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

signMessage(...): move encoding and hashing logic to client side #22

Merged
merged 3 commits into from
Apr 8, 2023

Conversation

keyz-tk
Copy link
Contributor

@keyz-tk keyz-tk commented Apr 7, 2023

Summary & Motivation

For raw payload signing, our configuration is too inflexible -- currently we require the message to be UTF8 encoded, and we hash the payload via KECCAK256 on the remote signer.

This PR changes signMessage(...) to conform to what Ethers expects, eth_sign style:

How I Tested These Changes

CI and running internal E2E tests manually

@keyz-tk keyz-tk changed the title [WIP] signMessage: move encoding and hashing logic to client side signMessage(...): move encoding and hashing logic to client side Apr 8, 2023
@keyz-tk keyz-tk marked this pull request as ready for review April 8, 2023 00:21
Copy link
Contributor

@r-n-o r-n-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@keyz-tk keyz-tk merged commit dce864d into main Apr 8, 2023
@keyz-tk keyz-tk deleted the sign-hex-or-utf8 branch April 19, 2023 19:22
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

Successfully merging this pull request may close these issues.

2 participants