All URIs are relative to https://gw.api.cloud.sphereon.com/blockchain/easy/0.10
Method | HTTP request | Description |
---|---|---|
chainIdExists | GET /{context}/chains/id/{chainId} | Determine chain id exists |
determineChainId | POST /{context}/chains/id | Predetermine id of chain |
determineEntryId | POST /{context}/chains/id/{chainId}/entries | Predetermine id of an entry |
entryIdExists | GET /{context}/chains/id/{chainId}/entries/{entryId} | Determine entry id exists |
IdResponse chainIdExists(context, chainId)
Determine chain id exists
Determine whether the Id of a chain exists in the blockchain
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.IdApi();
var context = "context_example"; // String | context
var chainId = "chainId_example"; // String | chainId
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.chainIdExists(context, chainId, callback);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
IdResponse determineChainId(context, chain, opts)
Predetermine id of chain
Pre determine the Id of a chain without anchoring it in the blockchain. You determine the Id that the chain would receive once it would have been anchored
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.IdApi();
var context = "context_example"; // String | context
var chain = new EasyBlockchainApi.Chain(); // Chain | Determine a chain hash. The entry needs at least a (combination of) globally unique external Id in the complete Blockchain network!
var opts = {
'checkExistence': false // Boolean | Check whether the id exists
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.determineChainId(context, chain, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chain | Chain | Determine a chain hash. The entry needs at least a (combination of) globally unique external Id in the complete Blockchain network! | |
checkExistence | Boolean | Check whether the id exists | [optional] [default to false] |
- Content-Type: application/json;charset=UTF-8
- Accept: application/json;charset=UTF-8
IdResponse determineEntryId(context, chainId, entry, opts)
Predetermine id of an entry
Pre determine the Id of an entry request without anchoring the entry
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.IdApi();
var context = "context_example"; // String | context
var chainId = "chainId_example"; // String | chainId
var entry = new EasyBlockchainApi.Entry(); // Entry | The entry to determine the hash for on the specified chain
var opts = {
'checkExistence': false // Boolean | Check whether the id exists
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.determineEntryId(context, chainId, entry, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entry | Entry | The entry to determine the hash for on the specified chain | |
checkExistence | Boolean | Check whether the id exists | [optional] [default to false] |
- Content-Type: application/json;charset=UTF-8
- Accept: application/json;charset=UTF-8
IdResponse entryIdExists(context, chainId, entryId)
Determine entry id exists
Determine whether the Id of an entry exists in the blockchain
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.IdApi();
var context = "context_example"; // String | context
var chainId = "chainId_example"; // String | chainId
var entryId = "entryId_example"; // String | entryId
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.entryIdExists(context, chainId, entryId, callback);
Name | Type | Description | Notes |
---|---|---|---|
context | String | context | |
chainId | String | chainId | |
entryId | String | entryId |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8