# @bitgo/utxo-descriptors

> BitGo SDK for building UTXO descriptors

Latest version **2.3.2** (published 2026-11-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @bitgo/utxo-descriptors
pnpm add @bitgo/utxo-descriptors
yarn add @bitgo/utxo-descriptors
bun add @bitgo/utxo-descriptors
```

## 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 | 2.3.2 |
| Published | 2026-11-17 |
| First published | 2026-05-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 2 |
| Unpacked size | 540 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 397 |
| Author | BitGo SDK Team |
| Maintainers | louib-bitgo, bitgobot |

## Links

- npm: https://www.npmjs.com/package/@bitgo/utxo-descriptors
- Repository: https://github.com/BitGo/BitGoJS
- Homepage: https://github.com/BitGo/BitGoJS#readme
- Issues: https://github.com/BitGo/BitGoJS/issues
- npm.io page: https://npm.io/package/@bitgo/utxo-descriptors

## Dependencies (2)

- [@bitgo/utxo-core](https://npm.io/package/@bitgo/utxo-core.md) ^1.42.2
- [@bitgo/wasm-utxo](https://npm.io/package/@bitgo/wasm-utxo.md) ^5.15.0

## Recent versions

- 2.3.2 (latest) — 2026-11-17
- 2.3.1 — 2026-10-29
- 2.3.0 — 2026-10-22
- 2.2.0 — 2026-10-16
- 2.1.0 — 2026-09-29
- 2.0.0 — 2026-09-09
- 1.5.3 — 2026-09-04
- 1.5.2 — 2026-09-01
- 1.5.1 — 2026-08-27
- 1.5.0 — 2026-08-25
- 1.4.0 — 2026-07-28
- 1.3.4 — 2026-07-22
- 1.3.3 — 2026-07-16
- 1.3.2 — 2026-06-03
- 1.3.1 — 2026-06-02
- … 4 more at https://npm.io/package/@bitgo/utxo-descriptors/versions

## README

# @bitgo/utxo-descriptors

A library for constructing [Bitcoin output descriptors][bip-380] (BIP-380) — descriptor strings that pair on-chain UTXOs with a derivable, parseable key-tracking expression.

This package is the canonical home for descriptor-building logic across BitGo's UTXO codebase. It deliberately stays one layer above [`@bitgo/wasm-utxo`][wasm-utxo]: that package owns descriptor parsing and miniscript compilation. This package owns the high-level _builders_ that emit valid descriptor strings for the protocols BitGo supports.

## Install

```bash
yarn add @bitgo/utxo-descriptors
```

## Module layout

```
src/
├── index.ts                  # re-exports each protocol module under a namespace
└── sbtc/                     # sBTC peg-in deposit descriptors
    ├── constants.ts
    ├── descriptor.ts
    ├── depositAddress.ts
    └── index.ts
```

Each new protocol gets its own subdirectory under `src/` and is re-exported as a namespace from [`src/index.ts`](src/index.ts), so consumers import it as `import { sbtc } from '@bitgo/utxo-descriptors'`.

---

## sBTC

The `sbtc` namespace builds descriptors for sBTC peg-in deposits — Bitcoin UTXOs whose output script is a Taproot tree with two leaves:

- a **deposit** leaf, spendable only by the sBTC signers, that commits to the Stacks recipient and the maximum signer fee
- a **reclaim** leaf, spendable by the depositor after a relative timelock, that lets the depositor recover their BTC if the signers fail to act

Both leaves are expressed as **Bitcoin miniscript fragments** inside a single `tr()` descriptor — no raw script bytes, no out-of-band leaf hashing. This is enabled by the `payload_drop(<hex>)` fragment and tap-context `r:older(N)` shipped in `@bitgo/wasm-utxo` 4.11.0 ([BitGoWASM #272](https://github.com/BitGo/BitGoWASM/pull/272)).

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