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
#[test]fntest_verify_bip137(){// The sig is created by unisat.// let sig = await window.unisat.signMessage("hello world");// sig = "G4j29m8WutQfZJaonWuXLoXhlhlPfJzbN/Vmz2hdiAYwFMpvTPZslHaOBaotsFfkN26KpaCF3Az0ooUr6vMbNBg="// signer = "bc1p43s0vyuq6wvsfqmw5vd2thhv5pg755ekasw2y8jwh754ezdayfkqvsrama"let msg = "hello world";let sig_b64 = "G4j29m8WutQfZJaonWuXLoXhlhlPfJzbN/Vmz2hdiAYwFMpvTPZslHaOBaotsFfkN26KpaCF3Az0ooUr6vMbNBg=";letmut sig:Vec<u8> = general_purpose::STANDARD.decode(sig_b64).unwrap();assert_eq!(sig.len(), 65);
sig.rotate_left(1);assert_eq!(sig[64], 27);let pk = ecdsa::recover(msg, sig).unwrap();}
For now, it's using eip191 to handle the recover_id.
The text was updated successfully, but these errors were encountered:
googolmo
added a commit
to googolmo/rings-node
that referenced
this issue
May 5, 2023
For now, it's using eip191 to handle the recover_id.
The text was updated successfully, but these errors were encountered: