Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Latest commit

 

History

History
98 lines (72 loc) · 1.91 KB

README.md

File metadata and controls

98 lines (72 loc) · 1.91 KB

LI.FI <> Gateway

Important

Please reference Handover Documentation before spawning this project:

Table of Contents

Getting Started

  1. Install project dependencies

    <!-- npm -->
    npm i
    
    <!-- yarn -->
    yarn
    
    <!-- pnpm -->
    pnpm i
    
  2. (optional) Start local Redis container

    <!-- npm -->
    npm run redis
    
    <!-- yarn -->
    yarn redis
    
    <!-- pnpm -->
    pnpm redis
    
  3. Start Server

    Development:

    <!-- npm -->
    npm run dev
    
    <!-- yarn -->
    yarn dev
    
    <!-- pnpm -->
    pnpm dev
    

    Production:

    <!-- npm -->
    npm start
    
    <!-- yarn -->
    yarn start
    
    <!-- pnpm -->
    pnmp start
    
  4. (optional) Tear down Redis container

    <!-- npm -->
    npm run redis:stop
    
    <!-- yarn -->
    yarn redis:stop
    
    <!-- pnpm -->
    pnpm redis:stop
    

Available Endpoints

POST /stats/wallet

Generates JSON list of GatewayMetrics

Headers:

  • month: reference Month enum
  • (optional) input: absolute path for input JSON file (default: ./data/input.json)
  • (optional) output: absolute path for output (default: ./data/output.json)

POST /issue/credential

Enqueues Credential metadata to be issued by the issue-credential BullMQ Queue.

Headers:

  • credential: Filepath to JSON list of GatewayMetrics for wallets (e.g. ./data/output.json)

POST /issue/loyalty-pass

Enqueues list of wallets to be created or updated by the create_or_update_loyalty_pass BullMQ Queue.

Headers:

  • loyalty-pass: Filepath to JSON list of wallets