Testnet (test network) is an open-source test application for Rafiki. In other words, a Rafiki Playground. It wants to use all of the functionalities of Rafiki and put its advantages to the real test.
Testnet is made up of several components, including an Interledger test wallet application, e-commerce application and in the near future, a bank application.
See Testnet in action:
Rafiki is an open-source package that exposes a comprehensive set of Interledger APIs. It's intended to be run by wallet providers, allowing them to offer Interledger functionality to their users.
Never heard of Interledger before, or you would like to learn more? Here are some good places to start:
Please read the contribution guidelines before submitting contributions. All contributions must adhere to our code of conduct.
# Install Node 18
nvm install lts/hydrogen
nvm use lts/hydrogen
# Install pnpm using Corepack
corepack enableIf you do not have corepack installed locally you can use npm or yarn to install pnpm:
npm install pnpm -g
# or
yarn install pnpm -gFor alternative methods of installing pnpm, you can refer to the official pnpm documentation.
To install dependencies, execute:
pnpm iIn order for the Rafiki Testnet playground to function, it is necessary to configure the environment variables appropriately. You must duplicate the example environment file, .env.example, into your local environment file, .env.
Note The local environment file (
.env) is NOT tracked in the version control system, and should NOT be included in any commits.
Navigate to the project's root directory and enter the following command:
cp ./docker/dev/.env.example ./docker/dev/.envUsing your preferred text editor, open the ./docker/dev/.env file and configure the necessary environment variables.
The RAPYD_ACCESS_KEY and RAPYD_SECRET_KEY variables values can be found in your Rapyd Sandbox account (you need to create an account at rapyd.net), under the Developers menu item. The RAPYD_SETTLEMENT_EWALLET variable value can be found in your Rapyd Sandbox account details.
To create a new Interledger Test Wallet account, a verification email will be sent to the provided email address. If you want to send emails within the development environment, you will need to have a personal Sendgrid account and update the following environment variables: SEND_EMAIL to true, SENDGRID_API_KEY and FROM_EMAIL. If you prefer not to send emails in the development environment, simply set SEND_EMAIL to false and use the verification link found in the Docker wallet-backend container logs to finalize the registration process for a new user.
Cross-currency transactions are supported. To enable this functionality, you will need to register at freecurrencyapi.com/ and update the RATE_API_KEY environment variable with your own API key.
Currencies can be added in the admin environment. For example assetCode is USD, assetScale is 2, and you will need to add an amount to liquidity.
To play with the e-commerce application, you will need to create a USD payment pointer with the name boutique, then generate public and private key for the payment pointer in the Developer Keys found in the Settings menu of Interledger Test Wallet. You also need to update the following environment variables: PRIVATE_KEY to the generated base64 encoded private key, KEY_ID to the boutique payment pointer key id and PAYMENT_POINTER to http://rafiki-backend/boutique.
Navigate to the project's root directory and execute:
pnpm devUpon executing the above command, the following will be available
-
Interledger Test Wallet application
- Frontend at http://localhost:4003
- Backend at http://localhost:3003
- Admin at http://localhost:3012
-
Interledger Boutique application