Concise integration guidance for web and desktop developers building secure experiences with Trezor Suite and Trezor hardware wallets.
Trezor Suite provides a secure, user-facing environment for interacting with hardware wallets. This guide outlines best practices, authentication flows, and sample code snippets to help developer teams integrate Trezor Suite functionality into partner applications while prioritizing user safety and threat resistance.
Integrations should authenticate using OAuth2 or API keys for server-to-server operations. For wallet interactions, prefer short-lived session tokens and tie sessions to user action contexts. Never persist raw device data or mnemonic material server-side.
Use the official bridge and trezor-connect library for web-based flows. For desktop applications, rely on the native Trezor connectivity libraries or platform USB interfaces with WebUSB fallback.
// Example: basic trezor-connect usage (JavaScript)
import TrezorConnect from 'trezor-connect';
TrezorConnect.init({
connectSrc: 'https://connect.trezor.io/9/',
popup: true,
lazyLoad: true,
});
const getAddress = async () => {
const result = await TrezorConnect.getAddress({
path: "m/44'/0'/0'/0/0",
coin: 'Bitcoin',
});
if (result.success) console.log('address', result.payload.address);
};
Trezor Suite exposes secure, audited functions through trezor-connect including message signing, psbt handling, and device management. Keep the UI flow clear: show expected signing data, verify amounts and destinations, and prompt users to confirm on-device.
trezor-connect and request the minimum scope.Be explicit about device states: locked, unavailable, firmware outdated. Provide actionable UI remediation: instruct users to unlock, update firmware, or reconnect. Use graceful fallbacks if WebUSB or the bridge is unavailable.
Minimize telemetry. If you collect usage metrics, aggregate and anonymize them, and give users an opt-out. Never associate telemetry with exported addresses or on-chain activity that can deanonymize users.
Automated tests should include hardware-in-the-loop scenarios where possible, and mock device responses for CI runs. Validate your UX with real users to ensure prompts and warnings are understandable.
Q: Can we store derived addresses server-side?
A: Yes for indexing, but store only public addresses and fingerprint metadata — never store private keys or mnemonic seeds.
Q: Is on-chain broadcasting supported?
A: Trezor signs transactions but does not broadcast; implement broadcasting via your backend or a public RPC endpoint.