PQGrind Docs

HTTP API

Warning

The reference indexer runs only on a private test network. A public endpoint is not yet available. Examples below are from that network; issuance fields are shown as symbols because the test network uses a scaled-down profile.

Base URL below: $INDEXER. All responses are JSON. All read endpoints are GET. Amounts are integers in units (= satoshis) unless noted.

Read endpoints

Endpoint Returns
/api/status counters, current difficulty and schedule position
/api/mintjob everything a miner needs to build a candidate now
/api/mints mint records, newest first
/api/rejects rejected candidates with reasons
/api/events events (transactions that moved units)
/api/holders [[address, amount], …], largest first
/api/address/<addr> balance, unit-carrying outputs, history
/api/utxo/<txid>:<vout> ranges on one output
/api/tx/<txid> event, mint or rejection, per-condition reasons, inputs/outputs
/api/block/<height> events in one block
/api/epochs schedule-step changes (name kept for compatibility)

/api/status

curl -s "$INDEXER/api/status"
{
  "tick": "PQSB",
  "height": 321,
  "start": "<H_start>",
  "mints": 33,
  "max_mints": "<M_max>",
  "reward": "<R>",
  "minted": "<33·R>",
  "burned": 600,
  "circulating": "<33·R − 600>",
  "holders": 13,
  "claim": "6a5d087fd0a2cd92b4a013",
  "wave": "<n>",
  "zeros": "<n − 1>",
  "min_tier": 80,
  "node_height": 321,
  "indexer_error": ""
}

indexer_error is non-empty when the last sync failed; the data is then stale.

/api/mintjob

{
  "tick": "PQSB",
  "height": 321,
  "wave": "<n>",
  "zeros": "<n − 1>",
  "units": "<R>",
  "min_tier": 80,
  "claim": "6a5d087fd0a2cd92b4a013",
  "token_output_index": 0,
  "min_lock_sats": "<R>",
  "expected_trials": 3713159134
}
Field Use
wave, zeros, units current wave, leading hex zeros the txid needs, units per mint (Draft C, proposed fields)
claim put this runestone in one output (not output 0); add the companion-rune mint if you want it
token_output_index always 0: the recipient output
min_lock_sats lower bound on the value of the lock output (condition 8)
min_tier lowest lock level accepted this block
expected_trials model estimate for the whole search at min_tier and zeros

The job describes the next block. If a wave ends before your transaction confirms, it is judged against the new values.

/api/tx/<txid>

Example from the earlier reference build (Format A claim, score rule); the Draft C build reports wave and zeros in place of difficulty and score.

{
  "txid": "03b4ed472bd5a7b80120409beab9d2e80976c33355b023cf43e56b632f1d834f",
  "found": true,
  "confirmations": 67,
  "mint": {"n": 33, "height": 255, "tier": 64, "difficulty": 1.0, "score": 69.06},
  "reject": null,
  "reasons": ["<one line per condition>"],
  "vin":  [{"outpoint": "4c07bb53…56aa:1", "value": 5000}],
  "vout": [{"n": 0, "value": 1000}, {"n": 1, "value": 0, "addr": "OP_RETURN"}, {"n": 2, "value": 1600}]
}

(tier: 64 is the test network's scaled-down level; the rules allow 80 and 88 only.)

reasons in English with stable codes (E02…E09): not yet available. The reference build returns internal text that will be replaced.

Write endpoints

The reference build also has POST endpoints for building market PSBTs and broadcasting. They are tools, not part of the protocol; their formats are described on PSBT formats. A public deployment of them is not yet available.