Skip to content

Conversation

crStiv
Copy link
Contributor

@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
2 participants