---
title: Instructions
description:
  On-chain instruction reference for the Private Channels Escrow and Withdraw
  programs
---

This section is the on-chain 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](/docs/tools/private-channels/instructions/create-instance) -
  initialize the escrow instance PDA
- [AllowMint](/docs/tools/private-channels/instructions/allow-mint) - whitelist
  an SPL token mint
- [BlockMint](/docs/tools/private-channels/instructions/block-mint) - remove a
  mint from the allowlist
- [AddOperator](/docs/tools/private-channels/instructions/add-operator) -
  provision an operator
- [RemoveOperator](/docs/tools/private-channels/instructions/remove-operator) -
  revoke an operator
- [SetNewAdmin](/docs/tools/private-channels/instructions/set-new-admin) -
  transfer admin rights
- [Deposit](/docs/tools/private-channels/instructions/deposit) - move SPL tokens
  into the escrow
- [Release Funds](/docs/tools/private-channels/instructions/release-funds) -
  operator settles a withdrawal to Mainnet
- [Reset SMT Root](/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](/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 |
