PQGrind Docs

Error codes

Warning

Codes are a proposal (pending freeze). Returning them from the API is not yet available; the reference build returns free text.

Code Condition (Valid mint) Message
— not a candidate (no record)
E01 1 reserved: below H_start (such blocks are skipped, so never emitted)
E02 2 input 0 is not a P2WSH spend of the given script
E03 3 script is not the lock template at an accepted level ≥ min level
E04 4 witness shape: <item> at position <p> (count, owner hash type, T, Σ, key, index, tag)
E05 5 no PQSB mint claim in the first PQSB output
E06 6 claim target is not output 0, or output 0 is OP_RETURN
E07 7 txid has <z> leading zeros, wave <n> needs <n − 1> (Draft C; earlier drafts: score <s> below difficulty <D>)
E08 8 lock value <v> sat below R
E09 9 mint limit reached

Format in API responses (proposed)

{
  "txid": "…",
  "height": 255,
  "valid": false,
  "code": "E07",
  "level": 80,
  "checks": [
    {"n": 2, "ok": true},
    {"n": 3, "ok": true, "level": 80},
    {"n": 4, "ok": true},
    {"n": 5, "ok": true},
    {"n": 6, "ok": true},
    {"n": 7, "ok": false, "score_fp": 1310720, "need_fp": 2097152}
  ]
}

checks stops at the first failure. score_fp and need_fp are the exact integers.