From 5bd04cb7a6b0e581325d9acc6757a98760645710 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 29 Jun 2026 11:11:39 -0700 Subject: Swaps: add coinos staging (mutinynet) Boltz provider Point mutinynet wallets at the new self-hosted staging Boltz backend (swap-staging.coinos.io) by default, instead of mainnet api.boltz.exchange. Backend: dedicated boltz CLN + shared mut bitcoind on cs, behind a CORS shim + cloudflared. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/api.js') diff --git a/src/api.js b/src/api.js index 186a0ca..64ff331 100644 --- a/src/api.js +++ b/src/api.js @@ -145,6 +145,7 @@ function nk(base, net) { return net === 'mainnet' ? base : `${base}:${net}`; } // way: a provider can fail a swap but never steal (we claim/refund on-chain). export const BOLTZ_PRESETS = [ { id: 'local', label: 'Local (regtest)', api: '/boltz', ws: 'ws://localhost:9004/v2/ws' }, + { id: 'staging', label: 'coinos staging (mutinynet)', api: 'https://swap-staging.coinos.io', ws: 'wss://swap-staging.coinos.io/v2/ws' }, { id: 'boltz', label: 'Boltz Exchange', api: 'https://api.boltz.exchange' }, { id: 'middleway', label: 'Middle Way', api: 'https://api.middle-way.space' }, { id: 'zeus', label: 'ZEUS Swaps', api: 'https://swaps.zeuslsp.com/api' }, @@ -163,7 +164,8 @@ export function setBoltzCustom({ api, ws }) { } export function getBoltzProviderId() { try { const id = localStorage.getItem(BOLTZ_PROVIDER_KEY); if (id && BOLTZ_PRESETS.some((p) => p.id === id)) return id; } catch {} - return getNetwork() === 'regtest' ? 'local' : 'boltz'; // default per network + const net = getNetwork(); // default per network + return net === 'regtest' ? 'local' : net === 'mutinynet' ? 'staging' : 'boltz'; } export function setBoltzProviderId(id) { try { localStorage.setItem(BOLTZ_PROVIDER_KEY, id); } catch {} } -- cgit v1.2.3