@arkade-os/boltz-swap 0.3.43 → 0.3.44
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.
- package/dist/{arkade-swaps-LvsGHtre.d.ts → arkade-swaps-2q3VSgb4.d.ts} +27 -1
- package/dist/{arkade-swaps-C3sUFr5f.d.cts → arkade-swaps-DwgfLCMY.d.cts} +27 -1
- package/dist/{chunk-CWY37W4B.js → chunk-PHF6C2NE.js} +1 -1
- package/dist/{chunk-UXYHW7KV.js → chunk-QVXFEX5F.js} +184 -158
- package/dist/expo/background.cjs +184 -158
- package/dist/expo/background.js +2 -2
- package/dist/expo/index.cjs +184 -158
- package/dist/expo/index.d.cts +1 -1
- package/dist/expo/index.d.ts +1 -1
- package/dist/expo/index.js +2 -2
- package/dist/index.cjs +185 -159
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/expo/index.cjs
CHANGED
|
@@ -3033,6 +3033,40 @@ var claimVHTLCwithOffchainTx = async (identity, vhtlcScript, serverXOnlyPublicKe
|
|
|
3033
3033
|
await arkProvider.finalizeTx(arkTxid, finalCheckpoints);
|
|
3034
3034
|
return arkTxid;
|
|
3035
3035
|
};
|
|
3036
|
+
var refundWithoutReceiverVHTLCwithOffchainTx = async (identity, vhtlcScript, serverXOnlyPublicKey, input, output, arkInfo, arkProvider) => {
|
|
3037
|
+
const rawCheckpointTapscript = import_base8.hex.decode(arkInfo.checkpointTapscript);
|
|
3038
|
+
const serverUnrollScript = import_sdk7.CSVMultisigTapscript.decode(rawCheckpointTapscript);
|
|
3039
|
+
const { arkTx, checkpoints } = (0, import_sdk7.buildOffchainTx)([input], [output], serverUnrollScript);
|
|
3040
|
+
const signedArkTx = await identity.sign(arkTx);
|
|
3041
|
+
const { arkTxid, finalArkTx, signedCheckpointTxs } = await arkProvider.submitTx(
|
|
3042
|
+
import_base8.base64.encode(signedArkTx.toPSBT()),
|
|
3043
|
+
checkpoints.map((c) => import_base8.base64.encode(c.toPSBT()))
|
|
3044
|
+
);
|
|
3045
|
+
const finalTx = import_sdk7.Transaction.fromPSBT(import_base8.base64.decode(finalArkTx));
|
|
3046
|
+
const serverPubkeyHex = import_base8.hex.encode(serverXOnlyPublicKey);
|
|
3047
|
+
const refundLeafHash = (0, import_payment3.tapLeafHash)(
|
|
3048
|
+
scriptFromTapLeafScript(vhtlcScript.refundWithoutReceiver())
|
|
3049
|
+
);
|
|
3050
|
+
for (let i = 0; i < finalTx.inputsLength; i++) {
|
|
3051
|
+
if (!verifySignatures(finalTx, i, [serverPubkeyHex], refundLeafHash)) {
|
|
3052
|
+
throw new Error("Invalid final Ark transaction");
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
const finalCheckpoints = await Promise.all(
|
|
3056
|
+
signedCheckpointTxs.map(async (c, idx) => {
|
|
3057
|
+
const tx = import_sdk7.Transaction.fromPSBT(import_base8.base64.decode(c));
|
|
3058
|
+
const checkpointLeaf = checkpoints[idx].getInput(0).tapLeafScript[0];
|
|
3059
|
+
const cpLeafHash = (0, import_payment3.tapLeafHash)(scriptFromTapLeafScript(checkpointLeaf));
|
|
3060
|
+
if (!verifySignatures(tx, 0, [serverPubkeyHex], cpLeafHash)) {
|
|
3061
|
+
throw new Error("Invalid server signature in checkpoint transaction");
|
|
3062
|
+
}
|
|
3063
|
+
const signedCheckpoint = await identity.sign(tx, [0]);
|
|
3064
|
+
return import_base8.base64.encode(signedCheckpoint.toPSBT());
|
|
3065
|
+
})
|
|
3066
|
+
);
|
|
3067
|
+
await arkProvider.finalizeTx(arkTxid, finalCheckpoints);
|
|
3068
|
+
return arkTxid;
|
|
3069
|
+
};
|
|
3036
3070
|
var refundVHTLCwithOffchainTx = async (swapId, identity, arkProvider, boltzXOnlyPublicKey, ourXOnlyPublicKey, serverXOnlyPublicKey, input, output, arkInfo, refundFunc) => {
|
|
3037
3071
|
const rawCheckpointTapscript = import_base8.hex.decode(arkInfo.checkpointTapscript);
|
|
3038
3072
|
const serverUnrollScript = import_sdk7.CSVMultisigTapscript.decode(rawCheckpointTapscript);
|
|
@@ -3787,85 +3821,22 @@ var ArkadeSwaps = class _ArkadeSwaps {
|
|
|
3787
3821
|
}
|
|
3788
3822
|
const outputScript = import_sdk8.ArkAddress.decode(address).pkScript;
|
|
3789
3823
|
const refundWithoutReceiverLeaf = vhtlcScript.refundWithoutReceiver();
|
|
3790
|
-
const
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
await this.joinBatch(
|
|
3807
|
-
this.wallet.identity,
|
|
3808
|
-
input2,
|
|
3809
|
-
output,
|
|
3810
|
-
arkInfo,
|
|
3811
|
-
isRecoverableVtxo
|
|
3812
|
-
);
|
|
3813
|
-
sweptCount++;
|
|
3814
|
-
continue;
|
|
3815
|
-
}
|
|
3816
|
-
if (isRecoverableVtxo) {
|
|
3817
|
-
logger.error(
|
|
3818
|
-
`Swap ${pendingSwap.id}: recoverable VTXO ${vtxo.txid}:${vtxo.vout} cannot be refunded yet \u2014 refundWithoutReceiver locktime has not passed (refundLocktime=${vhtlcTimeouts.refund}, currentTimestamp=${Math.floor(Date.now() / 1e3)}). Refund will be retried after locktime.`
|
|
3819
|
-
);
|
|
3820
|
-
skippedCount++;
|
|
3821
|
-
continue;
|
|
3822
|
-
}
|
|
3823
|
-
const input = {
|
|
3824
|
-
...vtxo,
|
|
3825
|
-
tapLeafScript: vhtlcScript.refund(),
|
|
3826
|
-
tapTree: vhtlcScript.encode()
|
|
3827
|
-
};
|
|
3828
|
-
try {
|
|
3829
|
-
if (boltzCallCount > 0) {
|
|
3830
|
-
await new Promise((r) => setTimeout(r, 2e3));
|
|
3831
|
-
}
|
|
3832
|
-
boltzCallCount++;
|
|
3833
|
-
await refundVHTLCwithOffchainTx(
|
|
3834
|
-
pendingSwap.id,
|
|
3835
|
-
this.wallet.identity,
|
|
3836
|
-
this.arkProvider,
|
|
3837
|
-
boltzXOnlyPublicKey,
|
|
3838
|
-
ourXOnlyPublicKey,
|
|
3839
|
-
serverXOnlyPublicKey,
|
|
3840
|
-
input,
|
|
3841
|
-
output,
|
|
3842
|
-
arkInfo,
|
|
3843
|
-
this.swapProvider.refundSubmarineSwap.bind(this.swapProvider)
|
|
3844
|
-
);
|
|
3845
|
-
sweptCount++;
|
|
3846
|
-
} catch (error) {
|
|
3847
|
-
if (!(error instanceof BoltzRefundError)) {
|
|
3848
|
-
throw error;
|
|
3849
|
-
}
|
|
3850
|
-
if (!isSubmarineRefundLocktimeReached(vhtlcTimeouts.refund)) {
|
|
3851
|
-
logger.error(
|
|
3852
|
-
`Swap ${pendingSwap.id}: Boltz rejected VTXO outpoint and refundWithoutReceiver locktime has not passed yet (currentTimestamp=${Math.floor(Date.now() / 1e3)}, locktime=${vhtlcTimeouts.refund}). Refund will be retried after locktime.`
|
|
3853
|
-
);
|
|
3854
|
-
skippedCount++;
|
|
3855
|
-
continue;
|
|
3856
|
-
}
|
|
3857
|
-
logger.warn(
|
|
3858
|
-
`Swap ${pendingSwap.id}: Boltz rejected VTXO outpoint, falling back to refundWithoutReceiver via joinBatch`
|
|
3859
|
-
);
|
|
3860
|
-
const fallbackInput = {
|
|
3861
|
-
...vtxo,
|
|
3862
|
-
tapLeafScript: refundWithoutReceiverLeaf,
|
|
3863
|
-
tapTree: vhtlcScript.encode()
|
|
3864
|
-
};
|
|
3865
|
-
await this.joinBatch(this.wallet.identity, fallbackInput, output, arkInfo, false);
|
|
3866
|
-
sweptCount++;
|
|
3867
|
-
}
|
|
3868
|
-
}
|
|
3824
|
+
const refundContext = {
|
|
3825
|
+
arkInfo,
|
|
3826
|
+
vhtlcScript,
|
|
3827
|
+
serverXOnlyPublicKey,
|
|
3828
|
+
refundWithoutReceiverLeaf,
|
|
3829
|
+
outputScript
|
|
3830
|
+
};
|
|
3831
|
+
const { swept: sweptCount, skipped: skippedCount } = await this.refundVtxos({
|
|
3832
|
+
swapId: pendingSwap.id,
|
|
3833
|
+
vtxos: refundableVtxos,
|
|
3834
|
+
refundLocktime: vhtlcTimeouts.refund,
|
|
3835
|
+
refundContext,
|
|
3836
|
+
boltzXOnlyPublicKey,
|
|
3837
|
+
ourXOnlyPublicKey,
|
|
3838
|
+
refundViaBoltz: this.swapProvider.refundSubmarineSwap.bind(this.swapProvider)
|
|
3839
|
+
});
|
|
3869
3840
|
if (!isSubmarineSuccessStatus(pendingSwap.status)) {
|
|
3870
3841
|
const fullyRefunded = skippedCount === 0;
|
|
3871
3842
|
await updateSubmarineSwapStatus(
|
|
@@ -4423,7 +4394,10 @@ var ArkadeSwaps = class _ArkadeSwaps {
|
|
|
4423
4394
|
* swap's ARK lockup address.
|
|
4424
4395
|
*
|
|
4425
4396
|
* Path selection per VTXO:
|
|
4426
|
-
* - CLTV
|
|
4397
|
+
* - CLTV elapsed, live VTXO → `refundWithoutReceiver` offchain (sender +
|
|
4398
|
+
* server, no Boltz, no batch round).
|
|
4399
|
+
* - CLTV elapsed, swept VTXO → `refundWithoutReceiver` via `joinBatch`
|
|
4400
|
+
* (a swept VTXO is no longer a live leaf).
|
|
4427
4401
|
* - Pre-CLTV recoverable → skipped (Boltz can't co-sign swept-batch refund).
|
|
4428
4402
|
* - Pre-CLTV non-recoverable → cooperative 3-of-3 refund via Boltz.
|
|
4429
4403
|
*
|
|
@@ -4480,84 +4454,22 @@ var ArkadeSwaps = class _ArkadeSwaps {
|
|
|
4480
4454
|
const outputScript = import_sdk8.ArkAddress.decode(address).pkScript;
|
|
4481
4455
|
const refundWithoutReceiverLeaf = vhtlcScript.refundWithoutReceiver();
|
|
4482
4456
|
const refundLocktime = pendingSwap.response.lockupDetails.timeouts.refund;
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
this.wallet.identity,
|
|
4500
|
-
input2,
|
|
4501
|
-
output,
|
|
4502
|
-
arkInfo,
|
|
4503
|
-
isRecoverableVtxo
|
|
4504
|
-
);
|
|
4505
|
-
sweptCount++;
|
|
4506
|
-
continue;
|
|
4507
|
-
}
|
|
4508
|
-
if (isRecoverableVtxo) {
|
|
4509
|
-
logger.error(
|
|
4510
|
-
`Swap ${pendingSwap.id}: recoverable VTXO ${vtxo.txid}:${vtxo.vout} cannot be refunded yet \u2014 refundWithoutReceiver locktime has not passed (refundLocktime=${refundLocktime}, currentTimestamp=${Math.floor(Date.now() / 1e3)}). Refund will be retried after locktime.`
|
|
4511
|
-
);
|
|
4512
|
-
skippedCount++;
|
|
4513
|
-
continue;
|
|
4514
|
-
}
|
|
4515
|
-
const input = {
|
|
4516
|
-
...vtxo,
|
|
4517
|
-
tapLeafScript: vhtlcScript.refund(),
|
|
4518
|
-
tapTree: vhtlcScript.encode()
|
|
4519
|
-
};
|
|
4520
|
-
try {
|
|
4521
|
-
if (boltzCallCount > 0) {
|
|
4522
|
-
await new Promise((r) => setTimeout(r, 2e3));
|
|
4523
|
-
}
|
|
4524
|
-
boltzCallCount++;
|
|
4525
|
-
await refundVHTLCwithOffchainTx(
|
|
4526
|
-
pendingSwap.id,
|
|
4527
|
-
this.wallet.identity,
|
|
4528
|
-
this.arkProvider,
|
|
4529
|
-
boltzXOnlyPublicKey,
|
|
4530
|
-
ourXOnlyPublicKey,
|
|
4531
|
-
serverXOnlyPublicKey,
|
|
4532
|
-
input,
|
|
4533
|
-
output,
|
|
4534
|
-
arkInfo,
|
|
4535
|
-
this.swapProvider.refundChainSwap.bind(this.swapProvider)
|
|
4536
|
-
);
|
|
4537
|
-
sweptCount++;
|
|
4538
|
-
} catch (error) {
|
|
4539
|
-
if (!(error instanceof BoltzRefundError)) {
|
|
4540
|
-
throw error;
|
|
4541
|
-
}
|
|
4542
|
-
if (!isSubmarineRefundLocktimeReached(refundLocktime)) {
|
|
4543
|
-
logger.error(
|
|
4544
|
-
`Swap ${pendingSwap.id}: Boltz rejected VTXO outpoint and refundWithoutReceiver locktime has not passed yet (currentTimestamp=${Math.floor(Date.now() / 1e3)}, locktime=${refundLocktime}). Refund will be retried after locktime.`
|
|
4545
|
-
);
|
|
4546
|
-
skippedCount++;
|
|
4547
|
-
continue;
|
|
4548
|
-
}
|
|
4549
|
-
logger.warn(
|
|
4550
|
-
`Swap ${pendingSwap.id}: Boltz rejected VTXO outpoint, falling back to refundWithoutReceiver via joinBatch`
|
|
4551
|
-
);
|
|
4552
|
-
const fallbackInput = {
|
|
4553
|
-
...vtxo,
|
|
4554
|
-
tapLeafScript: refundWithoutReceiverLeaf,
|
|
4555
|
-
tapTree: vhtlcScript.encode()
|
|
4556
|
-
};
|
|
4557
|
-
await this.joinBatch(this.wallet.identity, fallbackInput, output, arkInfo, false);
|
|
4558
|
-
sweptCount++;
|
|
4559
|
-
}
|
|
4560
|
-
}
|
|
4457
|
+
const refundContext = {
|
|
4458
|
+
arkInfo,
|
|
4459
|
+
vhtlcScript,
|
|
4460
|
+
serverXOnlyPublicKey,
|
|
4461
|
+
refundWithoutReceiverLeaf,
|
|
4462
|
+
outputScript
|
|
4463
|
+
};
|
|
4464
|
+
const { swept: sweptCount, skipped: skippedCount } = await this.refundVtxos({
|
|
4465
|
+
swapId: pendingSwap.id,
|
|
4466
|
+
vtxos: unspentVtxos,
|
|
4467
|
+
refundLocktime,
|
|
4468
|
+
refundContext,
|
|
4469
|
+
boltzXOnlyPublicKey,
|
|
4470
|
+
ourXOnlyPublicKey,
|
|
4471
|
+
refundViaBoltz: this.swapProvider.refundChainSwap.bind(this.swapProvider)
|
|
4472
|
+
});
|
|
4561
4473
|
const finalStatus = await this.getSwapStatus(pendingSwap.id);
|
|
4562
4474
|
await this.savePendingChainSwap({
|
|
4563
4475
|
...pendingSwap,
|
|
@@ -5090,6 +5002,120 @@ var ArkadeSwaps = class _ArkadeSwaps {
|
|
|
5090
5002
|
async joinBatch(identity, input, output, arkInfo, isRecoverable2 = true) {
|
|
5091
5003
|
return joinBatch(this.arkProvider, identity, input, output, arkInfo, isRecoverable2);
|
|
5092
5004
|
}
|
|
5005
|
+
/**
|
|
5006
|
+
* Settle a `refundWithoutReceiver` (sender + server, no Boltz) refund for a
|
|
5007
|
+
* single VTXO whose CLTV refund locktime has elapsed.
|
|
5008
|
+
*
|
|
5009
|
+
* A live VTXO settles the leaf with an offchain Ark tx — no batch round. A
|
|
5010
|
+
* swept (recoverable) VTXO is no longer a live leaf, so it can only be
|
|
5011
|
+
* reclaimed by re-registering it into a batch.
|
|
5012
|
+
*/
|
|
5013
|
+
async settleRefundWithoutReceiver(ctx, vtxo) {
|
|
5014
|
+
const input = {
|
|
5015
|
+
...vtxo,
|
|
5016
|
+
tapLeafScript: ctx.refundWithoutReceiverLeaf,
|
|
5017
|
+
tapTree: ctx.vhtlcScript.encode()
|
|
5018
|
+
};
|
|
5019
|
+
const output = { amount: BigInt(vtxo.value), script: ctx.outputScript };
|
|
5020
|
+
if ((0, import_sdk8.isRecoverable)(vtxo)) {
|
|
5021
|
+
await this.joinBatch(this.wallet.identity, input, output, ctx.arkInfo, true);
|
|
5022
|
+
} else {
|
|
5023
|
+
await refundWithoutReceiverVHTLCwithOffchainTx(
|
|
5024
|
+
this.wallet.identity,
|
|
5025
|
+
ctx.vhtlcScript,
|
|
5026
|
+
ctx.serverXOnlyPublicKey,
|
|
5027
|
+
input,
|
|
5028
|
+
output,
|
|
5029
|
+
ctx.arkInfo,
|
|
5030
|
+
this.arkProvider
|
|
5031
|
+
);
|
|
5032
|
+
}
|
|
5033
|
+
}
|
|
5034
|
+
/**
|
|
5035
|
+
* Refund every VTXO at a swap's VHTLC address back to the wallet, shared by
|
|
5036
|
+
* {@link ArkadeSwaps.refundVHTLC} (submarine) and {@link ArkadeSwaps.refundArk}
|
|
5037
|
+
* (chain). Path selection per VTXO:
|
|
5038
|
+
* - CLTV elapsed → `refundWithoutReceiver` (offchain for a live VTXO, via a
|
|
5039
|
+
* batch round for a swept one — see {@link settleRefundWithoutReceiver}).
|
|
5040
|
+
* - Pre-CLTV recoverable → skipped (Boltz can't co-sign a swept-batch refund).
|
|
5041
|
+
* - Pre-CLTV non-recoverable → cooperative 3-of-3 refund via Boltz, falling
|
|
5042
|
+
* back to `refundWithoutReceiver` offchain if Boltz rejects after the
|
|
5043
|
+
* locktime has since elapsed.
|
|
5044
|
+
*
|
|
5045
|
+
* @returns Counts of VTXOs swept vs. deferred.
|
|
5046
|
+
*/
|
|
5047
|
+
async refundVtxos(params) {
|
|
5048
|
+
const {
|
|
5049
|
+
swapId,
|
|
5050
|
+
vtxos,
|
|
5051
|
+
refundLocktime,
|
|
5052
|
+
refundContext,
|
|
5053
|
+
boltzXOnlyPublicKey,
|
|
5054
|
+
ourXOnlyPublicKey,
|
|
5055
|
+
refundViaBoltz
|
|
5056
|
+
} = params;
|
|
5057
|
+
const { vhtlcScript, serverXOnlyPublicKey, arkInfo, outputScript } = refundContext;
|
|
5058
|
+
let boltzCallCount = 0;
|
|
5059
|
+
let sweptCount = 0;
|
|
5060
|
+
let skippedCount = 0;
|
|
5061
|
+
for (const vtxo of vtxos) {
|
|
5062
|
+
const isRecoverableVtxo = (0, import_sdk8.isRecoverable)(vtxo);
|
|
5063
|
+
const output = { amount: BigInt(vtxo.value), script: outputScript };
|
|
5064
|
+
if (isSubmarineRefundLocktimeReached(refundLocktime)) {
|
|
5065
|
+
await this.settleRefundWithoutReceiver(refundContext, vtxo);
|
|
5066
|
+
sweptCount++;
|
|
5067
|
+
continue;
|
|
5068
|
+
}
|
|
5069
|
+
if (isRecoverableVtxo) {
|
|
5070
|
+
logger.error(
|
|
5071
|
+
`Swap ${swapId}: recoverable VTXO ${vtxo.txid}:${vtxo.vout} cannot be refunded yet \u2014 refundWithoutReceiver locktime has not passed (refundLocktime=${refundLocktime}, currentTimestamp=${Math.floor(Date.now() / 1e3)}). Refund will be retried after locktime.`
|
|
5072
|
+
);
|
|
5073
|
+
skippedCount++;
|
|
5074
|
+
continue;
|
|
5075
|
+
}
|
|
5076
|
+
const input = {
|
|
5077
|
+
...vtxo,
|
|
5078
|
+
tapLeafScript: vhtlcScript.refund(),
|
|
5079
|
+
tapTree: vhtlcScript.encode()
|
|
5080
|
+
};
|
|
5081
|
+
try {
|
|
5082
|
+
if (boltzCallCount > 0) {
|
|
5083
|
+
await new Promise((r) => setTimeout(r, 2e3));
|
|
5084
|
+
}
|
|
5085
|
+
boltzCallCount++;
|
|
5086
|
+
await refundVHTLCwithOffchainTx(
|
|
5087
|
+
swapId,
|
|
5088
|
+
this.wallet.identity,
|
|
5089
|
+
this.arkProvider,
|
|
5090
|
+
boltzXOnlyPublicKey,
|
|
5091
|
+
ourXOnlyPublicKey,
|
|
5092
|
+
serverXOnlyPublicKey,
|
|
5093
|
+
input,
|
|
5094
|
+
output,
|
|
5095
|
+
arkInfo,
|
|
5096
|
+
refundViaBoltz
|
|
5097
|
+
);
|
|
5098
|
+
sweptCount++;
|
|
5099
|
+
} catch (error) {
|
|
5100
|
+
if (!(error instanceof BoltzRefundError)) {
|
|
5101
|
+
throw error;
|
|
5102
|
+
}
|
|
5103
|
+
if (!isSubmarineRefundLocktimeReached(refundLocktime)) {
|
|
5104
|
+
logger.error(
|
|
5105
|
+
`Swap ${swapId}: Boltz rejected VTXO outpoint and refundWithoutReceiver locktime has not passed yet (currentTimestamp=${Math.floor(Date.now() / 1e3)}, locktime=${refundLocktime}). Refund will be retried after locktime.`
|
|
5106
|
+
);
|
|
5107
|
+
skippedCount++;
|
|
5108
|
+
continue;
|
|
5109
|
+
}
|
|
5110
|
+
logger.warn(
|
|
5111
|
+
`Swap ${swapId}: Boltz rejected VTXO outpoint, falling back to refundWithoutReceiver offchain`
|
|
5112
|
+
);
|
|
5113
|
+
await this.settleRefundWithoutReceiver(refundContext, vtxo);
|
|
5114
|
+
sweptCount++;
|
|
5115
|
+
}
|
|
5116
|
+
}
|
|
5117
|
+
return { swept: sweptCount, skipped: skippedCount };
|
|
5118
|
+
}
|
|
5093
5119
|
/**
|
|
5094
5120
|
* Creates a VHTLC script for the swap.
|
|
5095
5121
|
* Works for submarine, reverse, and chain swaps.
|
package/dist/expo/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IArkadeSwaps, A as ArkadeSwaps, Q as QuoteSwapOptions, V as VhtlcTimeouts } from '../arkade-swaps-
|
|
1
|
+
import { I as IArkadeSwaps, A as ArkadeSwaps, Q as QuoteSwapOptions, V as VhtlcTimeouts } from '../arkade-swaps-DwgfLCMY.cjs';
|
|
2
2
|
import { n as SwapManagerClient, C as CreateLightningInvoiceRequest, e as CreateLightningInvoiceResponse, S as SendLightningPaymentRequest, o as SendLightningPaymentResponse, O as OptimisticSendLightningPaymentResponse, c as BoltzSubmarineSwap, b as BoltzReverseSwap, f as SubmarineRefundOutcome, g as SubmarineRecoveryInfo, h as SubmarineRecoveryResult, F as FeesResponse, a as BoltzChainSwap, j as ArkToBtcResponse, l as ChainArkRefundOutcome, k as BtcToArkResponse, d as Chain, i as ChainFeesResponse, L as LimitsResponse, G as GetSwapStatusResponse, B as BoltzSwap } from '../types-8NrCdOpS.cjs';
|
|
3
3
|
import { E as ExpoArkadeSwapsConfig } from '../swapsPollProcessor-CGMXUKPe.cjs';
|
|
4
4
|
export { D as DefineSwapBackgroundTaskOptions, b as ExpoArkadeLightningConfig, c as ExpoSwapBackgroundConfig, P as PersistedSwapBackgroundConfig, S as SWAP_POLL_TASK_TYPE, a as SwapTaskDependencies } from '../swapsPollProcessor-CGMXUKPe.cjs';
|
package/dist/expo/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IArkadeSwaps, A as ArkadeSwaps, Q as QuoteSwapOptions, V as VhtlcTimeouts } from '../arkade-swaps-
|
|
1
|
+
import { I as IArkadeSwaps, A as ArkadeSwaps, Q as QuoteSwapOptions, V as VhtlcTimeouts } from '../arkade-swaps-2q3VSgb4.js';
|
|
2
2
|
import { n as SwapManagerClient, C as CreateLightningInvoiceRequest, e as CreateLightningInvoiceResponse, S as SendLightningPaymentRequest, o as SendLightningPaymentResponse, O as OptimisticSendLightningPaymentResponse, c as BoltzSubmarineSwap, b as BoltzReverseSwap, f as SubmarineRefundOutcome, g as SubmarineRecoveryInfo, h as SubmarineRecoveryResult, F as FeesResponse, a as BoltzChainSwap, j as ArkToBtcResponse, l as ChainArkRefundOutcome, k as BtcToArkResponse, d as Chain, i as ChainFeesResponse, L as LimitsResponse, G as GetSwapStatusResponse, B as BoltzSwap } from '../types-8NrCdOpS.js';
|
|
3
3
|
import { E as ExpoArkadeSwapsConfig } from '../swapsPollProcessor-CuDM6sxV.js';
|
|
4
4
|
export { D as DefineSwapBackgroundTaskOptions, b as ExpoArkadeLightningConfig, c as ExpoSwapBackgroundConfig, P as PersistedSwapBackgroundConfig, S as SWAP_POLL_TASK_TYPE, a as SwapTaskDependencies } from '../swapsPollProcessor-CuDM6sxV.js';
|
package/dist/expo/index.js
CHANGED