Public status page
What Hirakumi's monitor saw in the last 24 hours, and the promise every paid answer is checked against.
08:00 UTC: Live (254 of 254 checks passed)
Hirakumi calls this API with saved test inputs and checks every answer against its promise. Buyers are never charged while it is Down.
Down at 19:40 UTC, Live again at 19:41 UTC. 0 credits used, 0 calls refused without charge.
Down at 19:38 UTC, Live again at 19:39 UTC. 0 credits used, 0 calls refused without charge.
Down at 19:36 UTC, Live again at 19:37 UTC. 0 credits used, 0 calls refused without charge.
Down at 19:34 UTC, Live again at 19:35 UTC. 0 credits used, 0 calls refused without charge.
Down at 19:32 UTC, Live again at 19:33 UTC. 0 credits used, 0 calls refused without charge.
100 calls for 2 tUSDM, paid once on Cardano preprod. A credit is used only when the answer keeps the promise.Settlement: escrow, because: large pack, new seller
GET/price
A response counts as good when it returns an accepted status code from 200 to 299, with JSON containing required fields: change24h as a number, symbol as a string, timestamp as a string no older than 900 seconds, and usd as a number.
The exact check (JSON)// npm i @x402/fetch@2.26.0 @x402/cardano@2.26.0
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { toClientCardanoSigner } from "@x402/cardano";
import { ExactCardanoScheme } from "@x402/cardano/exact/client";
const base = "https://52-70-235-103.sslip.io/a/api_eejiaioyqt";
const signer = toClientCardanoSigner({ mnemonic: process.env.MNEMONIC!, network: "cardano:preprod",
provider: { blockfrost: { baseUrl: "https://cardano-preprod.blockfrost.io/api/v0", projectId: process.env.BLOCKFROST_PROJECT_ID } } });
const client = new x402Client().register("cardano:preprod", new ExactCardanoScheme(signer))
.setSpendControls({ maxAmountPerPayment: "$2" }); // never pay more than one pack
const payFetch = wrapFetchWithPayment(fetch, client);
// one payment buys 100 credits for 2 tUSDM
const { token } = await (await payFetch(`${base}/packs/pk_7a6rr2uygn`, { method: "POST" })).json();
// 200 uses one credit; 422 means the promise wasn't met and no credit was used
const res = await fetch(`${base}/x/getPrice`, { headers: { Authorization: `Bearer ${token}` } });
console.log(res.status, res.headers.get("x-credits-remaining"), await res.json());