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
| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | The pack's bytes as fetched. |
certificate | MintCertificate | The 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.