let wallet = LocalWallet::new(&mut rand::thread_rng());
let wallet = "私钥".parse::().unwrap();
let signature = wallet.sign_message("hello world").await?;
if signature.verify("hello world", wallet.address()).is_ok(){
println!("ok--");
}else{
println!("fail---");
}
let recovered = signature.recover("hello world")?;
assert_eq!(recovered,wallet.address());
let sign = "签名字符串".parse::()?;
let r = sign.r;
let s = sign.s;
let v = sign.v;