Skip to main content

Overview

TrezorConnect provides a comprehensive API for interacting with Trezor hardware wallets. All methods are called through the TrezorConnect object and return a Promise that resolves with a result object.

Method Structure

Every method call follows a consistent pattern:
const result = await TrezorConnect.methodName(params);

if (result.success) {
  // Handle successful response
  console.log(result.payload);
} else {
  // Handle error
  console.error(result.error);
}

Response Format

All methods return a standardized response object:
{
  success: true,
  payload: {
    // Method-specific data
  },
  device?: Device // Device info (when applicable)
}

Method Categories

TrezorConnect methods are organized into several categories:

Device Management

Methods for device configuration, firmware, and security:

getFeatures

Get device features and capabilities

getDeviceState

Get device state for passphrase validation

firmwareUpdate

Update device firmware

resetDevice

Initialize a new device

wipeDevice

Wipe all device data

applySettings

Change device settings

Account Operations

Generic methods that work across multiple cryptocurrencies:
import TrezorConnect from '@trezor/connect';

const result = await TrezorConnect.getAddress({
  path: "m/49'/0'/0'/0/0",
  coin: 'btc',
  showOnTrezor: true
});

if (result.success) {
  console.log('Address:', result.payload.address);
  console.log('Path:', result.payload.serializedPath);
}

Bitcoin Operations

Sign a Bitcoin transaction with detailed UTXO inputs and outputs.
const result = await TrezorConnect.signTransaction({
  inputs: [
    {
      address_n: [49 | 0x80000000, 0 | 0x80000000, 0 | 0x80000000, 0, 0],
      prev_hash: 'b4dc0ffeee...',
      prev_index: 0,
      amount: '100000'
    }
  ],
  outputs: [
    {
      address: '1BitcoinAddress...',
      amount: '90000'
    }
  ],
  coin: 'btc'
});
Compose a transaction with automatic UTXO selection and fee calculation.
const result = await TrezorConnect.composeTransaction({
  outputs: [{ address: '1Address...', amount: '50000' }],
  coin: 'btc',
  push: false
});
Authorize CoinJoin transactions for privacy-enhanced Bitcoin transfers.
const result = await TrezorConnect.authorizeCoinjoin({
  coordinator: 'www.coordinator.com',
  maxRounds: 10,
  maxCoordinatorFeeRate: 50000000,
  maxFeePerKvbyte: 3500,
  path: "m/84'/0'/0'",
  coin: 'btc'
});

Ethereum Operations

const result = await TrezorConnect.ethereumGetAddress({
  path: "m/44'/60'/0'/0/0",
  showOnTrezor: true
});

if (result.success) {
  console.log('Address:', result.payload.address);
}

Multi-Chain Support

TrezorConnect supports multiple blockchain networks:

Cardano

cardanoGetAddress cardanoSignTransaction cardanoComposeTransaction

Ripple

rippleGetAddress rippleSignTransaction

Stellar

stellarGetAddress stellarSignTransaction

Tezos

tezosGetAddress tezosSignTransaction

Monero

moneroGetAddress moneroSignTransaction

Solana

solanaGetAddress solanaSignTransaction

Tron

tronGetAddress tronSignTransaction

Bundle Calls

Many methods support bundle calls to process multiple requests efficiently:
const result = await TrezorConnect.getAddress({
  bundle: [
    { path: "m/49'/0'/0'/0/0", coin: 'btc' },
    { path: "m/49'/0'/0'/0/1", coin: 'btc' },
    { path: "m/49'/0'/0'/0/2", coin: 'btc' }
  ]
});

if (result.success) {
  result.payload.forEach((item, index) => {
    console.log(`Address ${index}:`, item.address);
  });
}
Bundle calls automatically emit BUNDLE_PROGRESS events during processing. See the Events page for details.

Advanced Features

Silent Address Validation

Some methods support silent address validation:
const result = await TrezorConnect.getAddress({
  path: "m/49'/0'/0'/0/0",
  coin: 'btc',
  address: '1ExpectedAddress...', // Validates against this
  showOnTrezor: true
});

// Throws Method_AddressNotMatch error if addresses don't match

Coin Path Validation

Methods automatically validate derivation paths against coin standards:
// This will validate that the path matches Bitcoin standards
const result = await TrezorConnect.getAddress({
  path: "m/49'/0'/0'/0/0", // BIP49 (P2SH-P2WPKH)
  coin: 'btc'
});

Cross-Chain Calls

Bypass coin path validation for non-standard paths:
const result = await TrezorConnect.getAddress({
  path: "m/44'/0'/0'/0/0",
  coin: 'btc',
  crossChain: true // Skip path validation
});

Blockchain Methods

Methods that interact with blockchain backends (no device needed):
const result = await TrezorConnect.blockchainEstimateFee({
  coin: 'btc',
  request: {
    blocks: [2, 6, 10]
  }
});

if (result.success) {
  console.log('Fee estimates:', result.payload);
}

Method Permissions

Methods require specific permissions:
PermissionDescriptionMethods
readRead data from devicegetAddress, getPublicKey, getAccountInfo
writeWrite data to deviceresetDevice, applySettings
managementDevice managementfirmwareUpdate, wipeDevice
Users must grant permission in the Trezor Suite popup before methods can execute.

Common Parameters

Many methods share common parameters:
ParameterTypeDescription
pathstring | number[]BIP32 derivation path
coinstringCryptocurrency identifier
showOnTrezorbooleanDisplay on device screen
bundlearrayMultiple requests in one call

TypeScript Support

All methods are fully typed:
import TrezorConnect, { type Address } from '@trezor/connect';

const result = await TrezorConnect.getAddress({
  path: "m/49'/0'/0'/0/0",
  coin: 'btc'
});

if (result.success) {
  const address: string = result.payload.address;
  const serializedPath: string = result.payload.serializedPath;
}

Next Steps

Events

Learn about the event system

Error Handling

Handle errors effectively

Device Management

Manage device connections

API Reference

Explore all methods

Build docs developers (and LLMs) love