-
Notifications
You must be signed in to change notification settings - Fork 169
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-In with Ethereum + ERC1271 #246
Sign-In with Ethereum + ERC1271 #246
Conversation
Thanks @rkreutz for the PR. Will take a bit to review as need to read EIP and a bit loaded with other work this week. But definitely good addition to library! |
Please check ERC20Tests.swift line 115 about how to make the newly added tests to be tested with |
@dnKaratzas added the tests there |
I know but need to rename the corresponding class names from |
…reutz/web3.swift into feature/sign-in-with-ethereum
@dnKaratzas done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rkreutz Looks good! Only one small comment, and we can merge it
/// - Returns: a `Bool` indicating if the pair message-signature is verified (whether or not the signature came from the address in the message) | ||
/// - Throws: `SiweVerifier.Error` if message is not verifiable; | ||
/// might throw `KeyUtilError` in case recovering the address that signed the message fails | ||
open func verify(message: SiweMessage, against signature: String) async throws -> Bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be public
not open
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 39e0169
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@DarthMike I believe this got forgotten at some point? 😄 |
Thanks @rkreutz, merged |
Hey guys, any plans on making a new release to include this one? Thanks |
Hey there,
This PR adds some structs/classes around Sign-In with Ethereum (EIP-4361) which is a new standard for trustless sign-ins. This was based on the TypeScript implementation of the same feature by the people behind the proposal.
As part of the implementation, I also added ERC-1271 support. To test it I've deployed a couple contracts to Rinkeby, repo is here.
I've added tests and made sure they are also running fine on Linux (since this will be specially useful for Server Side).
Cheers