peer chaincode

The peer chaincode command allows administrators to perform chaincode related operations on a peer, such as installing, instantiating, invoking, packaging, querying, and upgrading chaincode.

Syntax

The peer chaincode command has the following subcommands:

The different subcommand options (install, instantiate...) relate to the different chaincode operations that are relevant to a peer. For example, use the peer chaincode install subcommand option to install a chaincode on a peer, or the peer chaincode query subcommand option to query a chaincode for the current value on a peer's ledger.

Each peer chaincode subcommand is described together with its options in its own section in this topic.

Flags

Each peer chaincode subcommand has both a set of flags specific to an individual subcommand, as well as a set of global flags that relate to all peer chaincode subcommands. Not all subcommands would use these flags. For instance, the query subcommand does not need the --orderer flag.

The individual flags are described with the relevant subcommand. The global flags are

Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint

Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint

Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint

Ordering service endpoint specified as <hostname or IP address>:<port>

The hostname override to use when validating the TLS connection to the orderer

Use TLS when communicating with the orderer endpoint

Transient map of arguments in JSON encoding