Skip to main content

What is Trezor Connect?

Trezor Connect is a high-level JavaScript interface for Trezor hardware wallets. It provides a comprehensive API for integrating Trezor functionality into third-party applications, wallets, and services.
Trezor Connect version 10.0.0 is currently in alpha stage. This represents a major evolution of the platform with improved architecture and capabilities.

Key Features

Multi-Platform Support

Works across Node.js, web browsers, browser extensions, Electron apps, and React Native mobile applications.

Comprehensive Blockchain Support

Supports Bitcoin, Ethereum, Cardano, Solana, Ripple, Stellar, Tezos, and many more cryptocurrencies.

Transaction Signing

Sign cryptocurrency transactions securely with hardware-backed private keys.

Public Key Export

Access public keys and extended public keys (xpub) for account management.

Message Authentication

Sign and verify messages for authentication and proof of ownership.

Account Discovery

Discover wallet accounts and retrieve balance information across multiple blockchains.

Use Cases

Cryptocurrency Wallets

Integrate Trezor hardware wallet support into your cryptocurrency wallet application to provide users with enhanced security for their digital assets.

Decentralized Applications (DApps)

Connect users’ Trezor devices to authenticate and sign blockchain transactions directly from your dApp interface.

Exchanges and Trading Platforms

Enable secure withdrawal confirmations and transaction signing for users who prefer hardware wallet security.

Enterprise Applications

Implement hardware-based authentication and cryptographic signing for enterprise applications requiring high security standards.

Portfolio Management

Access read-only account information to display balances and transaction history without exposing private keys.

Architecture

Trezor Connect uses a modular architecture designed for different environments:
1

Transport Layer

Handles communication with Trezor devices through multiple transport protocols:
  • BridgeTransport: Communicates via Trezor Bridge (default for Node.js)
  • WebUSB: Direct browser communication with devices
  • Bluetooth: Wireless connection for supported models
2

API Layer

Provides high-level methods for blockchain operations:
  • Account management and discovery
  • Transaction composition and signing
  • Public key derivation
  • Message signing and verification
3

Device Management

Handles device state, events, and user interactions:
  • Device connection/disconnection events
  • Firmware updates and verification
  • PIN and passphrase management

Package Variants

Trezor Connect is available in multiple variants optimized for different environments:
npm install @trezor/connect
Choose the right package for your environment:
  • Use @trezor/connect for Node.js and Electron main process
  • Use @trezor/connect-web for web applications (includes popup UI)
  • Use @trezor/connect-webextension for browser extensions (Manifest V3 compatible)
  • Use @trezor/connect-mobile for React Native apps (communicates via deep links)

Core Concepts

Manifest

All applications must provide a manifest with identification information:
const manifest = {
  appName: 'My Application',
  appUrl: 'https://myapp.example.com',
  email: '[email protected]',
  appIcon: 'https://myapp.example.com/icon.png' // optional
};

Events

Trezor Connect uses an event-driven architecture for device and transport notifications:
  • DEVICE_EVENT: Fired when devices connect, disconnect, or change state
  • TRANSPORT_EVENT: Notifies about transport layer status (Bridge, WebUSB, etc.)
  • BLOCKCHAIN_EVENT: Updates on blockchain connection and subscriptions
  • UI_EVENT: Requests for user interaction or confirmation

Permissions

API methods require specific permissions:
  • read: Access public keys and addresses
  • write: Sign transactions and messages
  • management: Device configuration and firmware updates

Security Model

Trezor Connect is designed with security as the primary concern:
All cryptographic operations happen inside the Trezor hardware wallet. Private keys are never exposed to the host computer or application.
Critical operations like transaction signing require physical confirmation on the Trezor device screen.
Uses BIP32/BIP39/BIP44 standards for hierarchical deterministic key derivation.
Built-in firmware hash checking ensures device authenticity and integrity.

Response Format

All API methods return a consistent response structure:
// Success response
{
  success: true,
  payload: {
    // Method-specific data
  },
  device: {
    // Device information
  }
}

// Error response
{
  success: false,
  error: 'Error message',
  code: 'ERROR_CODE'
}

Next Steps

Installation

Install Trezor Connect for your environment

Initialization

Set up and initialize Trezor Connect

Supported Coins

View all supported cryptocurrencies

API Reference

Explore the complete API documentation

Resources

GitHub Repository

View source code and contribute

Interactive Explorer

Try the API in your browser

Examples

Sample implementations for various environments

NPM Package

View package on NPM registry

Build docs developers (and LLMs) love