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
eth_sign requires 32 byte message hash #33
Comments
Did you use MetaMask as provider? seems something related to this: |
import 'dart:convert';
import 'package:crypto/crypto.dart';
// ...
const messageToSign = "TEST";
final bytes = utf8.encode(messageToSign);
final messageHash = sha256.convert(bytes);
final signature = await provider.sign(
message: '0x$messageHash', address: session.accounts[0]); |
Using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error: JSON-RPC error -32000: eth_sign requires 32 byte message hash
The text was updated successfully, but these errors were encountered: