Skip to content

zoeldevapps/cardano-assets-server

Repository files navigation

Cardano assets server

Cardano has several different sources for metadata:

API

The server exposes a graphql API. The schema is available here.

Setup

DB restore

Syncing the assets db from scratch on mainnet (and potentially preprod) can be quite time-consuming. To help with getting servers quicker up to speed, there are 2 scripts:

scripts/restore.sh dump_XXX.sql.gz

DB and Migrations

The app is using postgres as a database server. For migrations it uses @slonik/migrator internally (which uses umzug in the background). To run migrations in production run:

node migrate up

before anything else.

Offchain metadata

Offchain metadata are fetched from directly from github and is periodically checked for any addition entries. Github has very strict rate limiting on their API. It's recommended to first use the scripts/loadOffchain.ts script to fill the DB with assets by cloning the offchain repository.

Existing solutions

There are currently aggregator solutions that allow fetching metadata:

  • blockfrost - require a separate subscription with no self-host options
  • koios - built on top of db-sync and postgrest
  • offchain-metadata-sever - which only handles the off-chain part

The aim of this project was to provide a relatively lighter-weight solution, only focusing on tokens on Cardano.

About

Service to host cardano asset metadata

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published