Build private, compliant on-chain finance apps on the zkScatter ZK stack.
zkScatter is a privacy-preserving settlement protocol for compliant on-chain finance. The same primitives — a commitment pool, half-proof authorization, a relayer network, identity gating — power OTC trading, private payments, and identity-gated distributions on top of one shared engine.
@zkscatter/sdk is the TypeScript toolkit for talking to every part of
that protocol — contracts, ZK proofs, relayer network, shared
orderbook, on-device note storage. One package, one mental model;
ship a wallet on web, mobile, or Node.
The same SDK powers the reference apps shipped by Tokamak — Pro (OTC), Pay (payments), Drop (drops), and Mobile. Anything those apps do, your app can do, with the same primitives.
What you can build with the SDK
Peer-to-peer order matching across a shared orderbook. EdDSA-signed orders, dual half-proofs settle in one transaction.
Send payouts in any whitelisted token. Recipients claim later, gaslessly, to their wallet — per-recipient amounts stay private against the rest of the payout batch until each recipient claims.
Distribute to verified humans without doxxing claimers. The same
claim circuit powers airdrops and order payouts — batch up to 20.
Match orders off-chain, submit settlement proofs, charge a basis-point fee, manage your bond and exit cool-down.
Compose PrivateSettlement + CommitmentPool + IdentityGate
directly. The four reference apps are starting points, not the
boundary.
Reuse the zk-X509 identity layer. Prove “this user is verified” without exposing who.
What’s in the box
callDeposit, callSettleAuth, callClaimWithProof, callCancel —
typed wrappers over PrivateSettlement and CommitmentPool. Plus
ensureAllowance with USDT-safe reset semantics.
Web Worker prover, Poseidon hashing, EdDSA on Baby Jubjub, incremental
Merkle trees, and circuit-specific builders for deposit, authorize,
claim, cancel.
Discover active relayers from the on-chain registry, probe their
/api/info endpoints, submit signed orders, track status, and run
operator actions (register, update, bond, exit).
Read-only client for the cross-relayer order discovery service — pair-filtered listings, relayer rosters, online checks.
Pluggable adapters for commitment-note persistence: in-memory for tests, IndexedDB for browsers, SQLite/AsyncStorage on mobile.
useWallet and <WalletProvider> — window.ethereum detection,
chain/account tracking, vendor labels (MetaMask, Rabby, Coinbase).
How the flows compose
The same four steps cover every flow — what differs is who runs which step. Deposit and claim are universal; authorize/match changes shape per flow.
- Deposit (universal)
The user signs a deposit ZK proof on-device.
CommitmentPool.depositinserts a Poseidon commitment hiding the owner secret, token, and amount. Same call for OTC, payments, drops. - Authorize / Issue
OTC: maker signs an EdDSA order + half-proof binding it to a leaf. Payment: sender signs a one-sided spend committing to the recipient address. Drop: distributor publishes a claims root committing to each recipient’s address + amount.
- Match / Submit
OTC: a relayer pairs two compatible half-proofs and submits
PrivateSettlement.settleAuth. Payment: a relayer (or the sender) submits the spend directly. Drop: no matching — recipients claim independently. - Claim (universal)
The recipient’s payout sits in
CommitmentPoolas a new commitment addressed to their wallet. They claim later — any time, gaslessly — by proving knowledge of the spending key. Up to 20 claims per transaction.
Where to go next
npm, pnpm, or yarn. Peer-dep ethers — no bundled runtime.
From npm install to settled trade in under 10 minutes.
Half-proof authorization, commitment-pool settlement, relayer economy.
Module-by-module surface — every export, every signature.