Skip to content

feat(connect): add ethereumSignAuth7702 method - #30801

Merged
martykan merged 1 commit into
developfrom
feat/connect-eip7702-sign-auth
Aug 5, 2026
Merged

feat(connect): add ethereumSignAuth7702 method#30801
martykan merged 1 commit into
developfrom
feat/connect-eip7702-sign-auth

Conversation

@martykan

@martykan martykan commented Aug 4, 2026

Copy link
Copy Markdown
Member

Description

Adds TrezorConnect.ethereumSignAuth7702, the host side of EIP-7702 authorization/revocation signing shipped in firmware 2.12.4 by trezor/trezor-firmware#7340.

Callers pass path, chainId, delegate and nonce and get back the { yParity, r, s } signature that forms one entry of a transaction authorizationList; authorizing the zero address revokes an existing delegation instead.

The method is gated behind __experimental: true (same pattern as the nostr methods), because the protobuf message is marked experimental and the device additionally requires experimental features to be enabled.

E2E run

Notes for QA

FW 2.12.4+ required

Device setup (via trezorctl):

trezorctl set experimental-features on   # required for every call
trezorctl set safety-checks prompt       # required to authorize; revocation works under strict
  • Easiest surface is the new Connect Explorer page: Ethereum → sign EIP-7702 authorization.
  • Firmware only accepts Ambire (0x5A7FC11397E9a8AD41BF10bf13F22B0a63f96f6d) and MetaMask (0x63c0c19a282a1B52b07dD5a65b58948A07DAE32B) as delegates; anything else must fail with Unknown EIP-7702 delegate address.

Related Issue

Related to trezor/trezor-firmware#6394

🤖 LLM Test Recommendations

Summary: This change set introduces a brand-new TrezorConnect method, ethereumSignAuth7702 (EIP-7702 authorization signing), across method registration, types, implementation, fixtures, and CI matrix. No Suite E2E test directly covers the new method, so the recommended strategy is to run the existing Ethereum signing and TrezorConnect integration tests as regression smoke tests. The highest-value tests are those that exercise ethereum transaction/message signing and TrezorConnect init, where registration or type changes could surface failures.

Changed files (13)
  • packages/connect-common/src/callableMethods.ts
  • packages/connect-common/src/types/api/ethereum.type-test.ts
  • packages/connect-common/src/types/api/ethereum/common.ts
  • packages/connect-common/src/types/api/ethereum/ethereumSignAuth7702.ts
  • packages/connect-common/src/types/api/ethereum/index.ts
  • packages/connect-explorer/src/data/methods/ethereum/signAuth7702.ts
  • packages/connect/e2e/__fixtures__/ethereumSignAuth7702.ts
  • packages/connect/e2e/__fixtures__/index.ts
  • packages/connect/src/api/ethereum/api/ethereumSignAuth7702.test.ts
  • packages/connect/src/api/ethereum/api/ethereumSignAuth7702.ts
  • packages/connect/src/api/ethereum/api/index.ts
  • packages/connect/src/data/config.ts
  • scripts/ci/connect-test-matrix-generator.js

Recommended tests (5)

🔴 High priority (2)
  • suite/e2e/tests/trezor-connect/ethereumSignTransaction.test.ts — Directly exercises TrezorConnect Ethereum signing (ethereumSignTransaction), which lives in the same connect Ethereum API family as the new ethereumSignAuth7702 method. This is the strongest Suite E2E proxy for catching regressions in ethereum method registration, shared types, and device signing flow.
  • suite/e2e/tests/wallet/send-eth.test.ts — Validates the Suite Ethereum send flow end-to-end, including custom fee handling and device confirmation of ethereum transaction data. Changes to ethereum common types and method config could affect how Suite composes or confirms Ethereum transactions.
🟡 Medium priority (3)
  • suite/e2e/tests/trezor-connect/ethereumSignMessage.test.ts — Tests another Ethereum signing method through TrezorConnect (ethereumSignMessage) and shares the connect permissions, init, and ethereum API infrastructure that the new method was wired into. Useful for detecting registration or type-export regressions.
  • suite/e2e/tests/trezor-connect/error.test.ts — Covers TrezorConnect.init in suite-desktop core mode and ethereumGetAddress error handling. Adding a new ethereum method to callableMethods/config changes the global method table, so this is a good smoke test for connect initialization remaining healthy.
  • suite/e2e/tests/wallet/sign-and-verify-eth.test.ts — Exercises Ethereum message signing inside the Suite wallet and verifies device prompts/toasts. Shares the underlying ethereum signing stack with the new method, though it does not touch the new API directly.

