{"openapi":"3.1.0","info":{"title":"tari_indexer","description":"The Tari indexer implementation","contact":{"name":"The Tari Development Community"},"license":{"name":"BSD-3-Clause","identifier":"BSD-3-Clause"},"version":"0.55.0"},"paths":{"/committees":{"get":{"tags":["handlers::committees"],"description":"Get one shard group's committee in an epoch, with its proof against the epoch's validator set hash","operationId":"get_committee","parameters":[{"name":"epoch","in":"query","description":"The epoch of the committee","required":true,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"shard","in":"query","description":"Any shard of the shard group whose committee to return","required":true,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"The committee and its proof","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCommitteeResponse"}}}},"400":{"description":"The epoch has not occurred yet, or the shard is in no shard group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"This indexer holds no validator set for the epoch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/epoch-checkpoints":{"get":{"tags":["handlers::epoch_checkpoints"],"description":"List epoch checkpoints from storage, ascending by epoch","operationId":"list_epoch_checkpoints","parameters":[{"name":"from_epoch","in":"query","description":"Epoch to start listing from (inclusive). Defaults to 0","required":false,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"limit","in":"query","description":"Maximum number of checkpoints to return (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"shard","in":"query","description":"Only the checkpoints of the shard group containing this shard","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"include_committees","in":"query","description":"Include the next epoch's committee for the shard group containing `shard`, with its proof against the next epoch's validator set hash. Requires `shard`","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of epoch checkpoints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEpochCheckpointsResponse"}}}},"400":{"description":"`include_committees` without `shard`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/epoch-checkpoints/latest":{"get":{"tags":["handlers::epoch_checkpoints"],"description":"Get the latest epoch checkpoint","operationId":"get_latest_epoch_checkpoint","parameters":[{"name":"shard","in":"query","description":"The latest checkpoint of the shard group containing this shard","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"include_committees","in":"query","description":"Include the next epoch's committee for the shard group containing `shard`, with its proof against the next epoch's validator set hash. Requires `shard`","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"The latest epoch checkpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLatestEpochCheckpointResponse"}}}},"400":{"description":"`include_committees` without `shard`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No epoch checkpoints found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/epoch-checkpoints/latest/shard-groups":{"get":{"tags":["handlers::epoch_checkpoints"],"description":"Get the latest epoch checkpoint of the shard group holding each shard, without committees","operationId":"get_latest_shard_group_checkpoints","responses":{"200":{"description":"The latest epoch checkpoint of each shard group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLatestShardGroupCheckpointsResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/epoch-manager/stats":{"get":{"tags":["handlers::misc"],"description":"Get epoch manager stats","operationId":"get_epoch_manager_stats","responses":{"200":{"description":"Epoch manager stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEpochManagerStatsResponse"}}}},"500":{"description":"Failed to fetch epoch manager stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/events":{"get":{"tags":["handlers::indexer_events"],"description":"SSE events","operationId":"sse_events","responses":{}}},"/identity":{"get":{"tags":["handlers::misc"],"description":"Get indexer network identity information","operationId":"get_identity","responses":{"200":{"description":"Indexer network identity info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIdentityResponse"}}}},"500":{"description":"Failed to get identity info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/info":{"get":{"tags":["handlers::misc"],"description":"Get this indexer's own configuration, as far as it affects what its API returns. Every field is local to the node answering the request - two indexers on the same network can disagree on all of them.","operationId":"get_info","responses":{"200":{"description":"Indexer configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIndexerInfoResponse"}}}}}}},"/network":{"get":{"tags":["handlers::network"],"description":"Get network info","operationId":"get","responses":{}}},"/network/connections":{"get":{"tags":["handlers::network"],"description":"Get active peer connections","operationId":"get_connections","responses":{"200":{"description":"Active peer connections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetConnectionsResponse"}}}},"500":{"description":"Failed to fetch peer connections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/network/economics":{"get":{"tags":["handlers::network"],"description":"Get network-wide TARI economic totals (claimed, burned, fee volume, supply, fees claimable by validators, target rate and the rate changes scheduled ahead)","operationId":"get_economics","responses":{"200":{"description":"Network economic totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetNetworkEconomicsResponse"}}}},"500":{"description":"Failed to fetch network economics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/network/stats":{"get":{"tags":["handlers::network"],"description":"Get network sync stats","operationId":"get_network_sync_stats","responses":{"200":{"description":"Network sync stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetNetworkSyncStateResponse"}}}},"500":{"description":"Failed to fetch network sync stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/resources/tari":{"get":{"tags":["handlers::resources"],"description":"Fetches the TARI resource","operationId":"get_tari","responses":{"200":{"description":"Resource details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResourceResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer is still syncing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/resources/{resource_address}":{"get":{"tags":["handlers::resources"],"description":"Fetches a resource by ID","operationId":"get_resource","responses":{"200":{"description":"Resource details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResourceResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer is still syncing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/substates/fetch":{"post":{"tags":["handlers::substates"],"description":"Fetches several substates by their IDs. Each value is served in its CBOR encoding, base64 in the JSON body.","operationId":"fetch_substates","responses":{"200":{"description":"Substates details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubstatesResponse"}}}},"400":{"description":"Too many substates requested, or proofs requested together with cached_only or from an indexer that does not verify proofs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch substates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer is still syncing, or no committee answers for the substate's shard group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/substates/versions":{"post":{"tags":["handlers::substates"],"description":"Looks up the live version of several substates, without their values or proofs. The versions cannot be verified by the caller: they are for pinning transaction inputs, where a wrong version makes the transaction fail.","operationId":"get_substate_versions","responses":{"200":{"description":"The live version of each substate that has one","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubstateVersionsResponse"}}}},"400":{"description":"Too many substates requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to look up substates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer is still syncing, or no committee answers for the substate's shard group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/substates/{substate_id}":{"get":{"tags":["handlers::substates"],"description":"Fetches a substate by ID. The value is served in its CBOR encoding, base64 in the JSON body.","operationId":"get_substate","parameters":[{"name":"substate_id","in":"path","description":"The substate ID to fetch","required":true,"schema":{"type":"string"}},{"name":"local_search_only","in":"query","description":"If true, only search local storage for the substate","required":true,"schema":{"type":"boolean"}},{"name":"version","in":"query","description":"Minimum version of the substate to fetch","required":false,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"include_proof","in":"query","description":"If true, include the proof the substate was verified with. A spent version named by `version` is then answered with its down proof","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Substate details, or with include_proof, the proof that the version asked for has been spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubstateResponse"}}}},"400":{"description":"A proof was requested together with local_search_only, or from an indexer that does not verify proofs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such substate, or the version asked for has been spent and no down proof was requested or verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch substate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer is still syncing, or no committee answers for the substate's shard group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates/catalogue":{"get":{"tags":["handlers::templates"],"description":"List templates discovered on the network via the template catalogue","operationId":"list_template_catalogue","parameters":[{"name":"name_filter","in":"query","description":"Substring filter on template name","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum entries to return (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"after","in":"query","description":"Cursor: return entries inserted after the row with this template address. Omit to start from the beginning","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Template catalogue entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTemplateCatalogueResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to list template catalogue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates/catalogue/{template_address}":{"get":{"tags":["handlers::templates"],"description":"Get a single template catalogue entry by its address","operationId":"get_template_catalogue_entry","responses":{"200":{"description":"Template catalogue entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCatalogueItem"}}}},"404":{"description":"Template not found in catalogue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch template catalogue entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/templates/{template_address}":{"get":{"tags":["handlers::templates"],"description":"Fetch a template definition by its address","operationId":"get_template_definition","responses":{"200":{"description":"Template definition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplateDefinitionResponse"}}}},"404":{"description":"Template not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch template definition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transaction-receipts":{"get":{"tags":["handlers::transaction_receipts"],"description":"List transaction receipts","operationId":"list_transaction_receipts","responses":{"200":{"description":"List of transaction receipts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTransactionReceiptsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The last_id receipt is not stored on this indexer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to list transaction receipts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transaction-receipts/{address}":{"get":{"tags":["handlers::transaction_receipts"],"description":"Get the transaction receipt by its address","operationId":"get_transaction_receipt","responses":{"200":{"description":"Transaction receipt found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTransactionReceiptResponse"}}}},"404":{"description":"Transaction receipt not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch transaction receipt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transactions":{"post":{"tags":["handlers::transactions"],"description":"Submit a transaction to validators responsible for the involved shards","operationId":"submit_transaction","responses":{"200":{"description":"Transaction submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitTransactionResponse"}}}},"400":{"description":"Invalid transaction or request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to submit transaction due to an internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"All validators failed to process the transaction, or a shard group it involves has no committee","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transactions/dry-run":{"post":{"tags":["handlers::transactions"],"description":"Submit a transaction as a dry-run","operationId":"submit_transaction_dry_run","responses":{"200":{"description":"Dry-run transaction processed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitTransactionDryRunResponse"}}}},"400":{"description":"Invalid transaction or request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Every dry-run execution slot is busy, or the caller's dry-run budget is spent; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to process dry-run transaction due to an internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transactions/events/stream":{"get":{"tags":["handlers::transaction_events"],"description":"SSE stream of template-emitted transaction events. Supports catch-up via the `after_id` query parameter or `Last-Event-ID` header. A cursor older than the indexer's event retention window (see `event_retention_epochs` on /info) is refused with 410, and a stream whose catch-up reaches pruned events ends, so the reconnect is refused the same way.","operationId":"sse_transaction_events","parameters":[{"name":"topic","in":"query","description":"Filter by event topic","required":false,"schema":{"type":"string"}},{"name":"substate_id","in":"query","description":"Filter by substate ID","required":false,"schema":{"type":"string"}},{"name":"template_address","in":"query","description":"Filter by template address","required":false,"schema":{"type":"string"}},{"name":"resource_address","in":"query","description":"Filter by resource address. Matches only std.resource.* events, which carry the resource as their substate_id. Vault events name no resource: filter those by substate_id (the vault ID)","required":false,"schema":{"type":"string"}},{"name":"after_id","in":"query","description":"Resume from this event ID (exclusive)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"SSE stream of transaction events"},"410":{"description":"Events after the resume cursor have been pruned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transactions/recent":{"get":{"tags":["handlers::transactions"],"description":"List recent transactions, newest first.\n\nBEST EFFORT: this lists what this indexer happens to hold — transactions submitted through it, plus those it observed on the network gossip topic while it was running and subscribed. It is not a complete record of network activity and absence from this listing does not mean a transaction does not exist. An indexer misses a transaction if it was offline or still starting up when it was gossiped, if its inbound gossip queue was full, or if the transaction has since aged past its retention window (see `transaction_retention_epochs` on /info).\n\nTransaction receipts are different: they are synced from network state rather than gossip, are complete from genesis back to the indexer's receipt retention window (see `transaction_receipt_retention_epochs` on /info), and are recovered after downtime. A committed transaction whose gossip this indexer missed therefore has a receipt but no entry here — list it from /transaction-receipts instead. Transactions that never committed (mempool-rejected, aborted or expired) never get a receipt, so gossip is the only source for them and coverage is best effort with no fallback.","operationId":"list_recent_transactions","responses":{"200":{"description":"List of recent transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRecentTransactionsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to list recent transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transactions/{transaction_id}":{"get":{"tags":["handlers::transactions"],"description":"Get a transaction (including its instructions, fee instructions and signatures) by transaction ID.\n\nBEST EFFORT: this reads the indexer's local transaction store, which holds transactions submitted through this indexer and — when gossip indexing is enabled, see `index_gossiped_transactions` on /info — those it observed on the network gossip topic. A 404 means this indexer has no body for the transaction, not that the transaction does not exist: it may have been gossiped while the indexer was offline, dropped from a full inbound queue, or pruned once past its retention window.\n\nTwo endpoints answer authoritatively where this one cannot. /transactions/{transaction_id}/result queries the transaction's committee, so it resolves the outcome of any transaction regardless of where it was submitted. /transaction-receipts is synced from network state rather than gossip and is complete back to its retention window (see `transaction_receipt_retention_epochs` on /info), which is longer than the transaction one, so a committed transaction always has a receipt there even when its body is missing here.","operationId":"get_transaction","responses":{"200":{"description":"Transaction found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTransactionResponse"}}}},"404":{"description":"Transaction not known to this indexer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/transactions/{transaction_id}/result":{"get":{"tags":["handlers::transactions"],"description":"Get the result of a submitted transaction (by transaction ID). The execution result, and the receipt when a proof is requested, are served in their CBOR encoding, base64 in the JSON body.","operationId":"get_transaction_result","parameters":[{"name":"transaction_id","in":"path","description":"The transaction ID","required":true,"schema":{"type":"string"}},{"name":"include_proof","in":"query","description":"If true, a committed transaction's result includes its receipt and the proof that the receipt was committed","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Transaction result found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTransactionResultResponse"}}}},"400":{"description":"A proof was requested from an indexer that does not verify proofs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Transaction result not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch transaction result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A proof was requested and no committee answers for the receipt's shard group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/utxos/fetch":{"post":{"tags":["handlers::utxos"],"description":"Gets full UTXO data for a list of tag and nonce pairs, and which of the pairs are spent or burnt","operationId":"fetch_utxos","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUtxosRequest"}}},"required":true},"responses":{"200":{"description":"UTXO details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUtxosResponse"}}}},"400":{"description":"Too many UTXOs requested or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch UTXOs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/utxos/stream":{"post":{"tags":["handlers::utxos"],"description":"Streams UTXO updates","operationId":"stream_utxo_updates","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUtxoUpdatesRequest"}}},"required":true},"responses":{"200":{"description":"Stream of UTXO updates"},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to start UTXO update stream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/validators":{"get":{"tags":["handlers::validators"],"description":"Get the validator roster for an epoch as tracked by the epoch manager","operationId":"list_validators","parameters":[{"name":"epoch","in":"query","description":"Epoch to fetch the roster for. Defaults to the current epoch","required":false,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"The validator roster for the epoch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListValidatorsResponse"}}}},"400":{"description":"The requested epoch has not occurred yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/wait-until-ready":{"get":{"tags":["handlers::misc"],"description":"Request will return an empty result when the indexer is ready to serve requests. This may take an indefinite amount of time after startup.","operationId":"wait_until_ready","responses":{}}}},"components":{"schemas":{"BatchedSubstateProof":{"type":"object","description":"A [`SubstateProof`] served in a [`GetSubstatesResponse`], whose commit proof the response serves once for every\nproof anchored at the same block.","required":["anchor","value_proof","value_hash_epoch"],"properties":{"anchor":{"$ref":"#/components/schemas/SubstateProofAnchor","description":"The committed block the proof is anchored at. The response's `commit_proofs` holds its commit proof under\n`anchor.block_id`."},"down_proof":{"type":["string","null"],"format":"byte","description":"CBOR-encoded `SubstateDownProof`, as in [`SubstateProof::down_proof`]."},"value_hash_epoch":{"type":"integer","format":"int64","minimum":0},"value_proof":{"type":"string","format":"byte","description":"CBOR-encoded `SubstateValueProof`, as in [`SubstateProof::value_proof`]."}}},"Connection":{"type":"object","required":["connection_id","peer_id","direction","age"],"properties":{"age":{"type":"string"},"connection_id":{"type":"string"},"direction":{"type":"string"},"peer_id":{"type":"string"},"ping_latency":{"type":["string","null"]},"user_agent":{"type":["string","null"]}}},"EpochCheckpointEntry":{"type":"object","description":"A shard group's checkpoint of the end of an epoch: the commit proof of its end-of-epoch block, which the\ncommittee of `epoch` signed.\n\nEvery field but `checkpoint` is read out of `checkpoint` for convenience, and is untrusted until the checkpoint\nverifies against that committee.","required":["epoch","shard_group","checkpoint"],"properties":{"checkpoint":{"type":"string","format":"byte","description":"CBOR-encoded `EpochCheckpoint`."},"epoch":{"type":"integer","format":"int64","description":"The epoch the checkpoint ends.","minimum":0},"next_epoch_committee":{"oneOf":[{"$ref":"#/components/schemas/ValidatorSetCommittee","description":"The next epoch's committee for the requested shard, when `include_committees` was set and this indexer holds\nthat epoch's validator set."},{"type":"null"}]},"next_epoch_validator_set_hash":{"type":["string","null"],"description":"The validator set hash of the next epoch that the end-of-epoch block names, read from the header metadata\npreimage the checkpoint carries. Absent if the block names none."},"shard_group":{"type":"object"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"GetCommitteeResponse":{"type":"object","required":["committee"],"properties":{"committee":{"$ref":"#/components/schemas/ValidatorSetCommittee"}}},"GetConnectionsResponse":{"type":"object","required":["connections"],"properties":{"connections":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}}}},"GetEpochManagerStatsResponse":{"type":"object","required":["current_epoch","current_block_height","current_block_hash"],"properties":{"consensus_epoch":{"type":["integer","null"],"format":"int64","description":"The epoch the validators execute transactions in, as the indexer has observed from their\ncommitted blocks, held within one epoch below `current_epoch`. It trails `current_epoch` after\neach epoch boundary until every committee has committed its end-of-epoch block. `None` until\nthe indexer has observed every committee.","minimum":0},"current_block_hash":{"type":"string"},"current_block_height":{"type":"integer","format":"int64","minimum":0},"current_epoch":{"type":"integer","format":"int64","description":"The current epoch according to the indexer's epoch oracle view","minimum":0}}},"GetIdentityResponse":{"type":"object","required":["peer_id","public_key","public_addresses"],"properties":{"peer_id":{"type":"string"},"public_addresses":{"type":"array","items":{"type":"string"}},"public_key":{"type":"string"}}},"GetIndexerInfoResponse":{"type":"object","description":"The configuration of a single indexer node, as far as it affects what its API returns. Every field\nis local to the node answering the request: two indexers on the same network can disagree on all of\nthem, so a client that cares must ask the node it is talking to.","required":["version","network","network_byte","current_epoch","index_gossiped_transactions","verify_substate_proofs","substate_cache_max_serve_lag_secs","indexes_all_events","utxo_tombstone_horizons"],"properties":{"current_epoch":{"type":"integer","format":"int64","description":"The current epoch, so a client can resolve the epoch-denominated fields below against a clock\nwithout a second request.","minimum":0},"event_retention_epochs":{"type":["integer","null"],"format":"int64","description":"How many epochs past the epoch its transaction committed in this indexer retains an event\nbefore pruning it. `None` means events are retained indefinitely. Event queries answer no\nfurther back than this, and the event stream refuses with 410 to resume from a cursor older\nthan the newest pruned event.","minimum":0},"index_gossiped_transactions":{"type":"boolean","description":"Whether this indexer stores transactions observed on the network gossip topic in addition to\nthose submitted directly to it. When false, a transaction submitted elsewhere is unknown to\nthis indexer until its receipt is synced.\n\nEven when true the stored set of transactions is best effort: an indexer misses whatever was\ngossiped while it was offline or while its inbound queue was full, and there is no backfill.\nTransaction receipts carry no such caveat — they are synced from network state and are\ncomplete back to `transaction_receipt_retention_epochs` — so a committed transaction always\nhas a receipt even when its body is missing here. Transactions that never committed get no receipt, so gossip\nis the only source for them."},"indexes_all_events":{"type":"boolean","description":"Whether this indexer stores every event on the network. When false it is configured with event\nfilters, so event queries answer over a subset and absence is not proof an event did not occur."},"network":{"type":"string"},"network_byte":{"type":"integer","format":"int32","minimum":0},"sidechain_id":{"type":["string","null"],"description":"The sidechain this indexer follows, if it is configured for one."},"substate_cache_max_serve_lag_secs":{"type":"integer","format":"int64","description":"How long after a shard was last confirmed synced this indexer keeps serving cached substates\nfor it, in seconds. Cached values are invalidated by the state transitions this indexer syncs\nrather than expired on a timer, so a served value trails the chain by the sync interval rather\nthan by this bound - which is what stops a validator that has stopped serving transitions from\nholding a stale value open indefinitely.","minimum":0},"transaction_receipt_retention_epochs":{"type":["integer","null"],"format":"int64","description":"How many epochs past the epoch its transaction committed in this indexer retains a transaction\nreceipt before pruning it. `None` means receipts are retained indefinitely. Longer than\n`transaction_retention_epochs`, so a retained transaction always has its receipt.","minimum":0},"transaction_retention_epochs":{"type":["integer","null"],"format":"int64","description":"How many epochs past its terminal epoch this indexer retains a transaction before pruning the\nrecord. `None` means transactions are retained indefinitely. A client paginating transaction\nhistory hits this floor rather than the start of the chain.","minimum":0},"utxo_tombstone_horizons":{"type":"array","items":{"type":"array","items":false,"prefixItems":[{"type":"integer","format":"int32","minimum":0},{"type":"integer","format":"int64","minimum":0}]},"description":"Per shard, the state version at and below which this indexer may lack the tombstone of a spent\nUTXO, ascending by shard. A shard's first sync fetches only its live substates, so a spend\nbefore it is not seen, and pruning a tombstone raises the horizon over it. A shard not listed\nhas every tombstone. The UTXO stream sets `StartOfShard::spends_incomplete` for a shard whose\ncursor is below its horizon. This is sync state, and rises while the indexer runs."},"utxo_tombstone_retention_epochs":{"type":["integer","null"],"format":"int64","description":"How many epochs past the epoch a UTXO was spent in this indexer retains its tombstone before\npruning it. `None` means tombstones are retained indefinitely. Pruning raises the shard's\nentry in `utxo_tombstone_horizons`, so a UTXO stream resuming from further back is told its\nspends are incomplete.","minimum":0},"verify_substate_proofs":{"type":"boolean","description":"Whether substates served by this indexer are verified against a shard group committee proof\nbefore being returned. When false, values are served as fetched from a single validator and\ncarry no proof of correctness."},"version":{"type":"string","description":"The indexer's build version."}}},"GetLatestEpochCheckpointResponse":{"type":"object","required":["checkpoint"],"properties":{"checkpoint":{"$ref":"#/components/schemas/EpochCheckpointEntry"}}},"GetLatestShardGroupCheckpointsResponse":{"type":"object","required":["checkpoints"],"properties":{"checkpoints":{"type":"array","items":{"$ref":"#/components/schemas/EpochCheckpointEntry"},"description":"The latest checkpoint of the shard group holding each shard, each listed once, in shard order and without\ncommittees. Each group is at its own latest epoch, so where the shard group layout changed and this indexer\nholds the new layout's checkpoints of only some groups, two listed groups can share shards. Empty while this\nindexer holds no checkpoint."}}},"GetNetworkEconomicsResponse":{"type":"object","required":["current_epoch","total_claimed","total_exhaust_burned","fee_volume","receipt_exhaust_burned","total_supply","transaction_receipt_count","target_burn_rate_bps"],"properties":{"burn_rate_retired_from":{"type":["integer","null"],"format":"int64","description":"The first epoch the release-scheduled rate governs again, when the council has retired.","minimum":0},"current_epoch":{"type":"integer","format":"int64","minimum":0},"fee_volume":{"type":"string","description":"Total fees paid by transaction payers, summed from transaction receipts."},"receipt_exhaust_burned":{"type":"string","description":"Total exhaust burned summed from the same receipts as `fee_volume`; `receipt_exhaust_burned /\nfee_volume` is the exact realized burn share, and this is the burn netted from `total_supply`. May\ntransiently trail `total_exhaust_burned` while the receipt sync frontier catches up to the checkpoint\nfrontier."},"scheduled_burn_rates":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledBurnRate"},"description":"Rate changes the council has scheduled to activate after `current_epoch`, ascending by epoch.\nEmpty when nothing is pending."},"target_burn_rate_bps":{"type":"integer","format":"int32","description":"The share of collected fees burned rather than paid to leaders, in basis points, in effect at `current_epoch`.","minimum":0},"total_claimed":{"type":"string","description":"Total XTR claimed (peg-in)."},"total_exhaust_burned":{"type":"string","description":"Total exhaust burned, sourced from checkpoint headers (consensus-backed, complete since genesis).\nKept as a cross-check against `receipt_exhaust_burned`."},"total_supply":{"type":"string","description":"Circulating L2 supply: `total_claimed - receipt_exhaust_burned`."},"transaction_receipt_count":{"type":"integer","format":"int64","description":"Number of transaction receipts the indexer has stored.","minimum":0},"validator_claimable_fees":{"type":"string","description":"Leader fees sitting in validator fee pools that validators have not yet claimed: the sum of every pool's\ncurrent balance."}}},"GetNetworkSyncStateResponse":{"type":"object","required":["network_desc"],"properties":{"activity_bucket_secs":{"type":"integer","format":"int64","description":"The width in seconds of each bucket of `ShardGroupSyncStatus::activity`.","minimum":0},"network_desc":{"$ref":"#/components/schemas/NetworkDescription"},"shard_groups":{"type":"array","items":{"$ref":"#/components/schemas/ShardGroupSyncStatus"},"description":"What each shard group's sync is doing, ascending by shard group."},"shards":{"type":"array","items":{"$ref":"#/components/schemas/ShardSyncStatus"},"description":"How far each shard of the network is synced, ascending by shard, from the global shard."},"sync_progress":{"oneOf":[{"$ref":"#/components/schemas/SyncProgress"},{"type":"null"}]},"validators":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorStatus"},"description":"The latest probe of each validator this indexer has synced from. Populated lazily, so\nvalidators that have never been contacted for a sync will not appear here."}}},"GetResourceResponse":{"type":"object","required":["resource","version"],"properties":{"resource":{"type":"string","format":"byte","description":"The CBOR-encoded `Resource`."},"total_supply":{"type":["string","null"]},"version":{"type":"integer","format":"int64","minimum":0}}},"GetSubstateResponse":{"type":"object","required":["version","state","verified"],"properties":{"proof":{"oneOf":[{"$ref":"#/components/schemas/SubstateProof","description":"The proof the indexer verified this answer with. Present only when `include_proof` was set\nand a committee member could prove the answer. A down answer always carries one."},{"type":"null"}]},"state":{"$ref":"#/components/schemas/SubstateState","description":"What the shard group holds for `version`. Only a request with `include_proof` that names the version is\nanswered with [`SubstateState::Down`], and only with a proof the indexer verified for it: a down proof, or an\nexclusion when more than `f` committee members agree the version is down. Any other down is a 404."},"verified":{"type":"boolean","description":"True when the indexer verified this answer against the shard group committee (via a merkle\nproof). False when proofs are disabled, or when no committee member could supply a proof yet\n(e.g. nothing committed since an epoch change) and the value was served unverified. A down answer\nis verified only with a down proof: an exclusion alone does not show the version was ever up."},"version":{"type":"integer","format":"int64","minimum":0}}},"GetSubstateVersionsResponse":{"type":"object","description":"The live version of each substate asked for in a [`GetSubstateVersionsRequest`].\n\nThe versions carry no proof, so a client cannot verify them. They are fit for pinning transaction inputs, where a\nwrong version makes the transaction fail rather than spend or read anything it should not, and for nothing that\ntakes a version as evidence of what the chain holds.","required":["versions"],"properties":{"versions":{"type":"object","description":"The live version of each substate asked for. A substate that does not exist, or whose latest version is\ndown, has no entry.","additionalProperties":{"type":"integer","format":"int64","minimum":0},"propertyNames":{"type":"string"}}}},"GetSubstatesResponse":{"type":"object","required":["substates"],"properties":{"commit_proofs":{"type":"object","description":"The commit proof of each block a proof in `proofs` is anchored at, by block id. Proofs anchored at the same\nblock share it.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"proofs":{"type":"object","description":"The proof each substate was verified with, when `include_proofs` was set, less the commit proof of the block\nit is anchored at, which is in `commit_proofs`. A substate no committee member could prove has no entry.","additionalProperties":{"$ref":"#/components/schemas/BatchedSubstateProof"},"propertyNames":{"type":"string"}},"substates":{"type":"object","description":"Each live substate's version and CBOR-encoded value, as in [`SubstateState::Up`].","additionalProperties":{"type":"object"},"propertyNames":{"type":"string"}}}},"GetTemplateDefinitionResponse":{"type":"object","required":["name","definition","code_size"],"properties":{"code_size":{"type":"integer","minimum":0},"definition":{"type":"object"},"name":{"type":"string"}}},"GetTransactionReceiptResponse":{"type":"object","required":["receipt"],"properties":{"receipt":{"type":"string","format":"byte","description":"The CBOR-encoded `TransactionReceipt`."}}},"GetTransactionResponse":{"type":"object","required":["transaction"],"properties":{"transaction":{"$ref":"#/components/schemas/TransactionEntry","description":"The stored transaction, including its instructions, fee instructions and signatures."}}},"GetTransactionResultResponse":{"type":"object","required":["result"],"properties":{"receipt":{"oneOf":[{"$ref":"#/components/schemas/ProvenTransactionReceipt","description":"The committed transaction receipt and its proof, when `include_proof` was set and the\ntransaction committed. An aborted transaction commits no receipt."},{"type":"null"}]},"result":{"type":"object","description":"The result of the transaction, which may be pending (not yet finalized) or finalized with details such as the\nfinal decision, execution result, and timestamps"}}},"GetUtxoUpdatesRequest":{"type":"object","required":["shard_state_versions","resource_address","per_shard_limit"],"properties":{"from_epoch":{"type":"integer","format":"int64","minimum":0},"per_shard_limit":{"type":"integer","format":"int32","description":"The number of UTXO rows to read per shard in this pass, from 1 to 1000. `from_epoch` and\n`unspent_only` are applied to the rows read, so a shard can return fewer updates than this,\nor none, and still have more: `StartOfShard::has_more` says whether it does. A state version\nwider than the limit is returned whole, overrunning it.","minimum":0},"resource_address":{"type":"string"},"shard_state_versions":{"type":"array","items":false,"prefixItems":[{"type":"integer","format":"int32","minimum":0},{"type":"integer","format":"int64","minimum":0}]},"unspent_only":{"type":"boolean"}}},"GetUtxosRequest":{"type":"object","required":["tag_and_nonce_pairs","resource_address"],"properties":{"cursor":{"type":["string","null"],"description":"Resume after the previous page: pass its `next_cursor`. UTXOs are paged in the order of their ids, which every\nindexer shares, so any indexer can resume a page another returned. A UTXO created or spent while the pages are\nread may or may not be returned."},"resource_address":{"type":"string"},"tag_and_nonce_pairs":{"type":"array","items":{"type":"array","items":false,"prefixItems":[{"type":"integer","format":"int32","minimum":0},{"type":"string"}]}},"unspent_at":{"type":"array","items":{"type":["array","null"],"items":false,"prefixItems":[{"type":"integer","format":"int32","minimum":0},{"type":"integer","format":"int64","minimum":0}]},"description":"Empty, or for each pair of `tag_and_nonce_pairs` in order, the shard and state version the client saw its UTXO\nunspent at, or `null` when it does not know them. A pair with no unspent UTXO is reported in `spent` once this\nindexer has indexed its shard through that state version, as this indexer keeps every unspent UTXO."}}},"GetUtxosResponse":{"type":"object","required":["utxos"],"properties":{"next_cursor":{"type":["string","null"],"description":"The `cursor` for the next page, or `None` once `utxos` holds the last matching UTXO."},"spent":{"type":"array","items":{"type":"array","items":false,"prefixItems":[{"type":"integer","format":"int32","minimum":0},{"type":"string"}]},"description":"The requested tag and nonce pairs this indexer holds as spent or burnt. A requested pair in neither list is\nunknown to this indexer, which may not yet have indexed it, or may have pruned its tombstone."},"utxos":{"type":"array","items":{"type":"array","items":false,"prefixItems":[{"type":"string"},{"type":"string"}]},"description":"The unspent UTXOs matching a requested tag and nonce pair, each a CBOR-encoded `Utxo`, in id order. Any number\nof UTXOs may share a pair."}}},"ListEpochCheckpointsResponse":{"type":"object","required":["checkpoints"],"properties":{"checkpoints":{"type":"array","items":{"$ref":"#/components/schemas/EpochCheckpointEntry"},"description":"Ascending by epoch. Only checkpoints that carry their end-of-epoch header's metadata preimage are listed."}}},"ListRecentTransactionsResponse":{"type":"object","required":["transactions"],"properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionEntry"}}}},"ListTemplateCatalogueResponse":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/TemplateCatalogueItem"}}}},"ListTransactionReceiptsResponse":{"type":"object","required":["receipts"],"properties":{"receipts":{"type":"array","items":{"type":"array","items":false,"prefixItems":[{"type":"string"},{"type":"string"}]},"description":"Each receipt's address and its CBOR-encoded `TransactionReceipt`."}}},"ListValidatorsResponse":{"type":"object","description":"The validator roster for an epoch, as registered on the base layer and tracked by the epoch\nmanager. Unlike the lazily-observed snapshots in `GetNetworkSyncStateResponse`, this is the\ncomplete consensus-derived validator set for the epoch.","required":["epoch","validators"],"properties":{"epoch":{"type":"integer","format":"int64","description":"The epoch the roster applies to.","minimum":0},"validators":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorInfo"}}}},"NetworkDescription":{"type":"object","required":["epoch","shard_groups","num_preshards"],"properties":{"epoch":{"type":"integer","format":"int64","minimum":0},"num_preshards":{"type":"string"},"shard_groups":{"type":"array","items":{"type":"array","items":false,"prefixItems":[{"type":"object"},{"type":"integer","format":"int32","minimum":0}]}}}},"ProvenTransactionReceipt":{"type":"object","description":"A committed transaction's receipt substate, with the proof it was verified with.","required":["version","value"],"properties":{"proof":{"oneOf":[{"$ref":"#/components/schemas/SubstateProof","description":"`None` when no committee member could prove the receipt, e.g. when nothing has been committed\nsince an epoch change."},{"type":"null"}]},"value":{"type":"string","format":"byte","description":"The receipt substate's CBOR-encoded `SubstateValue`, as in [`SubstateState::Up`]. It decodes to\n`SubstateValue::TransactionReceipt`."},"version":{"type":"integer","format":"int64","minimum":0}}},"ScheduledBurnRate":{"type":"object","description":"A burn rate the council has scheduled, taking effect from `activation_epoch`.","required":["activation_epoch","rate_bps"],"properties":{"activation_epoch":{"type":"integer","format":"int64","minimum":0},"rate_bps":{"type":"integer","format":"int32","minimum":0}}},"ShardGroupSyncPhase":{"oneOf":[{"type":"object","description":"No round has started yet.","required":["kind"],"properties":{"kind":{"type":"string","enum":["Starting"]}}},{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["SyncingCheckpoints"]}}},{"type":"object","description":"Indexing a new shard from a verified snapshot of its tree.","required":["shard","kind"],"properties":{"kind":{"type":"string","enum":["Snapshotting"]},"shard":{"type":"integer","format":"int32","minimum":0}}},{"type":"object","description":"Following a stream from `ShardGroupSyncStatus::stream_peer`.","required":["kind"],"properties":{"kind":{"type":"string","enum":["Streaming"]}}},{"type":"object","description":"Waiting until `until_unix_s` before the next round.","required":["reason","until_unix_s","kind"],"properties":{"kind":{"type":"string","enum":["Paused"]},"reason":{"type":"string"},"until_unix_s":{"type":"integer","format":"int64","minimum":0}}},{"type":"object","description":"Every committee member streamed history of `shard` above `from_version` that mismatches a verified leaf, which\npoints at this indexer's own recomputation. The group stops following until the epoch moves.","required":["shard","kind"],"properties":{"from_version":{"type":["integer","null"],"format":"int64","minimum":0},"kind":{"type":"string","enum":["Halted"]},"shard":{"type":"integer","format":"int32","minimum":0}}}],"description":"What a shard group's sync loop is doing."},"ShardGroupSyncStatus":{"type":"object","description":"One shard group's sync, as its loop last reported it. Kept in memory, so it starts empty when the indexer does.","required":["shard_group","phase","phase_since_unix_s","blames","excluded_peers","activity"],"properties":{"activity":{"type":"array","items":{"$ref":"#/components/schemas/SyncActivityBucket"},"description":"The versions and transactions promoted from the group's shards in each bucket of the last ten minutes, oldest\nfirst. The last bucket is still filling."},"blames":{"type":"array","items":{"$ref":"#/components/schemas/SyncBlame"},"description":"The group's most recent blames, oldest first."},"excluded_peers":{"type":"array","items":{"type":"string"},"description":"libp2p PeerIds of every peer blamed during the current epoch, each excluded from the group for the rest of it."},"last_checkpoint":{"oneOf":[{"$ref":"#/components/schemas/SyncStoredCheckpoint","description":"The epoch of the last checkpoint the group stored, and when it was stored."},{"type":"null"}]},"phase":{"$ref":"#/components/schemas/ShardGroupSyncPhase"},"phase_since_unix_s":{"type":"integer","format":"int64","description":"Unix timestamp (seconds) at which the group entered `phase`.","minimum":0},"shard_group":{"type":"object"},"stream_peer":{"type":["string","null"],"description":"libp2p PeerId of the committee member the group's current or last round streams from."},"tip":{"oneOf":[{"$ref":"#/components/schemas/SyncObservedTip","description":"The group's latest committed tip whose commit proof verified."},{"type":"null"}]}}},"ShardLevel":{"type":"object","required":["state_version","confirmed_secs_ago"],"properties":{"confirmed_secs_ago":{"type":"integer","format":"int64","minimum":0},"state_version":{"type":"integer","format":"int64","minimum":0}}},"ShardMismatch":{"type":"object","required":["at_unix_s","details"],"properties":{"at_unix_s":{"type":"integer","format":"int64","minimum":0},"details":{"type":"string"}}},"ShardObservedLeaf":{"type":"object","required":["state_version","observed_at_unix_s"],"properties":{"observed_at_unix_s":{"type":"integer","format":"int64","minimum":0},"state_version":{"type":"integer","format":"int64","minimum":0}}},"ShardSnapshotProgress":{"type":"object","required":["state_version","substates","fraction","started_at_unix_s"],"properties":{"fraction":{"type":"number","format":"double","description":"How far through the shard's leaf key space the snapshot has paged, from 0 to 1. Leaf keys are hashes, so this\nestimates the share of the shard's substates received."},"started_at_unix_s":{"type":"integer","format":"int64","minimum":0},"state_version":{"type":"integer","format":"int64","description":"The version of the verified leaf the snapshot is taken at.","minimum":0},"substates":{"type":"integer","format":"int64","minimum":0}}},"ShardSyncState":{"type":"string","enum":["Waiting","Snapshotting","CatchingUp","Following","Halted"]},"ShardSyncStatus":{"type":"object","description":"How far one shard is synced.","required":["shard","state","versions_last_minute"],"properties":{"last_mismatch":{"oneOf":[{"$ref":"#/components/schemas/ShardMismatch","description":"When a peer was last blamed for this shard's history, and why."},{"type":"null"}]},"last_promoted_at_unix_s":{"type":["integer","null"],"format":"int64","minimum":0},"level":{"oneOf":[{"$ref":"#/components/schemas/ShardLevel","description":"The version the stream last found the shard level with its committee at."},{"type":"null"}]},"shard":{"type":"integer","format":"int32","minimum":0},"snapshot":{"oneOf":[{"$ref":"#/components/schemas/ShardSnapshotProgress"},{"type":"null"}]},"staged":{"oneOf":[{"$ref":"#/components/schemas/ShardVersionAt","description":"The last version staged, where the stream resumes. Those above `verified` await a verified leaf."},{"type":"null"}]},"state":{"$ref":"#/components/schemas/ShardSyncState"},"tip_leaf":{"oneOf":[{"$ref":"#/components/schemas/ShardObservedLeaf","description":"The latest verified leaf a probe of the shard's committee returned."},{"type":"null"}]},"verified":{"oneOf":[{"$ref":"#/components/schemas/ShardVersionAt","description":"The last version a verified leaf authenticated, through which every version is promoted to the indexed tables."},{"type":"null"}]},"versions_last_minute":{"type":"integer","format":"int64","description":"State versions promoted in the last minute.","minimum":0}}},"ShardVersionAt":{"type":"object","required":["state_version","epoch"],"properties":{"epoch":{"type":"integer","format":"int64","description":"The epoch the version was committed in.","minimum":0},"state_version":{"type":"integer","format":"int64","minimum":0}}},"SubmitTransactionDryRunResponse":{"type":"object","required":["transaction_id","result"],"properties":{"result":{"type":"string","format":"byte","description":"The CBOR-encoded `ExecuteResult` of the dry run, including any emitted events and state changes, but without\na final decision or commitment to the ledger."},"transaction_id":{"type":"string","description":"The ID of the transaction that was dry-run"}}},"SubmitTransactionResponse":{"type":"object","required":["transaction_id"],"properties":{"transaction_id":{"type":"string","description":"The ID of the submitted transaction"}}},"SubstateProof":{"type":"object","description":"Proof that a substate value was committed by its shard group.\n\nTwo parts: a commit proof that the shard group committee committed a block whose header carries\n`anchor.state_merkle_root`, and a value proof that the substate's leaf is in the state tree under\nthat root. Verifying it requires the committee for `anchor.epoch` and `anchor.shard_group`.\n\nA proof shows the value was committed at the anchor block. It says nothing about later blocks, so\na caller judges freshness by the anchor's epoch and height.","required":["anchor","commit_proof","value_proof","value_hash_epoch"],"properties":{"anchor":{"$ref":"#/components/schemas/SubstateProofAnchor","description":"The committed block the proof is anchored at, as read from `commit_proof`."},"commit_proof":{"type":"string","format":"byte","description":"CBOR-encoded `SidechainBlockCommitProof`: the anchor block's header and the chain of quorum\ncertificates that committed it."},"down_proof":{"type":["string","null"],"format":"byte","description":"CBOR-encoded `SubstateDownProof`, present when the substate version is down and the committee still holds it:\nan inclusion proof that the version was committed, anchored at a block of its own, and an exclusion proof\nunder `anchor.state_merkle_root` that it is no longer in the state tree. `value_proof` is that exclusion\nproof.\n\nA down version without one is served with `value_proof` alone. A version that never existed also satisfies\nit, as does one committed after the anchor, so it shows the version gone only to a reader that has proven the\nversion up at a block of an earlier epoch than the anchor's."},"value_hash_epoch":{"type":"integer","format":"int64","description":"The epoch the substate's leaf value hash was computed in. It is an input to that hash, so a\nverifier needs it to recompute the leaf.","minimum":0},"value_proof":{"type":"string","format":"byte","description":"CBOR-encoded `SubstateValueProof`: the inclusion proof of the substate's leaf under\n`anchor.state_merkle_root`."}}},"SubstateProofAnchor":{"type":"object","description":"The committed block a [`SubstateProof`] is anchored at.","required":["epoch","shard_group","height","block_id","state_merkle_root"],"properties":{"block_id":{"type":"string"},"epoch":{"type":"integer","format":"int64","minimum":0},"height":{"type":"integer","format":"int64","minimum":0},"shard_group":{"type":"object"},"state_merkle_root":{"type":"string","description":"The shard group state root the block header commits."}}},"SubstateState":{"oneOf":[{"type":"object","description":"The version is live, holding `substate`.","required":["up"],"properties":{"up":{"type":"object","description":"The version is live, holding `substate`.","required":["substate"],"properties":{"substate":{"type":"string","format":"byte","description":"The CBOR-encoded `SubstateValue`, as the validator that answered the indexer served it. A proof is checked\nagainst the value these bytes decode to."}}}}},{"type":"object","description":"The version was live and has been spent. The proof's `down_proof` shows both.","required":["down"],"properties":{"down":{"type":"object","description":"The version was live and has been spent. The proof's `down_proof` shows both."}}}],"description":"What the shard group holds for a substate version."},"SyncActivityBucket":{"type":"object","required":["start_unix_s","versions","transactions"],"properties":{"start_unix_s":{"type":"integer","format":"int64","minimum":0},"transactions":{"type":"integer","format":"int64","description":"Transaction receipts promoted to the indexed tables.","minimum":0},"versions":{"type":"integer","format":"int64","description":"State versions promoted to the indexed tables.","minimum":0}}},"SyncBlame":{"type":"object","description":"Peers blamed for history no verified leaf covers. A blamed peer is excluded from its shard group for the rest of\n`epoch`.","required":["peer_ids","epoch","at_unix_s","details"],"properties":{"at_unix_s":{"type":"integer","format":"int64","minimum":0},"details":{"type":"string"},"epoch":{"type":"integer","format":"int64","minimum":0},"peer_ids":{"type":"array","items":{"type":"string"},"description":"libp2p PeerIds of the blamed peers."}}},"SyncObservedTip":{"type":"object","required":["epoch","height","observed_at_unix_s"],"properties":{"epoch":{"type":"integer","format":"int64","minimum":0},"height":{"type":"integer","format":"int64","minimum":0},"observed_at_unix_s":{"type":"integer","format":"int64","minimum":0}}},"SyncProgress":{"type":"object","required":["last_epoch","checkpoint_progress","last_state_versions"],"properties":{"checkpoint_progress":{"type":"array","items":{"type":"array","items":false,"prefixItems":[{"type":"object"},{"type":"integer","format":"int64","minimum":0}]}},"last_epoch":{"type":"integer","format":"int64","minimum":0},"last_state_versions":{"type":"array","items":{"type":"array","items":false,"prefixItems":[{"type":"integer","format":"int32","minimum":0},{"type":"array","items":false,"prefixItems":[{"type":"integer","format":"int64","minimum":0},{"type":"integer","format":"int64","minimum":0}]}]}}}},"SyncStoredCheckpoint":{"type":"object","required":["epoch","stored_at_unix_s"],"properties":{"epoch":{"type":"integer","format":"int64","minimum":0},"stored_at_unix_s":{"type":"integer","format":"int64","minimum":0}}},"TemplateCatalogueItem":{"type":"object","required":["template_address","template_name","author_public_key","binary_hash","at_epoch"],"properties":{"at_epoch":{"type":"integer","format":"int64","minimum":0},"author_public_key":{"type":"string"},"binary_hash":{"type":"string"},"metadata_hash":{"type":["string","null"]},"template_address":{"type":"string"},"template_name":{"type":"string"}}},"TransactionEntry":{"type":"object","required":["transaction_id","transaction","created_at","source"],"properties":{"created_at":{"type":"string","format":"date-time"},"rejected_reason":{"type":["string","null"],"description":"Reason the transaction was rejected by mempool validation when it was submitted through\nthis indexer. None if the transaction was not rejected at submission."},"source":{"$ref":"#/components/schemas/TransactionSource","description":"Where this indexer learned of the transaction."},"summary":{"oneOf":[{"$ref":"#/components/schemas/TransactionResultSummary","description":"Result summary from the locally indexed transaction receipt. None when no receipt has been\nindexed yet (pending or aborted)."},{"type":"null"}]},"transaction":{"type":"object","description":"Pruned transaction — blob commitments retained, raw blob bytes omitted to keep the\nresponse size bounded. The transaction id and signatures remain verifiable."},"transaction_id":{"type":"string"}}},"TransactionResultSummary":{"type":"object","required":["outcome","total_fees_paid","finalized_at"],"properties":{"finalized_at":{"type":"string","format":"date-time"},"outcome":{"type":"string"},"total_fees_paid":{"type":"integer","format":"int64","minimum":0}}},"TransactionSource":{"type":"string","description":"Where an indexer learned of a transaction it has stored.","enum":["local","gossip"]},"ValidatorConsensusState":{"type":"string","enum":["Initialising","Idle","CheckSync","Syncing","Presyncing","Running","Sleeping","Shutdown"]},"ValidatorInfo":{"type":"object","description":"A single validator's registration entry for an epoch.","required":["public_key","peer_id","shard_group","start_epoch","fee_claim_public_key","vote_power"],"properties":{"end_epoch":{"type":["integer","null"],"format":"int64","description":"The epoch the validator was deactivated, if any.","minimum":0},"fee_claim_public_key":{"type":"string","description":"The public key that may claim fees earned by this validator."},"peer_id":{"type":"string","description":"libp2p PeerId derived from the public key. Can be used to join against the liveness\nsnapshots in `GetNetworkSyncStateResponse.validators`."},"public_key":{"type":"string","description":"The validator's consensus public key."},"shard_group":{"type":"object","description":"The committee (shard group) the validator belongs to in this epoch."},"start_epoch":{"type":"integer","format":"int64","description":"The first epoch the validator's registration is active.","minimum":0},"vote_power":{"type":"integer","format":"int64","minimum":0}}},"ValidatorProbeError":{"type":"object","description":"Why a probe of a validator produced no snapshot.","required":["kind","message"],"properties":{"kind":{"$ref":"#/components/schemas/ValidatorProbeErrorKind"},"message":{"type":"string"}}},"ValidatorProbeErrorKind":{"type":"string","enum":["StatusUnavailable","InvalidProof"]},"ValidatorSetCommittee":{"type":"object","description":"One shard group's committee in an epoch, with the proof that it is that shard group's committee in the validator\nset `validator_set_hash` commits to.\n\nThe proof is only as good as the hash it is checked against: a verifier checks it against a validator set hash it\ntrusts, such as one a verified end-of-epoch checkpoint names, never against `validator_set_hash` alone.","required":["epoch","shard_group","validator_set_hash","members","proof"],"properties":{"epoch":{"type":"integer","format":"int64","minimum":0},"members":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorSetCommitteeMember"},"description":"Ascending by public key."},"proof":{"type":"string","format":"byte","description":"CBOR-encoded `ValidatorSetCommitteeProof`. It carries the members, and a verifier reads them from it."},"shard_group":{"type":"object"},"validator_set_hash":{"type":"string"}}},"ValidatorSetCommitteeMember":{"type":"object","required":["public_key","vote_power"],"properties":{"public_key":{"type":"string"},"vote_power":{"type":"integer","format":"int64","minimum":0}}},"ValidatorStatus":{"type":"object","description":"The latest probe of one validator's consensus pacemaker state, made by the indexer when it\nopened a sync stream from that validator.","required":["peer_id","shard_group","probed_at_unix_s"],"properties":{"peer_id":{"type":"string","description":"libp2p PeerId of the validator."},"probe_error":{"oneOf":[{"$ref":"#/components/schemas/ValidatorProbeError","description":"Why the latest probe produced no snapshot, or `None` when it produced `snapshot`. While this\nis set, `snapshot` is stale: it is the last one an earlier probe produced."},{"type":"null"}]},"probed_at_unix_s":{"type":"integer","format":"int64","description":"Unix timestamp (seconds) of the latest probe.","minimum":0},"shard_group":{"type":"object"},"snapshot":{"oneOf":[{"$ref":"#/components/schemas/ValidatorStatusSnapshot","description":"The last snapshot any probe of this validator produced, or `None` if none has succeeded."},{"type":"null"}]}}},"ValidatorStatusSnapshot":{"type":"object","description":"A validator's consensus pacemaker state as it reported it to the indexer.","required":["epoch","height","state","observed_at_unix_s"],"properties":{"epoch":{"type":"integer","format":"int64","minimum":0},"height":{"type":"integer","format":"int64","minimum":0},"observed_at_unix_s":{"type":"integer","format":"int64","description":"Unix timestamp (seconds) at which this snapshot was captured.","minimum":0},"state":{"$ref":"#/components/schemas/ValidatorConsensusState","description":"The validator's self-reported consensus pacemaker state. Diagnostic only - this is not\nverified, so it should not be relied upon for anything but display."}}}}}}