pub enum Message {
Show 25 variants CreateAccount(Box<AccountToCreate>), GetAccount(AccountIdentifier), GetAccounts, CallAccountMethod { account_id: AccountIdentifier, method: AccountMethod, }, Backup { destination: PathBuf, password: String, }, ChangeStrongholdPassword { current_password: String, new_password: String, }, ClearStrongholdPassword, IsStrongholdPasswordAvailable, RecoverAccounts { account_start_index: u32, account_gap_limit: u32, address_gap_limit: u32, sync_options: Option<SyncOptions>, }, RestoreBackup { source: PathBuf, password: String, }, RemoveLatestAccount, DeleteAccountsAndDatabase, GenerateMnemonic, VerifyMnemonic(String), SetClientOptions(Box<ClientOptions>), GetLedgerNanoStatus, GetNodeInfo { url: Option<String>, auth: Option<NodeAuth>, }, SetStrongholdPassword(String), SetStrongholdPasswordClearInterval(Option<u64>), StoreMnemonic(String), StartBackgroundSync { options: Option<SyncOptions>, interval_in_milliseconds: Option<u64>, }, StopBackgroundSync, EmitTestEvent(WalletEvent), Bech32ToHex(String), HexToBech32 { hex: String, bech32_hrp: Option<String>, },
}
Expand description

The messages that can be sent to the actor.

Variants

CreateAccount(Box<AccountToCreate>)

Creates an account. Expected response: Account

GetAccount(AccountIdentifier)

Read account. Expected response: Account

GetAccounts

Read accounts. Expected response: Accounts

CallAccountMethod

Fields

account_id: AccountIdentifier

The account identifier.

method: AccountMethod

The account method to call.

Consume an account method. Returns Response

Backup

Fields

destination: PathBuf

The backup destination.

password: String

Stronghold file password.

Backup storage. Password must be the current one, when Stronghold is used as SecretManager. Expected response: Ok

ChangeStrongholdPassword

Fields

current_password: String
new_password: String

Change the Stronghold password to another one and also re-encrypt the values in the loaded snapshot with it. Expected response: Ok

ClearStrongholdPassword

Clears the Stronghold password from memory. Expected response: Ok

IsStrongholdPasswordAvailable

Checks if the Stronghold password is available. Expected response: StrongholdPasswordIsAvailable

RecoverAccounts

Fields

account_start_index: u32

The index of the first account to search for.

account_gap_limit: u32

The number of accounts to search for, after the last account with unspent outputs.

address_gap_limit: u32

The number of addresses to search for, after the last address with unspent outputs, in each account.

sync_options: Option<SyncOptions>

Optional parameter to specify the sync options. The address_start_index and force_syncing fields will be overwritten to skip existing addresses.

Find accounts with unspent outputs Expected response: Accounts

RestoreBackup

Fields

source: PathBuf

The path to the backed up Stronghold.

password: String

Stronghold file password.

Restore a backup from a Stronghold file Replaces client_options, coin_type, secret_manager and accounts. Returns an error if accounts were already created If Stronghold is used as secret_manager, the existing Stronghold file will be overwritten. If a mnemonic was stored, it will be gone. Expected response: Ok

RemoveLatestAccount

Removes the latest account (account with the largest account index). Expected response: Ok

DeleteAccountsAndDatabase

Deletes the storage. Expected response: Ok

GenerateMnemonic

Generates a new mnemonic. Expected response: GeneratedMnemonic

VerifyMnemonic(String)

Checks if the given mnemonic is valid. Expected response: Ok

SetClientOptions(Box<ClientOptions>)

Updates the client options for all accounts. Expected response: Ok

GetLedgerNanoStatus

Get the ledger nano status Expected response: LedgerNanoStatus

GetNodeInfo

Fields

url: Option<String>

Url

auth: Option<NodeAuth>

Node authentication

Get the node information Expected response: NodeInfo

SetStrongholdPassword(String)

Set the stronghold password. Expected response: Ok

SetStrongholdPasswordClearInterval(Option<u64>)

Set the stronghold password clear interval. Expected response: Ok

StoreMnemonic(String)

Store a mnemonic into the Stronghold vault. Expected response: Ok

StartBackgroundSync

Fields

options: Option<SyncOptions>

Sync options

interval_in_milliseconds: Option<u64>

Interval in milliseconds

Start background syncing. Expected response: Ok

StopBackgroundSync

Stop background syncing. Expected response: Ok

EmitTestEvent(WalletEvent)

Emits an event for testing if the event system is working Expected response: Ok

Bech32ToHex(String)

Transforms bech32 to hex Expected response: HexAddress

HexToBech32

Fields

hex: String

Hex encoded bech32 address

bech32_hrp: Option<String>

Human readable part

Transforms a hex encoded address to a bech32 encoded address Expected response: Bech32Address

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more