Skip to content

the-laziest/namadexer-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Namadexer-go

Namadexer-go is a Golang implementation of indexer for Namada. It supports all endpoints from original namadexer and has additional endpoints:

  • /txs?hash=<hash-id-1>&hash=<hash-id-2>... - fetch list of transactions by specified hashes
  • /txs/memo/{memo} - fetch list of transactions by specified memo with limit and offset in query
  • /txs/memo/{memo}/total - total number of transactions by specified memo
  • /account/txs/{account_id} - fetch list of transactions associated with specified account and limit and offset in query
  • /account/txs/{account_id}/total - total number of transactions associated with specified account

Overview

The project is composed of 2 entities : the indexer and the server. They are both written in Golang.

  • the indexer: This component establishes a connection to the Namada node via RPC and collects blocks and transactions. It then stores this data in a PostgreSQL database. The indexer operates independently of the server and can be initiated on its own.

  • the server: This is a JSON-based server that facilitates querying of blocks and transactions using unique identifiers.

These services require a connection to a postgres database.

Overall, the structure is pretty similar to namadexer.

Development

You will need access to a namada node and specify its tendermint rpc host and port in the config/config.toml file. You can use the config.example.toml as a template.

Dev dependencies

To proceed, you must have Docker installed and a Namada node.

Run

Start all the components:

$ make compose

To start components separately you can use make run-postgres, make run-indexer and make run-server commands.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages