BlockVault Endpoints
Generate Scope Transaction
Used to generate a Provenance Blockchain scope transaction message without submitting it.
URL: https://{host}/api/v1/p8e/tx/generate
Method: POST
Request Body:
{
"account": {
"keyRingIndex": "0",
"keyIndex": "0",
"partyType": "OWNER",
},
"permissions": {
"audiences": [],
"permissionDart": false,
"permissionPortfolioManager": false
},
"contractSpecId": "f97ecc5d-c580-478d-be02-6c1b0c32235f",
"scopeSpecId": "551b5eca-921d-4ba7-aded-3966b224f44b",
"scopeId": <scope uuid>,
"contractInput": <string of contract input>
}
Field | Description | Data Type |
---|---|---|
account/keyRingIndex | The key ring index. Used to identify the provenance account. | String |
account/keyIndex | The key index. Used to identify the provenance account. | String |
permissions/audiences | Additional audiences that should be allowed permission to query against the saved data in EOS | List<Base64EncodedPublicKey> |
permissions/permissionDart | If the dart product should be allowed permission against the saved data in EOS. | Bool |
permissions/permissionPortfolioManager | If the portfolio manager product should be allowed permission against the saved data in EOS. | Bool |
contractSpecId | The contract specification id. denote the Contracts/Processes that will be used to manage the data within a scope. | String |
scopeSpecId | The scope specification id. indicates a set of allowed Contract Specifications that are allowed to be used against a given scope to perform updates. | String |
scopeId | The scope id that defines the set of records | String |
contractInput | The string representation of the input to the contract to run | String |
account/isTestNet | If true, testnet shall be used, otherwise mainnet | Bool |
Response
Sample Response
Field | Description | Data Type |
---|---|---|
json | JSON object containing the fully formed set of messages to be sent to Provenance for contract execution | JSON Object |
base64 | Base 64 encoded versions of those same messages provided as JSON above | String |
Execute Transaction on Provenance
Used to send a transaction proposal message to be executed by the Provenance Blockchain network.
URL: https://{host}/api/v1/p8e/tx/execute
Method: POST
Request Body:
{
"chainId": "pio-testnet-1",
"nodeEndpoint": "grpc://192.168.1.242:9090",
"tx": <tx body>,
"account": {
"keyRingIndex": "0",
"keyIndex": "0",
"partyType": "OWNER",
},
}
Field | Description | Data Type |
---|---|---|
chainId | The blockchain identifier | String |
nodeEndpoint | The url to the provenance node to run against | String |
tx | The tx body that should be broadcast to provenance | String |
account/keyRingIndex | The key ring index. Used to identify the provenance account. | String |
account/keyIndex | The key index. Used to identify the provenance account. | String |
account/isTestNet | If true, testnet shall be used, otherwise mainnet | Bool |
Response
{
"hash": <result of the contract execution provided as a hash>,
"gasWanted": <nhash value>,
"gasUsed": <nhash value>,
"height": <block height>
}
Field | Description | Data Type |
---|---|---|
hash | The returned hash of the record stored on the Provenance ledger | String |
gasWanted | The gas estimated and supplied for contract execution | String |
gasUsed | The gas used during contract execution | String |
height | The block height when the transaction was committed to the ledger | String |