-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
bugSomething isn't workingSomething isn't working
Description
🧰 Project
SDK
📝 Description
In the passkey client, the signMessage method (aka personal_sign) expects a plain string (not a hex string) to sign. However, Metamask's API - a de-facto standard for wallet APIs - expects a hex string.
This will cause issues as the interface will deviate from that of other wallets.
🔄 Reproduction steps
const message = "Hello world";
const messageToSign = stringToHex(message);
const signature = await provider.request({
method: "personal_sign",
params: [messageToSign, account.address],
});
const isValidSignature = await verifyMessage({
message,
signature,
address: account.address,
});
🤔 Expected behavior
isValidSignature should be true, but it is false.
However, if we instead pass the hexed version of the message into verifyMessage, it returns true.
😯 Actual behavior
No response
🖥 Environment
No response
📋 Additional context
No response
📎 Logs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working