Introduction
This section covers historical context and motivation for the connector.
Modern web-wallets and dApps need a secure bridge between ephemeral browser contexts and cryptographic hardware like Ledger devices. In-browser capabilities have matured—WebUSB, WebHID and Web Bluetooth enable direct communication—but those channels must be used carefully. This connector enforces the principle that user private keys and signing approvals always remain on the hardware device, while the browser coordinates actions and displays informative prompts to the user.
Detailed flow
1) User clicks "Connect Ledger" in the web app.
2) App selects a transport adapter (for example, WebUSB).
3) The adapter calls the browser permission API and presents a system permission dialog. The user selects a device.
4) On successful connection, the adapter opens a secure channel and the app receives a session token (opaque).
5) The app requests operations from the session (e.g., sign transaction). Each operation prompts the user on-device to confirm. The device returns signed data only after user confirmation.
6) The app verifies signatures server-side or locally before proceeding.
Security deep-dive
Threat model: hostile web page, man-in-the-middle on USB host, compromised browser extension.
Mitigations include: strict origin checks, ephemeral sessions, explicit device prompts, and not relying on browser storage for secrets. Additionally, the device enforces PIN and passphrase protection and displays canonical transaction data to the user, which prevents malicious apps from silently signing transactions.
UX copy suggestions
Use short instructive copy for each step. Example:
Step 1: Connect your Ledger
- Unlock your Ledger device and open the Ledger Live or appropriate app.
- Choose 'Connect' in this browser dialog.
- Approve the connection on your device.
Step 2: Approve actions
- Review the transaction details displayed on your Ledger.
- Confirm to sign, or decline to cancel.
Step 3: Disconnect
- When finished, disconnect the device physically or click 'Disconnect' in the site UI.