Skip to content

readPieceMetadata

readPieceMetadata(envelopeMetadata): PieceMetadataView

Defined in: derive.ts:466

Read a piece’s envelope metadata (foc/v 2: foc/gkid, foc/group) into one canonical shape.

Takes the metadata as FEE returns it (info.appMetadata), unvalidated.

Parameter Type
envelopeMetadata PieceMetadataV2 | Readonly<Record<string, unknown>> | undefined

PieceMetadataView

If foc/v is not 2 (an envelope from keysmith 0.1.0 is foc/v 1, or foc/ks), or a field is malformed.