# 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).
* **Wallet Agnostic**: Easily integrate with mobile wallets using our WizardConnect adapter, or use server-side headless wallets.

## 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: 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://docs.intentsprotocol.xyz/readme.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.
