Skip to content
docs

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.

readonly curve: SignerCurve

Defined in: signer.ts:85

The curve this signer signs with. Chain packages assert the one they need.


readonly kind: "seed" | "key" | "external"

Defined in: signer.ts:83

Where the key lives: derived from a seed, one imported key, or outside the SDK.


readonly schemes: readonly SignScheme[]

Defined in: signer.ts:87

Schemes this signer can produce; asking for another throws SignerError.

dispose(): void

Defined in: signer.ts:93

Zeroize key material. Idempotent; the signer is unusable afterwards.

void


getPublicKey(): Promise<Uint8Array<ArrayBufferLike>>

Defined in: signer.ts:89

Compressed 33-byte secp256k1 or 32-byte ed25519 public key.

Promise<Uint8Array<ArrayBufferLike>>


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.

Uint8Array

SignOptions

Promise<Uint8Array<ArrayBufferLike>>