Skip to content

feat: eip-712 digest and calldata digest addition (WIP)#976

Draft
PatrickAlphaC wants to merge 1 commit into
LedgerHQ:developfrom
PatrickAlphaC:feat/calldata-hash
Draft

feat: eip-712 digest and calldata digest addition (WIP)#976
PatrickAlphaC wants to merge 1 commit into
LedgerHQ:developfrom
PatrickAlphaC:feat/calldata-hash

Conversation

@PatrickAlphaC
Copy link
Copy Markdown

@PatrickAlphaC PatrickAlphaC commented Mar 30, 2026

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 displayHash is enabled, the review screen now shows three fields instead of two:

  • EIP-712 Digest - keccak256("\x19\x01" || domainSeparator || hashStruct(message)) (the value that is actually signed)
  • Domain hash - the domain separator hash (existing)
  • Message hash - the structured message hash (existing)

The signing path (ui_712_approve_cb) is completely unchanged.

Transaction Signing

When a transaction contains non-empty calldata, the review screen now shows:

  • Calldata Digest - 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

  • Bugfix (non-breaking change that solves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Tests
  • Documentation
  • Other (for changes that might not fit in any category)

Additional comments

Snapshot files will need to be regenerated for EIP-712 and blind signing tests since the number of displayed fields has changed.

@PatrickAlphaC PatrickAlphaC changed the title feat: eip-712 digest and calldata digest addition feat: eip-712 digest and calldata digest addition (WIP) Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant