pub struct Wallet { /* private fields */ }
Implementations§
Source§impl Wallet
impl Wallet
pub fn generate_mnemonic() -> Mnemonic
pub fn get_private_key_from_mnemonic( mnemonic: Mnemonic, account: u32, address_index: u32, ) -> PrivateKey
pub fn get_wallet_keys_mnemonic(mnemonic_str: String) -> (String, String)
pub fn from_private_key(priv_key: &str) -> Result<Wallet, Error>
pub fn from_pem_file(file_path: &str) -> Result<Wallet, Error>
pub fn from_pem_file_contents(contents: String) -> Result<Wallet, Error>
pub fn get_pem_decoded_content(file: &str) -> Vec<u8> ⓘ
pub fn get_wallet_keys_pem(file: &str) -> (String, String)
pub fn from_keystore_secret( file_path: &str, insert_password: InsertPassword, ) -> Result<Wallet, Error>
pub fn get_private_key_from_keystore_secret( file_path: &str, password: &str, ) -> Result<PrivateKey, Error>
pub fn address(&self) -> SdkAddress
👎Deprecated since 0.54.0: Renamed to
to_address
, type changed to multiversx_chain_core::types::Addresspub fn to_address(&self) -> Address
pub fn sign_tx(&self, unsign_tx: &Transaction) -> [u8; 64]
pub fn get_keystore_password() -> String
pub fn validate_keystore_password( path: &str, password: String, ) -> Result<DecryptionParams, WalletError>
pub fn decrypt_secret_key(decryption_params: DecryptionParams) -> Vec<u8> ⓘ
pub fn encrypt_keystore( data: &[u8], address: &Address, public_key: &str, password: &str, ) -> String
pub fn generate_pem_content( address: &Address, private_key: &str, public_key: &str, ) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Wallet
impl RefUnwindSafe for Wallet
impl Send for Wallet
impl Sync for Wallet
impl Unpin for Wallet
impl UnwindSafe for Wallet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
fn interpret_from(from: &T, _context: &InterpreterContext) -> T
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more