POST /notarize
Request notarization of given hash, return requestId of queued request. Tha hash must be a SHA256 type with 0x prefix.
Params
The body of the request must be a JSON object with the following fields:
Param | Description | Required |
---|---|---|
hash | Hash of document to notarize | Yes |
optionals | Object with webhookUrl, secret and metadata | No |
Usage
const axios = require('axios');
const endpoint = https://pablock-api-dev.bcode.cloud
const authToken = '<your-token>'
const optionals = {webhook: "https://example.com/webhook", metadata: {}}
const hash = "0xb133a0c0e9bee3be20163d2ad31d6248db292aa6dcb1ee087a2aa50e0fc75ae2"
let { status, data } = await axios.post(
`${endpoint}/notarize/`,
{ hash, ...optionals },
{
headers: {
Authorization : `Bearer ${authToken}`
}
}
);
const requestId = data.requestId