github.com/defanghe/fabric@v2.1.1+incompatible/docs/wrappers/peer_chaincode_preamble.md (about) 1 # peer chaincode 2 3 The `peer chaincode` command allows administrators to perform chaincode 4 related operations on a peer, such as installing, instantiating, invoking, 5 packaging, querying, and upgrading chaincode. 6 7 ## Syntax 8 9 The `peer chaincode` command has the following subcommands: 10 11 * install 12 * instantiate 13 * invoke 14 * list 15 * package 16 * query 17 * signpackage 18 * upgrade 19 20 The different subcommand options (install, instantiate...) relate to the 21 different chaincode operations that are relevant to a peer. For example, use the 22 `peer chaincode install` subcommand option to install a chaincode on a peer, or 23 the `peer chaincode query` subcommand option to query a chaincode for the 24 current value on a peer's ledger. 25 26 Each peer chaincode subcommand is described together with its options in its own 27 section in this topic. 28 29 ## Flags 30 31 Each `peer chaincode` subcommand has both a set of flags specific to an 32 individual subcommand, as well as a set of global flags that relate to all 33 `peer chaincode` subcommands. Not all subcommands would use these flags. 34 For instance, the `query` subcommand does not need the `--orderer` flag. 35 36 The individual flags are described with the relevant subcommand. The global 37 flags are 38 39 * `--cafile <string>` 40 41 Path to file containing PEM-encoded trusted certificate(s) for the ordering 42 endpoint 43 44 * `--certfile <string>` 45 46 Path to file containing PEM-encoded X509 public key to use for mutual TLS 47 communication with the orderer endpoint 48 49 * `--keyfile <string>` 50 51 Path to file containing PEM-encoded private key to use for mutual TLS 52 communication with the orderer endpoint 53 54 * `-o` or `--orderer <string>` 55 56 Ordering service endpoint specified as `<hostname or IP address>:<port>` 57 58 * `--ordererTLSHostnameOverride <string>` 59 60 The hostname override to use when validating the TLS connection to the orderer 61 62 * `--tls` 63 64 Use TLS when communicating with the orderer endpoint 65 66 * `--transient <string>` 67 68 Transient map of arguments in JSON encoding