This is an example project that mocks 5 PFI servers using the tbdex protocol.
Currently mocks five PFI servers and can be extended.
This example includes:
- A server which does a sanctions check on the customer and issues a verifiable credential only if they are not on a sanctions list.
- Five mock PFIs (participating financial institutions) that implement tbDEX.
See main.ts for the liquidity node code (server).
NOTE: this is not using market rates, or anything sensible, and is not intended to showcase all regulatory requirements that must be fulfilled. This is for illustrative purposes only, not production use. For a more general exemplar for a PFI liquidity node, please take a look at: https://github.com/TBD54566975/tbdex-pfi-exemplar/ (which also includes a database, this one does not).
This project is using node v20.3.1
and npm >=v7.0.0
. You can verify your node
and npm
installation via the terminal:
$ node --version
v20.3.1
$ npm --version
9.6.7
If you don't have node
installed, feel free to choose whichever installation approach you feel the most comfortable with. If you don't have a preferred installation method, we recommend using nvm
(aka node version manager). nvm
allows you to install and use different versions of node. It can be installed by running brew install nvm
(assuming that you have homebrew)
Once you have installed nvm
, install the desired node version with nvm install vX.Y.Z
.
(you only need to do this step once).
💡 Make sure you have all the prerequisites
Install dependencies
npm install
Run the servers (or restart them) in another terminal window:
npm run server
The business logic for the PFI is mainly in main.ts and the offerings as specified in offerings.ts. Each server port is also set up in config.ts. Poke around!
Each interaction happens in the context of an "Exchange" which is a record of the interaction between the customer and the PFI.
Configuration can be set using environment variables. Defaults are set in src/config.ts
Resource | Description |
---|---|
CODEOWNERS | Outlines the project lead(s) |
CODE_OF_CONDUCT.md | Expected behavior for project contributors, promoting a welcoming environment |
CONTRIBUTING.md | Developer guide to build, test, run, access CI, chat, discuss, file issues |
GOVERNANCE.md | Project governance |
LICENSE | Apache License, Version 2.0 |
- AquaFinance Capital: https://aqf-mock-pfis.tbddev.org/
- SwiftLiquidity Solutions: https://sls-mock-pfis.tbddev.org
- Flowback Financial: https://ff-mock-pfis.tbddev.org
- Vertex Liquid Assets: https://vla-mock-pfis.tbddev.org
- Titanium Trust: https://tt-mock-pfis.tbddev.org
- Ultimate Identity : https://mock-idv.tbddev.org
-
GHS to USDC
-
NGN to KES
-
KES to USD
-
USD to KES
-
KES to USDC
-
KES to USD
-
NGN to GHS
-
BTC to NGN
-
USD to EUR
-
EUR to USD
-
USD to GBP
-
USD to BTC
-
EUR to USD
-
EUR to USDC
-
USD to EUR
-
EUR to GBP
-
USD to AUD
-
USD to GBP
-
USD to KES
-
USD to MXN