Indexer Installation

This guide will walk you through setting up a self-hosted indexer API. before indexer service setup, user should have setup Endless fullnode and already connected to Endless network.

Please refer Sample configuration with index GRPC enabled

Pre-compile binary file with configuration

To run the indexer service we need to build configuration: config.toml. the content below for your reference:

stream_url="http://127.0.0.1:50051"
server="127.0.0.1:3000"
db_dir="endless_indexer_data"

Let’s go through some of these fields.

  • stream_url indexer service depends transaction sent by GRPC service.

    stream_url should points to endless-node GRPC endpoint, please refer Sample configuration with index GRPC enabled

  • server This is the URL service of endless-indexer. By default the value is 127.0.0.1:3000.

  • db_dir db_dir points to the directory where index service store db data. By default the value is endless_indexer_data

Run endless-index

Make sure the config.toml is located in the same directory as endless-index.

endless-index

All indexed data are saved under endless_indexer_data.

Prune endless_indexer_data and restart endless-index if user want to clear and rebuild the index from the scratch.

Docker

docker run command:

Here is a sample docker-compose.yaml to orchestrate endless-node and endless-indexer:

Endless-index API Doc

After ensure endless-index service is started, accessing http://localhost:3000/api/v2/spec will display the schema that conforms to the OpenAPI specification.

Last updated