keyspaceKeys
keyspaceKeys(
signer,ref,options?):Promise<KeyspaceKeys>
Defined in: derive.ts:131
Sign for one keyspace and derive its key.
The signature is the root secret, and it never leaves this function: the caller gets the keyspace key and the public commitment, and has nothing else to guard.
For a new keyspace this signs twice and compares, which catches a
non-deterministic signer before any data depends on it, at the cost of a second
wallet prompt. For an existing one, pass the commitment its dataset records
(foc/kc): it signs once, and the commitment catches the same faults. See
KeyspaceKeysOptions.
Only the owner’s own wallet can sign: a key signed by any other wallet, a session key included, is not the key the owner’s wallet derives, and nothing downstream could tell. Delegates receive a grant instead.
The result carries the keyspace descriptor, so an owner writes the same way
a delegate does — writeTarget(descriptor, kk, scope) — with the keyspace
taken from what was actually signed.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
signer | TypedDataSigner |
ref | KeyspaceRef |
options | KeyspaceKeysOptions |
Returns
Section titled “Returns”Throws
Section titled “Throws”If the signer is not deterministic, is not the owner, does not produce an ECDSA signature,
or derives a key that does not match options.commitment.