code: func (rc *Client) isChaincodeInstalled(reqCtx reqContext.Context, req InstallCCRequest, peer fab.ProposalProcessor, retryOpts retry.Opts) (bool, error) {
  
  	chaincodeQueryResponse, err := resource.QueryInstalledChaincodes(reqCtx, peer, resource.WithRetry(retryOpts))
  	if err != nil {
  		return false, err
  	}
  
  	logger.Debugf("isChaincodeInstalled: %+v", chaincodeQueryResponse)
  
  	for _, chaincode := range chaincodeQueryResponse.Chaincodes {
  		if chaincode.Name == req.Name && chaincode.Version == req.Version && chaincode.Path == req.Path {
  			return true, nil
  		}
  	}
  
  	return false, nil
  }
docs: // isChaincodeInstalled verify if chaincode is installed on peer