@arkade-os/boltz-swap 0.2.4 → 0.2.6

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
@@ -45,6 +45,7 @@ __export(index_exports, {
45
45
  getInvoiceSatoshis: () => getInvoiceSatoshis,
46
46
  isPendingReverseSwap: () => isPendingReverseSwap,
47
47
  isPendingSubmarineSwap: () => isPendingSubmarineSwap,
48
+ isReverseClaimableStatus: () => isReverseClaimableStatus,
48
49
  isReverseFinalStatus: () => isReverseFinalStatus,
49
50
  isSubmarineFinalStatus: () => isSubmarineFinalStatus,
50
51
  isSubmarineRefundableStatus: () => isSubmarineRefundableStatus,
@@ -150,6 +151,9 @@ var isReverseFinalStatus = (status) => {
150
151
  "swap.expired"
151
152
  ].includes(status);
152
153
  };
154
+ var isReverseClaimableStatus = (status) => {
155
+ return ["transaction.mempool", "transaction.confirmed"].includes(status);
156
+ };
153
157
  var isPendingReverseSwap = (swap) => {
154
158
  return swap.type === "reverse";
155
159
  };
@@ -1228,6 +1232,7 @@ var ArkadeLightning = class {
1228
1232
  getInvoiceSatoshis,
1229
1233
  isPendingReverseSwap,
1230
1234
  isPendingSubmarineSwap,
1235
+ isReverseClaimableStatus,
1231
1236
  isReverseFinalStatus,
1232
1237
  isSubmarineFinalStatus,
1233
1238
  isSubmarineRefundableStatus,
package/dist/index.d.cts CHANGED
@@ -7,6 +7,7 @@ interface SwapProviderConfig {
7
7
  type BoltzSwapStatus = "invoice.expired" | "invoice.failedToPay" | "invoice.paid" | "invoice.pending" | "invoice.set" | "invoice.settled" | "swap.created" | "swap.expired" | "transaction.claim.pending" | "transaction.claimed" | "transaction.confirmed" | "transaction.failed" | "transaction.lockupFailed" | "transaction.mempool" | "transaction.refunded";
8
8
  declare const isSubmarineFinalStatus: (status: BoltzSwapStatus) => boolean;
9
9
  declare const isReverseFinalStatus: (status: BoltzSwapStatus) => boolean;
10
+ declare const isReverseClaimableStatus: (status: BoltzSwapStatus) => boolean;
10
11
  declare const isPendingReverseSwap: (swap: PendingSubmarineSwap | PendingReverseSwap) => swap is PendingReverseSwap;
11
12
  declare const isPendingSubmarineSwap: (swap: PendingSubmarineSwap | PendingReverseSwap) => swap is PendingSubmarineSwap;
12
13
  declare const isSubmarineRefundableStatus: (status: BoltzSwapStatus) => boolean;
@@ -391,4 +392,4 @@ declare const decodeInvoice: (invoice: string) => DecodedInvoice;
391
392
  declare const getInvoiceSatoshis: (invoice: string) => number;
392
393
  declare const getInvoicePaymentHash: (invoice: string) => string;
393
394
 
394
- export { ArkadeLightning, type ArkadeLightningConfig, BoltzSwapProvider, type BoltzSwapStatus, type CreateLightningInvoiceResponse, type DecodedInvoice, type FeeConfig, type FeesResponse, type IncomingPaymentSubscription, InsufficientFundsError, InvoiceExpiredError, InvoiceFailedToPayError, type LimitsResponse, type Network, NetworkError, type PendingReverseSwap, type PendingSubmarineSwap, type RefundHandler, type RetryConfig, SchemaError, type SendLightningPaymentRequest, type SendLightningPaymentResponse, SwapError, SwapExpiredError, type TimeoutConfig, TransactionFailedError, type Vtxo, decodeInvoice, getInvoicePaymentHash, getInvoiceSatoshis, isPendingReverseSwap, isPendingSubmarineSwap, isReverseFinalStatus, isSubmarineFinalStatus, isSubmarineRefundableStatus, isSubmarineSwapRefundable };
395
+ export { ArkadeLightning, type ArkadeLightningConfig, BoltzSwapProvider, type BoltzSwapStatus, type CreateLightningInvoiceResponse, type DecodedInvoice, type FeeConfig, type FeesResponse, type IncomingPaymentSubscription, InsufficientFundsError, InvoiceExpiredError, InvoiceFailedToPayError, type LimitsResponse, type Network, NetworkError, type PendingReverseSwap, type PendingSubmarineSwap, type RefundHandler, type RetryConfig, SchemaError, type SendLightningPaymentRequest, type SendLightningPaymentResponse, SwapError, SwapExpiredError, type TimeoutConfig, TransactionFailedError, type Vtxo, decodeInvoice, getInvoicePaymentHash, getInvoiceSatoshis, isPendingReverseSwap, isPendingSubmarineSwap, isReverseClaimableStatus, isReverseFinalStatus, isSubmarineFinalStatus, isSubmarineRefundableStatus, isSubmarineSwapRefundable };
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ interface SwapProviderConfig {
7
7
  type BoltzSwapStatus = "invoice.expired" | "invoice.failedToPay" | "invoice.paid" | "invoice.pending" | "invoice.set" | "invoice.settled" | "swap.created" | "swap.expired" | "transaction.claim.pending" | "transaction.claimed" | "transaction.confirmed" | "transaction.failed" | "transaction.lockupFailed" | "transaction.mempool" | "transaction.refunded";
8
8
  declare const isSubmarineFinalStatus: (status: BoltzSwapStatus) => boolean;
9
9
  declare const isReverseFinalStatus: (status: BoltzSwapStatus) => boolean;
10
+ declare const isReverseClaimableStatus: (status: BoltzSwapStatus) => boolean;
10
11
  declare const isPendingReverseSwap: (swap: PendingSubmarineSwap | PendingReverseSwap) => swap is PendingReverseSwap;
11
12
  declare const isPendingSubmarineSwap: (swap: PendingSubmarineSwap | PendingReverseSwap) => swap is PendingSubmarineSwap;
12
13
  declare const isSubmarineRefundableStatus: (status: BoltzSwapStatus) => boolean;
@@ -391,4 +392,4 @@ declare const decodeInvoice: (invoice: string) => DecodedInvoice;
391
392
  declare const getInvoiceSatoshis: (invoice: string) => number;
392
393
  declare const getInvoicePaymentHash: (invoice: string) => string;
393
394
 
394
- export { ArkadeLightning, type ArkadeLightningConfig, BoltzSwapProvider, type BoltzSwapStatus, type CreateLightningInvoiceResponse, type DecodedInvoice, type FeeConfig, type FeesResponse, type IncomingPaymentSubscription, InsufficientFundsError, InvoiceExpiredError, InvoiceFailedToPayError, type LimitsResponse, type Network, NetworkError, type PendingReverseSwap, type PendingSubmarineSwap, type RefundHandler, type RetryConfig, SchemaError, type SendLightningPaymentRequest, type SendLightningPaymentResponse, SwapError, SwapExpiredError, type TimeoutConfig, TransactionFailedError, type Vtxo, decodeInvoice, getInvoicePaymentHash, getInvoiceSatoshis, isPendingReverseSwap, isPendingSubmarineSwap, isReverseFinalStatus, isSubmarineFinalStatus, isSubmarineRefundableStatus, isSubmarineSwapRefundable };
395
+ export { ArkadeLightning, type ArkadeLightningConfig, BoltzSwapProvider, type BoltzSwapStatus, type CreateLightningInvoiceResponse, type DecodedInvoice, type FeeConfig, type FeesResponse, type IncomingPaymentSubscription, InsufficientFundsError, InvoiceExpiredError, InvoiceFailedToPayError, type LimitsResponse, type Network, NetworkError, type PendingReverseSwap, type PendingSubmarineSwap, type RefundHandler, type RetryConfig, SchemaError, type SendLightningPaymentRequest, type SendLightningPaymentResponse, SwapError, SwapExpiredError, type TimeoutConfig, TransactionFailedError, type Vtxo, decodeInvoice, getInvoicePaymentHash, getInvoiceSatoshis, isPendingReverseSwap, isPendingSubmarineSwap, isReverseClaimableStatus, isReverseFinalStatus, isSubmarineFinalStatus, isSubmarineRefundableStatus, isSubmarineSwapRefundable };
package/dist/index.js CHANGED
@@ -103,6 +103,9 @@ var isReverseFinalStatus = (status) => {
103
103
  "swap.expired"
104
104
  ].includes(status);
105
105
  };
106
+ var isReverseClaimableStatus = (status) => {
107
+ return ["transaction.mempool", "transaction.confirmed"].includes(status);
108
+ };
106
109
  var isPendingReverseSwap = (swap) => {
107
110
  return swap.type === "reverse";
108
111
  };
@@ -1180,6 +1183,7 @@ export {
1180
1183
  getInvoiceSatoshis,
1181
1184
  isPendingReverseSwap,
1182
1185
  isPendingSubmarineSwap,
1186
+ isReverseClaimableStatus,
1183
1187
  isReverseFinalStatus,
1184
1188
  isSubmarineFinalStatus,
1185
1189
  isSubmarineRefundableStatus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkade-os/boltz-swap",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
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",
@@ -30,7 +30,7 @@
30
30
  "author": "Arkade-OS",
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
- "@arkade-os/sdk": "0.3.2",
33
+ "@arkade-os/sdk": "0.3.3",
34
34
  "@noble/hashes": "2.0.0",
35
35
  "@scure/base": "2.0.0",
36
36
  "@scure/btc-signer": "2.0.1",