Developer Portal • Getting Started

Welcome! This guide is a practical introduction to using the Trezor Suite® Developer Portal. It walks through everything you need to integrate with Trezor hardware wallets, from prerequisites and setup to API usage, security best practices, and sample code. Whether you’re building a lightweight dApp sign-in or a full wallet experience — you’ll find actionable steps and clear examples here.

Introduction

Hardware wallets like Trezor secure private keys off the host device. The Developer Portal exposes tools, documentation, and SDKs that let apps interact with Trezor devices in a secure, user-consented way. This guide focuses on the modern development flow: connecting to a Trezor device, requesting signatures, and verifying data — all while following best practices.

Who this guide is for

This is targeted at front-end engineers, backend engineers building signing workflows, and technical product managers who need to understand integration constraints. You should be comfortable with JavaScript/TypeScript, basic CLI usage, and general web security concepts.

What you will learn

  • How to set up your local environment for Trezor development.
  • Using Trezor Suite APIs and SDKs to request signatures and query device info.
  • Security patterns: ephemeral sessions, origin validation, and user prompts.
  • Testing and CI considerations for hardware wallets.

Prerequisites

Hardware & Accounts

Before you start, make sure you have:

  • A Trezor device (Model T or One) with the latest firmware.
  • Trezor Suite installed on one machine for device recovery or setup.
  • A development machine with Node.js (LTS recommended) and npm/yarn.

Software

Install these tools:

  • Node.js >= 16
  • Yarn or npm
  • A modern browser (Chrome, Edge, Firefox) for WebUSB/WebHID experiments

Why firmware matters

Firmware updates add features, fix crypto bugs, and improve device compatibility. Always test on the firmware version you intend to support and document the minimum supported firmware in your app.

Install & Setup

Use the official JS SDK (example namespace: @trezor/connect — replace with the portal’s current package if different). Installation is done via npm or yarn.

Quick install

// using npm
npm install @trezor/connect

// using yarn
yarn add @trezor/connect
            

Then import in your app:

import TrezorConnect from '@trezor/connect';
TrezorConnect.init({
  manifest: {
    email: 'dev@example.com',
    appUrl: 'https://your-app.example'
  }
});
            

Client manifest

The manifest identifies your app to device firmware and to the user. Use a contact email and a valid app URL. Keep this info up to date in staging and production.

Permissions & transport

Trezor devices can connect via WebUSB, WebHID, or bridge-based transports. On the web, prefer WebHID/WebUSB where available for direct device access; otherwise the Trezor Bridge provides a reliable fallback.

APIs & SDKs

The Developer Portal lists available endpoints, SDK packages, and platform-specific integration guides. Below are the common concepts and methods you’ll use.

Core API concepts

  1. Device discovery — list connected devices and their capabilities.
  2. Session initiation — create a session that scopes requests and user prompts.
  3. Signing requests — request signatures for transactions or arbitrary messages.
  4. Verification — confirm a signature on the server or client.

Example: request a Bitcoin address

TrezorConnect.getAddress({
  device: { path: 'auto' },
  coin: 'BTC',
  path: "m/44'/0'/0'/0/0"
}).then(result => {
  if (result.success) {
    console.log('address', result.payload.address);
  } else {
    console.error('error', result.payload.error);
  }
});
          

Example: sign a transaction (simplified)

TrezorConnect.signTransaction({
  coin: 'BTC',
  inputs: [...],
  outputs: [...]
}).then(res => {
  if (res.success) sendToBackend(res.payload)
});
          
Notes on APIs

Always handle the user-cancel path. Users may refuse or disconnect devices at any time; your UI should gracefully recover and provide clear instructions.

Examples & Patterns

1. Connect & show device state

Use the device list call to populate your app with device metadata (model, firmware version, initialized/uninitialized).

2. Wallet connect pattern

Similar to other wallet connectors, open a modal that describes the request, then call the SDK and wait for confirmation. Provide the user with a clear explanation of what they are signing.

3. Server-side verification

When you receive a signed payload, verify the signature server-side before taking sensitive actions (like broadcasting a transaction or granting access).

Minimal sign flow

1) Collect nonce from server → 2) Request signature → 3) Send signed nonce to server → 4) Server verifies and issues a token.

Batching

Batch smaller operations where UX allows — fewer prompts improve usability, but never batch unrelated consent scopes.

Recovery & onboarding

Offer clear instructions for first-time users: set PIN, write down seed — but never collect the seed in your app.

Security Best Practices

When integrating with hardware wallets, security is the non-negotiable priority. The device is a root of trust — keep it that way.

Never transmit private keys

Under no circumstances should private keys or seed phrases be transmitted to a server, logged, or sent to third-party APIs. The device exists so your keys never leave it.

Ephemeral sessions and origin checks

Use ephemeral session tokens for short-lived operations. On the server, ensure the origin and referrer match expected values for web flows.

User prompts & clarity

Label signing requests with explicit details (amount, recipient, memo). The user must be able to confirm exactly what they sign on the hardware device screen.

Audit & observability

Log only necessary metadata (request IDs, success/failure states) and never sensitive payloads. Maintain an audit trail for transaction requests to help with debugging and dispute resolution.

Testing & CI

Testing with hardware in CI can be challenging. Use a combination of mocks, emulators, and manual hardware tests.

Local hardware testbeds

Maintain a small pool of devices in a secure lab that can be used for scripted end-to-end tests. Protect those devices with multi-person access controls.

Unit tests & mocking

Mock the SDK responses for unit tests. Ensure integration tests that rely on real device behavior are isolated and annotated so they don’t run in every pipeline job.

Regression matrix

Test across OS (Windows, macOS, Linux), multiple browser transports (WebHID/WebUSB), and firmware versions you support.

FAQ

What if the user disconnects mid-sign?

Catch the cancellation/error and surface a clear retry option. Show the user the exact state of the transaction they were signing to avoid duplicate actions.

Can I automate signing?

No. Hardware wallets require user confirmation on-device for sensitive operations. Automation that bypasses user consent defeats the purpose of the hardware wallet.

How do I support multiple coins?

Use per-coin handlers and validate coin-specific fields. Keep coin logic modular so adding new coins doesn’t introduce cross-coin errors.

Resources

Start with the official Developer Portal for SDK docs, changelog, and firmware notes. Here are some starter resources (replace placeholders with live links from your portal):

Pro tip: Keep an integration checklist that includes supported firmware versions, required transports, and a UX checklist for signing prompts — it speeds up QA and reduces user errors.

Conclusion

Integrating with the Trezor Suite Developer Portal unlocks secure signing capabilities for your application. Focus on clear UX for user consent, rigorous security practices, and careful testing across devices and firmware. The device is the source of truth — treat it with that level of respect and your users will benefit from strong, user-controlled security.

Next steps

  1. Review the official API reference on the portal.
  2. Install the SDK and run through the address and sign examples locally.
  3. Set up a small device test pool for integration tests and document your minimal supported firmware.

If you want, copy this HTML into your docs site and replace the placeholder links with live Developer Portal links. Happy building — and remember: never ask users for seed phrases.

Server-side signature verification (example)

// Node.js pseudo-code to verify a signed message returned from a Trezor device
import crypto from 'crypto';
import { verifySignature } from 'some-crypto-lib'; // replace with actual library

// payload: { message, signature, publicKey }
function verify(payload){
  const { message, signature, publicKey } = payload;
  const valid = verifySignature(message, signature, publicKey);
  return valid;
}