This is a demo application showcasing the capabilities of the Fireblocks platform with regard to Non Custodial Wallets.
src
- the main module of the projectmodel
- DB model entitiesmigrations
- DB migrationssubscribers
- DB subscriberscontrollers
- Express request handlersmiddleware
- Express middlewareroutes
- Express route mappinginterfaces
- Type interfacesservices
- Business logictest
- test relatedutil
- utlities
The following environment variables are required,
- General
PORT
- API listen portORIGIN_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 RoleFIREBLOCKS_API_KEY_NCW_ADMIN
- uuid key for API User: NCW Admin RoleFIREBLOCKS_API_BASE_URL
- Depending on your workspace environment:https://sandbox-api.fireblocks.io/
orhttps://api.fireblocks.io/
- PEMs - Please replace newlines with "\n" when providing PEMs.
- Authentication - JWT verification middleware (NPM express-oauth2-jwt-bearer)
ISSUER_BASE_URL
=https://YOUR_ISSUER_DOMAIN
AUDIENCE
=https://my-api.com
JWKS_URI
- optionalISSUER
- optional
- Database (mysql)
DB_HOST
- Database hostDB_PORT
- Database portDB_USERNAME
- Database usernameDB_PASSWORD
- Database passwordDB_NAME
- Database name
- CoinMarketCap
CMC_PRO_API_KEY
- CoinMarketCap API Key (optional for asset quotes)
$ yarn
$ yarn test
$ yarn build
$ yarn start
Create
yarn typeorm migration:create -n NameOfMigration
OR auto generate
yarn typeorm migration:generate src/migrations/NameOfMigration
Run
yarn migrate
auto-generated via yarn db:diagram
TBD