You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let spend_str = "f644de91c7defae58ff9136dcc8b03a2059fda3294865065f86554d3aaeb310c";let view_str = "3dd9d71a6fe2b909e1603c9ac325f13f2c6ac965e7e1ec98e5e666ed84b4d40c";let wallet = Wallet::from_secret_string(String::from(spend_str),String::from(view_str));
Wallet File processing
load and save wallet
// Create a wallet objectletmut wallet = Wallet::new();// Load wallet from a wallet file with a password.
wallet.load(String::from("tests/vig.wallet"),String::from(""));// Save current wallet to a new file with a new password.
wallet.save(String::from("tests/vig-new.wallet"),String::from("abcd"));
Wallet instance functions
Wallet Address generation
to Address
let prefix:u64 = 0x3d;letmut wallet = Wallet::new();
wallet.load(String::from("tests/vig.wallet"),String::from(""));// Get an Address objectlet address = wallet.to_address(prefix);let addressStr = address.get();println!("{}", addressStr);
update secret keys
let prefix:u64 = 0x3d;letmut wallet = Wallet::new();let spend_str = "f644de91c7defae58ff9136dcc8b03a2059fda3294865065f86554d3aaeb310c";let view_str = "3dd9d71a6fe2b909e1603c9ac325f13f2c6ac965e7e1ec98e5e666ed84b4d40c";
wallet.update_secret_keys(String::from(spend_str),String::from(view_str));// Get an Address objectlet address = wallet.to_address(prefix);let addressStr = address.get();println!("{}", addressStr);