tari_indexer (0.40.0)

Download OpenAPI specification:

License: BSD-3-Clause

The Tari indexer implementation

handlers::epoch_checkpoints

list_epoch_checkpoints

List epoch checkpoints from storage

query Parameters
from_epoch
integer <int64> >= 0

Epoch to start listing from (inclusive). Defaults to 0

limit
integer <int32> >= 0

Maximum number of checkpoints to return (default: 20, max: 100)

Responses

Response samples

Content type
application/json
{
  • "checkpoints": [
    ]
}

get_latest_epoch_checkpoint

Get the latest epoch checkpoint

Responses

Response samples

Content type
application/json
{
  • "checkpoint": { }
}

handlers::misc

get_epoch_manager_stats

Get epoch manager stats

Responses

Response samples

Content type
application/json
{
  • "current_block_hash": "string",
  • "current_block_height": 0,
  • "current_epoch": 0
}

get_identity

Get indexer network identity information

Responses

Response samples

Content type
application/json
{
  • "peer_id": "string",
  • "public_addresses": [
    ],
  • "public_key": "string"
}

get_info

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.

Responses

Response samples

Content type
application/json
{
  • "current_epoch": 0,
  • "index_gossiped_transactions": true,
  • "indexes_all_events": true,
  • "network": "string",
  • "network_byte": 0,
  • "sidechain_id": "string",
  • "substate_cache_max_serve_lag_secs": 0,
  • "transaction_retention_epochs": 0,
  • "verify_substate_proofs": true,
  • "version": "string"
}

wait_until_ready

Request will return an empty result when the indexer is ready to serve requests. This may take an indefinite amount of time after startup.

handlers::indexer_events

sse_events

SSE events

handlers::network

get

Get network info

get_connections

Get active peer connections

Responses

Response samples

Content type
application/json
{
  • "connections": [
    ]
}

get_economics

Get network-wide TARI economic totals (claimed, burned, fee volume, supply, target rate)

Responses

Response samples

Content type
application/json
{
  • "current_epoch": 0,
  • "fee_volume": "string",
  • "receipt_exhaust_burned": "string",
  • "target_burn_rate_bps": 0,
  • "total_claimed": "string",
  • "total_exhaust_burned": "string",
  • "total_supply": "string",
  • "transaction_receipt_count": 0
}

get_network_sync_stats

Get network sync stats

Responses

Response samples

Content type
application/json
{
  • "network_desc": {
    },
  • "sync_progress": { },
  • "validators": [
    ]
}

handlers::nfts

get_non_fungibles

Get non-fungibles by resource address

Request Body schema: application/json
required
address
required
string
end_index
required
integer <int64> >= 0
start_index
required
integer <int64> >= 0

Responses

Request samples

Content type
application/json
{
  • "address": "string",
  • "end_index": 0,
  • "start_index": 0
}

Response samples

Content type
application/json
{
  • "non_fungibles": [
    ]
}

handlers::resources

get_tari

Fetches the TARI resource

Responses

Response samples

Content type
application/json
{
  • "resource": { },
  • "total_supply": "string",
  • "version": 0
}

get_resource

Fetches a resource by ID

Responses

Response samples

Content type
application/json
{
  • "resource": { },
  • "total_supply": "string",
  • "version": 0
}

handlers::substates

fetch_substates

Fetches several substates by their IDs

Responses

Response samples

Content type
application/json
{
  • "substates": {
    }
}

get_substate

Fetches a substate by ID

path Parameters
substate_id
required
string

The substate ID to fetch

query Parameters
local_search_only
required
boolean

If true, only search local storage for the substate

version
integer <int32> >= 0

Minimum version of the substate to fetch

Responses

Response samples

Content type
application/json
{
  • "substate": { },
  • "verified": true,
  • "version": 0
}

handlers::templates

list_cached_templates

List all template cached by this indexer

query Parameters
limit
integer <int32> >= 0

Limit the number of results returned

Responses

Response samples

Content type
application/json
{
  • "templates": [
    ]
}

