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

Sign message malfunction. #286

Open
kraikov opened this issue Jun 11, 2020 · 1 comment
Open

Sign message malfunction. #286

kraikov opened this issue Jun 11, 2020 · 1 comment

Comments

@kraikov
Copy link
Collaborator

kraikov commented Jun 11, 2020

https://github.com/liquality/chainabstractionlayer/blob/989e97f6c0931a289cd76b66c997165be21f3256/packages/bitcoin-js-wallet-provider/lib/BitcoinJsWalletProvider.js#L53

  1. You should pass message prefix when signing messages - '\u0018Bitcoin Signed Message:\n'

  2. You have to take into account what type is the address signing the message i.e. if it's segwit you should pass { segwitType: 'p2wpkh' }

  3. You need to encode the string as base64 in order to be able to verify it.

@kraikov
Copy link
Collaborator Author

kraikov commented May 12, 2022

@monokh shall we fix that?

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