Skip to content
GitHub

Auto-Peering with the Test Network

You can start one local instance of Rafiki and peer it automatically with the remote Test Network by running the following commands:

Terminal window
## using Tigerbeetle DB
pnpm localenv:compose:autopeer
## OR using Postgres DB`
pnpm localenv:compose:psql:autopeer

The mock account servicing entity, Cloud Nine Wallet, in your local Rafiki instance will automatically peer with the remote Test Network instance. The required services will be exposed externally using the localtunnel package.

The exposed ports are:

ServicePort
Open Payments3000
ILP connector3002
Auth server3006

To use the Open Payments example in the Bruno API collection, follow these steps:

  1. Navigate to localhost:3030 to find the list of created wallet addresses. Alternatively, you can run the following command:
Terminal window
docker logs rafiki-cloud-nine-mock-ase-1
  1. Copy the URL of one of the wallet addresses.

  2. Set the URL as the senderWalletAddress variable in the Bruno Autopeering environment.

To shut down the connection and clear the environment, run the following command:

Terminal window
pnpm localenv:compose down
## Running the command to shut down is necessary
## as any subsequent script run to spin up a local Rafiki instance
## will use different wallet addresses.