Caelus3,462 checksGitHubv0.25.0MIT
API Reference / verifyMintedPack · function

Function: verifyMintedPack()

function verifyMintedPack(bytes, certificate): Promise<ChebData>;

Decode a minted pack once its length and SHA-256 match the certificate.

Parameters

ParameterTypeDescription
bytesUint8ArrayThe pack's bytes as fetched.
certificateMintCertificateThe certificate published beside it.

Returns

Promise<ChebData>

The decoded pack.

Throws

MintIntegrityError when the bytes are not the ones the certificate was written for; nothing is decoded in that case.

Start building

Quickstart →