Skip to content

UnwrapResult

UnwrapResult<Brand, Kind> = { id: Id<Brand>; lookupKey: LookupKeyForKind<Kind>; ok: true; } | { error: UnwrapError; ok: false; }

Defined in: src/codecs/wrapped/index.ts:61

Result returned by WrappedKeyCodec.safeUnwrap.

On success, id is the canonical Id and lookupKey is the recovered integer (number for 32-bit kinds, bigint for 64-bit kinds). On failure, error is a ParseError for structural problems or "verification_failed" when the payload is structurally valid but the verification tag does not match any entry in the wrapping keyring.

Brand extends string

Kind extends WrappedKind