notarizeHash
Request notarization of given hash, return requestId of queued request. Tha hash must be a SHA256 type with 0x prefix.
Params
Param | Description |
---|---|
hash | Hash of document to notarize |
optionals | Object with webhookUrl, secret and metadata |
Usage
type Optionals = {
webhookUrl: string | null,
metadata: { [key: string]: any } | null,
secret: string | null, // Unused field
};
import { BcodeSDK } from "@bcode-tech/bcode-sdk";
const fun = () => {
const sdk = new BcodeSDK({
apiKey: "your-api-key",
config: { env: "MUMBAI" },
});
const requestId = await sdk.notarizeHash(
"0xb133a0c0e9bee3be20163d2ad31d6248db292aa6dcb1ee087a2aa50e0fc75ae2"
);
const requestId2 = await sdk.notarizeHash(
"0xb133a0c0e9bee3be20163d2ad31d6248db292aa6dcb1ee087a2aa50e0fc75ae2", {
webhookUrl: "https://example.com/webhook"
}
);
};