open-index/open-npm huggingface dataset:
npm package: @leordev-tbdex/http-client
Description: Http client that can be used to send tbdex messages
Latest version: 0.27.3

# tbdex http client

An HTTP client that can be used to send tbdex messages to PFIs

# Installation
```bash
npm install @tbdex/http-client
```

# Usage
```typescript
import { TbdexHttpClient } from '@tbdex/http-client'

const offerings = await TbdexHttpClient.getOfferings({ pfiDid: SOME_PFI_DID })
```
npm package: @leordev-tbdex/http-server
Description: A configurable implementation of the [tbdex http api draft specification](https://github.com/TBD54566975/tbdex-protocol/blob/main/rest-api/README.md)
Latest version: 0.27.3

# tbdex http server

A configurable implementation of the [tbdex http api draft specification](https://github.com/TBD54566975/tbdex-protocol/blob/main/rest-api/README.md)

>
> This repo is currently under construction 🚧

# Installation
```bash
npm install @tbdex/http-server
```
# Usage
```typescript
import { TbdexHttpServer } from '@tbdex/http-server'

const api = new TbdexHttpServer()

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(9000, () => {
  console.log('Server listening on port 9000')
})
```