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: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.
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; 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.
authorizers
Section titled “authorizers”Uint8Array<ArrayBufferLike>[]
crypto
Section titled “crypto”viewSecret
Section titled “viewSecret”Uint8Array
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>
getAuthorizerPublicKeys()?
Section titled “getAuthorizerPublicKeys()?”
optionalgetAuthorizerPublicKeys():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).
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>[]>
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: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.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
signTransaction()
Section titled “signTransaction()”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.
Parameters
Section titled “Parameters”transaction
Section titled “transaction”UnsignedTransactionV1
sealPublicKey
Section titled “sealPublicKey”Uint8Array
authorizers
Section titled “authorizers”Uint8Array<ArrayBufferLike>[]
Returns
Section titled “Returns”Promise<TransactionSignature[]>