# @trezor/rollout

> Small javascript library to get latest safe firmware version for trezor update.

Latest version **1.3.2** (published 2022-03-22) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

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

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.3.2 |
| Published | 2022-03-22 |
| First published | 2020-03-13 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 36.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1053 |
| Author | Trezor |
| Maintainers | martin_varmuza, prusnak, szymonlesisz, tsusanka-sl, matejkriz, trezor-ci |
| Keywords | Trezor, trezor-rollout, trezor firmware update |

## Links

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

## Dependencies (3)

- [runtypes](https://npm.io/package/runtypes.md) ^6.5.1
- [cross-fetch](https://npm.io/package/cross-fetch.md) ^3.1.5
- [@trezor/utils](https://npm.io/package/@trezor/utils.md) ^1.0.0

## Recent versions

- 1.3.2 (latest) — 2022-03-22
- 1.3.1 — 2022-02-23
- 1.3.0 — 2022-02-14
- 1.2.1 — 2021-12-13
- 1.2.0 — 2021-07-15
- 1.1.0 — 2021-07-01
- 1.0.8 — 2021-06-03
- 1.0.7 — 2021-01-06
- 1.0.6 — 2021-01-03
- 1.0.4 — 2020-03-23
- 1.0.3 — 2020-03-19
- 1.0.2 — 2020-03-19
- 1.0.1-0 — 2020-03-13

## README

# @trezor/rollout

[![npm version](https://badge.fury.io/js/%40trezor%2Frollout.svg)](https://badge.fury.io/js/%40trezor%2Frollout)

Tldr: For historical reasons, Trezor devices firmware updates are not always straightforward.

**Incremental update**: not every firmware update can be applied on any installed firmware. This currently applies only for T1 devices. Releases definitions (see below), contain `min_bootloader_version` and `min_firmware_version`. Depending on whether the device is in bootloader mode or not, respective field (`min_bootloader_version` or `min_firmware_version`) should be observed and next firmware to apply should be evaulated againts them.

**Incremental downgrade**: it is not possible to downgrade to lower version of bootloader. **Rollout module does not solve this**. Problem is, device will not tell you bootloader version if it is not in bootloader mode.

**Rollout update**: sometimes we might want to offer firmware only to small portion of users. This behaviour is defined by `rollout` field and handled by this lib.

**Firmware headers**: any firmware that is applied on firmware with bootloader >= 1.8.0 has old firmware header of 256 bytes, that should be removed before installing. This should be only temporary state and will be solved in future by introducing special intermediate firmwares for updating.

### Publishing

[Follow instructions](../../docs/releases/npm-packages.md) how to publish @trezor package to npm registry.

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