-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi!
I tried to sign a string with a priv key but I cannot produce the same signature on Electrum/Sparrow.
I used the seed found inside readme.
You can find the code I am using below. Any tip? The address generated from the lib is the same other wallets.. Maybe some wrong encoding between uint, string and base64?
var seed = bip39.mnemonicToSeed("praise you muffin lion enable neck grocery crumble super myself license ghost");
var hdWallet = HDWallet.fromSeed(seed);
String message = 'hello';
// it works
final child1 = hdWallet.derivePath("m/44'/0'/0'/0/0");
test('address', () {
expect(child1.address, "1PLDRLacEkAaaiWnfojVDb5hWpwXvKJrRa");
});
// not working
test('signature', () {
expect(base64.encode(child1.sign(message)), "H0NwJXuPbaef/EjEW1CAF2Kdm76y+oWgQAq004Tp+fAfZlYPaSfFEp7O/Uj85lJUNxAXUaK9KK/sV1TKKyU9Wds=");
});
Thanks for your support,
Simone
inaltoasinistra, nolbertj and sneurlax
Metadata
Metadata
Assignees
Labels
No labels