NightForge Explorer API

Public REST API for the Midnight blockchain explorer. All endpoints return JSON unless otherwise noted.

https://preprod.nightforge.jp CORS Enabled No Auth Required

Core

GET /health
Try it

Health check endpoint. Returns service status and current timestamp.

{
  "status": "ok",
  "timestamp": "2026-03-31T12:00:00.000Z",
  "network": "Midnight Preprod"
}
GET /api/network
Try it

Network configuration and node details.

{
  "name": "Midnight Preprod",
  "rpcEndpoint": "wss://...",
  "genesisHash": "0x...",
  "chainType": "Live",
  "node": { "version": "...", "specVersion": 1 },
  "cardanoNetwork": "preprod"
}
GET /api/stats
Try it

Indexer statistics including total blocks, extrinsics, events, and current epoch.

{
  "blocks": 150000, "extrinsics": 500000, "events": 1200000,
  "totalBlocks": 150000, "totalExtrinsics": 500000, "totalEvents": 1200000,
  "latestBlock": 150000,
  "epoch": { "epoch": 42, "sidechain_slot": 12345, "mainchain_epoch": 500 }
}
GET /api/blocks
Try it

Paginated list of blocks (newest first).

Params: limit (max 100, default 50), offset (default 0)

[
  { "height": 150000, "hash": "0xabc...", "parent_hash": "0xdef...",
    "extrinsics_count": 3, "events_count": 12, "timestamp": 1711882800 }
]
GET /api/blocks/:heightOrHash
Try it

Get a single block by height (number) or hash (hex string).

{
  "height": 1, "hash": "0xabc...", "parent_hash": "0xdef...",
  "state_root": "0x...", "extrinsics_root": "0x...",
  "extrinsics_count": 1, "events_count": 5, "timestamp": 1711800000
}
GET /api/blocks/:height/extrinsics
Try it

All extrinsics in a specific block.

[
  { "hash": "0x...", "block_height": 1, "index": 0, "section": "timestamp",
    "method": "set", "signer": null, "success": 1, "timestamp": 1711800000 }
]
GET /api/blocks/:height/events
Try it

All events emitted in a specific block.

[
  { "block_height": 1, "index": 0, "section": "system",
    "method": "ExtrinsicSuccess", "data": "..." }
]
GET /api/extrinsics
Try it

Recent extrinsics across all blocks.

Params: limit (max 100, default 50)

[
  { "hash": "0x...", "block_height": 150000, "section": "midnight",
    "method": "transact", "signer": "5G...", "success": 1 }
]
GET /api/extrinsics/:hash

Get a single extrinsic by its hash.

{
  "hash": "0x...", "block_height": 150000, "index": 1,
  "section": "midnight", "method": "transact",
  "signer": "5G...", "args": "0x...", "success": 1
}
GET /api/extrinsics/:hash/decoded

Get a Midnight extrinsic with decoded transaction details (shielding type, inputs, outputs).

{
  "hash": "0x...", "section": "midnight", "method": "transact",
  "decoded": { "txType": "transfer", "shieldingType": "shielded", "inputs": 2, "outputs": 2 }
}
GET /api/extrinsics/stats
Try it

Extrinsic statistics: totals, success/fail counts.

{
  "total": 500000, "successful": 498000, "failed": 2000
}
GET /api/validators
Try it

List of known validators, sorted by last seen.

[
  { "address": "5G...", "last_seen": 1711882800, "blocks_produced": 500 }
]

Analytics

GET /api/analytics/overview
Try it

Comprehensive network overview: blocks, TPS, shielded ratio, committee size, epoch info, and more.

{
  "network": "Midnight Preprod", "blocks": 150000, "extrinsics": 500000,
  "midnightTxs": 120000, "bridgeOps": 5000, "avgBlockTime": 6.2,
  "tps": 1.3, "shieldedRatio": 0.85, "contractDeploys": 45,
  "contractCalls": 80000, "committeeSize": 7
}
GET /api/analytics/extrinsic-types
Try it

Top 20 extrinsic types by frequency (section + method).

[
  { "section": "midnight", "method": "transact", "count": 120000 },
  { "section": "timestamp", "method": "set", "count": 150000 }
]
GET /api/analytics/block-rate
Try it

Hourly block production and extrinsic counts.

Params: hours (default 24)

