Signer
Defined in: signer.ts:81
Turns bytes into signatures; the only object that may hold a private key. Implement it to plug in a hardware wallet, MPC or a backend, or use LocalSigner, privateKeySigner or externalSigner.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”
readonlycurve:SignerCurve
Defined in: signer.ts:85
The curve this signer signs with. Chain packages assert the one they need.
readonlykind:"seed"|"key"|"external"
Defined in: signer.ts:83
Where the key lives: derived from a seed, one imported key, or outside the SDK.
schemes
Section titled “schemes”
readonlyschemes: readonlySignScheme[]
Defined in: signer.ts:87
Schemes this signer can produce; asking for another throws SignerError.
Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose():
void
Defined in: signer.ts:93
Zeroize key material. Idempotent; the signer is unusable afterwards.
Returns
Section titled “Returns”void
getPublicKey()
Section titled “getPublicKey()”getPublicKey():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: signer.ts:89
Compressed 33-byte secp256k1 or 32-byte ed25519 public key.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
sign()
Section titled “sign()”sign(
payload,options?):Promise<Uint8Array<ArrayBufferLike>>
Defined in: signer.ts:91
Sign an already-hashed or already-serialised payload. Chains decide what the bytes are.
Parameters
Section titled “Parameters”payload
Section titled “payload”Uint8Array
options?
Section titled “options?”Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>