This is the Undexer. It decodes historical data from a Namada node, and caches it into PostgreSQL, so that you don't have to.
Undexer is the pilot project for Fadroma 2.0.
See @fadroma/namada
and @hackbg/borshest
.
For all endpoints available please refer to the OpenAPI specs.
API v4 (current): https://undexer.hack.bg/v4
API v3 (deprecated): https://undexer-v3.demo.hack.bg/v3/
/block
endpoint: removed blockHeader
, added proposer
and signers
API v2 (decommissioned): https://undexer.demo.hack.bg/v2/
API v1 (decommissioned).
Requires:
Setup:
git clone --recursive https://github.com/hackbg/undexer
cd undexer
pnpm i
pnpm build:wasm:dev # or pnpm build:wasm:prod
pnpm start # concurrently runs api and indexer
You may need to create an .env
file to provide at least DATABASE_URL
(for connecting
to your PostgreSQL instance). See src/config.js
for other environment variables.
You can use Docker Compose to launch Postgres and hack on the rest outside of the container.
Requires:
Setup:
git clone --recursive https://github.com/hackbg/undexer
cd undexer
just up # or `docker compose up`, etc.
We use NixOS/systemd/Docker to run this in production.
Undexer does not manage TLS certificates or terminate HTTPS. We use NGINX and automatic ACME/LetsEncrypt cert management provided by NixOS.
./fadroma
is a Git submodule. Handle accordingly. For example, if the directory is empty,
this usually means you cloned the Undexer repo without submodules. To populate it, use:
git submodule update --init --recursive
If you catch anything breaking, get in touch by filing an issue or PR in this repository.