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:52

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

The signer derives the one-time spend scalar (c + k) 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.

SignerStealthCrypto

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>


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:35

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): Promise<TransactionSignature[]>

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

Signs the given unsigned transaction and returns the collected signatures.

sealPublicKey is mixed into the transaction hash (hashUnsignedTransaction(JSON.stringify(tx), sealPublicKey)) so every signature in the final envelope verifies against the SAME hash — the engine’s seal verification enforces this. Implementations MUST hash with the supplied sealPublicKey, not their own.

UnsignedTransactionV1

Uint8Array

Promise<TransactionSignature[]>