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).
Methods
Section titled “Methods”addStealthSignature()?
Section titled “addStealthSignature()?”
optionaladdStealthSignature(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.
Parameters
Section titled “Parameters”unsignedJson
Section titled “unsignedJson”string
The (compact) JSON of the unsigned transaction to hash + sign.
publicNonce
Section titled “publicNonce”Uint8Array
The stealth output’s sender public nonce (the DH counterparty).
sealPublicKey
Section titled “sealPublicKey”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.
crypto
Section titled “crypto”Returns
Section titled “Returns”Promise<TransactionSignature>
getAddress()
Section titled “getAddress()”getAddress():
Promise<string>
Defined in: ootle/src/signer.ts:12
Returns the component address derived from this signer’s public key.
Returns
Section titled “Returns”Promise<string>
getPublicKey()
Section titled “getPublicKey()”getPublicKey():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: ootle/src/signer.ts:15
Returns the raw public key bytes for this signer.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
getViewSecret()?
Section titled “getViewSecret()?”
optionalgetViewSecret():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.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
signTransaction()
Section titled “signTransaction()”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.
Parameters
Section titled “Parameters”transaction
Section titled “transaction”UnsignedTransactionV1
sealPublicKey
Section titled “sealPublicKey”Uint8Array
Returns
Section titled “Returns”Promise<TransactionSignature[]>