Simple KES ↔ BTC swap interface that integrates with the Minmo API API.
This app connects to the unified Minmo API API for all swap operations:
http://localhost:5000/api/v1//swap/quote, /swap/onramp, /swap/offrampFor a Lightning address, the buyer sends exactly the fiat amount they entered. The app submits that address to the API without first fetching an invoice. The agent retains its margin in sats before funding escrow; escrow and payout network fees are deducted from those sats. The API then requests the beneficiary's invoice for the net payout. On-chain destinations also use the requested fiat budget.
For a fixed Lightning invoice, including one generated by WebLN, the invoice amount must be paid in full. The API includes escrow and payout network fees in the funding principal and calculates the corresponding fiat payment, which can exceed the invoice's fiat equivalent.
Future destination integrations, such as BOLT12 offers, should choose their fee behavior based on whether the payout amount is flexible or fixed. Preserve flexible destinations for server-side resolution after fees are deducted. BOLT12 destinations are not currently supported by this app.
npm run dev:api (from project root)npm run dev:swap# Get a token through the hosted auth flow or Nostr auth endpoints.
# Use in API calls
curl -H 'Authorization: Bearer <token>' \
http://localhost:5000/api/v1/swap/quote
# Create an API key via Console API
curl -X POST http://localhost:5000/api/v1/organizations/{orgId}/api-keys \
-H 'Authorization: Bearer <jwt_token>' \
-d '{"name": "Swap App", "serviceIds": ["swap"]}'
# Use API key for swaps
curl -H 'X-API-Key: mk_...' \
http://localhost:5000/api/v1/swap/quote
For detailed API documentation, visit: http://localhost:5000/api/docs
Content type
Image
Digest
sha256:8e5ed571d…
Size
64.9 MB
Last updated
about 10 hours ago
docker pull minmoto/swap:production-0.5.15