Module map of @zkscatter/sdk.
@zkscatter/sdk ships as a multi-entry package. Pick the subpath that
matches what you’re doing — bundlers tree-shake the rest.
Modules
Network config, contract ABIs, token whitelist, pool event helpers.
Typed transaction builders for deposit, settle, claim, cancel.
Groth16 prover, Poseidon, EdDSA, Merkle trees, stealth addresses.
Registry, HTTP client, operator actions, profile sanitization.
Read-only client for the shared order discovery service.
Pluggable note storage adapters (memory, IndexedDB).
Wallet provider + useWallet hook for browser apps.
Compatibility matrix
| Subpath | Browser | Node / SSR | React Native |
|---|---|---|---|
root / core | ✅ | ✅ | ✅ |
contracts | ✅ | ✅ | ✅ |
zk | ✅ | ⚠️ no Worker | ⚠️ native prover required |
relayer | ✅ | ✅ | ✅ |
orderbook | ✅ | ✅ | ✅ |
notes | ✅ | ⚠️ memory only | ⚠️ memory only |
react | ✅ | ❌ | ❌ |
Versioning
@zkscatter/sdk follows semver. Contract ABIs are pinned per minor —
upgrading the SDK to track a contract upgrade is always a minor bump,
even if the surface is source-compatible. Each minor release notes the
contract version it tracks alongside any breaking source changes.
Conventions
- All async APIs accept an optional
AbortSignal(signal?parameter) for cancellation. - ZK and contract-layer numeric values use native
bigint(commitments, amounts incallDeposit, EdDSA coordinates, etc.). HTTP wire types inrelayerandorderbookuse strings for amounts/nonces and numbers formaxFee/expiry/nonceto match the relayer protocol. Storage adapters serialize bigints at their boundary. - All ABIs are exposed as both raw strings (
*_ABI) and pre-parsed ethersInterfaceobjects (*_IFACE) — use the iface for decoding logs without re-parsing. - All HTTP clients accept a
fetchoverride for custom transports (proxies, mocks, polyfills).