All URIs are relative to https://gw.api.cloud.sphereon.com/blockchain/easy/0.10
| Method | HTTP request | Description |
|---|---|---|
| createChain | POST /{context}/chains | Create a new chain |
CommittedChainResponse createChain(context, chain)
Create a new chain
Create a new chain. Create a new chain. You can regard a chain as a blockchain within a blockchain, All entries in a chain are linked and relies on data from previous entries in the chain.
var EasyBlockchainApi = require('easy_blockchain_api');
var defaultClient = EasyBlockchainApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new EasyBlockchainApi.ChainApi();
var context = "context_example"; // String | context
var chain = new EasyBlockchainApi.Chain(); // Chain | Create a chain using the first entry supplied. The entry needs at least a (combination of) globaly unique external Id in the complete Blockchain network!
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createChain(context, chain, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| context | String | context | |
| chain | Chain | Create a chain using the first entry supplied. The entry needs at least a (combination of) globaly unique external Id in the complete Blockchain network! |
- Content-Type: application/json;charset=UTF-8
- Accept: application/json;charset=UTF-8