Struct diem_wallet::WalletLibrary [−][src]
pub struct WalletLibrary { /* fields omitted */ }Expand description
WalletLibrary contains all the information needed to recreate a particular wallet
Implementations
Constructor that generates a Mnemonic from OS randomness and subsequently instantiates an empty WalletLibrary from that Mnemonic
Constructor that instantiates a new WalletLibrary from Mnemonic
Function that returns the string representation of the WalletLibrary Mnemonic NOTE: This is not secure, and in general the mnemonic should be stored in encrypted format
Function that writes the wallet Mnemonic to file NOTE: This is not secure, and in general the Mnemonic would need to be decrypted before it can be written to file; otherwise the encrypted Mnemonic should be written to file
Recover wallet from input_file_path
Function that iterates from the current key_leaf until the supplied depth
pub fn new_address_at_child_number(
&mut self,
child_number: ChildNumber
) -> Result<AccountAddress>
pub fn new_address_at_child_number(
&mut self,
child_number: ChildNumber
) -> Result<AccountAddress>
Function that allows to get the address of a particular key at a certain ChildNumber
Function that generates a new key and adds it to the addr_map and subsequently returns the AuthenticationKey associated to the PrivateKey, along with it’s ChildNumber
Returns a list of all addresses controlled by this wallet that are currently held by the addr_map
Simple public function that allows to sign a Diem RawTransaction with the PrivateKey associated to a particular AccountAddress. If the PrivateKey associated to an AccountAddress is not contained in the addr_map, then this function will return an Error
Return private key for an address in the wallet
Return authentication key (AuthenticationKey) for an address in the wallet
Trait Implementations
WalletLibrary naturally support TransactionSigner trait.