Docs / Build / Build on Propolis
Build on Propolis
Everything the Hive does is open to other software: an HTTP API with standard PrivateToken auth, an MCP server for agents, and one ES module.
HTTP API
JSON in, JSON out, CORS open. Authentication for spending is the PrivateToken header and nothing else: no API key, no account.
Read the key
curl https://propoliscompute.com/api/v1/keyReturns the issuer name, keyId, the public key (tokenKey, base64url SPKI), the shared challenge, the work rule (workBits, shareMinBits, shareMaxBits, maxShares, maxTokensPerMint), the engines and the ledger address with its current key.
Mint
curl -X POST https://propoliscompute.com/api/v1/mint \
-H 'content-type: application/json' \
-d '{"keyId":"<keyId>","requests":[{"tokenRequest":"<b64url>","bits":30,"nonces":["<16 hex>","…"]}]}'Ask
curl -X POST https://propoliscompute.com/api/v1/ask \
-H 'authorization: PrivateToken token=<b64url token>' \
-H 'content-type: application/json' \
-d '{"engine":"fast","messages":[{"role":"user","content":"What is a nullifier?"}]}'The answer comes back with model, receipt, the request JSON used for the receipt, the nullifiers spent and the pages fetched, if any.
Public reads
| Endpoint | Returns |
|---|---|
GET /api/v1/stats | Tokens minted and spent, total work, hashrate over ten minutes, anchored hours |
GET /api/v1/epochs?limit=20 | Anchored hours with minted, spent, work, nullifier root and transaction |
GET /api/v1/epoch/<hour> | The nullifiers of an hour and their root |
MCP server
A remote MCP server over streamable HTTP at https://propoliscompute.com/api/mcp. Add it to any MCP client and your agent gets four tools.
| Tool | What it does |
|---|---|
propolis_key | The issuer key, challenge, work rule, engines and on-chain pin |
propolis_status | Network totals |
propolis_ask | One turn at the relay, paid with tokens (1 fast, 4 deep), optional fetch |
propolis_verify_receipt | Recompute a receipt and compare it |
{
"mcpServers": {
"propolis": { "type": "http", "url": "https://propoliscompute.com/api/mcp" }
}
}Tokens for propolis_ask come from the Hive (Vault, then Export) or from the SDK.
SDK
One ES module, dependencies included, for browsers, Node 20+, Deno and Bun.
import { Propolis } from "https://propoliscompute.com/sdk/propolis.mjs";
const propolis = new Propolis({ base: "https://propoliscompute.com" });
await propolis.key(); // the key, its id recomputed from the key itself
const pin = await propolis.verifyKeyPin(); // { pinned, onchain, served, ledger }
if (!pin.pinned) throw new Error("key is not the pinned one");
const tokens = await propolis.mint({ count: 1 }); // CPU mining, slow on purpose
const r = await propolis.ask({ tokens, prompt: "Hello" }); // one fast turn
console.log(r.answer, Propolis.verifyReceipt(r));propolis.mint() mines on the CPU and is slow by design; browsers should mine in the Hive on the GPU and export. propolis.burn({ txHash, count }) mints from a $PROPOLIS burn once the token exists.