feat: eip-712 digest and calldata digest addition (WIP)#976
Draft
PatrickAlphaC wants to merge 1 commit into
Draft
feat: eip-712 digest and calldata digest addition (WIP)#976PatrickAlphaC wants to merge 1 commit into
PatrickAlphaC wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the Wallet Signature and Calldata Digest Display Standard (ERC draft) to display standardized cryptographic digests during signing flows, enabling independent verification by signers.
EIP-712 Signing
When
displayHashis enabled, the review screen now shows three fields instead of two:keccak256("\x19\x01" || domainSeparator || hashStruct(message))(the value that is actually signed)The signing path (
ui_712_approve_cb) is completely unchanged.Transaction Signing
When a transaction contains non-empty calldata, the review screen now shows:
keccak256(uint256(len(calldata)) || calldata)This gives signers a compact, independently verifiable fingerprint of the calldata without needing to compare hundreds of hex characters. The digest is computed incrementally during RLP parsing and displayed alongside the existing transaction hash.
The calldata digest is not shown for plugin-handled transactions (where the plugin already provides meaningful UI for the calldata).
All displayed hash values are
0x-prefixed per the ERC requirement.Changes include
Additional comments
Snapshot files will need to be regenerated for EIP-712 and blind signing tests since the number of displayed fields has changed.