[
  { "hour": 1711882800, "blocks": 600, "extrinsics": 1800 }
]
GET /api/analytics/tx-classification
Try it

Classifies recent Midnight transactions as shielded/unshielded/mixed.

Params: limit (max 2000, default 500)

{
  "analyzed": 500,
  "shielding": { "shielded": 400, "unshielded": 50, "mixed": 30, "unknown": 20 },
  "types": { "transfer": 300, "contract_call": 150, "deploy": 50 }
}
GET /api/analytics/events
Try it

Event type breakdown across all indexed blocks.

[
  { "section": "system", "method": "ExtrinsicSuccess", "count": 490000 },
  { "section": "midnight", "method": "Transacted", "count": 120000 }
]
GET /analytics/volume
Try it

Hourly transaction volume.

Params: hours (default 24)

[
  { "hour": "2026-03-31 12:00:00", "count": 150 }
]

Privacy

GET /api/analytics/privacy
Try it

Privacy dashboard: shielded/unshielded ratios, contract deploys/calls, and trends (event-based).

Params: hours (max 168, default 24). Cached for 60s.

{
  "totalMidnightTxs": 500, "shielded": 400, "unshielded": 80,
  "contractDeploys": 5, "contractCalls": 120,
  "shieldedRatio": 0.83, "trend": [...]
}
GET /api/privacy-score
Try it

Composite Privacy Health Score — weighted metric combining shielded ratio, network activity, decentralization, and ecosystem diversity. Unique to NightForge.

{
  "privacyHealthScore": 72, "grade": "B+",
  "breakdown": {
    "shieldedRatio": { "score": 100, "weight": "40%", "value": "83.0% shielded" },
    "networkActivity": { "score": 50, "weight": "25%", "value": "0.250 TPS" },
    "decentralization": { "score": 60, "weight": "20%", "value": "12 validators" },
    "ecosystemDiversity": { "score": 40, "weight": "15%", "value": "20 contracts" }
  },
  "interpretation": "Midnight privacy health is good. Room for improvement..."
}
GET /api/midnight-txs
Try it

Recent Midnight-specific transactions with decoded shielding info.

Params: limit (max 100, default 20)

[
  { "hash": "0x...", "block_height": 150000, "timestamp": 1711882800,
    "signer": "5G...", "shieldingType": "shielded", "txType": "transfer" }
]

Bridge

GET /api/analytics/bridge
Try it

Cardano bridge operations: totals, trends, and recent bridge transactions.

Params: hours (max 168, default 24)

{
  "totalBridgeOps": 5000, "last24h": 120, "trend": [...],
  "recentBridgeOps": [
    { "hash": "0x...", "block_height": 149990, "timestamp": 1711882000,
      "args_summary": "Cardano block #12345 (0xabc...)" }
  ]
}

Governance

GET /api/governance
Try it

Governance dashboard: committee updates, proposals, and voting data.

{
  "committeeUpdates": [...],
  "recentGovernanceEvents": [...]
}
GET /api/committee
Try it

Current committee members and their status.

[
  { "address": "5G...", "role": "member", "since_epoch": 10 }
]

Epochs

GET /api/epoch
Try it

Current epoch information: sidechain epoch/slot, mainchain epoch/slot.

{
  "epoch": 42, "sidechain_slot": 12345,
  "mainchain_epoch": 500, "mainchain_slot": 130000000
}
GET /api/epochs
Try it

Epoch timeline: historical epoch data.

Params: limit (max 200, default 50)

[
  { "epoch": 42, "sidechain_slot": 12345, "mainchain_epoch": 500,
    "block_height": 149000, "timestamp": 1711880000 }
]

Cardano

GET /api/cardano-anchors
Try it

Cardano anchor points: sidechain state anchored to Cardano.

Params: limit (max 200, default 50)

[
  { "block_height": 149500, "mainchain_block": 12345678,
    "mainchain_hash": "0x...", "timestamp": 1711881000 }
]

Contracts

GET /api/analytics/contracts
Try it

Contract leaderboard: most active contracts by call count.

{
  "contracts": [
    { "address": "0x...", "calls": 5000, "deploys": 1, "last_call": 1711882800 }
  ]
}
GET /api/contracts/deployed
Try it

All deployed contract addresses discovered from on-chain events.

[
  { "address": "0x...", "deployed_at_block": 50000, "deployer": "5G..." }
]