Quick start

Build the voucher library and settlement program and run their tests on your own machine. Everything runs locally; nothing touches a live network.

Prerequisites#

  • Node.js 22
  • Rust (stable), installed with rustup
  • The Solana CLI (Agave)
  • Anchor 0.31.1, installed with avm

Install#

From the repository root:

npm install

Voucher library#

Run the TypeScript tests, including the shared test vectors:

npm run test:voucher

Settlement program#

Build the program and generate its IDL:

npm run build:program

Run the integration tests. They load the compiled program into LiteSVM and cover deposits, redemption, replays, double-spends, overspend ordering, expiry, limits, bad signatures and time-locked withdrawals:

npm run test:program

Check the Rust encoding against the same test vectors the TypeScript library uses:

cd program && cargo test

Deploying to devnet#

The program has not been deployed yet. To deploy your own copy, fund a devnet wallet at ~/.config/solana/id.json, then:

cd program && anchor deploy --provider.cluster devnet

Next#