spec: add EIP-712 signing scheme for zone transactions#416
Open
spec: add EIP-712 signing scheme for zone transactions#416
Conversation
Adds an alternate signing scheme so wallets that only support eth_signTypedData_v4 (hardware wallets, WalletConnect-only dapps, legacy SDKs) can author zone transactions without native Tempo envelope support. - New signature type 0x05 layered onto the existing Tempo transaction envelope, changing only the digest the signature commits to. - Domain binds chainId and ZonePortal address; two struct variants cover root signing (ZoneTransaction) and access-key signing via Keychain V2 wrapping (AccessKeyZoneTransaction, includes userAddress). - Keychain V1 rejected as an EIP-712 wrapper since it does not bind user_address into the signing hash; P256/WebAuthn access keys keep their native schemes. Made-with: Cursor
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.
Summary
Adds an alternate signing scheme for zone transactions, based on EIP-712 typed messages, so that wallets without native Tempo or zone envelope support (hardware wallets, WalletConnect-only dapps, legacy SDKs) can author zone transactions by signing structured data with
eth_signTypedData_v4.0x05layered onto the existing Tempo transaction envelope. The wire-level envelope and fields are unchanged; only the digest the signature commits to changes (EIP-712 digest instead of the native tx hash).chainId(which already encodeszoneId) and the zone'sZonePortaladdress, giving each zone a unique domain and a stable address for wallets to display.ZoneTransaction— used when a root account signs directly. Mapping to envelope fields is bijective.AccessKeyZoneTransaction— used when a Keychain access key signs on behalf of a root. IncludesuserAddressas the first field so the wallet prompt shows which root account the access key is acting for.0x04 || innerSig || user_address) around a0x05inner signature. Secp256k1 access keys work under EIP-712 without re-registration (the curve is registered, not the digest scheme).0x03) is rejected as an EIP-712 wrapper because it does not binduser_addressinto the signing hash — an EIP-712 wallet cannot seeuser_address, so V1 wrapping would allow a malicious client to rebind the signature to any root.Private RPC > Signature Typestable is extended with the new type, and the TOC is updated.Test plan
#eip-712-typed-transactions,#access-key-signing,#signature-types) resolve correctly on GitHub.ZoneTransactionandAccessKeyZoneTransactionfield sets against the final Tempo transaction envelope used on zones.Made with Cursor