Served by explorer/pqwexplorer/web.py from the indexed, reorganisation-safe database. Every endpoint is
GET, unauthenticated and read-only. This schema is the contract tested by
scripts/devhub/explorer_contract_test.py; an endpoint absent from it does not exist.
Canonical chain identity.GET /status returns chain_id and genesis; clients must pin both.
Freshness. Data comes from the indexed tip (indexed_tip). lag_blocks = node_head - indexed_tip.
Account balances (/address/{address}) are read from the node at the indexed tip block (balance_at_block),
so they are consistent with the indexed history beside them; everything else is indexed. /status reports
explorer_version and the database schema_version.
Protocol events./events returns the logs of the registered PQWERAI contracts (/contracts) decoded with
the event ABIs generated from their published sources, per module (ai, qai, pq, ipfs, and pate = GhostTurbo permissions). A decoded
event shows what a contract emitted. It is not a verification of the contract, of QAI reserves or of any
post-quantum signature. Events whose parameters cannot be canonicalised from source are not decoded.
Supply.total_supply_wei = minted - base-fee burn - slashing burn (the node's counter as last observed;
slash_burn_wei is null before the first observation). It includes locked stake, the Quantum Reserve and the
founder treasury: the explorer does not publish a circulating-supply figure. circulating_wei is retained for
compatibility and equals total_supply_wei.
Reorganisations. The indexer replaces non-finalized blocks when a heavier branch wins (records in
reorgs_handled). A reorganisation below the recorded finalized checkpoint is never applied: the indexer
records a finality_violation alarm (/status.alarms) and stops. Treat data above finalized_height as
reversible.
Pagination and size limits./blocks, /issuance, /checkpoints and /ai/events accept a backward
cursor: limit (1 to a hard maximum: 100, 200, 100, 500) and before_block (exclusive). Without parameters
they return the same newest-first windows as before (25, 50, 100, 500). To fetch the next page pass the last
item's block number (observed_head for checkpoints) as before_block; for /ai/events also pass its
log_index as before_log_index so events sharing a block are never skipped. An empty array ends the walk.
/events paginates the same way as /ai/events (default 100, maximum 500) and filters by module and address.
Cursor parameters on endpoints that do not paginate return 400; unrelated query parameters are ignored.
Address transactions and token transfers (50 each) and mining statistics (last 64 blocks) are not paginated.
Amounts. All wei/gwei amounts that can exceed 2^53 are decimal strings.
Errors.400 with {"error": "<message>"} for malformed path values, 404 with {"error": "not found"}
for unknown resources and routes.
Etherscan-compatible API.GET /api?module=…&action=… (also /api/, outside this /api/v1 server) answers
in Etherscan's envelope {"status": "1"|"0", "message": "OK"|"NOTOK"|…, "result": …} with decimal-string
numbers, so Etherscan clients (Hardhat/Foundry lookups, ethers EtherscanProvider, portfolio trackers) can read
chain 20778. chainid (Etherscan API v2) must be 20778 when given; apikey is ignored. Every supported
module.action, its parameters, data source and limits are listed under x-etherscan-api in this file and
contract-tested against explorer/pqwexplorer/etherscan.py. Source verification, internal transactions,
prices and ERC-1155 are not served (NOTOK with the reason).
Base URL: https://explorer.pqwerai.com/api/v1 (public, read-only) or http://127.0.0.1:8089/api/v1 for a local explorer. The examples use the local address.
One transaction with receipt status and decoded token transfers.
Path parameter hash — pattern ^0x[0-9a-fA-F]{64}$
Status
Body
200
Transaction
400
Error —
404
Error —
curl-shttp://127.0.0.1:8089/api/v1/tx/<hash>
Response fields
Field
Type
Notes
hash *
string
block *
integer
idx *
integer
from *
string
to *
string | null
contract *
string | null
Created contract address
value *
string
gas_used *
integer
gas_price *
string
status *
integer
input_bytes *
integer
logs *
integer
events
array
Decoded protocol events emitted by this transaction
ghostshield_v2
object
Present only for a transaction to the GhostShield v2 system account (0x5E0660Cc96b62435FA020E885467aBcC145e10d1):
calldata decoded from opcode and RLP(args) as Core encodes it (op, opcode, args, fixed_gas, gas_note: the
fixed opcode gas is not the full cost, every operation also pays 2,100 per storage word read and 5,000 per word
written, metered at execution; error and
expected_code when Core would reject the calldata itself), the transaction's decoded v2 events and, for a failed
transaction, failure = {code (GS2:E_*), meaning, basis}. The code is re-simulated on the parent block state
(eth_call), so the exact in-block reason can differ; basis says so.
|
| token_transfers * | array | |
Estimated network hashrate over time, with the miner addresses of the period.
Query parameter range — Time span ending at the indexed head (default 7d). Periods are 15 min, 2 h, 6 h, or about 1/120 of the chain's age for all. (default 7d)
Status
Body
200
Hashrate
400
Error
curl-shttp://127.0.0.1:8089/api/v1/hashrate
Response fields
Field
Type
Notes
range *
string
label *
string
bucket_seconds *
integer | null
Length of one period (null for all before enough blocks are indexed)
at_block *
integer | null
Indexed head the series was computed at
from_ts *
integer | null
Unix time the series starts
to_ts *
integer | null
Unix time of the indexed head
method *
string
How the estimate is made and what it does not show
points *
array
Oldest first
summary *
object
Empty when there are no points
miners *
array
Up to 15 miner addresses ordered by work found in the range (block difficulty varies up to 16x, so work and block shares differ)
Detected ERC-20 / ERC-721 contracts, with their transfer activity.
Query parameter sort — Order: most transfers (usage), most receiving addresses (popularity), most recent transfer (activity), or newest contract (CR-0108)
Query parameter kind — Token standard filter (default all)
Status
Body
200
array of Token
curl-shttp://127.0.0.1:8089/api/v1/tokens
Response fields
Field
Type
Notes
address *
string
kind *
string
first_block *
integer
name
string | null
Optional ERC-20 metadata as published by the token; null if absent
symbol
string | null
decimals
integer | null
transfers
integer
Indexed Transfer events of this contract (since 0.8.0)
receivers
integer
Distinct recipient addresses ever seen (not current holders)