Operate / Extended view

Optional /extended JSON

Clients that already call /extended keep that path. Same Postgres, off by default.

Subset, not a drop-in replica

Node RPC (/v2) is not this listener: no nonce. The full account /balances document (miner rewards, token offering, metadata) is not shipped. BNS reads are empty until BNS_DECODER_ENABLED=true. Missing fields (miner_txid, execution_cost_*, post_conditions, total_fees_sent) are omitted, never zeroed.

Only the value 1 enables it.

EXTENDED_VIEW=1
curl http://127.0.0.1:3999/extended/v1/status
KeyDefaultNotes
EXTENDED_VIEWunsetOnly 1 turns it on
EXTENDED_PORT3999Positive integer

Same process as /v1, second bind. Compose publishes 127.0.0.1:3999 and leaves the flag off, so the port refuses until you set it in .env.

{
  "server_version": "secondlayer-extended/1.30.0",
  "status": "ready",
  "chain_tip": {
    "block_height": 8054704,
    "block_hash": "0xabc",
    "index_block_hash": "0xdef",
    "burn_block_height": 850000
  }
}

Empty chain omits chain_tip. status stays "ready".

These paths answer on :3999.

MethodPathReturns
GET/extended/v1/statusserver_version, status, optional chain_tip
GET/extended/v1/blockList, height desc
GET/extended/v1/block/:hashOne block by hash or height. Includes txs
GET/extended/v1/txList. Optional from_height / to_height
GET/extended/v1/tx/:tx_idOne transaction
GET/extended/v1/tx/:tx_id/eventsJSON array, event_index order
GET/extended/v1/address/:principal/transactionsTxs where sender is the principal
GET/extended/v1/address/:principal/stxDecoded STX totals as strings. No nonce
GET/extended/v1/address/:principal/ftPer-asset FT nets
GET/extended/v1/address/:principal/nftHeld { asset_identifier, value }
GET/extended/v1/tokens/nft/transfersnft_transfer rows. Optional asset_identifier
GET/extended/v1/namesBNS by ?address=. Empty if the decoder is off
GET/extended/v1/names/:nameOne FQN. {} if the decoder is off
QueryDefaultNotes
limit20Max 30 on block/tx lists; max 50 on nft transfers. Over → 400
offset0
from_height, to_heighttx list only
asset_identifiernft transfers only

Lists use { limit, offset, total, results }, not the /v1 cursor envelope. /tx/:tx_id/events is a JSON array. cursor and from_cursor return 400.

/extended is not mounted on :3800. :3800/extended 404s with the /v1 body (code: "NOT_FOUND"). Errors on :3999 are { "error": "Not found" } with no code, path, or next_cursor.

BindReads
LoopbackOpen, no token
Past loopbackINSTANCE_TOKEN

Same rule as /v1. Tokens: Authentication.

Prefer Index unless you already have /extended clients.

SurfacePortJob
/v13800Index, Streams, subgraphs. Envelope, cursors, signatures.
/extended3999Optional JSON projection of Index rows. Off by default.
Node RPC /v220443Nonce, call-read, broadcast. Point those at the node.

No second Postgres. No extra API container.