# @trezor/utxo-lib

> Client-side Bitcoin-like JavaScript library

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

## Install

```sh
npm install @trezor/utxo-lib
pnpm add @trezor/utxo-lib
yarn add @trezor/utxo-lib
bun add @trezor/utxo-lib
```

## 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 | 2019-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 201.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1064 |
| Author | Trezor <info@trezor.io> |
| Maintainers | prusnak, tsusanka-sl, trezor-ci, trezor-admin |
| Keywords | Trezor, bitcoin, altcoins, utxo, javascript |

## Links

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

## Dependencies (8)

- [wif](https://npm.io/package/wif.md) ^5.0.0
- [cashaddrjs](https://npm.io/package/cashaddrjs.md) 0.4.4
- [@scure/base](https://npm.io/package/@scure/base.md) ^2.0.0
- [@noble/curves](https://npm.io/package/@noble/curves.md) ^2.0.1
- [@noble/hashes](https://npm.io/package/@noble/hashes.md) ^2.0.1
- [@trezor/utils](https://npm.io/package/@trezor/utils.md) 10.0.1
- [varuint-bitcoin](https://npm.io/package/varuint-bitcoin.md) 2.0.0
- [@sinclair/typebox](https://npm.io/package/@sinclair/typebox.md) ^0.34.49

## 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
- 2.5.0 — 2025-12-16
- 2.4.5-beta.2 — 2025-12-09
- 2.4.5-beta.1 — 2025-11-12
- 2.4.4 — 2025-10-23
- 2.4.4-beta.1 — 2025-10-20
- 2.4.3 — 2025-09-18
- 2.4.3-beta.1 — 2025-09-10
- 2.4.2 — 2025-07-11
- 2.4.2-beta.2 — 2025-07-09
- … 68 more at https://npm.io/package/@trezor/utxo-lib/versions

## README

# @trezor/utxo-lib

[![NPM](https://img.shields.io/npm/v/@trezor/utxo-lib.svg)](https://www.npmjs.org/package/@trezor/utxo-lib)

Javascript Bitcoin and Bitcoin-like altcoins library for node.js and browsers.

This library is a fork of the `bitcoinjs-lib` and it is profiled to work with `Trezor` environment.

It enables standard operations such as generating addresses, creating transactions, importing/exporting keys etc.

Not all the modules/methods from the upstream are present here (like ecpair, psbt...) since we didn't use them for now, however they might be easily added in the future.

_You probably don't want to use this package directly. Try one of the alternatives instead:_

- [bitcoinjs-lib](https://github.com/bitcoinjs/bitcoinjs-lib)
- [@bitgo/utxo-lib](https://github.com/BitGo/BitGoJS/tree/master/modules/utxo-lib)
- [bcoin](https://github.com/indutny/bcoin)
- [bitcore](https://github.com/bitpay/bitcore)

## History timeline

This is the fifth and hopefully the ultimate attempt to fork and maintain `bitcoinjs-lib`.

1. https://www.npmjs.com/package/bitcoinjs-lib-zcash
1. https://github.com/trezor/bitcoinjs-trezor
1. https://github.com/BitGo/bitgo-utxo-lib
1. https://github.com/trezor/trezor-utxo-lib

## Main differences

Differences are explicitly described in each file.

- `Transaction` class is extended by each custom `altcoin` implementation.
- `Transaction` class is parsing amounts as strings.
- `address` module handles `Bitcoin Cash` addresses.
- added `coinselect` and `compose` modules (origin source: https://github.com/trezor/hd-wallet/tree/master/src/build-tx)
- removed unused modules: `block`, `classify`, `ecpair`, `psbt`.

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