Notarization
The main goal of Notarization.cloud project is to provide a service to write hash of data on to the blockchain, to give the possibility to the users to give legal valididty to the data.
In BcodeSDK we have integrated functions to notarize and check notarization status.
In Bcode notarization service, to increase the throughput of our system, we bundle more notarizations using merkle tree algorithm. To ensure reproducibility we bind the merkle root hash with the array of notarizations, uploaded on IPFS.
To notarize a hash, after BcodeSDK initailization we execute:
const requestId = await bcode.notarizeHash(hash);
The return value is a id usefull to query transaction status. Webhook can be used to get notified when transaction is completed with success or failed status. In the webhook call can be included a metadata key with data passed in notarizeHash call. Otherwise if webhook is not needed, transaction status can be queried with:
const res = await sdk.checkStatus(requestId);
The return value contains:
- status: "success" | "failed" | "pending" | "queued" | "mined"
- tx: EVM transaction object
- receipt: EVM receipt object
- ethTx: EVM receipt object