Class: WalletMethodHandler
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new WalletMethodHandler(options?)
Parameters
| Name | Type | Description |
|---|---|---|
options? | WalletOptions | The wallet options. |
Properties
methodHandler
• methodHandler: any
Methods
callMethod
▸ callMethod(method): Promise<string>
Call a wallet method on the Rust backend.
Parameters
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
accountIndex | AccountId | The account index. |
method | __AccountMethod__ | The account method to call. |
Returns
Promise<string>
listen
▸ listen(eventTypes, callback): Promise<void>
Listen to wallet events.
Parameters
| Name | Type | Description |
|---|---|---|
eventTypes | WalletEventType[] | The wallet event types to listen for. |
callback | (error: Error, event: Event) => void | The 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>