> For the complete documentation index, see [llms.txt](https://xchainjs.gitbook.io/xchainjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xchainjs.gitbook.io/xchainjs/providers/xchain-utxo-providers/how-it-works.md).

# How it Works

This section for the XChain UTXO Providers package offers insight into the operational workflow and mechanisms involved in interacting with Unspent Transaction Output (UTXO) providers within blockchain networks.

A specification outlines a generalized interface for API providers, intended for use with XChainJS implementations.&#x20;

These providers should refrain from generating keys themselves; instead, the xchain-crypto library should handle this task to ensure compatibility across different blockchains.&#x20;

The providers are solely provided with a master BIP39 phrase, from which they decode a temporary key and address as needed.

### Design <a href="#design" id="design"></a>

The UtxoOnlineDataProvider has the following signature:

```
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>
}
```

### Supported Providers <a href="#implementations" id="implementations"></a>

#### Sochain v3

<table><thead><tr><th width="131">Provider</th><th width="187">Website</th><th width="104">Status</th><th width="84">FreeTier</th><th>Chains supported</th></tr></thead><tbody><tr><td>sochain v3</td><td><a href="https://sochain.com/api/">https://sochain.com/api/</a></td><td>Complete</td><td>No</td><td>BTC, BTC-Testnet, LTC,LTC-Testnet, DOGE, DOGE-Testnet</td></tr></tbody></table>

#### Blockcypher

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

#### Haskoin

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