feat(signer-trezor): implement EIP-712 typed data signing
- Lenguaje dominante
- Rust
- Estrellas
- 1.3k
- Forks
- 668
- Merge medio
- 2 d 1 h
- PR fusionados (30 d)
- 29
Descripción
## Summary
The Trezor signer does not implement `sign_dynamic_typed_data`, so EIP-712 typed data signing falls back to the default trait implementation which hashes locally and calls `sign_hash`. Since the Trezor signer returns `UnsupportedOperation` for `sign_hash`, EIP-712 signing fails entirely.
Trezor devices (Model T, Model One) support on-device EIP-712 signing via the `EthereumSignTypedData` streaming protocol (message type 464). The device computes the EIP-712 hash internally and displays struct fields on screen for user verification, which is more secure than signing a blind hash.
## Expected behavior
`sign_dynamic_typed_data` should use the Trezor's native EIP-712 streaming protocol to sign typed data on-device, with struct field verification on the device screen.
## Current behavior
Calling `sign_dynamic_typed_data` on a `TrezorSigner` fails because it falls through to `sign_hash`, which is unsupported.
## Dependencies
This requires `trezor-client` to expose `ethereum_sign_typed_data()`, which is proposed in trezor/trezor-firmware#7038.
Guía de contribución
Línea de trabajo
Start at TrezorSigner’s sign_dynamic_typed_data implementation and its sign_hash fallback. Check whether trezor-client exposes ethereum_sign_typed_data() through trezor/trezor-firmware#7038 before integrating the Trezor streaming protocol. Done means EIP-712 data is signed on-device with struct-field verification instead of returning UnsupportedOperation.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- blockchain
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100