Prerequisites
- Rust 1.91+
- Solana CLI 3.1.13 (Agave):
sh -c "$(curl -sSfL https://release.anza.xyz/v3.1.13/install)" - Node.js 24.7.0+
- pnpm 10.15.1+:
npm install -g pnpm@10.15.1
Clone the Repository
git clone https://github.com/solana-foundation/solana-private-channels.gitcd solana-private-channels
Generate TypeScript Clients
The TypeScript clients are not published to npm. They must be generated from the IDL using Codama.
# Escrow program clientcd private-channel-escrow-programpnpm install --frozen-lockfilepnpm run generate-clientscd ..# Withdraw program clientcd private-channel-withdraw-programpnpm install --frozen-lockfilepnpm run generate-clientscd ..
Generated clients land in:
private-channel-escrow-program/clients/typescript/src/generated/private-channel-withdraw-program/clients/typescript/src/generated/
Import from these local paths in your application; there is no
@private-channels/client package on npm. Code samples in this section use a
relative path (../private-channel-escrow-program/...) that assumes your code
lives alongside the cloned repository; adjust it to match where you actually
import from in your own project.
Connect to Devnet
solana config set --url devnetsolana airdrop 2solana balance
- Escrow Program ID:
9tgHa1DcnaSSUtmMsst8ovKTe1Gfxzezn27KnH9xXYeU - Withdraw Program ID:
J231K9UEpS4y4KAPwGc4gsMNCjKFRMYcQBcjVW7vBhVi
Next Steps
Deposit Tokens - make your first deposit
Is this page helpful?