⚠️ Changes with no test coverage (10)

  • packages/connect-common/src/types/api/ethereum.type-test.ts
  • packages/connect-common/src/types/api/ethereum/ethereumSignAuth7702.ts
  • packages/connect-common/src/types/api/ethereum/index.ts
  • packages/connect-explorer/src/data/methods/ethereum/signAuth7702.ts
  • packages/connect/e2e/__fixtures__/ethereumSignAuth7702.ts
  • packages/connect/e2e/__fixtures__/index.ts
  • packages/connect/src/api/ethereum/api/ethereumSignAuth7702.test.ts
  • packages/connect/src/api/ethereum/api/ethereumSignAuth7702.ts
  • packages/connect/src/api/ethereum/api/index.ts
  • scripts/ci/connect-test-matrix-generator.js

Updated: 2026-08-05T12:51:19.008Z

🌐 Preview deployments

🌐 Suite Web preview: https://dev.suite.sldev.cz/suite-web/feat/connect-eip7702-sign-auth/web/

🔍 Currents Test Results

🔍 Suite desktop test results: View in Currents

🔍 Suite web test results: View in Currents

🔍 Suite native android test results: View in Currents

🔒 Quarantined E2E Tests

Trezor Suite (web) — 3 test(s)
Test Type
Quarantine test: "Recovery - dry run,Recovery with device reconnection" 🙋 manual
Quarantine test: "TrezorConnect webextension -> Suite Web,second call after popup was closed by user should work" 🙋 manual
Quarantine test: "Recovery T2T1 - dry run,Recovery after partial recovery" 🙋 manual

Updated: 2026-08-05T12:54:06.316Z • 3 test(s) total

Trezor Suite (desktop) — 2 test(s)
Test Type
Quarantine test: "Recovery - dry run,Recovery after partial recovery" 🙋 manual
Quarantine test: "Recovery - dry run,Recovery with device reconnection" 🙋 manual

Updated: 2026-08-05T12:53:50.806Z • 2 test(s) total

@martykan
martykan marked this pull request as ready for review August 5, 2026 09:36
Host side of EIP-7702 authorization/revocation signing, added to firmware
2.12.4 by trezor-firmware#7340. Callers pass path, chainId, delegate and
nonce and get back the { yParity, r, s } signature that forms one entry of
a transaction authorizationList. Authorizing the zero address revokes an
existing delegation.

The method is gated behind __experimental: true, the same way the nostr
methods are, because the protobuf message is marked experimental and the
device additionally requires experimental features to be enabled. Firmware
accepts only a small allowlist of delegates and refuses authorization (but
not revocation) under strict safety checks, hence the e2e setup lowering
them.

The delegate is normalized to its EIP-55 checksummed form, since the device
renders it exactly as received; a mixed-case address that does not match
its checksum is rejected as a likely typo. chainId and nonce are uint64 on
the wire but capped at Number.MAX_SAFE_INTEGER, so a value JavaScript
cannot hold exactly is refused rather than rounded into a different
authorization. Network definitions are downloaded for any chainId other
than 0 so the device can name the chain instead of showing a raw id.

E2e fixtures are derived from trezor-common, both the signature vectors and
the two error cases. They are wired into the opt-in `experimental` CI group
rather than the `ethereum` one, as they need firmware 2.12.4+ with
experimental features on.

Unrelated to trezor-firmware#7275, which removed EIP-7702 *transactions*
(tx_type 4) from ethereumSignTransaction.

Co-Authored-By: Claude <noreply@anthropic.com>
@martykan
martykan force-pushed the feat/connect-eip7702-sign-auth branch from 971373e to afbe510 Compare August 5, 2026 12:47
@trezor-bot

trezor-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

✅ Previously successful run of [Test] suite-native Android E2E workflow has been found.
⏭️ Skipping tests for this run.
💡 If you are unsure about your latest changes, please rerun the workflow manually. (Use the Re-run all jobs option)

@szymonlesisz szymonlesisz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i cant say i fully understand what is it for :) but the test are green and i dont see any obvious flaws 👍

@martykan
martykan merged commit 06146f9 into develop Aug 5, 2026
215 checks passed
@martykan
martykan deleted the feat/connect-eip7702-sign-auth branch August 5, 2026 14:20
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.

2 participants