Indexer info
Indexer info and state
Retrieves the current status, sync progress, and current SMT root of PIVX Name Resolution Indexer node.
Endpoint
GET https://indexer.pivx.name/v1.0/info (get basic info)
POST https://indexer.pivx.name/v1.0/info (If additional parameters are required)
Request Body
The request body must be a JSON object containing the following parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
extended | boolean | false | If true, additionally returns additional info values |
Code Examples
- cURL
- JavaScript
- Python
- PHP
curl -X GET https://indexer.pivx.name/v1.0/info
const url = 'https://indexer.pivx.name/v1.0/info';
fetch(url, {
method: 'GET'
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
import requests
url = "https://indexer.pivx.name/v1.0/info"
response = requests.get(url)
print(response.json())
<?php
$url = 'https://indexer.pivx.name/v1.0/info';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
Response Example (with extended: true)
The registrar_address and registrar_viewing_key shown here are illustrative. The live
node returns the real mainnet values, which are also published on the
front page at launch.
{
"response": {
"last_processed_coin_block": 5538251,
"last_checkpoint": {
"idx": 42,
"block_id": 5538251,
"smt_root": "1c3ba6eb818b93823d635b7d6737377693796312a1abd2d3b863da5d455df128"
},
"indexer_smt_root": "1c3ba6eb818b93823d635b7d6737377693796312a1abd2d3b863da5d455df128",
"anchored_smt_root": "1c3ba6eb818b93823d635b7d6737377693796312a1abd2d3b863da5d455df128",
"indexer_synced": true,
"checkpoints_behind": false,
"anchored_epoch": 2,
"sync_stopped": false,
"domains_count": 4,
"zones": ["pivx", "private", "secure", "safe"],
"registrar_address": "ps1…",
"registrar_viewing_key": "pxviews1…"
}
}
| Field | Type | Description |
|---|---|---|
last_processed_coin_block | int | Latest processed block on chain (usually last checkpoint's block_id) |
indexer_smt_root | string | The latest point of Indexer's sync (SMT Root of the Indexer) |
anchored_smt_root | string | The root the anchor contract currently attests to, read directly from its state |
indexer_synced | boolean | Whether this node's independently computed root equals the root the anchor contract attests to. This is the full sync check — it is measured against the contract, not against a local table |
checkpoints_behind | boolean | True when this node's newest checkpoint is older than the root the contract attests to — i.e. discovery is lagging |
anchored_epoch | int | The anchor contract epoch this node's operator has reviewed and set it to. The node stops following the chain as soon as the on-chain epoch moves past it (see sync_stopped). It is the node's setting, not read from the chain: a node updated ahead of a scheduled rules change already reports the coming epoch, and until the change comes into force serves the state it has, made under the epoch in force, without taking new checkpoints. Read the epoch of a root from the contract instead — see Step 3 — check the epoch |
sync_stopped | boolean | True while the node no longer follows the chain and waits for its operator: the on-chain epoch, moved by a rules change or a rollback, is one it has not been updated for. It keeps serving the state it has, so prefer another node meanwhile |
domains_count | int | Total names registered |
zones | string[] | Zones a name can be registered in |
registrar_address | string | Address of the Registrar to process incoming TXes and escrow |
registrar_viewing_key | string | Full viewing key of the Registrar PIVX Address, giving access to the whole Protocol history — incoming commands and outgoing payouts alike |
last_checkpoint | Latest checkpoint information (latest SMT Root update) | |
idx | int | Index of the root in the anchor contract's rootAt mapping (0 is the genesis root); the resume cursor for checkpoint discovery |
smt_root | string | Latest Merkle tree root (hex) |
block_id | int | PIVX block_id of the last checkpoint and SMT Root generation |
warning
If last_processed_coin_block is significantly behind last_checkpoint.block_id, recent registrations may not be reflected yet.