So far we've used testnet4. But Bitcoin has multiple networks, and your pod can accept deposits from any of them:
jss start --pay --pay-cost 1 --pay-token PODS --pay-rate 10 \ --pay-chains "tbtc3,tbtc4"
The --pay-chains flag tells JSS which chains to accept. Each chain has its own mempool API for verification:
| Chain ID | Network | Sats |
|---|---|---|
btc | Bitcoin mainnet | Real money |
tbtc4 | Testnet4 | Free (faucets) |
tbtc3 | Testnet3 | Free (faucets) |
signet | Signet | Free (faucets) |
The TXO URI prefix tells the server which chain to verify against:
# Deposit testnet4 sats curl -X POST http://localhost:4443/pay/.deposit \ -H "Authorization: Nostr $NIP98_TOKEN" \ -d "txo:tbtc4:abc123...789:0" # Deposit testnet3 sats curl -X POST http://localhost:4443/pay/.deposit \ -H "Authorization: Nostr $NIP98_TOKEN" \ -d "txo:tbtc3:def456...012:1"
curl -H "Authorization: Nostr $NIP98_TOKEN" \ http://localhost:4443/pay/.balance
{
"did": "did:nostr:5e7617...45af",
"balance": 0,
"cost": 1,
"unit": "sat",
"balances": {
"tbtc3": 285444,
"tbtc4": 572393
}
}
Two currencies, one account, one key. Each tracked separately in the webledger.
With multiple currencies, you can trade. The secondary market uses sell orders:
# Alice creates a sell order: 1000 tbtc3 for 500 tbtc4
curl -X POST http://localhost:4443/pay/.sell \
-H "Authorization: Nostr $ALICE_NIP98" \
-H "Content-Type: application/json" \
-d '{"sell": "tbtc3", "amount": 1000, "price": 500, "want": "tbtc4"}'
# Bob fills the order
curl -X POST http://localhost:4443/pay/.swap \
-H "Authorization: Nostr $BOB_NIP98" \
-H "Content-Type: application/json" \
-d '{"orderId": "..."}'
The pod acts as escrow. It holds Alice's tbtc3 until Bob pays the tbtc4. When the swap completes, both balances update atomically. No trust between Alice and Bob — the pod enforces the trade.
| Endpoint | What It Does |
|---|---|
GET /pay/.offers | List open sell orders |
POST /pay/.sell | Create a sell order |
POST /pay/.swap | Fill a sell order |
Every pod with --pay-chains is a multi-currency exchange. Users deposit from different chains, create sell orders, and trade peer-to-peer. The pod handles escrow and settlement. No centralised exchange. No KYC. Just two people, two currencies, and a JSON file.
Part 9: Your Pod Is an Exchange. Manual trading is slow. An automated market maker prices swaps instantly using a constant-product formula. Add liquidity, swap currencies, earn fees — all on your pod.