1. Install
POST api/v1/chaincode/installchaincodes
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 |
---|---|---|
peers | string array | The array of names of the peer nodes where the chaincode package will be installed. |
chaincode_package | string | The base64-encoded contexts of the chaincode package |
chaincode_label | string | The label that will be used to identify the installed chaincode package |
chaincode_type | string (optional) | The type of chaincode language (e.g. "golang") |
...
POST api/v1/chaincodes/<chaincode_name>/?operaions=<commit<install/approve/approve>commit>
Query Parameters | Type | Note |
---|---|---|
operations | string | HLF lifecycle command that deploys, approves, and commits a chaincode with several organizations |
...
Body Parameters | Type | Note |
---|---|---|
chaincode_label | string | The label that will be used to identify the installed chaincode package |
package_id | string | The package id of the chaincode package that will be installed. |
channel_id | string | The channel on which this command should be executed. |
version | string | the version of the chaincode definition to be approved |
signature_policy | string | Use a policy inside the channel configuration as the chaincode endorsement policy. |
peer | string array | The array of the id of the peer nodes. For commit only |
3.
...
List
PUT Get api/v1/chaincodes/<chaincode_name>
Update Get a channellist of chaincodes
Response Body |
---|
Type | Note |
---|
name | string | The |
name of the chaincode. | ||
chaincode_label | string | The label that will be used to identify the installed chaincode package |
version | string | the version of the chaincode definition to be approved |
package_ |
id | string | the package id of installed package |
3. List
Get api/v1/chaincodes/<chaincode_name>
Get a chaincodes
Response Body | Type | Note |
---|---|---|
name | string | The name of the chaincode. |
chaincode_label | string | The label that will be used to identify the installed chaincode package |
version | string | the version of the chaincode definition to be approved |
package_id | string | the package id of installed package |
package_id | string | the approval status |
organizations | ||
channel |