{"openapi":"3.1.0","info":{"title":"Interchained Vision API","description":"Production-grade ITC blockchain explorer + ITSL token registry & deployer.","version":"0.1.0"},"paths":{"/api/health":{"get":{"tags":["health"],"summary":"Health","description":"Fully synchronous health check — reads SQLite directly with sqlite3,\nbypassing the async event loop so it always responds instantly.","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stats/network":{"get":{"tags":["stats"],"summary":"Network Stats","operationId":"network_stats_api_stats_network_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stats/price":{"get":{"tags":["stats"],"summary":"Price","operationId":"price_api_stats_price_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stats/supply":{"get":{"tags":["stats"],"summary":"Supply","description":"Circulating ITC supply.\n\nSource priority:\n  1. Fresh cached gettxoutsetinfo (≤ SUPPLY_CACHE_TTL old) — exact.\n  2. Run gettxoutsetinfo now (slow, single-flight via lock) — exact.\n  3. Deterministic Σ-subsidy fallback — fast, ignores burnt/unspendable.\n\nReturns a stable shape regardless of source so the UI can render\nimmediately; `source` and `stale` flags let callers decide how to\nlabel it.","operationId":"supply_api_stats_supply_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/hashrate":{"get":{"tags":["stats"],"summary":"Hashrate","description":"Network hashrate — 120-block rolling average, in H/s.","operationId":"hashrate_api_hashrate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/difficulty":{"get":{"tags":["stats"],"summary":"Difficulty","description":"Current proof-of-work difficulty.","operationId":"difficulty_api_difficulty_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blockcount":{"get":{"tags":["stats"],"summary":"Blockcount","description":"Current tip height as a plain integer — useful for scripts and widgets.","operationId":"blockcount_api_blockcount_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/circulatingsupply":{"get":{"tags":["stats"],"summary":"Circulating Supply Plain","description":"Circulating supply in ITC as a plain number — compatible with\nCoinMarketCap / CoinGecko supply endpoint conventions.","operationId":"circulating_supply_plain_api_circulatingsupply_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stats/indexer":{"get":{"tags":["stats"],"summary":"Indexer Status","description":"Synchronous endpoint — runs in FastAPI's threadpool so it bypasses\nthe asyncio event loop entirely and always responds even when the\nindexer is saturating it.\n\nFalls back gracefully through three levels:\n  1. Read the full status JSON from kv.\n  2. If that row can't be read (lock or missing), read just\n     vision:indexer:last_height and synthesise a status — better than\n     lying with phase=starting which keeps the splash up forever.\n  3. If even that fails, return phase=db_locked so the frontend knows\n     this is contention, not a cold start.","operationId":"indexer_status_api_stats_indexer_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blocks/tip/height":{"get":{"tags":["compat"],"summary":"Tip Height","description":"Returns the current best block height as a plain integer.","operationId":"tip_height_api_blocks_tip_height_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/block/header/{hash_or_height}":{"get":{"tags":["compat"],"summary":"Block Header","description":"Block header fields (no transactions).","operationId":"block_header_api_block_header__hash_or_height__get","parameters":[{"name":"hash_or_height","in":"path","required":true,"schema":{"type":"string","title":"Hash Or Height"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tx/volume/24h":{"get":{"tags":["compat"],"summary":"Tx Volume 24H","description":"Transaction count over the last 24 hours (derived from cached block data).","operationId":"tx_volume_24h_api_tx_volume_24h_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mining/hashrate":{"get":{"tags":["compat"],"summary":"Mining Hashrate","description":"Network hashrate — 120-block rolling average (H/s).","operationId":"mining_hashrate_api_mining_hashrate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mining/diff-adj-estimate":{"get":{"tags":["compat"],"summary":"Diff Adj Estimate","description":"Estimated time and block height of the next difficulty retarget.","operationId":"diff_adj_estimate_api_mining_diff_adj_estimate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mining/next-block":{"get":{"tags":["compat"],"summary":"Next Block","description":"Projected contents of the next block based on current mempool.","operationId":"next_block_api_mining_next_block_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mining/next-block/txids":{"get":{"tags":["compat"],"summary":"Next Block Txids","description":"TXIDs of transactions in the projected next block.","operationId":"next_block_txids_api_mining_next_block_txids_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mining/next-block/includes/{txid}":{"get":{"tags":["compat"],"summary":"Next Block Includes","description":"Whether a given txid is included in the projected next block.","operationId":"next_block_includes_api_mining_next_block_includes__txid__get","parameters":[{"name":"txid","in":"path","required":true,"schema":{"type":"string","title":"Txid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mining/miner-summary":{"get":{"tags":["compat"],"summary":"Miner Summary","description":"Breakdown of the last N blocks by miner (coinbase payout address).","operationId":"miner_summary_api_mining_miner_summary_get","parameters":[{"name":"blocks","in":"query","required":false,"schema":{"type":"integer","default":144,"title":"Blocks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mempool/fees":{"get":{"tags":["compat"],"summary":"Mempool Fees","description":"Fee rate estimates (sat/vbyte) for next-block, 3-block, and 6-block targets.","operationId":"mempool_fees_api_mempool_fees_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blockchain/coins":{"get":{"tags":["compat"],"summary":"Blockchain Coins","description":"Coin supply information — circulating supply, halving schedule, subsidy.","operationId":"blockchain_coins_api_blockchain_coins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blockchain/utxo-set":{"get":{"tags":["compat"],"summary":"Utxo Set","description":"UTXO set statistics (from cached gettxoutsetinfo).","operationId":"utxo_set_api_blockchain_utxo_set_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blockchain/next-halving":{"get":{"tags":["compat"],"summary":"Next Halving","description":"ITC has no halvings — block reward does not change.","operationId":"next_halving_api_blockchain_next_halving_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blocks/tip":{"get":{"tags":["blocks"],"summary":"Tip","operationId":"tip_api_blocks_tip_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blocks":{"get":{"tags":["blocks"],"summary":"List Blocks","operationId":"list_blocks_api_blocks_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"before_height","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Height"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/block/{id}":{"get":{"tags":["blocks"],"summary":"Get Block","operationId":"get_block_api_block__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tx/{txid}":{"get":{"tags":["transactions"],"summary":"Get Transaction","operationId":"get_transaction_api_tx__txid__get","parameters":[{"name":"txid","in":"path","required":true,"schema":{"type":"string","title":"Txid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tx/broadcast":{"post":{"tags":["transactions"],"summary":"Broadcast","description":"Broadcast a raw transaction. Body: {\"hex\": \"...\"}","operationId":"broadcast_api_tx_broadcast_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/{addr}":{"get":{"tags":["addresses"],"summary":"Address Stats","operationId":"address_stats_api_address__addr__get","parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string","title":"Addr"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/{addr}/txs":{"get":{"tags":["addresses"],"summary":"Address Txs","operationId":"address_txs_api_address__addr__txs_get","parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string","title":"Addr"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/{addr}/utxos":{"get":{"tags":["addresses"],"summary":"Address Utxos","operationId":"address_utxos_api_address__addr__utxos_get","parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string","title":"Addr"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/{addr}/tokens":{"get":{"tags":["addresses"],"summary":"Address Tokens","description":"List ITSL token balances for this address.","operationId":"address_tokens_api_address__addr__tokens_get","parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string","title":"Addr"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address-index/status":{"get":{"tags":["addresses"],"summary":"Address Index Status","description":"Expose the address-index backfill progress so the UI can render\na \"still indexing\" state for empty pre-backfill addresses.","operationId":"address_index_status_api_address_index_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mempool/summary":{"get":{"tags":["mempool"],"summary":"Summary","operationId":"summary_api_mempool_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mempool/txs":{"get":{"tags":["mempool"],"summary":"List Txs","operationId":"list_txs_api_mempool_txs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mempool/projected":{"get":{"tags":["mempool"],"summary":"Projected","operationId":"projected_api_mempool_projected_get","parameters":[{"name":"blocks","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Blocks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens":{"get":{"tags":["tokens"],"summary":"List Tokens","operationId":"list_tokens_api_tokens_get","parameters":[{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(created|supply|transfers|name|symbol)$","default":"created","title":"Sort"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Direction"}},{"name":"verified","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/token/{token_id}":{"get":{"tags":["tokens"],"summary":"Get Token","operationId":"get_token_api_token__token_id__get","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenMeta"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/token/{token_id}/history":{"get":{"tags":["tokens"],"summary":"Token History","operationId":"token_history_api_token__token_id__history_get","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/token/{token_id}/balance/{address}":{"get":{"tags":["tokens"],"summary":"Token Balance","operationId":"token_balance_api_token__token_id__balance__address__get","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deploy/estimate":{"post":{"tags":["deploy"],"summary":"Estimate Fee","operationId":"estimate_fee_api_deploy_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeEstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deploy":{"post":{"tags":["deploy"],"summary":"Deploy Token","operationId":"deploy_token_api_deploy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenDeployResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search":{"get":{"tags":["search"],"summary":"Search","operationId":"search_api_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sse":{"get":{"tags":["realtime"],"summary":"Sse","operationId":"sse_api_sse_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/feed/blocks.xml":{"get":{"tags":["feeds"],"summary":"Blocks Feed","operationId":"blocks_feed_api_feed_blocks_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/webhooks":{"get":{"tags":["webhooks"],"summary":"List Webhooks","operationId":"list_webhooks_api_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["webhooks"],"summary":"Add Webhook","operationId":"add_webhook_api_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSub"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/{sub_id}":{"delete":{"tags":["webhooks"],"summary":"Remove Webhook","operationId":"remove_webhook_api_webhooks__sub_id__delete","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/pools":{"get":{"tags":["admin","admin"],"summary":"List Pools","operationId":"list_pools_api_admin_pools_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin","admin"],"summary":"Create Pool","operationId":"create_pool_api_admin_pools_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/pools/{pool_id}":{"put":{"tags":["admin","admin"],"summary":"Update Pool","operationId":"update_pool_api_admin_pools__pool_id__put","parameters":[{"name":"pool_id","in":"path","required":true,"schema":{"type":"integer","title":"Pool Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/snapshots":{"post":{"tags":["admin","admin"],"summary":"Create Snapshot","description":"Create a snapshot and start scanning in the background.\n\nValidation + the draft row are created synchronously (fast), then the heavy\nblock scan runs as a background task. We return ``202`` immediately with the\n``draft`` snapshot so the request never blocks long enough to trip the\nproxy's 502 timeout. The admin UI polls ``GET /admin/snapshots/{id}`` until\nthe status flips ``draft → generated`` (or ``failed``).","operationId":"create_snapshot_api_admin_snapshots_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotIn"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin","admin"],"summary":"List Snapshots","operationId":"list_snapshots_api_admin_snapshots_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/snapshots/cleanup":{"post":{"tags":["admin","admin"],"summary":"Cleanup Snapshots","description":"Bulk-delete leftover snapshots (default: ``failed`` + ``draft``) and their\nderived entries/blocks. Backs the ``cleanup_snapshots.sh`` script so cleanup\nruns through the backend that owns the DB (no second-process lock contention).","operationId":"cleanup_snapshots_api_admin_snapshots_cleanup_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CleanupIn","default":{"statuses":["failed","draft"]}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/snapshots/{snapshot_id}":{"delete":{"tags":["admin","admin"],"summary":"Delete Snapshot","description":"Delete a single snapshot and its derived entries/blocks.","operationId":"delete_snapshot_api_admin_snapshots__snapshot_id__delete","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","title":"Snapshot Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin","admin"],"summary":"Get Snapshot","operationId":"get_snapshot_api_admin_snapshots__snapshot_id__get","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","title":"Snapshot Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin","admin"],"summary":"Set Snapshot Status","operationId":"set_snapshot_status_api_admin_snapshots__snapshot_id__put","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","title":"Snapshot Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotStatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/snapshots/{snapshot_id}/entries/{entry_id}":{"put":{"tags":["admin","admin"],"summary":"Update Entry","operationId":"update_entry_api_admin_snapshots__snapshot_id__entries__entry_id__put","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","title":"Snapshot Id"}},{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntryUpdateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/snapshots/{snapshot_id}/blocks":{"get":{"tags":["admin","admin"],"summary":"Snapshot Blocks","operationId":"snapshot_blocks_api_admin_snapshots__snapshot_id__blocks_get","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","title":"Snapshot Id"}},{"name":"pool_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pool Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/snapshots/{snapshot_id}/export.csv":{"get":{"tags":["admin","admin"],"summary":"Export Snapshot Csv","description":"Detailed per-pool results CSV (audit / record-keeping).","operationId":"export_snapshot_csv_api_admin_snapshots__snapshot_id__export_csv_get","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","title":"Snapshot Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/snapshots/{snapshot_id}/payouts.csv":{"get":{"tags":["admin","admin"],"summary":"Export Payouts Csv","description":"Payout-ready CSV: payout_address + payout_amount (and satoshis).\n\nThis is the end-of-week sheet the operator feeds into the bulk payout\nprocess. Amounts are pre-calculated at satoshi precision via Decimal.\nEntries with no payout address or zero reward are skipped.","operationId":"export_payouts_csv_api_admin_snapshots__snapshot_id__payouts_csv_get","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","title":"Snapshot Id"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pools/apply":{"post":{"tags":["pools","pools"],"summary":"Apply For Grant","description":"Operator-submitted application. Creates a pool in ``pending`` status for\nadmin review — never auto-activates. Deduped by payout address against pools\nthat are already ``active`` or ``pending`` (a ``rejected``/``disabled`` pool\nmay re-apply).","operationId":"apply_for_grant_api_pools_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolApplicationIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pools/snapshots":{"get":{"tags":["pools","pools"],"summary":"Public Snapshots","operationId":"public_snapshots_api_pools_snapshots_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pools/snapshots/{snapshot_id}":{"get":{"tags":["pools","pools"],"summary":"Public Snapshot","operationId":"public_snapshot_api_pools_snapshots__snapshot_id__get","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nedb/status":{"get":{"tags":["nedb"],"summary":"Nedb Status","description":"nedbd health + selected database info.","operationId":"nedb_status_api_nedb_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Nedb Status Api Nedb Status Get"}}}}}}},"/api/nedb/query":{"post":{"tags":["nedb"],"summary":"Nedb Query","description":"Run an arbitrary NQL query against the configured (or override) database.","operationId":"nedb_query_api_nedb_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Nedb Query Api Nedb Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nedb/token-history/{token_id}":{"get":{"tags":["nedb"],"summary":"Nedb Token History","description":"Return ITSL ops for ``token_id``, optionally pinned to a historical seq.","operationId":"nedb_token_history_api_nedb_token_history__token_id__get","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Sequence number to rewind to","title":"As Of"},"description":"Sequence number to rewind to"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Nedb Token History Api Nedb Token History  Token Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nedb/trace/{token_id}":{"get":{"tags":["nedb"],"summary":"Nedb Trace","description":"TRACE caused_by — walk the causal chain for a token id.\n\nNEDB's ``TRACE caused_by`` clause follows the ``caused_by`` pointers on\n``itsl_ops`` documents to surface every op that contributed (transitively)\nto the current state of the token.","operationId":"nedb_trace_api_nedb_trace__token_id__get","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"reverse","in":"query","required":false,"schema":{"type":"boolean","description":"Trace forward causality if true","default":false,"title":"Reverse"},"description":"Trace forward causality if true"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Nedb Trace Api Nedb Trace  Token Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nedb/block/{height}":{"get":{"tags":["nedb"],"summary":"Nedb Block","description":"Return the block document for ``height``, optionally AS OF a past seq.","operationId":"nedb_block_api_nedb_block__height__get","parameters":[{"name":"height","in":"path","required":true,"schema":{"type":"integer","title":"Height"}},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"As Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Nedb Block Api Nedb Block  Height  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nedb/verify":{"get":{"tags":["nedb"],"summary":"Nedb Verify","description":"Verify the hash-chain integrity of the configured database.\n\nReturns ``{ok, seq, head, tamper_evident}``. ``tamper_evident`` is always\n``True`` for NEDB — every write is BLAKE2b-chained — but the field is\nexplicit so the frontend can label the result.","operationId":"nedb_verify_api_nedb_verify_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Nedb Verify Api Nedb Verify Get"}}}}}}},"/api/nedb/backfill-status":{"get":{"tags":["nedb"],"summary":"Nedb Backfill Status","description":"Return the current state of the bi-directional block backfill task.","operationId":"nedb_backfill_status_api_nedb_backfill_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Nedb Backfill Status Api Nedb Backfill Status Get"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AddressBalance":{"properties":{"confirmed_sats":{"type":"integer","title":"Confirmed Sats"},"unconfirmed_sats":{"type":"integer","title":"Unconfirmed Sats"}},"type":"object","required":["confirmed_sats","unconfirmed_sats"],"title":"AddressBalance"},"AddressStats":{"properties":{"address":{"type":"string","title":"Address"},"valid":{"type":"boolean","title":"Valid"},"balance":{"$ref":"#/components/schemas/AddressBalance"},"tx_count":{"type":"integer","title":"Tx Count"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"is_special":{"type":"boolean","title":"Is Special","default":false},"first_seen_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Seen Height"},"last_seen_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Seen Height"},"electrumx_available":{"type":"boolean","title":"Electrumx Available","default":true}},"type":"object","required":["address","valid","balance","tx_count"],"title":"AddressStats"},"Block":{"properties":{"height":{"type":"integer","title":"Height"},"hash":{"type":"string","title":"Hash"},"confirmations":{"type":"integer","title":"Confirmations"},"version":{"type":"integer","title":"Version"},"version_hex":{"type":"string","title":"Version Hex"},"merkleroot":{"type":"string","title":"Merkleroot"},"time":{"type":"integer","title":"Time"},"mediantime":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mediantime"},"nonce":{"type":"integer","title":"Nonce"},"bits":{"type":"string","title":"Bits"},"difficulty":{"type":"number","title":"Difficulty"},"chainwork":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chainwork"},"n_tx":{"type":"integer","title":"N Tx"},"previousblockhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previousblockhash"},"nextblockhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextblockhash"},"size":{"type":"integer","title":"Size"},"strippedsize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Strippedsize"},"weight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weight"},"coinbase":{"anyOf":[{"$ref":"#/components/schemas/CoinbaseDetail"},{"type":"null"}]},"txids":{"items":{"type":"string"},"type":"array","title":"Txids","default":[]}},"type":"object","required":["height","hash","confirmations","version","version_hex","merkleroot","time","nonce","bits","difficulty","n_tx","size"],"title":"Block"},"CleanupIn":{"properties":{"statuses":{"items":{"type":"string"},"type":"array","title":"Statuses"}},"type":"object","title":"CleanupIn","description":"Bulk-delete snapshots by status. Defaults to the leftover/failed states a\nre-run leaves behind, so a bare ``POST /cleanup`` is safe."},"CoinbaseDetail":{"properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"scriptsig_hex":{"type":"string","title":"Scriptsig Hex"},"scriptsig_text":{"type":"string","title":"Scriptsig Text"},"miner":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Miner"},"subsidy_sats":{"type":"integer","title":"Subsidy Sats"},"fee_sats":{"type":"integer","title":"Fee Sats"},"total_sats":{"type":"integer","title":"Total Sats"},"maturity":{"type":"object","title":"Maturity"}},"type":"object","required":["scriptsig_hex","scriptsig_text","subsidy_sats","fee_sats","total_sats","maturity"],"title":"CoinbaseDetail"},"EntryUpdateIn":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"txid":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Txid"}},"type":"object","title":"EntryUpdateIn"},"FeeEstimateRequest":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"symbol":{"type":"string","maxLength":16,"minLength":1,"title":"Symbol"},"decimals":{"type":"integer","maximum":18.0,"minimum":0.0,"title":"Decimals"},"amount":{"type":"string","title":"Amount"}},"type":"object","required":["name","symbol","decimals","amount"],"title":"FeeEstimateRequest"},"FeeEstimateResponse":{"properties":{"estimated_fee_sats":{"type":"integer","title":"Estimated Fee Sats"},"estimated_vbytes":{"type":"integer","title":"Estimated Vbytes"},"fee_per_vbyte":{"type":"integer","title":"Fee Per Vbyte"},"note":{"type":"string","title":"Note"}},"type":"object","required":["estimated_fee_sats","estimated_vbytes","fee_per_vbyte","note"],"title":"FeeEstimateResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PoolApplicationIn":{"properties":{"pool_name":{"type":"string","maxLength":120,"minLength":1,"title":"Pool Name"},"payout_address":{"type":"string","maxLength":120,"minLength":4,"title":"Payout Address"},"coinbase_tag":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Coinbase Tag"},"website":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Website"},"contact_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Email"},"discord":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Discord"},"telegram":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Telegram"}},"type":"object","required":["pool_name","payout_address"],"title":"PoolApplicationIn","description":"Public grant application submitted by a mining pool operator."},"PoolIn":{"properties":{"pool_name":{"type":"string","maxLength":120,"minLength":1,"title":"Pool Name"},"coinbase_tag":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Coinbase Tag"},"payout_address":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Payout Address"},"website":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Website"},"contact_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Email"},"discord":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Discord"},"telegram":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Telegram"},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["pool_name"],"title":"PoolIn"},"PoolUpdate":{"properties":{"pool_name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Pool Name"},"coinbase_tag":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Coinbase Tag"},"payout_address":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Payout Address"},"website":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Website"},"contact_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Email"},"discord":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Discord"},"telegram":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Telegram"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"PoolUpdate"},"QueryBody":{"properties":{"nql":{"type":"string","title":"Nql"},"db":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db"}},"type":"object","required":["nql"],"title":"QueryBody"},"SnapshotIn":{"properties":{"snapshot_name":{"type":"string","maxLength":160,"minLength":1,"title":"Snapshot Name"},"start_height":{"type":"integer","minimum":0.0,"title":"Start Height"},"end_height":{"type":"integer","minimum":0.0,"title":"End Height"},"reward_per_block":{"type":"string","title":"Reward Per Block","default":"0.10301990"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"allow_duplicate":{"type":"boolean","title":"Allow Duplicate","default":false}},"type":"object","required":["snapshot_name","start_height","end_height"],"title":"SnapshotIn"},"SnapshotStatusIn":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"SnapshotStatusIn"},"TokenDeployRequest":{"properties":{"name":{"type":"string","title":"Name"},"symbol":{"type":"string","title":"Symbol"},"decimals":{"type":"integer","title":"Decimals"},"amount":{"type":"string","title":"Amount"},"wif_key":{"type":"string","title":"Wif Key"},"witness":{"type":"boolean","title":"Witness","default":true}},"type":"object","required":["name","symbol","decimals","amount","wif_key"],"title":"TokenDeployRequest"},"TokenDeployResponse":{"properties":{"txid":{"type":"string","title":"Txid"},"token_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Id"},"raw":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Raw"}},"type":"object","required":["txid"],"title":"TokenDeployResponse"},"TokenMeta":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"symbol":{"type":"string","title":"Symbol"},"decimals":{"type":"integer","title":"Decimals"},"total_supply":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Supply"},"creator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator"},"created_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created Height"},"created_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created Time"},"create_txid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Create Txid"},"transfer_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Count"},"verified":{"type":"boolean","title":"Verified","default":false},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"}},"type":"object","required":["id","name","symbol","decimals"],"title":"TokenMeta"},"Transaction":{"properties":{"txid":{"type":"string","title":"Txid"},"hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hash"},"version":{"type":"integer","title":"Version"},"locktime":{"type":"integer","title":"Locktime"},"size":{"type":"integer","title":"Size"},"vsize":{"type":"integer","title":"Vsize"},"weight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weight"},"fee_sats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fee Sats"},"fee_rate_sat_vbyte":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fee Rate Sat Vbyte"},"block_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Hash"},"block_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Block Height"},"block_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Block Time"},"confirmations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confirmations"},"in_mempool":{"type":"boolean","title":"In Mempool","default":false},"is_coinbase":{"type":"boolean","title":"Is Coinbase","default":false},"inputs":{"items":{"$ref":"#/components/schemas/TxInput"},"type":"array","title":"Inputs"},"outputs":{"items":{"$ref":"#/components/schemas/TxOutput"},"type":"array","title":"Outputs"},"raw_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Hex"}},"type":"object","required":["txid","version","locktime","size","vsize","inputs","outputs"],"title":"Transaction"},"TxInput":{"properties":{"txid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Txid"},"vout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vout"},"scriptsig_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scriptsig Hex"},"scriptsig_asm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scriptsig Asm"},"sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence"},"txinwitness":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Txinwitness"},"coinbase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coinbase"},"prevout":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Prevout"}},"type":"object","title":"TxInput"},"TxOutput":{"properties":{"n":{"type":"integer","title":"N"},"value_sats":{"type":"integer","title":"Value Sats"},"script_pubkey_hex":{"type":"string","title":"Script Pubkey Hex"},"script_pubkey_asm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script Pubkey Asm"},"script_pubkey_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script Pubkey Type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},"type":"object","required":["n","value_sats","script_pubkey_hex"],"title":"TxOutput"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookSub":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":8,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["url"],"title":"WebhookSub"}}}}