Install
npm install @proof/sdkThe SDK is ESM, tree-shakeable and ships its ML-DSA implementation as a WASM module that loads on first use.
Quick start
import { createProof } from "@proof/sdk";
const proof = createProof({ network: "elysium-testnet" });
// 1. generate the ML-DSA key in the browser (never sent anywhere)
const pqKey = await proof.keys.generate(); // ML-DSA-65
await proof.keys.backup(pqKey, { passphrase }); // encrypted export
// 2. link it to the connected wallet and move funds
const tx = await proof.migrate({
account: walletAddress,
pqKey,
signer: wallet, // EIP-1193 provider or viem WalletClient
});
// 3. the receipt is on Elysium
const receipt = await tx.receipt();
console.log(receipt.block, receipt.pqKeyHash);The secret key stays in the user's browser. Only the signed migration transaction reaches Elysium.
Dual signing
// after migration every transfer carries both signatures
const transfer = await proof.transfer({
from: protectedAccount,
to: recipient,
amount: "250.0",
signer: wallet, // ECDSA signature
pqKey, // ML-DSA signature, produced locally
});Verify a receipt
const ok = await proof.receipts.verify(account);
// → { migrated: true, scheme: "ML-DSA-65", block: 49_120_771, pqKeyHash: "0x…" }Stats API
Public routes need no key. Responses are JSON; every response includes asOf (block height and time) and network.
GET
/api/statsCurrent totals with asOf block height and time.GET
/api/exposure/gridBucketed cells for the exposure grid (64 × 32, one per 11-bit address prefix).GET
/api/stats/history?range=30dDaily time series, 1–365 days.WS
/api/streamPushes totals and newly migrated accounts. Server-Sent Events fallback at the same path.curl "$PROOF_URL/api/stats" # your deployment originLive stream
const ws = new WebSocket(`${PROOF_STREAM_URL}/api/stream`); // indexer origin (wss://)
ws.onmessage = (e) => {
const msg = JSON.parse(e.data);
if (msg.type === "stats") render(msg.data);
if (msg.type === "migrated") flash(msg.data.bucket);
};Architecture
Keys are made in the browser; only signed transactions reach Elysium.
Browser
Marketing site
Next.js, GSAP, Lenis
Lattice scene
Three.js via R3F, shaders
Wallet + keygen
ML-DSA in WASM, client-side
Proof backend
Stats API
REST + WebSocket, cached
Exposure indexer
Scans exposed public keys
Postgres
Snapshots and history
Elysium
Elysium RPC
Blocks and state
Proof contract
Checks both signatures
The indexer reads Elysium and feeds the Stats API and the database. The signed migration transaction goes straight from the browser to the Proof contract.
Limits
- Public API: 60 requests per minute per IP; responses are edge-cached for 15–300 seconds.
- Stream: one connection per client; reconnect with backoff.
- Figures are labelled
sampleortestnetuntil mainnet launch.