Skip to content
Testnet only: a reference implementation, not a production service. Tokens and bank transfers here are simulated and have no value.
Architecture

How the reference fits together

The reference is a small set of components on Stellar Testnet. A wire arrives at the mock bank, becomes tokens through the API and the signer, and settles on Stellar; the keys stay in one place.

Components

Six components, one boundary

  1. API

    Accepts requests, records every change and owns the double-entry ledger.

  2. Console

    Where a business mints, pays, redeems and manages counterparties.

  3. Back office

    Where an operator attributes deposits, freezes holders and reconciles.

  4. Ledger watcher

    Watches the chain, reconciles what it sees and dispatches webhooks.

  5. Signer

    The only holder of keys. It holds the Testnet keys and signs every transaction.

  6. Stellar

    RPC and Horizon: how the reference reaches Stellar Testnet.

Run it

Bootstrap the issuer, then call the API

The quickstart runs the whole issuer on Testnet in about half an hour, then sends its first requests.

# in the repo root, with Docker
cp .env.example .env
docker compose up -d postgres
docker compose build core
# supply and reserves, no account needed
GET  /v1/public/supply/USDX
GET  /v1/public/reserves/USDX
Extension points

Swap one part without touching the rest

  1. ReserveSource

    Reads reserves from a source, such as a bank statement feed or a custodian API.

  2. SettlementRail

    Moves fiat, such as a real bank for wires and payouts.

  3. Signer

    Signs transactions, such as a hardware module or a remote key service.

  4. KycProvider

    Checks an organisation or person, such as a KYB or KYC provider.