Git Product home page Git Product logo

ncw-backend-demo's Introduction

Non-Custodial Wallet Demo backend

Description

This is a demo application showcasing the capabilities of the Fireblocks platform with regard to Non Custodial Wallets.

Structure

modules tree

  • src - the main module of the project
    • model - DB model entities
    • migrations - DB migrations
    • subscribers - DB subscribers
    • controllers - Express request handlers
    • middleware - Express middleware
    • routes - Express route mapping
    • interfaces - Type interfaces
    • services - Business logic
    • test - test related
    • util - utlities

Usage

Configurations

The following environment variables are required,

  • General
    • PORT - API listen port
    • ORIGIN_WEB_SDK - (optional) override CORS origin (comma separated for multiple values) - default: (http://localhost:5173,https://fireblocks.github.io)
  • Fireblocks
    • PEMs - Please replace newlines with "\n" when providing PEMs.
      • FIREBLOCKS_WEBHOOK_PUBLIC_KEY - Fireblocks webhook public key PEM (note: sandbox and production have different keys, docs)
      • FIREBLOCKS_API_SECRET - Private key PEM used for API Users (in production it's recommended to use different keys)
    • API
      • FIREBLOCKS_API_KEY_NCW_SIGNER - uuid key for API User: NCW Signer Role
      • FIREBLOCKS_API_KEY_NCW_ADMIN - uuid key for API User: NCW Admin Role
      • FIREBLOCKS_API_BASE_URL - Depending on your workspace environment: https://sandbox-api.fireblocks.io/ or https://api.fireblocks.io/
  • Authentication - JWT verification middleware (NPM express-oauth2-jwt-bearer)
    • ISSUER_BASE_URL=https://YOUR_ISSUER_DOMAIN
    • AUDIENCE=https://my-api.com
    • JWKS_URI - optional
    • ISSUER - optional
  • Database (mysql)
    • DB_HOST - Database host
    • DB_PORT - Database port
    • DB_USERNAME - Database username
    • DB_PASSWORD - Database password
    • DB_NAME - Database name
  • CoinMarketCap
    • CMC_PRO_API_KEY - CoinMarketCap API Key (optional for asset quotes)

Install

$ yarn

Test

$ yarn test

Build

$ yarn build

Start

$ yarn start

Migration

Create

yarn typeorm migration:create -n NameOfMigration

OR auto generate

yarn typeorm migration:generate src/migrations/NameOfMigration

Run

yarn migrate

Model

auto-generated via yarn db:diagram

Links

TBD

ncw-backend-demo's People

Contributors

alonfireblocks avatar amper-fb avatar goweiss avatar yuval-fireblocks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.