Add swapproxy to regtest environment

This commit is contained in:
Daniel Granhão
2025-06-05 17:25:34 +01:00
parent 4d882b2160
commit ae2baac84d
7 changed files with 211 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
use anyhow::{anyhow, bail, Result};
use bitcoin::{bip32, ScriptBuf};
use boltz_client::{
boltz::{ChainPair, BOLTZ_MAINNET_URL_V2, BOLTZ_REGTEST, BOLTZ_TESTNET_URL_V2},
boltz::{ChainPair, BOLTZ_MAINNET_URL_V2, BOLTZ_TESTNET_URL_V2},
network::{BitcoinChain, Chain, LiquidChain},
swaps::boltz::{
CreateChainResponse, CreateReverseResponse, CreateSubmarineResponse, Leaf, Side, SwapTree,
@@ -285,9 +285,11 @@ impl Config {
pub(crate) fn default_boltz_url(&self) -> &str {
match self.network {
// TODO: set swapproxy URLs for mainnet and testnet
LiquidNetwork::Mainnet => BOLTZ_MAINNET_URL_V2,
LiquidNetwork::Testnet => BOLTZ_TESTNET_URL_V2,
LiquidNetwork::Regtest => BOLTZ_REGTEST,
// On regtest use the swapproxy instance by default
LiquidNetwork::Regtest => "http://localhost:8387/v2",
}
}