Developer Portal
Everything needed to read, verify or build on HYPERHEDGE. Monad testnet, chain id 10143. Source: github.com/Venkat5599/Mn.
Contracts
- ComputeMarket · terms, lifecycle, ERC-1155 positions0x9dc5f35B0866bB0a1F046712B38f11E2544D701E
- CollateralVault · every token, in separate buckets; reconcile()0xf2aF6d0D92ED7106e064F02087586E4464E029D3
- OracleVerifier · 2-of-3 EIP-712 incident reports0xE65E13b3c69c1057FDDdA52CA96B0cB6721eb8D4
- PriceProtectionPool · MON/USD price protection AMM0x4dC4E80DaE43f2149B5E104194522550921A71d9
- TestUSD (hhUSD) · testnet stake token with a faucet0xeeBDcA711Cb71A85b791141180a9548206C94063
Oracle API
GET /api/oracle/contractsevery tracked contract with challenge progressGET /api/oracle/contracts/:idone contract with every challengeGET /api/oracle/evidence/:hashthe evidence file whose keccak256 is onchainGET /api/oracle/events?source=market|vault|pooldecoded onchain events, newest firstGET /api/oracle/price/latestMON/USD signed by 2 of 3 oracle keysGET /api/oracle/price/candles?granularity=3600exchange candles for MON-USD
Verify a settlement from your own code
import { createPublicClient, http } from "viem";
import { computeMarketAbi, verifyEvidence, slaFromUri } from "@hyperhedge/sdk";
const client = createPublicClient({ transport: http("https://testnet-rpc.monad.xyz") });
const market = "0x9dc5f35B0866bB0a1F046712B38f11E2544D701E";
// read a contract's committed terms and state
const terms = await client.readContract({ address: market, abi: computeMarketAbi, functionName: "terms", args: [2n] });
const status = await client.readContract({ address: market, abi: computeMarketAbi, functionName: "status", args: [2n] });
// fetch its evidence and re-check every proof of work yourself
const o = await (await fetch("https://hyperhedge-app.vercel.app/api/oracle/contracts/2")).json();
const evidence = await (await fetch(`https://hyperhedge-app.vercel.app/api/oracle/evidence/${o.evidenceHash}`)).json();
const check = await verifyEvidence(evidence, o.sla, async (n) => (await client.getBlock({ blockNumber: BigInt(n) })).hash);
console.log(check.ok, check.verdict, check.solved);Run your own delivery host
# run a delivery host: answers proof-of-work challenges with this machine's compute git clone https://github.com/Venkat5599/Mn && cd Mn AGENT_PORT=9795 COMPUTE_CLASS="my-gpu-box" bun apps/agent/src/index.ts
Name its URL as the host when you issue a contract. The oracle challenges it through the delivery window.