Skip to content

feat(wallets): add infrastructure for Trezor session_id reuse across multiple signers #10822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

crStiv
Copy link

@crStiv crStiv commented Jun 20, 2025

Motivation

When using Trezor hardware wallets with passphrase enabled, each new TrezorSigner instance requires re-entering the passphrase, creating poor UX when multiple wallets are needed (e.g., forge script --trezor --mnemonic-indexes 0,1,2).

Solution

Implemented infrastructure for session_id reuse across multiple TrezorSigner instances:

  • Added create_trezor_signer_with_session() and create_trezor_signer_and_get_session() utility functions
  • Enhanced WalletSigner with from_trezor_path_with_session() method
  • Refactored trezors() function to establish session with first signer and reuse for subsequent ones
  • Graceful fallback when session_id extraction is unavailable

Note: Session_id extraction currently returns None due to alloy-signer-trezor crate limitations, but infrastructure is ready for when upstream support becomes available.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

feat(wallets): reuse session_id across multiple TrezorSigner
1 participant