@arkade-os/boltz-swap 0.3.33 → 0.3.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { IWallet, ArkProvider, IndexerProvider, ArkInfo, Identity, ArkTxInput, VHTLC } from '@arkade-os/sdk';
2
- import { q as BoltzSwapProvider, w as SwapManager, m as SwapRepository, p as ArkadeSwapsCreateConfig, A as ArkadeSwapsConfig, n as SwapManagerClient, C as CreateLightningInvoiceRequest, e as CreateLightningInvoiceResponse, b as BoltzReverseSwap, S as SendLightningPaymentRequest, f as SendLightningPaymentResponse, c as BoltzSubmarineSwap, g as SubmarineRefundOutcome, h as SubmarineRecoveryInfo, i as SubmarineRecoveryResult, k as ArkToBtcResponse, a as BoltzChainSwap, l as BtcToArkResponse, d as Chain, F as FeesResponse, j as ChainFeesResponse, L as LimitsResponse, G as GetSwapStatusResponse, B as BoltzSwap } from './types-CrKkVzBB.cjs';
2
+ import { r as BoltzSwapProvider, x as SwapManager, n as SwapRepository, q as ArkadeSwapsCreateConfig, A as ArkadeSwapsConfig, o as SwapManagerClient, C as CreateLightningInvoiceRequest, e as CreateLightningInvoiceResponse, b as BoltzReverseSwap, S as SendLightningPaymentRequest, f as SendLightningPaymentResponse, c as BoltzSubmarineSwap, g as SubmarineRefundOutcome, h as SubmarineRecoveryInfo, i as SubmarineRecoveryResult, k as ArkToBtcResponse, a as BoltzChainSwap, m as ChainArkRefundOutcome, l as BtcToArkResponse, d as Chain, F as FeesResponse, j as ChainFeesResponse, L as LimitsResponse, G as GetSwapStatusResponse, B as BoltzSwap } from './types--axEWA8c.js';
3
3
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
4
4
 
5
5
  /**
@@ -267,10 +267,19 @@ declare class ArkadeSwaps {
267
267
  */
268
268
  claimBtc(pendingSwap: BoltzChainSwap): Promise<void>;
269
269
  /**
270
- * When an ARK to BTC swap fails, refund sats on ARK chain by claiming the VHTLC.
270
+ * When an ARK to BTC swap fails, refund every unspent VTXO at the chain
271
+ * swap's ARK lockup address.
272
+ *
273
+ * Path selection per VTXO:
274
+ * - CLTV has elapsed → `refundWithoutReceiver` via `joinBatch` (no Boltz).
275
+ * - Pre-CLTV recoverable → skipped (Boltz can't co-sign swept-batch refund).
276
+ * - Pre-CLTV non-recoverable → cooperative 3-of-3 refund via Boltz.
277
+ *
271
278
  * @param pendingSwap - The pending chain swap to refund.
279
+ * @returns Counts of VTXOs swept vs. deferred. A `swept: 0` outcome means
280
+ * the call was a no-op — callers should retry after CLTV.
272
281
  */
