
The device always knows the full layout before reading any values. In that way, deeply nested structures are still a possibility, but the device cannot be "led by the nose" by the client. The general idea is that the device gets all the types from EIP712 struct first, and uses them as a stencil to get the rest of the data values. In the final EthereumTypedDataRequest device tells signature of the data and address of the signer.
EthereumTypedDataAck - the fulfilled request with additional data types and values. EthereumTypedDataRequest - request from device to send additional data. EthereumSignTypedData - initial request for starting a signing flow. The exchange between client and device is defined by proto schema and consists of 3 messages: This is not a "WIP" request, in my opinion, it's ready for being field-tested. In this PR I'm submitting a working implementation of v4 typed data signatures, also a nice UI that in my opinion has the best balance between verbosity of the layout and the ability to introspect data on the device. use-v4 BOOLEAN Specify to use EIP-712 (v4) for typed data signing Sign typed data (EIP-712) with Ethereum address. Usage: trezorctl eth sign-typed-data TYPED_DATA_JSON There is a special flag -use-v4 in the reference client implementation that can be set to False. Meanwhile, we have to use Metamask's v4 everywhere and allow users to fall back to Geth's (which I'm not sure is used anywhere). It's also a fact that their *_v4 implementation has a bug that makes it not compliant to the official EIP-712 standard - see MetaMask/eth-sig-util#106, so one day it could be *_v5. My Pythonic code is based upon signTypedData_v4 reference implementation from MetaMask (see the TypeScript eth-sig-util code also signTypedData_v4 docs) since we need to maintain compatibility with current Web3 industry standard. We have users with Trezor wallets too, so I decided to step in and help with the EIP-712 feature implementation for the firmware. There are plenty of issues about EIP-712 support in hardware wallets like this one MetaMask/metamask-extension#10240 I know there are a lot of people trading/minting NFTs nowadays, many of which are minted through L2 solutions, almost all the time depending on EIP-712 as well.
Basically, this allows us to sign arbitrary Cosmos transactions using Eth wallets like MetaMask or Ledger. It's an L2 chain based on Cosmos SDK, and we rely heavily on EIP-712 typed data standard for interoperation with Ethereum and MetaMask. We're building a fully decentralized trading platform for derivatives. Hello 👋! I'm Max from Injective Protocol.