Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1. Install

POST api/v1/chaincodeschaincode/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? 

Chaincode Version?string

Body Parameters

Type

Note

peersarraythe version of the chaincode
Peersarrayan array of peer nodes
Chaincode FilestringPackage 
The 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")Descriptionstring 



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

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

Query Parameters

Type

Note

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


string

Body Parameters

Type

Note

Namechaincode_labelstringChannel The label that will be used to identify the installed chaincode package
package_id stringname The package id of the chaincode package that will be installed.
channelChaincode Version_idstringThe channel on which this command should be executed.
versionstring the version of the chaincode
Initialization Functionstring Chaincode function that will be invoked
definition to be approved
signature-policyarray Use a policy inside the channel configuration as the chaincode endorsement policy.
peerarray The array of id of the peer nodes. For commit onlyOrganizations array an array of endorsing organization ids




3. Upgrade

PUT api/v1/chaincodes/<chaincode_name>

Update a channel

string 

Body Parameters

Type

Note

Namechannel_idstringChannel The channel on which this command should be executed.
chaincode_labelstringThe label that will be used to identify the installed chaincode package
versionstring name of the channelChaincode Versionstringthe version of chain code
Organizations array an array of organization ids
Languagestring?
Chaincode Filestring?
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 chaincodeDescription