list_template_catalogue

List templates discovered on the network via the template catalogue

query Parameters
name_filter
string

Substring filter on template name

limit
integer <int64> >= 0

Maximum entries to return (default: 20, max: 100)

after
string

Cursor: return entries inserted after the row with this template address. Omit to start from the beginning

Responses

Response samples

Content type
application/json
{
  • "entries": [
    ]
}

get_template_catalogue_entry

Get a single template catalogue entry by its address

Responses

Response samples

Content type
application/json
{
  • "at_epoch": 0,
  • "author_public_key": "string",
  • "binary_hash": "string",
  • "metadata_hash": "string",
  • "template_address": "string",
  • "template_name": "string"
}

get_template_definition

Fetch a template definition by its address

Responses

Response samples

Content type
application/json
{
  • "code_size": 0,
  • "definition": { },
  • "name": "string"
}

handlers::transaction_receipts

list_transaction_receipts

List transaction receipts

Responses

Response samples

Content type
application/json
{
  • "receipts": [
    ]
}

get_transaction_receipt

Get the transaction receipt by its address

Responses

Response samples

Content type
application/json
{
  • "receipt": { }
}

handlers::transactions

submit_transaction

Submit a transaction to validators responsible for the involved shards

Responses

Response samples

Content type
application/json
{
  • "transaction_id": "string"
}

submit_transaction_dry_run

Submit a transaction as a dry-run

Responses

Response samples

Content type
application/json
{
  • "result": { },
  • "transaction_id": "string"
}

list_recent_transactions

List recent transactions, newest first.

BEST 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).

Transaction receipts are different: they are synced from network state rather than gossip, are complete from genesis, 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.

Responses

Response samples

Content type
application/json
{
  • "transactions": [
    ]
}

get_transaction

Get a transaction (including its instructions, fee instructions and signatures) by transaction ID.

BEST 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.

Two 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 from genesis, so a committed transaction always has a receipt there even when its body is missing here.

Responses

Response samples

Content type
application/json
{
  • "transaction": {
    }
}

get_transaction_result

Get the result of a submitted transaction (by transaction ID)

Responses

Response samples

Content type
application/json
{
  • "result": { }
}

handlers::transaction_events

sse_transaction_events

SSE stream of template-emitted transaction events. Supports catch-up via the after_id query parameter or Last-Event-ID header.

query Parameters
topic
string

Filter by event topic

substate_id
string

Filter by substate ID

template_address
string

Filter by template address

resource_address
string

Filter by resource address (derived from substate_id for std.resource.* events, or from the resource_address payload entry for std.vault.deposit / std.vault.withdraw)

after_id
integer <int64>

Resume from this event ID (exclusive)

handlers::utxos

list_utxos

List full UTXO data

Responses

Response samples

Content type
application/json
{
  • "utxos": [
    ]
}

fetch_utxos

Gets full UTXO data for a list of UTXO IDs

Request Body schema: application/json
required
resource_address
required
string
required
Array of items

Responses

Request samples

Content type
application/json
{
  • "resource_address": "string",
  • "tag_and_nonce_pairs": [
    ]
}

Response samples

Content type
application/json
{
  • "utxos": [
    ]
}

stream_utxo_updates

Streams UTXO updates

Request Body schema: application/json
required
from_epoch
integer <int64> >= 0
per_shard_limit
required
integer <int32> >= 0
resource_address
required
string
required
Array of items
unspent_only
boolean

Responses

Request samples

Content type
application/json
{
  • "from_epoch": 0,
  • "per_shard_limit": 0,
  • "resource_address": "string",
  • "shard_state_versions": [
    ],
  • "unspent_only": true
}

Response samples

Content type
application/json
{
  • "error": "string"
}

handlers::validators

list_validators

Get the validator roster for an epoch as tracked by the epoch manager

query Parameters
epoch
integer <int64> >= 0

Epoch to fetch the roster for. Defaults to the current epoch

Responses

Response samples

Content type
application/json
{
  • "epoch": 0,
  • "validators": [
    ]
}