This is a minimal HTTP API.
Identity is based on request source IP.
Returns the current challenge for the IP.
Response:
- track: CPU_HASH | MEM_WORK | CHAIN | BRANCHY_MIX | TINY_VM | VM_CHAIN | ARGON2D_CHAIN
- round_id
- params: object (track-specific)
- issued_at_ms (server timestamp)
Server rules:
- If the IP already holds an active challenge lock pointing to an open round, return the same challenge.
- Otherwise, select a track using the assignment policy and create a new lock.
Request body:
- track
- round_id
- proof: object (track-specific)
Response:
- status: win | invalid | too_late
- payout_micro: number (if win)
- pool_balance_micro: number (optional)
- solve_time_ms: number (if win)
Server rules:
- Must match current ip_lock.
- Verify proof.
- If valid, attempt to close the round atomically. Only one winner.
- CPU_HASH:
{ "nonce": string }such thatsha256(challenge||nonce)hasbitsleading-zero bits. - CHAIN:
{ "nonce": string }such thatsha256^steps(challenge||seed||nonce)hasbitsleading-zero bits. - MEM_WORK:
{ "nonce": string }such thatmemWalkDigest(seed, steps, lanes, laneSize, challenge||nonce)hasbitsleading-zero bits. - BRANCHY_MIX:
{ "nonce": string }such thatSHA256(branchyMix(challenge, seed, nonce, rounds))hasbitsleading-zero bits. - TINY_VM:
{ "nonce": string }such thatSHA256(vmDigestAfterRun(challenge, seed, program_hex, steps, nonce))hasbitsleading-zero bits. - VM_CHAIN:
{ "nonce": string }such thatSHA256(vmChainDigestAfterRun(challenge, seed, program_hex, steps, ... , nonce))hasbitsleading-zero bits. - ARGON2D_CHAIN:
{ "nonce": string }such thatargon2dChainDigest(challenge, seed, nonce, memBlocks, passes, lanes)hasbitsleading-zero bits.- NOTE: This is a non-standard, Argon2d-inspired memory-hard function with an extra hardcoded global transform step.
Request body:
- amount_micro
- destination (string)
Response:
- request_id
- status: pending
Server rules:
- amount_micro <= pending_balance_micro[ip]
- Deduct immediately from pending_balance_micro.
- Record withdraw request and ledger entry.
One-click redeem: generate a redemption code.
Response (success):
- status: ok
- code
- quota
- amount_micro
Notes:
- On transient upstream errors (e.g. remote MySQL 429/403/5xx), server returns:
- status: error
- reason: redeem_mysql_insert_failed
- code (still returned, so user does not lose it)
- amount_micro/quota
Returns local redeem history (latest first).
Response:
- status: ok
- items: [{ ts_ms, amount_micro, quota, code }]
Response:
- pending_balance_micro
- withdrawn_total_micro (optional)
- GET /admin/state