Skip to content

OotleWallet

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

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

OotleWallet

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

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

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

string

UnsignedTransactionV1

Uint8Array

Promise<TransactionAuthorization>

when no provider is registered for signerAddress.


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

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

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

UnsignedTransactionV1

Uint8Array

Promise<TransactionAuthorization[]>


getAddress(): Promise<string>

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

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

Promise<string>

when no default signer is configured.

Signer.getAddress


getKeyProvider(address): Signer | undefined

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

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

string

Signer | undefined


getPublicKey(): Promise<Uint8Array<ArrayBufferLike>>

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

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

Returns all registered signer addresses.

string[]


registerKeyProvider(address, provider): this

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

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

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

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

Signs using the default signer.

UnsignedTransactionV1

Uint8Array

Promise<TransactionSignature[]>

when no default signer is configured.

when the default address has no registered provider.

Signer.signTransaction