Skip to content

holdingOf

holdingOf(grant): Holding

Defined in: derive.ts:661

Which node a grant carries, ready to pass to keyForEnvelope.

A group key, a group’s key and a piece key are all 32 bytes of HKDF output, so nothing distinguishes them once unwrapped — but the grant that delivered the key does, so keep the whole grant, not just the key.

Takes a full grant or just { node }. For an in-memory descriptor, v may be absent but, if present, must be exactly 2 (see assertFormatVersion). Only decoded bytes (decodeGrant, unwrapWith) require v: 2.

Parameter Type
grant Pick<GrantDescriptor, "node"> & object

Holding

If v is present and not 2 (v 1 is keysmith 0.1.0’s), or the node is not one this version understands.