Skip to content

OotleWallet

Defined in: ootle/src/wallet.ts:33

A wallet that manages multiple key providers (one per component address) and can sign transactions on behalf of any registered signer.

Mirrors OotleWallet from the Rust ootle-rs crate.

const wallet = new OotleWallet();
wallet.registerKeyProvider(myAddress, mySecretKeyWallet);
wallet.setDefaultSigner(myAddress);
const signed = await wallet.authorizeTransaction(unsignedTx);

new OotleWallet(): OotleWallet

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

OotleWallet

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

Defined in: ootle/src/wallet.ts:130

Produces a one-time spend-key signature for a stealth input using the default signer.

string

Uint8Array

Uint8Array

Uint8Array<ArrayBufferLike>[]

SignerStealthCrypto

Uint8Array

Promise<TransactionSignature>

when no default signer is configured.

when the default address has no registered provider.

when the default signer does not implement addStealthSignature.

Signer.addStealthSignature


authorizeTransaction(signerAddress, unsignedTx, sealPublicKey, authorizers): Promise<TransactionAuthorization>

Defined in: ootle/src/wallet.ts:153

Generates TransactionAuthorization (signatures) for a specific registered signer. Mirrors OotleWallet::authorize_transaction from ootle-rs.

authorizers is the transaction’s full authorizer set, this signer’s keys among them.

string

UnsignedTransactionV1

Uint8Array

Uint8Array<ArrayBufferLike>[]

Promise<TransactionAuthorization>

when no provider is registered for signerAddress.


authorizeTransactionAll(unsignedTx, sealPublicKey, authorizers?): Promise<TransactionAuthorization[]>

Defined in: ootle/src/wallet.ts:171

Collects authorizations from all registered key providers. Useful when a transaction requires multiple signers.

authorizers defaults to the keys of every registered provider; pass the full set when the transaction has authorizers outside this wallet.

UnsignedTransactionV1

Uint8Array

Uint8Array<ArrayBufferLike>[]

Promise<TransactionAuthorization[]>


getAddress(): Promise<string>

Defined in: ootle/src/wallet.ts:69

Returns the default signer address, or throws if none is set.

Promise<string>

when no default signer is configured.

Signer.getAddress


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

Defined in: ootle/src/wallet.ts:104

The default signer’s authorizer keys.

Promise<Uint8Array<ArrayBufferLike>[]>

when no default signer is configured.

when the default address has no registered provider.

Signer.getAuthorizerPublicKeys


getKeyProvider(address): Signer | undefined

Defined in: ootle/src/wallet.ts:185

Returns the key provider for a specific address, if registered.

string

Signer | undefined


getPublicKey(): Promise<Uint8Array<ArrayBufferLike>>

Defined in: ootle/src/wallet.ts:80

Promise<Uint8Array<ArrayBufferLike>>

when no default signer is configured.

when the default address has no registered provider.

Signer.getPublicKey


getSignerAddresses(): string[]

Defined in: ootle/src/wallet.ts:192

Returns all registered signer addresses.

string[]


getViewSecret(): Promise<Uint8Array<ArrayBufferLike>>

Defined in: ootle/src/wallet.ts:115

Returns the default signer’s view-only secret for stealth scanning/spending.

Promise<Uint8Array<ArrayBufferLike>>

when no default signer is configured.

when the default address has no registered provider.

when the default signer does not implement getViewSecret.

Signer.getViewSecret


registerKeyProvider(address, provider): this

Defined in: ootle/src/wallet.ts:47

Registers a key provider (a Signer) for the given component address.

Stealth capabilities (getViewSecret/addStealthSignature) are optional methods on Signer (see Signer); the stealth spend authorizer uses them when present.

string

Signer

this


setDefaultSigner(address): this

Defined in: ootle/src/wallet.ts:58

Sets the address used when signTransaction is called without specifying a signer.

string

this

when no key provider has been registered for address.


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

Defined in: ootle/src/wallet.ts:90

Signs using the default signer.

UnsignedTransactionV1

Uint8Array

Uint8Array<ArrayBufferLike>[]

Promise<TransactionSignature[]>

when no default signer is configured.

when the default address has no registered provider.

Signer.signTransaction