# xchain-bitcoincash

The section offers a detailed insight into the underlying mechanisms and operational workflow of the xchain-Bitcoincash blockchain library.&#x20;

It provides developers with a comprehensive understanding of how they can effectively utilize the library's features and functionalities to interact with the Bitcoin Cash (BCH) blockchain network.

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

It communicates with Bitcoincash by using [@psf/bitcoincashjs-lib](https://www.npmjs.com/package/@psf/bitcoincashjs-lib)

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

* Mainnet: `https://www.blockchain.com/bch`
* Testnet: `https://www.blockchain.com/bch-testnet`

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

* Mainnet: [`https://www.blockchain.com/explorer?view=bch`](https://www.blockchain.com/)
* Testnet: [`https://www.blockchain.com/explorer?view=bch-testnet`](https://www.blockchain.com/)

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

By default, the index is 0. - `m/44'/145'/0'/0/` for mainnet, `m/44'/1'/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>
```

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xchainjs.gitbook.io/xchainjs/clients/xchain-utxo/xchain-bitcoincash.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
