decodeGrant
decodeGrant(
bytes):DecodedGrant
Defined in: packages/keysmith/src/wrap.ts:273
Read a grant delivered as bytes, without opening it: to see what it names before unwrapping, or to pass to holdingOf.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bytes |
Uint8Array |
Returns
Section titled “Returns”Throws
Section titled “Throws”If the bytes are not one canonical CBOR map holding a version 2 grant, with every field the right type and size, a canonical node, and no unknown numbered field.