Skip to content

Signer

Defined in: ootle/src/signer.ts:10

A Signer is responsible only for signing. It has no read or submit capability. Implementations include SecretKeyWallet (local WASM signing) and WalletDaemonSigner (remote daemon).

optional addStealthSignature(unsignedJson, publicNonce, sealPublicKey, ctx): Promise<TransactionSignature>

Defined in: ootle/src/signer.ts:71

Produces a one-time spend-key signature for a stealth input.

The signer derives the one-time spend scalar (c + k, keyed on the view secret ctx.viewSecret) for the owned stealth UTXO via ctx.crypto.stealthDhSecret(...) and signs the transaction hash with it.

Optional — only signers that hold the owner secret (e.g. SecretKeyWallet) can implement this. Daemon-delegated stealth is server-side and out of scope here.

string

The (compact) JSON of the unsigned transaction to hash + sign.

Uint8Array

The stealth output’s sender public nonce (the DH counterparty).

Uint8Array

The seal signer’s public key, mixed into the transaction hash (mirrors the hashUnsignedTransaction arg used by Signer.signTransaction).

Injected crypto seam, so the signer never imports WASM directly; the owner’s 32-byte view secret, which the one-time spend key is derived from; and the transaction’s full authorizer set, which includes the one-time spend public key.

Uint8Array<ArrayBufferLike>[]

SignerStealthCrypto

Uint8Array

Promise<TransactionSignature>


getAddress(): Promise<string>

Defined in: ootle/src/signer.ts:12

Returns the component address derived from this signer’s public key.

Promise<string>


optional getAuthorizerPublicKeys(): Promise<Uint8Array<ArrayBufferLike>[]>

Defined in: ootle/src/signer.ts:25

The public keys this signer authorizes with, for the transaction’s authorizer set.

Optional — defaults to [await getPublicKey()]. Every authorizer signs over the full set, so signTransaction (the free function) collects it from all signers before any of them signs. Implement this only for a signer that contributes signatures from keys other than getPublicKey (or more than one).

Promise<Uint8Array<ArrayBufferLike>[]>


getPublicKey(): Promise<Uint8Array<ArrayBufferLike>>

Defined in: ootle/src/signer.ts:15

Returns the raw public key bytes for this signer.

Promise<Uint8Array<ArrayBufferLike>>


optional getViewSecret(): Promise<Uint8Array<ArrayBufferLike>>

Defined in: ootle/src/signer.ts:51

Returns the view-only secret for stealth scanning/spending, if this signer holds one.

Optional — a signer may not hold a view secret (e.g. EphemeralKeySigner has no view key; WalletDaemonSigner keeps it server-side). The spend authorizer treats this as a fallback: it takes the view secret explicitly from the transfer spec and only calls this when the spec does not carry one.

Promise<Uint8Array<ArrayBufferLike>>


signTransaction(transaction, sealPublicKey, authorizers): Promise<TransactionSignature[]>

Defined in: ootle/src/signer.ts:37

Signs the given unsigned transaction and returns the collected signatures.

sealPublicKey and authorizers are mixed into the transaction hash (hashUnsignedTransaction(json, sealPublicKey, encodeAuthorizerSet(authorizers))) so every signature in the final envelope verifies against the SAME hash — the engine’s seal verification enforces this. authorizers is the public key of every authorizer of the transaction, this signer’s among them; the sealed transaction must carry an authorization from each key and no other. Implementations MUST hash with the supplied values, not their own.

UnsignedTransactionV1

Uint8Array

Uint8Array<ArrayBufferLike>[]

Promise<TransactionSignature[]>