feat(signer-trezor): implement EIP-712 typed data signing
- 主要言語
- Rust
- スター
- 1.3k
- フォーク
- 668
- 平均マージ
- 2日 2時間
- マージ済み PR(30日)
- 29
説明
## 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.
コントリビューションガイド
評価
この issue はまだ評価されていません。