From 74513a14122e71830bca7a7e1d2f80fd96ae0153 Mon Sep 17 00:00:00 2001 From: boufni95 Date: Wed, 4 Mar 2026 17:57:50 +0000 Subject: [PATCH 1/2] bimp fee --- src/services/serverMethods/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/services/serverMethods/index.ts b/src/services/serverMethods/index.ts index 483ef0d7..d74e67fd 100644 --- a/src/services/serverMethods/index.ts +++ b/src/services/serverMethods/index.ts @@ -91,6 +91,14 @@ export default (mainHandler: Main): Types.ServerMethods => { if (err != null) throw new Error(err.message) return mainHandler.adminManager.CloseChannel(req) }, + BumpTx: async ({ ctx, req }) => { + const err = Types.BumpTxValidate(req, { + txid_CustomCheck: txid => txid !== '', + sat_per_vbyte_CustomCheck: spv => spv > 0 + }) + if (err != null) throw new Error(err.message) + return mainHandler.adminManager.BumpTx(req) + }, GetAdminTransactionSwapQuotes: async ({ ctx, req }) => { const err = Types.TransactionSwapRequestValidate(req, { transaction_amount_sats_CustomCheck: amt => amt > 0 From 70544bd5514d9565037cc10f51e5d0d2543303cc Mon Sep 17 00:00:00 2001 From: boufni95 Date: Wed, 4 Mar 2026 18:26:21 +0000 Subject: [PATCH 2/2] rate fix --- src/services/lnd/swaps/submarineSwaps.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/services/lnd/swaps/submarineSwaps.ts b/src/services/lnd/swaps/submarineSwaps.ts index ffd8a5d5..6e4beba8 100644 --- a/src/services/lnd/swaps/submarineSwaps.ts +++ b/src/services/lnd/swaps/submarineSwaps.ts @@ -3,7 +3,7 @@ const zkpInit = (secp256k1ZkpModule as any).default || secp256k1ZkpModule; // import bolt11 from 'bolt11'; import { Musig, SwapTreeSerializer, TaprootUtils, constructRefundTransaction, - detectSwap, OutputType + detectSwap, OutputType, targetFee } from 'boltz-core'; import { randomBytes, createHash } from 'crypto'; import { ECPairFactory, ECPairInterface } from 'ecpair'; @@ -184,13 +184,16 @@ export class SubmarineSwaps { } ] const outputScript = address.toOutputScript(refundAddress, network) - // Construct the refund transaction - const refundTx = constructRefundTransaction( - details, - outputScript, - cooperative ? 0 : timeoutBlockHeight, + // Construct the refund transaction: targetFee converts sat/vbyte rate to flat fee + const refundTx = targetFee( feePerVbyte, - true + (fee) => constructRefundTransaction( + details, + outputScript, + cooperative ? 0 : timeoutBlockHeight, + fee, + true + ) ) if (!cooperative) {