@arkade-os/boltz-swap 0.3.0-next.7 → 0.3.0

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/index.cjs CHANGED
@@ -4398,7 +4398,7 @@ var ArkadeSwaps = class {
4398
4398
 
4399
4399
  // src/serviceWorker/arkade-swaps-message-handler.ts
4400
4400
  var import_sdk9 = require("@arkade-os/sdk");
4401
- var DEFAULT_MESSAGE_TAG = "ARKADE_LIGHTNING_UPDATER";
4401
+ var DEFAULT_MESSAGE_TAG = "ARKADE_SWAPS_UPDATER";
4402
4402
  var ArkadeSwapsMessageHandler = class _ArkadeSwapsMessageHandler {
4403
4403
  constructor(swapRepository) {
4404
4404
  this.swapRepository = swapRepository;
@@ -4459,12 +4459,12 @@ var ArkadeSwapsMessageHandler = class _ArkadeSwapsMessageHandler {
4459
4459
  }
4460
4460
  async handleMessage(message) {
4461
4461
  const id = message.id;
4462
- if (message.type === "INIT_ARKADE_LIGHTNING") {
4462
+ if (message.type === "INIT_ARKADE_SWAPS") {
4463
4463
  try {
4464
4464
  await this.handleInit(message);
4465
4465
  return this.tagged({
4466
4466
  id,
4467
- type: "ARKADE_LIGHTNING_INITIALIZED"
4467
+ type: "ARKADE_SWAPS_INITIALIZED"
4468
4468
  });
4469
4469
  } catch (error) {
4470
4470
  return this.tagged({ id, error });
@@ -4893,7 +4893,7 @@ var ServiceWorkerArkadeSwaps = class _ServiceWorkerArkadeSwaps {
4893
4893
  const initMessage = {
4894
4894
  tag: messageTag,
4895
4895
  id: getRandomId(),
4896
- type: "INIT_ARKADE_LIGHTNING",
4896
+ type: "INIT_ARKADE_SWAPS",
4897
4897
  payload: {
4898
4898
  network: config.network,
4899
4899
  arkServerUrl: config.arkServerUrl,
package/dist/index.d.cts CHANGED
@@ -91,8 +91,8 @@ declare function enrichReverseSwapPreimage(swap: PendingReverseSwap, preimage: s
91
91
  */
92
92
  declare function enrichSubmarineSwapInvoice(swap: PendingSubmarineSwap, invoice: string): PendingSubmarineSwap;
93
93
 
94
- type RequestInitArkLn = RequestEnvelope & {
95
- type: "INIT_ARKADE_LIGHTNING";
94
+ type RequestInitArkSwaps = RequestEnvelope & {
95
+ type: "INIT_ARKADE_SWAPS";
96
96
  payload: Omit<ArkadeSwapsConfig, "wallet" | "swapRepository" | "swapProvider" | "indexerProvider"> & {
97
97
  network: Network;
98
98
  arkServerUrl: string;
@@ -101,8 +101,8 @@ type RequestInitArkLn = RequestEnvelope & {
101
101
  };
102
102
  };
103
103
  };
104
- type ResponseInitArkLn = ResponseEnvelope & {
105
- type: "ARKADE_LIGHTNING_INITIALIZED";
104
+ type ResponseInitArkSwaps = ResponseEnvelope & {
105
+ type: "ARKADE_SWAPS_INITIALIZED";
106
106
  };
107
107
  type RequestCreateLightningInvoice = RequestEnvelope & {
108
108
  type: "CREATE_LIGHTNING_INVOICE";
@@ -479,8 +479,8 @@ type ResponseSwapManagerWaitForCompletion = ResponseEnvelope & {
479
479
  txid: string;
480
480
  };
481
481
  };
482
- type ArkadeSwapsUpdaterRequest = RequestInitArkLn | RequestCreateLightningInvoice | RequestSendLightningPayment | RequestCreateSubmarineSwap | RequestCreateReverseSwap | RequestClaimVhtlc | RequestRefundVhtlc | RequestWaitAndClaim | RequestWaitForSwapSettlement | RequestRestoreSwaps | RequestEnrichReverseSwapPreimage | RequestEnrichSubmarineSwapInvoice | RequestGetFees | RequestGetLimits | RequestGetSwapStatus | RequestGetPendingSubmarineSwaps | RequestGetPendingReverseSwaps | RequestGetPendingChainSwaps | RequestGetSwapHistory | RequestRefreshSwapsStatus | RequestArkToBtc | RequestBtcToArk | RequestCreateChainSwap | RequestWaitAndClaimChain | RequestWaitAndClaimArk | RequestWaitAndClaimBtc | RequestClaimArk | RequestClaimBtc | RequestRefundArk | RequestSignServerClaim | RequestVerifyChainSwap | RequestQuoteSwap | RequestSwapManagerStart | RequestSwapManagerStop | RequestSwapManagerAddSwap | RequestSwapManagerRemoveSwap | RequestSwapManagerGetPending | RequestSwapManagerHasSwap | RequestSwapManagerIsProcessing | RequestSwapManagerGetStats | RequestSwapManagerWaitForCompletion;
483
- type ArkadeSwapsUpdaterResponse = ResponseInitArkLn | ResponseCreateLightningInvoice | ResponseSendLightningPayment | ResponseCreateSubmarineSwap | ResponseCreateReverseSwap | ResponseClaimVhtlc | ResponseRefundVhtlc | ResponseWaitAndClaim | ResponseWaitForSwapSettlement | ResponseRestoreSwaps | ResponseEnrichReverseSwapPreimage | ResponseEnrichSubmarineSwapInvoice | ResponseGetFees | ResponseGetLimits | ResponseGetSwapStatus | ResponseGetPendingSubmarineSwaps | ResponseGetPendingReverseSwaps | ResponseGetPendingChainSwaps | ResponseGetSwapHistory | ResponseRefreshSwapsStatus | ResponseArkToBtc | ResponseBtcToArk | ResponseCreateChainSwap | ResponseWaitAndClaimChain | ResponseWaitAndClaimArk | ResponseWaitAndClaimBtc | ResponseClaimArk | ResponseClaimBtc | ResponseRefundArk | ResponseSignServerClaim | ResponseVerifyChainSwap | ResponseQuoteSwap | ResponseSwapManagerStart | ResponseSwapManagerStop | ResponseSwapManagerAddSwap | ResponseSwapManagerRemoveSwap | ResponseSwapManagerGetPending | ResponseSwapManagerHasSwap | ResponseSwapManagerIsProcessing | ResponseSwapManagerGetStats | ResponseSwapManagerWaitForCompletion;
482
+ type ArkadeSwapsUpdaterRequest = RequestInitArkSwaps | RequestCreateLightningInvoice | RequestSendLightningPayment | RequestCreateSubmarineSwap | RequestCreateReverseSwap | RequestClaimVhtlc | RequestRefundVhtlc | RequestWaitAndClaim | RequestWaitForSwapSettlement | RequestRestoreSwaps | RequestEnrichReverseSwapPreimage | RequestEnrichSubmarineSwapInvoice | RequestGetFees | RequestGetLimits | RequestGetSwapStatus | RequestGetPendingSubmarineSwaps | RequestGetPendingReverseSwaps | RequestGetPendingChainSwaps | RequestGetSwapHistory | RequestRefreshSwapsStatus | RequestArkToBtc | RequestBtcToArk | RequestCreateChainSwap | RequestWaitAndClaimChain | RequestWaitAndClaimArk | RequestWaitAndClaimBtc | RequestClaimArk | RequestClaimBtc | RequestRefundArk | RequestSignServerClaim | RequestVerifyChainSwap | RequestQuoteSwap | RequestSwapManagerStart | RequestSwapManagerStop | RequestSwapManagerAddSwap | RequestSwapManagerRemoveSwap | RequestSwapManagerGetPending | RequestSwapManagerHasSwap | RequestSwapManagerIsProcessing | RequestSwapManagerGetStats | RequestSwapManagerWaitForCompletion;
483
+ type ArkadeSwapsUpdaterResponse = ResponseInitArkSwaps | ResponseCreateLightningInvoice | ResponseSendLightningPayment | ResponseCreateSubmarineSwap | ResponseCreateReverseSwap | ResponseClaimVhtlc | ResponseRefundVhtlc | ResponseWaitAndClaim | ResponseWaitForSwapSettlement | ResponseRestoreSwaps | ResponseEnrichReverseSwapPreimage | ResponseEnrichSubmarineSwapInvoice | ResponseGetFees | ResponseGetLimits | ResponseGetSwapStatus | ResponseGetPendingSubmarineSwaps | ResponseGetPendingReverseSwaps | ResponseGetPendingChainSwaps | ResponseGetSwapHistory | ResponseRefreshSwapsStatus | ResponseArkToBtc | ResponseBtcToArk | ResponseCreateChainSwap | ResponseWaitAndClaimChain | ResponseWaitAndClaimArk | ResponseWaitAndClaimBtc | ResponseClaimArk | ResponseClaimBtc | ResponseRefundArk | ResponseSignServerClaim | ResponseVerifyChainSwap | ResponseQuoteSwap | ResponseSwapManagerStart | ResponseSwapManagerStop | ResponseSwapManagerAddSwap | ResponseSwapManagerRemoveSwap | ResponseSwapManagerGetPending | ResponseSwapManagerHasSwap | ResponseSwapManagerIsProcessing | ResponseSwapManagerGetStats | ResponseSwapManagerWaitForCompletion;
484
484
  declare class ArkadeSwapsMessageHandler implements MessageHandler<ArkadeSwapsUpdaterRequest, ArkadeSwapsUpdaterResponse> {
485
485
  private readonly swapRepository;
486
486
  static messageTag: string;
package/dist/index.d.ts CHANGED
@@ -91,8 +91,8 @@ declare function enrichReverseSwapPreimage(swap: PendingReverseSwap, preimage: s
91
91
  */
92
92
  declare function enrichSubmarineSwapInvoice(swap: PendingSubmarineSwap, invoice: string): PendingSubmarineSwap;
93
93
 
94
- type RequestInitArkLn = RequestEnvelope & {
95
- type: "INIT_ARKADE_LIGHTNING";
94
+ type RequestInitArkSwaps = RequestEnvelope & {
95
+ type: "INIT_ARKADE_SWAPS";
96
96
  payload: Omit<ArkadeSwapsConfig, "wallet" | "swapRepository" | "swapProvider" | "indexerProvider"> & {
97
97
  network: Network;
98
98
  arkServerUrl: string;
@@ -101,8 +101,8 @@ type RequestInitArkLn = RequestEnvelope & {
101
101
  };
102
102
  };
103
103
  };
104
- type ResponseInitArkLn = ResponseEnvelope & {
105
- type: "ARKADE_LIGHTNING_INITIALIZED";
104
+ type ResponseInitArkSwaps = ResponseEnvelope & {
105
+ type: "ARKADE_SWAPS_INITIALIZED";
106
106
  };
107
107
  type RequestCreateLightningInvoice = RequestEnvelope & {
108
108
  type: "CREATE_LIGHTNING_INVOICE";
@@ -479,8 +479,8 @@ type ResponseSwapManagerWaitForCompletion = ResponseEnvelope & {
479
479
  txid: string;
480
480
  };
481
481
  };
482
- type ArkadeSwapsUpdaterRequest = RequestInitArkLn | RequestCreateLightningInvoice | RequestSendLightningPayment | RequestCreateSubmarineSwap | RequestCreateReverseSwap | RequestClaimVhtlc | RequestRefundVhtlc | RequestWaitAndClaim | RequestWaitForSwapSettlement | RequestRestoreSwaps | RequestEnrichReverseSwapPreimage | RequestEnrichSubmarineSwapInvoice | RequestGetFees | RequestGetLimits | RequestGetSwapStatus | RequestGetPendingSubmarineSwaps | RequestGetPendingReverseSwaps | RequestGetPendingChainSwaps | RequestGetSwapHistory | RequestRefreshSwapsStatus | RequestArkToBtc | RequestBtcToArk | RequestCreateChainSwap | RequestWaitAndClaimChain | RequestWaitAndClaimArk | RequestWaitAndClaimBtc | RequestClaimArk | RequestClaimBtc | RequestRefundArk | RequestSignServerClaim | RequestVerifyChainSwap | RequestQuoteSwap | RequestSwapManagerStart | RequestSwapManagerStop | RequestSwapManagerAddSwap | RequestSwapManagerRemoveSwap | RequestSwapManagerGetPending | RequestSwapManagerHasSwap | RequestSwapManagerIsProcessing | RequestSwapManagerGetStats | RequestSwapManagerWaitForCompletion;
483
- type ArkadeSwapsUpdaterResponse = ResponseInitArkLn | ResponseCreateLightningInvoice | ResponseSendLightningPayment | ResponseCreateSubmarineSwap | ResponseCreateReverseSwap | ResponseClaimVhtlc | ResponseRefundVhtlc | ResponseWaitAndClaim | ResponseWaitForSwapSettlement | ResponseRestoreSwaps | ResponseEnrichReverseSwapPreimage | ResponseEnrichSubmarineSwapInvoice | ResponseGetFees | ResponseGetLimits | ResponseGetSwapStatus | ResponseGetPendingSubmarineSwaps | ResponseGetPendingReverseSwaps | ResponseGetPendingChainSwaps | ResponseGetSwapHistory | ResponseRefreshSwapsStatus | ResponseArkToBtc | ResponseBtcToArk | ResponseCreateChainSwap | ResponseWaitAndClaimChain | ResponseWaitAndClaimArk | ResponseWaitAndClaimBtc | ResponseClaimArk | ResponseClaimBtc | ResponseRefundArk | ResponseSignServerClaim | ResponseVerifyChainSwap | ResponseQuoteSwap | ResponseSwapManagerStart | ResponseSwapManagerStop | ResponseSwapManagerAddSwap | ResponseSwapManagerRemoveSwap | ResponseSwapManagerGetPending | ResponseSwapManagerHasSwap | ResponseSwapManagerIsProcessing | ResponseSwapManagerGetStats | ResponseSwapManagerWaitForCompletion;
482
+ type ArkadeSwapsUpdaterRequest = RequestInitArkSwaps | RequestCreateLightningInvoice | RequestSendLightningPayment | RequestCreateSubmarineSwap | RequestCreateReverseSwap | RequestClaimVhtlc | RequestRefundVhtlc | RequestWaitAndClaim | RequestWaitForSwapSettlement | RequestRestoreSwaps | RequestEnrichReverseSwapPreimage | RequestEnrichSubmarineSwapInvoice | RequestGetFees | RequestGetLimits | RequestGetSwapStatus | RequestGetPendingSubmarineSwaps | RequestGetPendingReverseSwaps | RequestGetPendingChainSwaps | RequestGetSwapHistory | RequestRefreshSwapsStatus | RequestArkToBtc | RequestBtcToArk | RequestCreateChainSwap | RequestWaitAndClaimChain | RequestWaitAndClaimArk | RequestWaitAndClaimBtc | RequestClaimArk | RequestClaimBtc | RequestRefundArk | RequestSignServerClaim | RequestVerifyChainSwap | RequestQuoteSwap | RequestSwapManagerStart | RequestSwapManagerStop | RequestSwapManagerAddSwap | RequestSwapManagerRemoveSwap | RequestSwapManagerGetPending | RequestSwapManagerHasSwap | RequestSwapManagerIsProcessing | RequestSwapManagerGetStats | RequestSwapManagerWaitForCompletion;
483
+ type ArkadeSwapsUpdaterResponse = ResponseInitArkSwaps | ResponseCreateLightningInvoice | ResponseSendLightningPayment | ResponseCreateSubmarineSwap | ResponseCreateReverseSwap | ResponseClaimVhtlc | ResponseRefundVhtlc | ResponseWaitAndClaim | ResponseWaitForSwapSettlement | ResponseRestoreSwaps | ResponseEnrichReverseSwapPreimage | ResponseEnrichSubmarineSwapInvoice | ResponseGetFees | ResponseGetLimits | ResponseGetSwapStatus | ResponseGetPendingSubmarineSwaps | ResponseGetPendingReverseSwaps | ResponseGetPendingChainSwaps | ResponseGetSwapHistory | ResponseRefreshSwapsStatus | ResponseArkToBtc | ResponseBtcToArk | ResponseCreateChainSwap | ResponseWaitAndClaimChain | ResponseWaitAndClaimArk | ResponseWaitAndClaimBtc | ResponseClaimArk | ResponseClaimBtc | ResponseRefundArk | ResponseSignServerClaim | ResponseVerifyChainSwap | ResponseQuoteSwap | ResponseSwapManagerStart | ResponseSwapManagerStop | ResponseSwapManagerAddSwap | ResponseSwapManagerRemoveSwap | ResponseSwapManagerGetPending | ResponseSwapManagerHasSwap | ResponseSwapManagerIsProcessing | ResponseSwapManagerGetStats | ResponseSwapManagerWaitForCompletion;
484
484
  declare class ArkadeSwapsMessageHandler implements MessageHandler<ArkadeSwapsUpdaterRequest, ArkadeSwapsUpdaterResponse> {
485
485
  private readonly swapRepository;
486
486
  static messageTag: string;
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ import {
57
57
  RestArkProvider,
58
58
  RestIndexerProvider
59
59
  } from "@arkade-os/sdk";
60
- var DEFAULT_MESSAGE_TAG = "ARKADE_LIGHTNING_UPDATER";
60
+ var DEFAULT_MESSAGE_TAG = "ARKADE_SWAPS_UPDATER";
61
61
  var ArkadeSwapsMessageHandler = class _ArkadeSwapsMessageHandler {
62
62
  constructor(swapRepository) {
63
63
  this.swapRepository = swapRepository;
@@ -118,12 +118,12 @@ var ArkadeSwapsMessageHandler = class _ArkadeSwapsMessageHandler {
118
118
  }
119
119
  async handleMessage(message) {
120
120
  const id = message.id;
121
- if (message.type === "INIT_ARKADE_LIGHTNING") {
121
+ if (message.type === "INIT_ARKADE_SWAPS") {
122
122
  try {
123
123
  await this.handleInit(message);
124
124
  return this.tagged({
125
125
  id,
126
- type: "ARKADE_LIGHTNING_INITIALIZED"
126
+ type: "ARKADE_SWAPS_INITIALIZED"
127
127
  });
128
128
  } catch (error) {
129
129
  return this.tagged({ id, error });
@@ -552,7 +552,7 @@ var ServiceWorkerArkadeSwaps = class _ServiceWorkerArkadeSwaps {
552
552
  const initMessage = {
553
553
  tag: messageTag,
554
554
  id: getRandomId(),
555
- type: "INIT_ARKADE_LIGHTNING",
555
+ type: "INIT_ARKADE_SWAPS",
556
556
  payload: {
557
557
  network: config.network,
558
558
  arkServerUrl: config.arkServerUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkade-os/boltz-swap",
3
- "version": "0.3.0-next.7",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "A production-ready TypeScript package that brings Boltz submarine-swaps to Arkade.",
6
6
  "main": "./dist/index.js",
@@ -60,7 +60,7 @@
60
60
  "author": "Arkade-OS",
61
61
  "license": "MIT",
62
62
  "dependencies": {
63
- "@arkade-os/sdk": "0.4.0-next.7",
63
+ "@arkade-os/sdk": "0.4.0",
64
64
  "@noble/hashes": "2.0.1",
65
65
  "@scure/base": "2.0.0",
66
66
  "@scure/btc-signer": "2.0.1",