code: func New(channelProvider context.ChannelProvider, opts ...ClientOption) (*Client, error) {
  
  	channelContext, err := channelProvider()
  	if err != nil {
  		return nil, errors.WithMessage(err, "failed to create channel context")
  	}
  
  	greylistProvider := greylist.New(channelContext.EndpointConfig().Timeout(fab.DiscoveryGreylistExpiry))
  
  	if channelContext.ChannelService() == nil {
  		return nil, errors.New("channel service not initialized")
  	}
  
  	eventService, err := channelContext.ChannelService().EventService()
  	if err != nil {
  		return nil, errors.WithMessage(err, "event service creation failed")
  	}
  
  	membership, err := channelContext.ChannelService().Membership()
  	if err != nil {
  		return nil, errors.WithMessage(err, "membership creation failed")
  	}
  
  	channelClient := newClient(channelContext, membership, eventService, greylistProvider)
  
  	for _, param := range opts {
  		err := param(&channelClient)
  		if err != nil {
  			return nil, errors.WithMessage(err, "option failed")
  		}
  	}
  
  	return &channelClient, nil
  }
docs: // New returns a Client instance. Channel client can query chaincode, execute chaincode and register/unregister for chaincode events on specific channel.