Enum iota_wallet::message_interface::Message
source · [−]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
Backup storage. Password must be the current one, when Stronghold is used as SecretManager.
Expected response: Ok
ChangeStrongholdPassword
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
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
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
Transforms a hex encoded address to a bech32 encoded address
Expected response: Bech32Address
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more