You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

1. Install

POST api/v1/chaincode/install

The front end will allow uploading a chaincode package, which is a .tar.gz format file.

Install a chaincode: peer lifecycle install

Questions?:

After the chaincode is installed, do we need to expose the package identifier to the clients? 

Body Parameters

Type

Note

peersstring arrayThe array of names of the peer nodes where the chaincode package will be installed. 
chaincode_packagestringThe base64-encoded contexts of the chaincode package
chaincode_labelstring The label that will be used to identify the installed chaincode package
chaincode_typestring (optional)The type of chaincode language (e.g. "golang")



2. Deploy a Chaincode → Approve (may by several orgs), Commit

POST api/v1/chaincodes/<chaincode_name>/?operaions=<commit/approve>

Query Parameters

Type

Note

operationsstringHLF lifecycle command that deploys, approves, and commits a chaincode with several organizations


Body Parameters

Type

Note

chaincode_labelstringThe label that will be used to identify the installed chaincode package
package_id stringThe package id of the chaincode package that will be installed.
channel_idstringThe channel on which this command should be executed.
versionstring the version of the chaincode definition to be approved
signature_policystring Use a policy inside the channel configuration as the chaincode endorsement policy.
peerstring array The array of the id of the peer nodes. For commit only




3. Upgrade

PUT api/v1/chaincodes/<chaincode_name>

Update a channel

Body Parameters

Type

Note

channel_idstringThe channel on which this command should be executed.
chaincode_labelstringThe label that will be used to identify the installed chaincode package
versionstring the version of the chaincode definition to be approved
constructor_messagestring The constructor message for the chaincode is in JSON format.
policystring The endorsement policy associated with this chaincode
  • No labels