Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a bug with signMessageOfBIP322Simple #13

Open
zhangliugang opened this issue Mar 21, 2024 · 0 comments
Open

is there a bug with signMessageOfBIP322Simple #13

zhangliugang opened this issue Mar 21, 2024 · 0 comments

Comments

@zhangliugang
Copy link

I cloned this repo and create a new test

  it('bip322-simple 2', async () => {
    const wallet = new LocalWallet("L3VFeEujGtevx9w18HD1fhRbCH67Az2dpCymeRE1SoPK6XQtaN2k", AddressType.P2WPKH, NetworkType.MAINNET);
    expect(wallet.address).eq("bc1q9vza2e8x573nczrlzms0wvx3gsqjx7vavgkx0l");
    const signature = await wallet.signMessage("", "bip322-simple");
    expect(signature).eq('AkcwRAIgM2gBAQqvZX15ZiysmKmQpDrG83avLIT492QBzLnQIxYCIBaTpOaD20qRlEylyxFSeEA2ba9YOixpX8z46TSDtS40ASECx/EgAxlkQpQ9hYjgGu6EBCPMVPwVIVJqO4XCsMvViHI=')
    
    const signature2 = await wallet.signMessage("Hello World", "bip322-simple");
    expect(signature2).eq('AkcwRAIgZRfIY3p7/DoVTty6YZbWS71bc5Vct9p9Fia83eRmw2QCICK/ENGfwLtptFluMGs2KsqoNSk89pO7F29zJLUx9a/sASECx/EgAxlkQpQ9hYjgGu6EBCPMVPwVIVJqO4XCsMvViHI=')
  });

these two cases is provided by https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki and the signature seems not correct at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant