> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Instructions

> Onchain instruction reference for the Private Channels Escrow and Withdraw programs

This section is the onchain instruction reference. Most developers call these
instructions through the generated TypeScript clients; you only need this if you
are building operator tooling, writing custom integrations, or debugging
instruction-level errors.

**Escrow Program** (`9tgHa1DcnaSSUtmMsst8ovKTe1Gfxzezn27KnH9xXYeU`) - manages
deposits, operator provisioning, and Mainnet settlement:

- [CreateInstance](/developers/docs/tools/private-channels/instructions/create-instance) -
  initialize the escrow instance PDA
- [AllowMint](/developers/docs/tools/private-channels/instructions/allow-mint) - whitelist
  an SPL token mint
- [BlockMint](/developers/docs/tools/private-channels/instructions/block-mint) - remove a
  mint from the allowlist
- [AddOperator](/developers/docs/tools/private-channels/instructions/add-operator) -
  provision an operator
- [RemoveOperator](/developers/docs/tools/private-channels/instructions/remove-operator) -
  revoke an operator
- [SetNewAdmin](/developers/docs/tools/private-channels/instructions/set-new-admin) -
  transfer admin rights
- [Deposit](/developers/docs/tools/private-channels/instructions/deposit) - move SPL tokens
  into the escrow
- [Release Funds](/developers/docs/tools/private-channels/instructions/release-funds) -
  operator settles a withdrawal to Mainnet
- [Reset SMT Root](/developers/docs/tools/private-channels/instructions/reset-smt-root) -
  operator rotates the Sparse Merkle Tree

**Withdraw Program** (`J231K9UEpS4y4KAPwGc4gsMNCjKFRMYcQBcjVW7vBhVi`) - runs on
the private channel network:

- [Withdraw Funds](/developers/docs/tools/private-channels/instructions/withdraw-funds) -
  burn channel-side balance to initiate a withdrawal

## Error Codes

**Escrow Program - `PrivateChannelEscrowProgramError`**

| Code                                         | Message                                          |
| -------------------------------------------- | ------------------------------------------------ |
| `InvalidEventAuthority`                      | Invalid event authority provided                 |
| `InvalidAta`                                 | Invalid ATA provided                             |
| `InvalidMint`                                | Invalid mint provided                            |
| `InvalidInstanceId`                          | Instance ID invalid or does not respect rules    |
| `InvalidInstance`                            | Invalid instance provided                        |
| `InvalidAdmin`                               | Invalid admin provided                           |
| `TransferHookNotAllowed`                     | Transfer hook extension not allowed              |
| `InvalidOperatorPda`                         | Invalid operator PDA provided                    |
| `InvalidTokenAccount`                        | Invalid token account provided                   |
| `InvalidEscrowBalance`                       | Invalid escrow balance                           |
| `InvalidAllowedMint`                         | Invalid allowed mint                             |
| `InvalidSmtProof`                            | Invalid SMT proof provided                       |
| `InvalidTransactionNonceForCurrentTreeIndex` | Invalid transaction nonce for current tree index |
| `UnexpectedTreeIndex`                        | Unexpected current tree index for SMT root reset |

**Withdraw Program - `PrivateChannelWithdrawProgramError`**

| Code          | Message                                     |
| ------------- | ------------------------------------------- |
| `InvalidMint` | Invalid mint provided                       |
| `ZeroAmount`  | Withdrawal amount must be greater than zero |
