You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Message signing should be very pluggable according to EIP191. Message encoding is all built-in to the (now confusingly named) defunct_hash_message().
How can it be fixed?
New message signing API that captures this concept:
classSignableMessage(NamedTuple): # as defined by EIP-191version: HexBytes# must be length 1header: HexBytes# aka "version specific data"body: HexBytes# aka "data to sign"signable_message=encode_structured_data_message(json_str)
account.sign_message(signable_message)
The encoding method could have arbitrary inputs without changing the message signing API, like:
It abstracts away the EIP-191 encoding process and message hashing inside sign_message(). A new recover_message() could work similarly.
The solution should make it trivial to experiment with or produce your own (sub)version of EIP-191, without any change to the eth-account library. (This is already possible by signing and recovering hashes of your own making, but it's not as accessible).
The text was updated successfully, but these errors were encountered:
What was wrong?
Message signing should be very pluggable according to EIP191. Message encoding is all built-in to the (now confusingly named)
defunct_hash_message()
.How can it be fixed?
New message signing API that captures this concept:
The encoding method could have arbitrary inputs without changing the message signing API, like:
It abstracts away the EIP-191 encoding process and message hashing inside
sign_message()
. A newrecover_message()
could work similarly.The solution should make it trivial to experiment with or produce your own (sub)version of EIP-191, without any change to the eth-account library. (This is already possible by signing and recovering hashes of your own making, but it's not as accessible).
The text was updated successfully, but these errors were encountered: