# @xchainjs/xchain-utxo-providers

> A specification for a generalised interface for api providers, to be used by XChainJS implementations. The providers should not have any functionality to generate a key, instead, the `xchain-crypto` library should be used to ensure cross-chain compatible

Latest version **2.1.2** (published 2026-10-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @xchainjs/xchain-utxo-providers
pnpm add @xchainjs/xchain-utxo-providers
yarn add @xchainjs/xchain-utxo-providers
bun add @xchainjs/xchain-utxo-providers
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2026-10-06 |
| First published | 2023-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 171.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 133 |
| Maintainers | xchainjsadmin, thorchain_org, _stu, veado, thatstrangeguy, junkai121, sarawut11, thorswap, hodrthemediocre, polaris_9r, thorianite |

## Links

- npm: https://www.npmjs.com/package/@xchainjs/xchain-utxo-providers
- Repository: https://github.com/xchainjs/xchainjs-lib
- Homepage: https://github.com/xchainjs/xchainjs-lib#readme
- Issues: https://github.com/xchainjs/xchainjs-lib/issues
- npm.io page: https://npm.io/package/@xchainjs/xchain-utxo-providers

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) 1.20.0
- [@xchainjs/xchain-util](https://npm.io/package/@xchainjs/xchain-util.md) 2.0.7
- [@xchainjs/xchain-client](https://npm.io/package/@xchainjs/xchain-client.md) 2.0.18
- [@supercharge/promise-pool](https://npm.io/package/@supercharge/promise-pool.md) 2.4.0

## Recent versions

- 2.1.2 (latest) — 2026-10-06
- 2.1.1 — 2026-08-06
- 2.1.0 — 2026-07-20
- 2.0.17 — 2026-06-25
- 2.0.16 — 2026-06-16
- 2.0.15 — 2026-06-03
- 2.0.14 — 2026-05-14
- 2.0.13 — 2026-04-15
- 2.0.12 — 2026-03-12
- 2.0.11 — 2026-02-23
- 2.0.10 — 2026-02-10
- 2.0.9 — 2025-09-19
- 2.0.8 — 2025-07-28
- 2.0.7 — 2025-07-23
- 2.0.6 — 2025-07-23
- … 39 more at https://npm.io/package/@xchainjs/xchain-utxo-providers/versions

## README

# XChainJS API UTXO providers Interface

A specification for a generalised interface for api providers, to be used by XChainJS implementations. The providers should not have any functionality to generate a key, instead, the `xchain-crypto` library should be used to ensure cross-chain compatible keystores are handled. The providers is only ever passed a master BIP39 phrase, from which a temporary key and address is decoded.

## Documentation

### [`xchain providers`](http://docs.xchainjs.org/xchain-xchain-utxo-providers/)

[`Overview of xchain-utxo-providers`](http://docs.xchainjs.org/xchain-utxo-providers/overview.html)\
[`Interface of xchain-utxo-providers`](http://docs.xchainjs.org/xchain-utxo-providers/interface.html)

## Design

The UtxoOnlineDataProvider has the following signature:

```typescript
import { Address, Asset } from '@xchainjs/xchain-util'

import { ExplorerProvider } from './explorer-provider'
import { Balance, Network, Tx, TxHash, TxHistoryParams, TxsPage } from './types'

export type Witness = {
  value: number
  script: Buffer
}
export type UTXO = {
  hash: string
  index: number
  value: number
  witnessUtxo: Witness
  txHex?: string
}
export interface OnlineDataProvider {
  getBalance(address: Address, assets?: Asset[]): Promise<Balance[]>
  getTransactions(params: TxHistoryParams): Promise<TxsPage>
  getTransactionData(txId: string, assetAddress?: Address): Promise<Tx>
}
export interface UtxoOnlineDataProvider extends OnlineDataProvider {
  getConfirmedUnspentTxs(address: Address): Promise<UTXO[]>
  getUnspentTxs(address: Address): Promise<UTXO[]>
  broadcastTx(txHex: string): Promise<TxHash>
}
```

## Implementations

### sochain v3

```
Website:          https://sochain.com/api/
Status:           Complete
FreeTier:         No
Chains supported: BTC,BTC-Testnet,LTC,LTC-Testnet,DOGE,DOGE-Testnet
```

### blockcypher

```
Website:         https://www.blockcypher.com/
Status:           Complete
FreeTier:         Yes, rate limited 3 reqs/sec
Chains supported: BTC,BTC-Testnet,LTC,DOGE
```

### haskoin

```
Website:         https://www.haskoin.com/
Status:           Complete
FreeTier:         Yes, rate limit unknown
Chains supported:  BTC,BTC-Testnet,BCH,BCH-Testnet
```

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