Skip to content

๐Ÿ”Ž Table interface for the TzKT blockchain indexer

License

Notifications You must be signed in to change notification settings

baking-bad/tzkt-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TzKT Pro

Setup

Create .env file from .env.tpl

Install dependencies

make install

Download latest TzKT snapshot

make snapshot

Run database and apply snapshot

make db-start  # wait for container is up and running
make db-restore

Create Postgres roles, schemas & views

make db-pro

Run the indexer and postgrest gateway

make pro-start

Generate Docs Specs (Open API Specification)

make spec

View Docs (with Redoc)

make docs

Upgrade

Just hit the make upgrade command to pull the latest images from Docker Hub and restart services. Specs and Docs will be also generated.

make upgrade

Code Samples

make spec will generate a GET code sample for each endpoint using the open-api/code-samples/config/gen-code-samples.config.json config.

To add a template for a new language:

  1. Create a Handlebars template file in open-api/code-samples/templates eg.

    open-api/code-samples/templates/javascript.hbs
    
  2. Update open-api/code-samples/config/gen-code-samples.config.json config eg.

    "JavaScript": "open-api/code-samples/templates/javascript.hbs",
  3. Now make spec will generate a GET code sample for each endpoint using the updated config and Handlebars template

Tag Groups

make spec will update x-tagGroups in the Open API spec it generates using open-api/data/open-api-tag-groups.json

Testing

To run tests

npm run test

or in watch mode

npm run test:watch

Node Version

The Node version for this project is automatically managed by AVN and NVM, read more here.