alloy-rs / alloy-rs/alloy

feat(signer-trezor): implement EIP-712 typed data signing

オープン
#4,043 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。