Skip to main content

Getting started

The Token metadata API is a microservice with hard dependencies on other Stacks blockchain components. Before you start, you'll need to have access to the following:

  1. A fully synchronized Stacks node
  2. A fully synchronized instance of the Stacks Blockchain API running in default or write-only mode, with its Postgres database exposed for new connections. A read-only DB replica is also acceptable
  3. A local writeable Postgres database for token metadata storage

Run service

This section helps you to initiate the service by following the steps below.

  1. Clone the repository by using the following command:

    git clone https://github.com/hirosystems/token-metadata-api.git

  2. Create a .env file and specify the appropriate values to configure access to the Stacks API database, the Token metadata API local database, and the Stacks node RPC interface. See env.ts for all available configuration options.

  3. Build the app (NodeJS v18+ is required)

    npm install
    npm run build
  4. Start the service

    npm run start