{"modulePath":"github.com/2lambda123/hyperledger-fabric","version":"v1.4.12","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package chaincode\n\n## Functions\n\n```go\nfunc ChaincodeInvokeOrQuery(\n\tspec *pb.ChaincodeSpec,\n\tcID string,\n\ttxID string,\n\tinvoke bool,\n\tsigner msp.SigningIdentity,\n\tcertificate tls.Certificate,\n\tendorserClients []pb.EndorserClient,\n\tdeliverClients []api.PeerDeliverClient,\n\tbc common.BroadcastClient,\n) (*pb.ProposalResponse, error)\n```\nChaincodeInvokeOrQuery invokes or queries the chaincode. If successful, the INVOKE form prints the ProposalResponse to STDOUT, and the QUERY form prints the query result on STDOUT. A command-line flag (-r, --raw) determines whether the query result is output as raw bytes, or as a printable string. The printable form is optionally (-x, --hex) a hexadecimal representation of the query response. If the query response is NIL, nothing is output.\n\nNOTE - Query will likely go away as all interactions with the endorser are Proposal and ProposalResponses\n\n```go\nfunc Cmd(cf *ChaincodeCmdFactory) *cobra.Command\n```\nCmd returns the cobra command for Chaincode\n\n## Types\n\n```go\ntype ChaincodeCmdFactory struct {\n\tEndorserClients []pb.EndorserClient\n\tDeliverClients  []api.PeerDeliverClient\n\tCertificate     tls.Certificate\n\tSigner          msp.SigningIdentity\n\tBroadcastClient common.BroadcastClient\n}\n```\nChaincodeCmdFactory holds the clients used by ChaincodeCmd\n\n```go\nfunc InitCmdFactory(cmdName string, isEndorserRequired, isOrdererRequired bool) (*ChaincodeCmdFactory, error)\n```\nInitCmdFactory init the ChaincodeCmdFactory with default clients\n\n","path":"github.com/2lambda123/hyperledger-fabric/peer/chaincode","name":"chaincode","synopsis":"","isRedistributable":true}
