Skip to content

Electrum and bitcoindart produce different signatures #5

@Siimone

Description

@Siimone

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions