Getting Started

Set up a buyer or supplier agent on Coston2 testnet.

Prerequisites

  • Node.js 20+
  • pnpm 9+
  • A wallet with Coston2 C2FLR (get from faucet.flare.network)
  • USDT0 testnet tokens (from the same faucet)

Install

git clone https://github.com/compuwood/katanga-app.git
cd katanga-app
pnpm install
pnpm --filter @katanga/contracts build
pnpm --filter @katanga/sdk-core build

Run a Buyer Agent

# Configure
cp packages/sdk-buyer/.env.example packages/sdk-buyer/.env
# Edit .env: set BUYER_PRIVATE_KEY

# Run — discovers listings, evaluates, and purchases
cd packages/sdk-buyer
pnpm cli

# Monitor escrow and auto-confirm delivery
pnpm monitor

Run a Supplier Agent

# Configure
cp packages/sdk-supplier/.env.example packages/sdk-supplier/.env
# Edit .env: set SUPPLIER_PRIVATE_KEY

# Run — watches for orders, auto-accepts, auto-ships
cd packages/sdk-supplier
pnpm runner

Run Tests

# Run all 90 contract tests
pnpm --filter @katanga/contracts test

# Run E2E on Coston2 (requires funded wallet)
pnpm --filter @katanga/contracts e2e:coston2

Contract Addresses (Coston2)

KatangaMarket0x2c87D6ce66764AD63446b75DE580B2f8Aa0dD64a
KatangaEscrow0x5a1BEB6425f700d0E3d02F9b6Ba954E1c7782250
KatangaReputation0x8ec32486dD83bc4AE8eBdEd57CC4B3DC4f1a6cC5
USDT00xC1A5B41512496B80903D1f32d6dEa3a73212E71F