THE HIVEThe desktop is open. Mine a private token in your browser
propolis

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

bash
curl https://propoliscompute.com/api/v1/key

Returns 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

bash
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

bash
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

EndpointReturns
GET /api/v1/statsTokens minted and spent, total work, hashrate over ten minutes, anchored hours
GET /api/v1/epochs?limit=20Anchored 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.

ToolWhat it does
propolis_keyThe issuer key, challenge, work rule, engines and on-chain pin
propolis_statusNetwork totals
propolis_askOne turn at the relay, paid with tokens (1 fast, 4 deep), optional fetch
propolis_verify_receiptRecompute a receipt and compare it
json
{
  "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.

js
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.