Skip to content

encodeGrant

encodeGrant<G>(grant): Uint8Array

Defined in: wrap.ts:160

Pack the grant to deliver or store it

{ 0: v, 1: node, 2: owner (20 bytes), 3: keyspace (16 bytes),
4: epk (65 bytes), 5: iv (12 bytes), 6: ct (48 bytes), * text: informational }

Fields with text keys carry anything informational added to the grant, such as a piece’s CID. These informational keys are not authenticated.

Type Parameter
G extends Grant
ParameterType
grantG

Uint8Array