Skip to content

decodeGrant

decodeGrant(bytes): Grant & Record<string, unknown>

Defined in: wrap.ts:188

Read a grant delivered as bytes, without opening it: to see what it names before unwrapping, or to pass to holdingOf.

ParameterType
bytesUint8Array

Grant & Record<string, unknown>

If the bytes are not one canonical CBOR map holding a version 1 grant, with every field the right type and size and no unknown numbered field.