Crate hdwallet_filecoin
source ·Expand description
Usage
use hdwallet_filecoin::{new_mnemonic, SecretKey};
let mnemonic = new_mnemonic().unwrap();
println!("{}", mnemonic);
let seed = mnemonic.to_seed("");
let sk = SecretKey::from_seed_bls(&seed).unwrap();
let pk = sk.public_key();
println!("{}", pk.address());
let msg = b"hello world";
let sig = sk.sign(msg).unwrap();
assert!(sig.verify(msg, &pk).is_ok());
Enums
Functions
- export private key to lotus hex format
- import private key from lotus hex format return public address