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

Support EIP2098 signatures with ethers.utils.recover* #2246

Closed
pmjohann opened this issue Oct 29, 2021 · 6 comments
Closed

Support EIP2098 signatures with ethers.utils.recover* #2246

pmjohann opened this issue Oct 29, 2021 · 6 comments
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published.

Comments

@pmjohann
Copy link

Note: Not all sections may be relevant, but please be as thorough while remaining concise as possible. Remove this Notice and any sections that don't feel pertinent.

If you are unsure if something is a bug, start a thread in the "discussions" tab above..

Describe the bug
Calling either ethers.utils.recoverAddress or ethers.utils.recoverPublicKey will complain that the sig is not 65 bytes.

Reproduction steps

ethers.utils.recoverAddress('0xd967f017af94fa0dd9d81f14c12378dea06b13158f4bd7ca7be3a73ccbcce4fd', '0x16a4c32d7e8de74161179375bac6384d40a13ad06512a2b999a992935d99ca9f18ae63ce6cfbefe1225952a241b8f21ee4a3554b7e028519ae0ad62b0fbf2277')

Environment:
All environments affected

Search Terms
Often similar issues have come up before. Include any search terms you have tried in this repository's Issues (including closed issues) and "Discussions", so if there are matching issues, we can be sure to add those keywords and link this issue to it, making it easier for people to find in the future.

@pmjohann pmjohann added the investigate Under investigation and may be a bug. label Oct 29, 2021
@ricmoo ricmoo added enhancement New feature or improvement. on-deck This Enhancement or Bug is currently being worked on. and removed investigate Under investigation and may be a bug. labels Oct 31, 2021
@ricmoo
Copy link
Member

ricmoo commented Oct 31, 2021

Yes, that certainly makes sense for me to include. ;)

@ricmoo ricmoo added the minor-bump Planned for the next minor version bump. label Jan 2, 2022
@ricmoo
Copy link
Member

ricmoo commented Mar 10, 2022

This is now available in v5.6.

Try it out and let me know if there are any issues. :)

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. minor-bump Planned for the next minor version bump. labels Mar 10, 2022
@sunwrobert
Copy link

sunwrobert commented Mar 17, 2022

hi @ricmoo, any chance that ethers can sign a signature as a compact signature or convert a signature to a compact signature? Wasn't sure if that was supported yet but it seemed like it wasn't. Thanks!

@ricmoo
Copy link
Member

ricmoo commented Mar 17, 2022

You want utils.splitSignature(sig). :)

@sunwrobert
Copy link

utils.splitSignature(sig)

😮 Thanks!

@ricmoo
Copy link
Member

ricmoo commented Mar 17, 2022

This was added, so I'll close it. Please re-open or create a new issue if there are any problems.

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

No branches or pull requests

3 participants