Guide

Install & Configure

Install the SDK, wire environment variables, and switch between stub and testnet modes.

npm i @arxpool-hq/sdk
import { configure } from "@arxpool-hq/sdk";

configure({
  mode: process.env.USE_STUB === "true" ? "stub" : "testnet",
  node: process.env.ARXPOOL_NODE,
  attesterKey: process.env.ARXPOOL_ATTESTER_KEY,
  attesterSecret: process.env.ARXPOOL_ATTESTER_SECRET,
});

.env.example

USE_STUB=true
ARXPOOL_ATTESTER_SECRET=local-dev

# testnet
# USE_STUB=false
ARXPOOL_NODE=https://testnet.arx.arcium.com
ARXPOOL_ATTESTER_KEY=ed25519:your_private_key_here

NEXT_PUBLIC_SITE_URL=https://arxpool-web.vercel.app
NEXT_PUBLIC_USE_STUB=true

Mode switch

  • Keep USE_STUB=true for deterministic local demos.
  • Flip to USE_STUB=false, set ARXPOOL_NODE, and provide ARXPOOL_ATTESTER_KEY for testnet.
  • NEXT_PUBLIC_USE_STUB mirrors the backend flag so the UI badge stays honest.

Run locally

npm run dev

Visit http://localhost:3000 and try the /demo flow.