The Token Registry API queries the Cardano Token Registry's GitHub repository to fetch off-chain metadata of tokens.
🔗 Token Registry Repository: Cardano Token Registry - Mappings
-
Set Environment Variables
- Create a
.env
file and specify the following variables:SERVER_PORT
: Port to run the API (Default:8080
)SCHEDULE_UPDATE
: Set totrue
to enable scheduled (re-clones the repo every 2 days)USE_GH_API
: Set totrue
to directly query github, else uses the cached info from build-time
- Create a
-
Install Dependencies & Start Server
yarn && yarn start
-
Endpoints
- GET
/health
: Health info - GET
/meetadata/:id
: Offchain metadata info of an asset - POST
/clone
: force clone the mappings folder from the token registry repo
- GET
docker run -p 8080:8080 \
-e SCHEDULE_UPDATE=true \
-e USE_GH_API=false \
-e SERVER_PORT=8080 \
ghcr.io/cardanoapi/token-registry-api:latest