wrapTo
Defined in: wrap.ts:82
Wrap a node key — a keyspace key, a scope key, or one piece’s key — to a recipient.
The descriptor is authenticated, so a grant cannot be relabelled as one naming a different keyspace, scope or piece. The result is inert without the recipient’s private key, so it can be delivered or stored anywhere.
The grant carries the descriptor in canonical form, whoever built it, and nothing else: add informational fields to the returned grant if needed.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
recipientPublicKey | `0x${string}` |
key | Uint8Array |
input | GrantDescriptor |