Package Exports
- @trezor/transport
- @trezor/transport/lib/index.js
- @trezor/transport/lib/lowlevel/sharedConnectionWorker
- @trezor/transport/lib/lowlevel/sharedConnectionWorker.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@trezor/transport) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@trezor/transport
Library for low-level communication with Trezor.
Intended as a "building block" for other packages - it is used in trezor.js (deprecated) and trezor-connect.
You probably don't want to use this package directly. For communication with Trezor with a more high-level API, use trezor-connect.
What is the purpose
- translate JSON payloads to binary messages using protobuf definitions comprehensible to Trezor devices
- chunking and reading chunked messages according to the Trezor protocol
- exposing single API for various transport methods:
- Trezor Bridge
- Webusb
- Create and expose typescript definitions based on protobuf definitions.
Updating messages
In order to be used new features of trezor-firmware you need to update protobuf definitions.
git submodule update --init --recursive
to initialize trezor-common submoduleyarn workspace @trezor/transport update:submodules
to update trezor-common submoduleyarn workspace @trezor/transport update:protobuf
to generate newmessages.json
andprotobuf.d.ts
Publishing
Follow instructions how to publish @trezor package to npm registry.