A web portal for shakedex swap proofs.
Currently in use at https://www.shakedex.com.
- Node.js v12+
- Postgres v12+
- An HSD full node with
--index-tx
enabled.
- Clone the repo.
- Run
npm install
. - Run
npm i -g db-migrate
to install the database migration tool. - Run
DATABASE_URL=<your database url> db-migrate up
to run database migrations. - Create a
.env
file with the environment variables described below. - Run
source .env && npm run start
.
Name | Use | Default |
---|---|---|
PORT | The port Express listens on. | 8080 |
HSD_HOST | The HSD host to get chain state from. | |
HSD_NETWORK | The HSD network to get chain state from. | regtest |
HSD_API_KEY | An API key to authenticate with HSD. | |
HSD_WALLET_ID | A wallet ID for use with HSD. This is required by the shakedex API, but the server doesn't need any wallet functionality. | primary |
DATABASE_URL | A Postgres database URL. |
Elastic Beanstalk configuration files are included if you are using AWS to deploy the app. The configuration files fix an issue with bcrypto
and node-gyp
, automatically run migrations upon deploy, and define a web
process in the Procfile
to start the app.
The UI is hosted at URLs that do not start with /api
. API urls are the following:
Query Params: page, per_page
Gets a list of auctions.
Gets a specific auction.
Download's an auctions swap proofs for fulfillment with the shakedex
CLI.
Body Params: An auction object. See this file in shakedex for what this looks like.
Please don't report security bugs on GitHub. Instead, send an e-mail to [email protected].