# @trezor/protocol

Latest version **10.0.1** (published 2026-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @trezor/protocol
pnpm add @trezor/protocol
yarn add @trezor/protocol
bun add @trezor/protocol
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 10.0.1 |
| Published | 2026-09-25 |
| First published | 2023-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 79.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1065 |
| Maintainers | prusnak, tsusanka-sl, trezor-ci, trezor-admin |

## Links

- npm: https://www.npmjs.com/package/@trezor/protocol
- Repository: https://github.com/trezor/trezor-suite
- Issues: https://github.com/trezor/trezor-suite/issues
- npm.io page: https://npm.io/package/@trezor/protocol

## Recent versions

- 10.0.1 (latest) — 2026-09-25
- 10.0.0-beta.3 (beta) — 2026-09-17
- 10.0.0-alpha.1 (alpha) — 2026-05-15
- 10.0.0 — 2026-09-22
- 10.0.0-beta.2 — 2026-09-16
- 10.0.0-beta.1 — 2026-07-30
- 1.3.1 — 2026-04-22
- 1.3.0 — 2025-12-16
- 1.3.0-beta.2 — 2025-12-09
- 1.3.0-beta.1 — 2025-11-25
- 1.2.11-beta.1 — 2025-11-12
- 1.2.10 — 2025-10-23
- 1.2.10-beta.1 — 2025-10-20
- 1.2.9 — 2025-09-18
- 1.2.9-beta.1 — 2025-09-10
- … 31 more at https://npm.io/package/@trezor/protocol/versions

## README

# @trezor/protocol

Library for decoding and encoding messages from/to Trezor

## protocol-bridge

Message format:

```
| 2 bytes               |                          |
| protobuf_message_type | protobuf_message_payload |
```

## protocol-v1

Message format:

```
| 3 bytes               | 2 bytes   | 2 bytes               | `len` - 2 bytes          |
| magic | magic | magic | len | len | protobuf_message_type | protobuf_message_payload |
```

Continuation packet format (chunks):

```
| 1 byte |                        |
| magic  | protobuf_message_chunk |
```

## protocol-v2 (TrezorHostProtocol)

Message format:

```
| 1 byte        | 2 bytes           | 2 bytes   | `len` including 4 bytes crc   |
| control_byte  | channel | channel | len | len | thp_payload + crc             |
```

Continuation packet format (chunks):

```
| 1 byte               | 2 bytes           |               |
| continuation_packet  | channel | channel | payload_chunk |
```

## protocol-trzd

Decode loaded `@trezor/protobuf` messages

---
_Source: https://npm.io/package/@trezor/protocol · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
