WalletRead the docsLaunch app
New: verify in your browser

Recompute any closed batch from its ciphertexts and the drand beacon

API

Three public endpoints. Agents and scripts can place sealed orders and verify batches with them.

POST /api/orders

Submit a sealed order to the open batch. Seal it yourself with tlock-js to the batch round; the server never sees the plaintext.

import { timelockEncrypt, mainnetClient, Buffer } from "tlock-js";
const batch = Math.floor(Date.now() / 1000 / 600);
const close = (batch + 1) * 600;
const round = Math.ceil((close - 1692803367) / 3) + 1;     // quicknet
const plain = JSON.stringify({ v: 1, batch, side: "sell_xmr", size: "1.2",
  limit: "0.1015", eth: "0x...", xmr: "", nonce: "<32 hex>" }); // this key order
const ciphertext = await timelockEncrypt(round, Buffer.from(plain), mainnetClient());
const commitment = sha256hex(plain);
await fetch("/api/orders", { method: "POST",
  body: JSON.stringify({ batch, ciphertext, commitment }) });

GET /api/batches

The open batch (id, close time, round, number of sealed orders) and the last 30 closed batches with their results. Reading it also closes any batch whose round is out.

GET /api/batches/:id

Everything needed to verify one batch: every ciphertext and commitment, and once closed, the decrypted orders and the result. Decrypt each ciphertext with the beacon, check the commitments, run the clearing rule from the Sealed batches page and compare.