LocalSigner
Defined in: signer.ts:184
Local key signer: the key lives in one Uint8Array, zeroized by dispose().
Built from a seed (derivable), from a seed as a leaf (leafFromSeed: no seed
kept), or from a raw derived key (leaf only).
Implements
Section titled “Implements”Properties
Section titled “Properties”
readonlycurve:SignerCurve
Defined in: signer.ts:187
Curve of the key.
Implementation of
Section titled “Implementation of”
readonlykind:"seed"
Defined in: signer.ts:185
Where the key lives: derived from a seed, one imported key, or outside the SDK.
Implementation of
Section titled “Implementation of”
readonlypath:string
Defined in: signer.ts:189
Derivation path of this key.
Implementation of
Section titled “Implementation of”publicKey
Section titled “publicKey”
readonlypublicKey:Uint8Array
Defined in: signer.ts:191
Public key, available without a call.
schemes
Section titled “schemes”
readonlyschemes: readonlySignScheme[]
Defined in: signer.ts:193
Every scheme a local key on this curve can produce.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”derive()
Section titled “derive()”derive(
relativePath):Promise<LocalSigner>
Defined in: signer.ts:281
A child signer at path/relativePath that keeps a seed copy and can derive further.
Parameters
Section titled “Parameters”relativePath
Section titled “relativePath”string
Returns
Section titled “Returns”Promise<LocalSigner>
Throws
Section titled “Throws”SignerError when this signer has no seed (built with fromPrivateKey or
leafFromSeed) or was disposed.
Implementation of
Section titled “Implementation of”deriveLeaf()
Section titled “deriveLeaf()”deriveLeaf(
relativePath):Promise<LocalSigner>
Defined in: signer.ts:289
Like derive, but the child keeps only its own key (no seed copy) and cannot derive further. What managers use for accounts.
Parameters
Section titled “Parameters”relativePath
Section titled “relativePath”string
Returns
Section titled “Returns”Promise<LocalSigner>
Implementation of
Section titled “Implementation of”dispose()
Section titled “dispose()”dispose():
void
Defined in: signer.ts:298
Zeroize the private key and any seed copy. Idempotent; signing afterwards throws.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”getPublicKey()
Section titled “getPublicKey()”getPublicKey():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: signer.ts:230
The public key; same as LocalSigner.publicKey.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
Implementation of
Section titled “Implementation of”sign()
Section titled “sign()”sign(
payload,options?):Promise<Uint8Array<ArrayBufferLike>>
Defined in: signer.ts:241
Sign payload with the requested scheme (the curve’s default when omitted).
Parameters
Section titled “Parameters”payload
Section titled “payload”Uint8Array
options?
Section titled “options?”SignOptions = {}
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
Throws
Section titled “Throws”SignerError after dispose(), for a scheme this curve cannot produce, a
payload of the wrong length, or a tweak outside schnorr.
Implementation of
Section titled “Implementation of”toJSON()
Section titled “toJSON()”toJSON():
object
Defined in: signer.ts:225
Public view only, for logs and serializers.
Returns
Section titled “Returns”object
curve:
SignerCurve
kind:
"seed"
path:
string
publicKey
Section titled “publicKey”publicKey:
string
fromPrivateKey()
Section titled “fromPrivateKey()”
staticfromPrivateKey(curve,privateKey,publicKey,path):LocalSigner
Defined in: signer.ts:220
Wrap an already-derived key. Cannot derive children. Takes ownership of privateKey (zeroized on dispose).
Parameters
Section titled “Parameters”privateKey
Section titled “privateKey”Uint8Array
publicKey
Section titled “publicKey”Uint8Array
string
Returns
Section titled “Returns”LocalSigner
fromSeed()
Section titled “fromSeed()”
staticfromSeed(seed,curve,path):LocalSigner
Defined in: signer.ts:204
Derive the key at path from the 64-byte BIP-39 seed. Keeps a COPY of the seed so it can derive children.
Parameters
Section titled “Parameters”Uint8Array
string
Returns
Section titled “Returns”LocalSigner
leafFromSeed()
Section titled “leafFromSeed()”
staticleafFromSeed(seed,curve,path):LocalSigner
Defined in: signer.ts:214
Derive the key at path from the seed and keep ONLY that key: the signer
cannot derive children and holds no copy of the seed. What chain managers
hand to accounts, so an account never carries the master seed.
Parameters
Section titled “Parameters”Uint8Array
string
Returns
Section titled “Returns”LocalSigner