Choose Your Package
Trezor Connect is available in different packages optimized for specific environments. Choose the package that matches your use case:Node.js
@trezor/connectFor Node.js applications and Electron main processWeb Applications
@trezor/connect-webFor web apps with popup UI and browser transportBrowser Extensions
@trezor/connect-webextensionFor browser extensions with Manifest V3 supportReact Native
@trezor/connect-mobileFor mobile apps using deep link communicationNode.js Installation
- npm
- yarn
- pnpm
The
@trezor/connect package is designed for Node.js and Electron main process. It does not include browser-specific features like popup UI or WebUSB transport.Prerequisites
- Node.js: Version 18 or higher recommended
- Trezor Bridge: Required for device communication
- Download from https://suite.trezor.io/web/bridge/
- Bridge runs as a background service and enables USB communication
TypeScript Support
Trezor Connect includes TypeScript definitions out of the box. No additional@types packages are needed.
Web Application Installation
- npm
- yarn
- pnpm
@trezor/connect-web includes additional features for web applications:- Popup-based UI for user interactions
- WebUSB transport for direct browser communication
- Automatic transport selection (WebUSB or Bridge)
Browser Requirements
- Modern browsers: Chrome 89+, Edge 89+, Opera 75+
- WebUSB support: For direct USB communication (optional, Bridge can be used as fallback)
- HTTPS: Required for WebUSB transport (localhost is allowed for development)
Browser Extension Installation
- npm
- yarn
- pnpm
Manifest V3 Configuration
Add required permissions to yourmanifest.json:
manifest.json
React Native Installation
- npm
- yarn
- pnpm
@trezor/connect-mobile uses deep links to communicate with Trezor Suite mobile app. Users need Trezor Suite installed on their device.Additional Setup
Configure deep link handling in your React Native app:app.json
Package Version
Current version: 10.0.0-alpha.1 To install a specific version:- npm
- yarn
- pnpm
Peer Dependencies
Trezor Connect requirestslib as a peer dependency:
Verification
Verify your installation by checking the installed version:- npm
- yarn
- pnpm
Build Tools Configuration
Webpack
If you’re using Webpack, you may need to configure polyfills for Node.js core modules:webpack.config.js
Vite
For Vite projects, add polyfills configuration:vite.config.js
Next.js
For Next.js applications using@trezor/connect-web:
next.config.js
Troubleshooting
Module not found errors
Module not found errors
If you see errors about missing modules like
crypto or stream, you need to configure polyfills for Node.js core modules. See the build tools configuration section above.TypeScript errors
TypeScript errors
Ensure you have
tslib installed as a peer dependency:Bridge connection issues
Bridge connection issues
If the SDK cannot connect to devices:
- Ensure Trezor Bridge is installed and running
- Check that your device is connected via USB
- Try restarting Trezor Bridge service
- On Linux, check USB permissions
WebUSB not working
WebUSB not working
WebUSB requires:
- HTTPS connection (localhost is allowed for development)
- Modern browser with WebUSB support
- User permission to access USB devices
Next Steps
Initialize Trezor Connect
Learn how to initialize and configure Trezor Connect in your application