Installation

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.git
cd 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 client
cd private-channel-escrow-program
pnpm install --frozen-lockfile
pnpm run generate-clients
cd ..
# Withdraw program client
cd private-channel-withdraw-program
pnpm install --frozen-lockfile
pnpm run generate-clients
cd ..

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 devnet
solana airdrop 2
solana balance
  • Escrow Program ID: 9tgHa1DcnaSSUtmMsst8ovKTe1Gfxzezn27KnH9xXYeU
  • Withdraw Program ID: J231K9UEpS4y4KAPwGc4gsMNCjKFRMYcQBcjVW7vBhVi

Next Steps

Deposit Tokens - make your first deposit

Is this page helpful?

Содержание

Редактировать страницу
Installation | Solana