273
- refundArk(pendingSwap: BoltzChainSwap): Promise<void>;
282
+ refundArk(pendingSwap: BoltzChainSwap): Promise<ChainArkRefundOutcome>;
274
283
  /**
275
284
  * Creates a chain swap from BTC to ARK.
276
285
  * @param args.feeSatsPerByte - Fee rate for BTC transactions (default: 1).
@@ -515,7 +524,7 @@ interface IArkadeSwaps extends AsyncDisposable {
515
524
  txid: string;
516
525
  }>;
517
526
  claimBtc(pendingSwap: BoltzChainSwap): Promise<void>;
518
- refundArk(pendingSwap: BoltzChainSwap): Promise<void>;
527
+ refundArk(pendingSwap: BoltzChainSwap): Promise<ChainArkRefundOutcome>;
519
528
  btcToArk(args: {
520
529
  feeSatsPerByte?: number;
521
530
  senderLockAmount?: number;
@@ -1,5 +1,5 @@
1
1
  import { IWallet, ArkProvider, IndexerProvider, ArkInfo, Identity, ArkTxInput, VHTLC } from '@arkade-os/sdk';
2
- import { q as BoltzSwapProvider, w as SwapManager, m as SwapRepository, p as ArkadeSwapsCreateConfig, A as ArkadeSwapsConfig, n as SwapManagerClient, C as CreateLightningInvoiceRequest, e as CreateLightningInvoiceResponse, b as BoltzReverseSwap, S as SendLightningPaymentRequest, f as SendLightningPaymentResponse, c as BoltzSubmarineSwap, g as SubmarineRefundOutcome, h as SubmarineRecoveryInfo, i as SubmarineRecoveryResult, k as ArkToBtcResponse, a as BoltzChainSwap, l as BtcToArkResponse, d as Chain, F as FeesResponse, j as ChainFeesResponse, L as LimitsResponse, G as GetSwapStatusResponse, B as BoltzSwap } from './types-CrKkVzBB.js';
2
+ import { r as BoltzSwapProvider, x as SwapManager, n as SwapRepository, q as ArkadeSwapsCreateConfig, A as ArkadeSwapsConfig, o as SwapManagerClient, C as CreateLightningInvoiceRequest, e as CreateLightningInvoiceResponse, b as BoltzReverseSwap, S as SendLightningPaymentRequest, f as SendLightningPaymentResponse, c as BoltzSubmarineSwap, g as SubmarineRefundOutcome, h as SubmarineRecoveryInfo, i as SubmarineRecoveryResult, k as ArkToBtcResponse, a as BoltzChainSwap, m as ChainArkRefundOutcome, l as BtcToArkResponse, d as Chain, F as FeesResponse, j as ChainFeesResponse, L as LimitsResponse, G as GetSwapStatusResponse, B as BoltzSwap } from './types--axEWA8c.cjs';
3
3
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
4
4
 
5
5
  /**
@@ -267,10 +267,19 @@ declare class ArkadeSwaps {
267
267
  */
268
268
  claimBtc(pendingSwap: BoltzChainSwap): Promise<void>;
269
269
  /**
270
- * When an ARK to BTC swap fails, refund sats on ARK chain by claiming the VHTLC.
270
+ * When an ARK to BTC swap fails, refund every unspent VTXO at the chain
271
+ * swap's ARK lockup address.
272
+ *
273
+ * Path selection per VTXO:
274
+ * - CLTV has elapsed → `refundWithoutReceiver` via `joinBatch` (no Boltz).
275
+ * - Pre-CLTV recoverable → skipped (Boltz can't co-sign swept-batch refund).
276
+ * - Pre-CLTV non-recoverable → cooperative 3-of-3 refund via Boltz.
277
+ *
271
278
  * @param pendingSwap - The pending chain swap to refund.
279
+ * @returns Counts of VTXOs swept vs. deferred. A `swept: 0` outcome means
280
+ * the call was a no-op — callers should retry after CLTV.
272
281
  */
273
- refundArk(pendingSwap: BoltzChainSwap): Promise<void>;
282
+ refundArk(pendingSwap: BoltzChainSwap): Promise<ChainArkRefundOutcome>;
274
283
  /**
275
284
  * Creates a chain swap from BTC to ARK.
276
285
  * @param args.feeSatsPerByte - Fee rate for BTC transactions (default: 1).
@@ -515,7 +524,7 @@ interface IArkadeSwaps extends AsyncDisposable {
515
524
  txid: string;
516
525
  }>;
517
526
  claimBtc(pendingSwap: BoltzChainSwap): Promise<void>;
518
- refundArk(pendingSwap: BoltzChainSwap): Promise<void>;
527
+ refundArk(pendingSwap: BoltzChainSwap): Promise<ChainArkRefundOutcome>;
519
528
  btcToArk(args: {
520
529
  feeSatsPerByte?: number;
521
530
  senderLockAmount?: number;