API v1

Public JSON API of this explorer, used by the NEB Community Wallet and the OTC site. Base URL https://explorer.neb.example/api/v1.

Conventions

curl https://explorer.neb.example/api/v1/info
curl https://explorer.neb.example/api/v1/address/neb1…/utxos
curl -X POST -H 'content-type: application/json' -d '{"hex":"01…"}' https://explorer.neb.example/api/v1/tx/broadcast

Endpoints

GET/info

Node and index status, fee policy.

{ "network": "mainnet", "chainId": "da2f5a…39ae", "height": 2900, "tipHash": "…", "tipTime": 1795184460,
  "indexedHeight": 2900, "synced": true, "nodeVersion": "1.0.2", "peers": 4,
  "feePolicy": { "minFeePerByte": "1", "minFee": "10000", "dust": "1000" }, "coinbaseMaturity": 100 }

synced is true when the index holds the node’s tip. The fee policy values are base units (strings, like every amount).

GET/blocks?limit=20&before=<height>

Block summaries, newest first (limit at most 100); before is exclusive.

{ "blocks": [ { "height": 2900, "id": "…", "time": 1795184460, "txCount": 1, "size": 624, "bits": 3154056948,
  "difficulty": 33676240.59, "miner": { "address": "neb1…", "lock": "…", "amount": "1900000000" },
  "reward": "2000000000", "fees": "0" } ] }

reward is the subsidy of the height; miner is the first coinbase output (address null for a multisig lock). difficulty = pow-limit target / target.

GET/block/:heightOrId

One block: the summary plus parent, bodyRoot, nonce, shareCount, confirmations and its txids (coinbase first).

{ …BlockSummary, "parent": "…", "bodyRoot": "…", "nonce": 123456, "shareCount": 31, "confirmations": 12, "txids": ["…"] }
GET/tx/:txid

A confirmed transaction, or an unconfirmed one broadcast through this explorer.

{ "txid": "…", "status": "confirmed", "height": 2890, "blockId": "…", "time": 1795183860, "confirmations": 11,
  "coinbase": false, "size": 270, "fee": "10000",
  "inputs": [ { "prevTxid": "…", "prevIndex": 0, "address": "neb1…", "lock": "…", "lockType": 1, "amount": "500000000", "publicKey": "…" } ],
  "outputs": [ { "index": 0, "amount": "100000000", "lockType": 1, "lock": "…", "address": "neb1…", "spentBy": null } ] }

status "mempool" (height, blockId and time null, confirmations 0) only while the node’s getrawmempool holds the transaction, read live. A relayed transaction that left the mempool without being confirmed (dropped or replaced) is 404 not_found, never a stale "mempool"; one in a block the indexer has not stored yet is reported "confirmed" from the node. A coinbase has one input with prevTxid of zeros, prevIndex 4294967295 and null fields, and fee "0". 404 not_found for an unknown txid, including mempool transactions not broadcast here.

GET/address/:addr

Balance and totals of a lock from the index (neb1… or a 64-hex lock).

{ "address": "neb1…", "lock": "…", "lockType": 1, "balance": "4000000000", "spendable": "2000000000", "immature": "2000000000",
  "received": "…", "sent": "…", "txCount": 12, "utxoCount": 3, "firstSeenHeight": 10, "lastSeenHeight": 2899, "rank": 42 }

spendable excludes coinbase outputs that are not mature at the next height. An address never seen returns zeros, null heights and rank null.

GET/address/:addr/txs?limit=25&cursor=

History, newest first (limit at most 100); pass nextCursor back as cursor for the next page.

{ "txs": [ { "txid": "…", "height": 2899, "time": 1795184400, "delta": "-100010000", "fee": "10000", "coinbase": false } ], "nextCursor": "2875.1" }

delta is signed: received − sent for this lock in that transaction.

GET/address/:addr/utxos

Unspent outputs, passed through from the node’s getutxos (authoritative, confirmed only). Never cached.

{ "tipHeight": 2900, "utxos": [ { "txid": "…", "index": 0, "amount": "1900000000", "height": 2850, "coinbase": true, "lockType": 1, "mature": false } ] }

mature is computed for tipHeight + 1. The node refuses a lock with more than 20,000 unspent outputs (502 upstream).

POST/tx/broadcast

Broadcast a signed transaction. Body: { "hex": "<transaction hex>" }.

{ "txid": "…" }

Decoded and shape-checked first (400 invalid_tx), then sent to the node; a node refusal is 400 { "error": "<node message>", "code": "rejected" }. The node refuses spends of unconfirmed outputs and of outputs already spent by a pooled transaction. Limited to 20 requests a minute per visitor.

GET/mempool

The node’s mempool txids; size and fee only for transactions broadcast through this explorer (null otherwise).

{ "count": 1, "txs": [ { "txid": "…", "size": 270, "fee": "10000", "seenAt": 1795184470 } ] }
GET/richlist?limit=100&offset=0

Locks by balance (limit at most 1000). total is the number of locks with a positive balance.

{ "total": 543, "holders": [ { "rank": 1, "address": "neb1…", "lock": "…", "lockType": 1, "balance": "…", "share": 0.0431 } ] }

share is a fraction of the circulating supply (0 to 1). The project share lock and the unspendable genesis lock are included.

GET/stats

Supply and network figures.

{ "height": 2900, "issued": "8823189999952", "circulating": "8823189999952", "holders": 543, "txCount24h": 600,
  "avgBlockTime1h": 59.8, "difficulty": 33676240.59, "attemptsPerSecond": 590000000000, "projectShareTotal": "290100000000" }

issued = scheduled rewards of heights 0..height + the genesis carry-over; circulating = sum of all unspent outputs. txCount24h excludes coinbases. attemptsPerSecond = expected attempts of the last hour’s blocks / their time span.

GET/search?q=

Resolves a height, block id, txid, neb1 address or lock.

{ "type": "block", "id": "…" }   // or { "type": "tx", … } or { "type": "address", "id": "neb1… or lock hex" }

404 not_found when nothing matches.

GET/peers

The node’s peers.

[ { "addr": "203.0.113.5:3440", "inbound": false, "subver": "neb-node/1.0.2", "height": 2900, "connected": 1025 } ]