Skip to content

wrapTo

wrapTo(recipientPublicKey, key, input): Promise<Grant>

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.

ParameterType
recipientPublicKey`0x${string}`
keyUint8Array
inputGrantDescriptor

Promise<Grant>