-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
refactor!: accept any msg type via AccountAPI.sign_message
[APE-1305]
#1614
Conversation
APE-1103 Refactor `AccountAPI.sign_message` arguments
Currently, this function only accepts a My proposal is to refactor to Account plugins would each individual handle This is driven by a specific need right now, as I've been trying to get an Rating 5 points because all account plugins will need to be updated to handle the new arguments |
APE-1305 "implement new sign_message fn accepting Any" (ApeWorX/ape #1614)
What I didRefactor the definition of sign_message to accept Any. Signers implementing this class can raise when they receive a message type they can't handle. Account plugins would each individual handle msg objects by type, including how they might display information from them for user feedback in terms of signing. This will improve UX because now we can display the text of a string message to sign (useful for displaying SIWE EIP-4361 authorizations), the complete object body and header for EIP-712 structured messages, and other future types of messages that might become necessary to support within Ape (EIP-4337?) fixes: APE-1103 How I did itChange type signature of sign_message function, and update implementors to match the new definition. How to verify itRun existing test suite Checklist
ApeWorX/ape #1614 by z80dev on GitHub via LinearSync |
AccountAPI.sign_message
[APE-1305]
AccountAPI.sign_message
[APE-1305]AccountAPI.sign_message
[APE-1305]
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.
Changes look good to me, I'll let @antazoey give final approval (and see if she likes the warning log)
be406c8
to
bec49d1
Compare
APE-1305 "implement new sign_message fn accepting Any" (ApeWorX/ape #1614)
What I didRefactor the definition of sign_message to accept Any. Signers implementing this class can raise when they receive a message type they can't handle. Account plugins would each individual handle msg objects by type, including how they might display information from them for user feedback in terms of signing. This will improve UX because now we can display the text of a string message to sign (useful for displaying SIWE EIP-4361 authorizations), the complete object body and header for EIP-712 structured messages, and other future types of messages that might become necessary to support within Ape (EIP-4337?) fixes: APE-1103 How I did itChange type signature of sign_message function, and update implementors to match the new definition. How to verify itRun existing test suite Checklist
ApeWorX/ape #1614 by z80dev on GitHub via LinearSync |
76400dc
to
43d66db
Compare
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
better handling of cases for different types in sign_message
e04a794
to
86f0dd6
Compare
4b712f1
to
405322b
Compare
What I did
Refactor the definition of sign_message to accept Any. Signers implementing this class can raise when they receive a message type they can't handle.
Account plugins would each individual handle msg objects by type, including how they might display information from them for user feedback in terms of signing. This will improve UX because now we can display the text of a string message to sign (useful for displaying SIWE EIP-4361 authorizations), the complete object body and header for EIP-712 structured messages, and other future types of messages that might become necessary to support within Ape (EIP-4337?)
fixes: APE-1103
How I did it
Change type signature of sign_message function, and update implementors to match the new definition.
How to verify it
Run existing test suite
Checklist