> For the complete documentation index, see [llms.txt](https://docs.intentsprotocol.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intentsprotocol.xyz/readme.md).

# BCH Intents SDK

**BCH Intents SDK** is a powerful, modular TypeScript toolkit designed to bring intent-based trading and Just-In-Time (JIT) liquidity to the Bitcoin Cash (BCH) network.

## What are Intents?

In traditional DeFi (like AMMs), users construct and sign explicit *transactions* containing exactly how a trade should be routed. This forces the user to accept high slippage, pay network fees for failed transactions, and exposes them to Miner Extractable Value (MEV) like front-running and sandwich attacks.

With an **intent-based architecture**, users do not sign transactions. Instead, they cryptographically sign an **intent** — a message expressing what they have, what they want, and the constraints of the trade (e.g. minimum price, expiry time).

1. **User signs an Intent:** "I have 5,000 sats of BCH and I want at least 4,500 sats of Token X."
2. **Solvers compete:** Professional market makers ("solvers") monitor the network and compete to fill this intent.
3. **Best price wins:** Solvers construct the actual transaction, paying the network fee and sourcing the liquidity from their own wallets (Just-In-Time liquidity). The solver who can give the user the best price wins the trade.

## Key Features

* **Dutch Auctions on UTXOs**: A breakthrough implementation of decaying-price market orders natively on BCH using recursive covenants.
* **MEV Protection**: Since users don't submit swap transactions to the public mempool, they cannot be front-run.
* **No Slippage Surprises**: Users are mathematically guaranteed to receive at least their specified minimum return.
* **Just-In-Time (JIT) Liquidity**: No need for fragmented liquidity pools. Solvers can use their own inventory or bridge liquidity from centralized exchanges.
* **Native CashTokens**: Built from the ground up for the Bitcoin Cash ecosystem, fully supporting standard BCH and CashTokens (e.g. MUSD, PUSD).
* **Frontend Monetization**: Built-in covenant-enforced fee system allows DEXs and wallets to collect guaranteed revenue on every swap without backend infrastructure.
* **Wallet Agnostic**: Connect any BCH wallet using `WalletConnectAdapter` (v0.2.0, industry-standard WC v2 protocol), `WizardConnectAdapter` (NIP-44 Nostr), or server-side headless wallets via `MainnetJSAdapter`.

## Why Use the SDK?

The BCH Intents SDK abstracts away the extreme complexity of compiling CashScript covenants, managing introspection opcodes, and communicating with solver networks.

Whether you are building a decentralized exchange aggregator, a Telegram trading bot, or writing your own solver algorithms, the SDK provides strongly-typed, production-ready primitives.

***

**Next:** Check out the [Quickstart Guide](/quickstart.md) to build your first Intent.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.intentsprotocol.xyz/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
