Skip to content

Offchain database and API service for Circles

License

Notifications You must be signed in to change notification settings

CirclesUBI/circles-api

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cff3077 · Oct 3, 2024
Aug 22, 2024
Apr 21, 2021
Oct 3, 2024
Jun 30, 2024
Aug 27, 2019
Mar 16, 2021
Aug 27, 2019
Oct 1, 2024
Mar 12, 2021
Mar 11, 2021
Aug 22, 2024
Aug 27, 2019
Aug 27, 2019
Jun 30, 2024
Aug 15, 2023
Mar 23, 2021
Jun 30, 2023
Aug 27, 2019
Jan 11, 2023
Jun 30, 2021
Jul 17, 2020
Oct 3, 2024
Oct 3, 2024
Jan 11, 2023

Repository files navigation

circles-api

Offchain API service for Circles


An offchain API service to safely store and resolve Circles user data from public adresses and find transitive transfer paths to send tokens within the trust graph.

Features

  • Create and search off-chain data like transfer descriptions and user profiles
  • Indexes and stores Circles trust network
  • Calculate transitive transfer steps to send Circles

Requirements

  • NodeJS environment (tested with v14)
  • PostgreSQL database
  • Redis

Usage

Check out the Dockerfile for running the circles-api on your server.

Development

# Install dependencies
npm install

# Copy .env file for local development
cp .env.example .env

# Seed and migrate database
npm run db:migrate
npm run db:seed

# Run tests
npm run test
npm run test:watch

# Check code formatting
npm run lint

# Start local server and watch changes
npm run watch:all

# Build for production
npm run build

# Run production server
npm start
npm worker:start

Pathfinder

pathfinder is a rust program by chriseth compiled for Linux arm64 in this repository. To update the pathfinder in the api, build a native binary according to the README instructions from chriseth and move the target into your project.

The version we are using corresponds with this commit: https://github.com/chriseth/pathfinder2/commit/641eb7a31e8a4f3418d9b59eb97e5307a265e195

License

GNU Affero General Public License v3.0 AGPL-3.0