> 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/clients/xchain-utxo/xchain-bitcoin.md).

# xchain-bitcoin

### Third-Party Library <a href="#third-party-library" id="third-party-library"></a>

It communicates with Bitcoin by using [`bitcoinjs-lib`](https://github.com/bitcoinjs/bitcoinjs-lib)

#### Client URL <a href="#client-url" id="client-url"></a>

* Mainnet: `https://api.blockchair.com/bitcoin`
* Testnet: `https://api.blockchair.com/bitcoin/testnet`

#### Explorer URL <a href="#explorer-url" id="explorer-url"></a>

* Mainnet: [`https://blockstream.info`](https://blockstream.info/)
* Testnet: [`https://blockstream.info/testnet`](https://blockstream.info/)

### Address Generation <a href="#address-generation" id="address-generation"></a>

It supports the [`BIP44 path derivations`](https://github.com/satoshilabs/slips/blob/master/slip-0044.md).

By default, the index is 0. - `84'/0'/0'/0/0` for mainnet, `84'/1'/0'/0/0` for testnet

### Blockchain-Specific Functions <a href="#blockchain-specific-functions" id="blockchain-specific-functions"></a>

#### Additional Functions to Get Fee Information <a href="#additional-functions-to-get-fee-information" id="additional-functions-to-get-fee-information"></a>

* `getFeesWithRates`
* `getFeesWithMemo`
* `getFeeRates`

```
type FeeRate = number
type FeeRates = Record<FeeOptionKey, FeeRate>
type FeesWithRates = { rates: FeeRates; fees: Fees }

getFeesWithRates(memo?: string): Promise<FeesWithRates>
getFeesWithMemo(memo: string): Promise<Fees>
getFeeRates(): Promise<FeeRates>
```

#### Scans UTXOs on the Address <a href="#scans-utxos-on-the-address" id="scans-utxos-on-the-address"></a>

```
scanUTXOs(): Promise<void>
```

### Peer Dependencies

You can visit the [xchain-bitcoin](https://github.com/xchainjs/xchainjs-lib/tree/master/packages/xchain-bitcoin) package repository to get the updated peer dependencies by looking at the "devDependencies" object in the "package.json" file.

For more information about the API of the package, please click [here](https://docs.xchainjs.org/xchain-docs/xchain-bitcoin/docs/index.html)
