Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

TBD54566975/tbdex-rest-api

Repository files navigation

tbDEX RESTful API

Warning

This repo is currently under construction 🚧

Installation

npm install @tbd54566975/tbdex-rest-api

Usage

import { RestApi } from '@tbd54566975/tbdex-rest-api'

const api = new RestApi()

api.get('offerings', async (ctx, filter) => { /* write biz logic here */ })
api.get('exchanges', async (ctx, filter) => { /* write biz logic here */ })

api.submit('rfq', async (ctx, message) => { /* write biz logic here */ })
api.submit('order', async (ctx, message) => { /* write biz logic here */ })
api.submit('close', async (ctx, message) => { /* write biz logic here */ })


await api.listen()