aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-29 11:11:39 -0700
committerAdam Soltys <[email protected]>2026-06-29 11:11:39 -0700
commit5bd04cb7a6b0e581325d9acc6757a98760645710 (patch)
tree079af5e39c8d50d1cad5b76965070fa70a97374e /src/api.js
parent81df06c53eef1ef2931ed48955aded1e6ce0fa4f (diff)
downloadcoinosv3-5bd04cb7a6b0e581325d9acc6757a98760645710.tar.gz
coinosv3-5bd04cb7a6b0e581325d9acc6757a98760645710.zip
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) <[email protected]>
Diffstat (limited to 'src/api.js')
-rw-r--r--src/api.js4
1 files changed, 3 insertions, 1 deletions
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 {} }