GET /v2/checkStatus/
Request to check notarization status containing transaction status, receipt, ethereum anchor tx and ethereum merkletree reference.
Params
Param | Type | Description |
---|---|---|
hash | string | Status of |
txHash | string | IPFS uri of merkle tree |
requestId | string | Polygon transaction object |
params | array | Array of element to include as "eth" key |
The params can be compined, if hash and txHash are present it will use them, otherwise if requestId is passed, it will use it.
Return
The POST request return an object containing the follow properties:
Param | Type | Description |
---|---|---|
status | string | Status of |
bundleMerkleTree | string | IPFS uri of merkle tree |
tx | object | Polygon transaction object |
receipt | object | Polygon receipt object |
ethTx | object | Ethereum transaction object |
decodedData | object | Proof |
merkleTree | object | Merkle tree of hashes |
receiptTimestamp | number | Timestamp of receipt |
network | string | Network name |
Usage
const axios = require('axios');
const endpoint = https://pablock-api-dev.bcode.cloud
const authToken = '<your-token>'
const requestId = '<request-id>'
let {
status,
data,
} = await axios.get(`${this.endpoint}/v2/checkStatus?requestId=${requestId}`, {
headers: {
Authorization: `Bearer ${this.authToken}`,
},
});
or
const axios = require('axios');
const endpoint = https://pablock-api-dev.bcode.cloud
const authToken = '<your-token>'
const hash = '<hash>'
const txHash = '<txHash>'
let {
status,
data,
} = await axios.get(`${this.endpoint}/v2/checkStatus?hash=${requestId}&txHash=${txHash}`, {
headers: {
Authorization: `Bearer ${this.authToken}`,
},
});