Skip to main content

Class: WalletMethodHandler

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new WalletMethodHandler(options?)

Parameters​

NameTypeDescription
options?WalletOptionsThe wallet options.

Properties​

methodHandler​

• methodHandler: any

Methods​

callMethod​

▸ callMethod(method): Promise<string>

Call a wallet method on the Rust backend.

Parameters​

NameTypeDescription
method__Method__The wallet method to call.

Returns​

Promise<string>


callAccountMethod​

▸ callAccountMethod(accountIndex, method): Promise<string>

Call an account method on the Rust backend.

Parameters​

NameTypeDescription
accountIndexAccountIdThe account index.
method__AccountMethod__The account method to call.

Returns​

Promise<string>


listen​

▸ listen(eventTypes, callback): Promise<void>

Listen to wallet events.

Parameters​

NameTypeDescription
eventTypesWalletEventType[]The wallet event types to listen for.
callback(error: Error, event: Event) => voidThe callback function to call when an event is received.

Returns​

Promise<void>


destroy​

▸ destroy(): Promise<void>

Returns​

Promise<void>


getClient​

▸ getClient(): Promise<Client>

Get the client associated with the wallet.

Returns​

Promise<Client>


getSecretManager​

▸ getSecretManager(): Promise<SecretManager>

Get the secret manager associated with the wallet.

Returns​

Promise<SecretManager>