Skip to content

reef-chain/reefscan-api

Repository files navigation

REEF Subsquid API

Commands

Install dependencies:

yarn

Build project:

yarn build

Start:

yarn start

Start in development:

yarn dev

Run tests:

yarn test

API

Public endpoints

Find contract : /contract/:address

Get verification status : /verification/status

Submit verification request : /verification/submit

Get verified contract : /verification/contract/:address

Get verified contracts count : /verification/verified-contracts-count

Get REEF price: /price/reef

LetsExchange source currencies for REEF swaps: /letsexchange/listcurrencies

LetsExchange REEF quote: /letsexchange/quote

LetsExchange REEF quote by target amount: /letsexchange/quote-revert

Create LetsExchange REEF swap: /letsexchange/create-exchange

Get LetsExchange transaction: /letsexchange/transaction/:id

Get LetsExchange transaction status: /letsexchange/transaction/:id/status

Admin endpoints

Verify from backup (DB => Squid): /verification/verify-from-backup

Backup from Squid (Squid => DB): /verification/backup-from-squid

Export backup (DB => JSON files): /verification/export-backup

Import backup (JSON files => DB): /verification/import-backup

Set contract approved: /verification/set-contract-approved

DB Migrations

Whenever the DB schema changes, it is required to create a new migration file. To do so:

  • Create a new file in the migrations folder with the following name format: YYYYMMDDHHmmss_migration_name.ts. This can be done manually or by installing the Sequelize CLI (npm install -g sequelize-cli) running sequelize migration:generate --name addNewColumn.
  • Add the migration code to the newly created file. The existing migrations can be used as a reference.

The migrations will be run automatically when the app starts.

Changelog

March 20, 2026

  • Added a new LetsExchange integration under /letsexchange to support swapping external currencies into REEF.
  • Added public routes for source-currency discovery, quotes, reverse quotes, transaction creation, transaction lookup, and transaction status.
  • Added LetsExchange route documentation in api.md.
  • Added configuration support for LETSEXCHANGE_API_TOKEN, optional LETSEXCHANGE_API_URL, and optional LETSEXCHANGE_AFFILIATE_ID.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors