feat(encryption): support ERC-7730 encryption scheme - #10
Open
melanciani wants to merge 1 commit into
Open
Conversation
Author
|
hey @llbartekll , did you get the time to have a look at this ? |
melanciani
force-pushed
the
feat/erc7730-encryption
branch
from
July 30, 2026 20:24
59435d1 to
9a29cb3
Compare
Author
|
hey again @llbartekll , without this feature, new integration like ethereum/clear-signing-erc7730-registry#2595 have failing tests. Would it be possible to have a look at this PR ? thanks ! |
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.
Ported the sourcify PR's behavior (sourcifyeth/clear-signing#56) to Rust :
Default impl means no existing implementor (or the FFI wrapper) breaks.
width), and format_value renders the plaintext with the field's normal format. On failure it renders fallbackLabel/[Encrypted]. Includes the Issue-1 width bounds check (> upper bound,
honoring leading-zero stripping). Plus the field-level-encryption parsing plumbing.
Verification
over-width→decryption_failed; no-fallbackLabel→[Encrypted]; bad plaintextType→encryption_invalid_descriptor. 7/7 pass.
Two deliberate divergences from the TS PR (Rust model differences)
diagnostic + render the fallback rather than blanking the transaction. (Arguably the better behavior — and I flagged the TS abort as debatable anyway.)
bindings. The core decrypt/fallback behavior is complete without it — worth a follow-up if you want the RECOMMENDED raw-value display.
result: Ported the wallet-delegated resolve_decrypted_value encryption model to the Rust fork on branch feat/erc7730-encryption (uncommitted, 6 files +281/−14 plus a new 7-case
integration test). Verified: 7/7 new tests pass, full suite no regressions, uniffi feature compiles, and the Zama registry testsv2 fixtures pass 16/16 via cs-test with no decryptor
(fallback path). Two documented divergences: malformed annotations degrade instead of aborting, and rawEncryptedValue output is omitted (invasive on the FFI DisplayItem).
🤖 Generated with Claude Code