generate_mnemonic/
generate_mnemonic.rs

1
2
3
4
5
6
7
8
9
use multiversx_sdk::wallet::Wallet;

fn main() {
    let mnemonic = Wallet::generate_mnemonic();
    println!("mnemonic: {mnemonic}");

    let private_key = Wallet::get_private_key_from_mnemonic(mnemonic, 0, 0);
    println!("private key: {:?}", private_key.to_string());
}