@atomiqlabs/sdk 8.3.1 → 8.3.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.
Files changed (181) hide show
  1. package/dist/bitcoin/coinselect2/utils.d.ts +6 -0
  2. package/dist/bitcoin/wallet/SingleAddressBitcoinWallet.d.ts +4 -0
  3. package/dist/bitcoin/wallet/SingleAddressBitcoinWallet.js +6 -0
  4. package/dist/enums/FeeType.d.ts +1 -1
  5. package/dist/enums/FeeType.js +1 -1
  6. package/dist/index.d.ts +2 -1
  7. package/dist/index.js +4 -2
  8. package/dist/intermediaries/Intermediary.d.ts +4 -4
  9. package/dist/intermediaries/Intermediary.js +1 -1
  10. package/dist/intermediaries/IntermediaryDiscovery.d.ts +7 -7
  11. package/dist/intermediaries/IntermediaryDiscovery.js +4 -2
  12. package/dist/prices/RedundantSwapPrice.d.ts +2 -2
  13. package/dist/prices/RedundantSwapPrice.js +1 -1
  14. package/dist/prices/SingleSwapPrice.d.ts +1 -1
  15. package/dist/prices/SingleSwapPrice.js +1 -1
  16. package/dist/prices/SwapPriceWithChain.d.ts +5 -6
  17. package/dist/prices/SwapPriceWithChain.js +6 -7
  18. package/dist/prices/abstract/IPriceProvider.d.ts +4 -4
  19. package/dist/prices/abstract/IPriceProvider.js +1 -1
  20. package/dist/prices/abstract/ISwapPrice.d.ts +1 -1
  21. package/dist/prices/abstract/ISwapPrice.js +1 -1
  22. package/dist/prices/providers/BinancePriceProvider.d.ts +1 -1
  23. package/dist/prices/providers/BinancePriceProvider.js +1 -1
  24. package/dist/prices/providers/CoinGeckoPriceProvider.d.ts +1 -1
  25. package/dist/prices/providers/CoinGeckoPriceProvider.js +1 -1
  26. package/dist/prices/providers/CoinPaprikaPriceProvider.d.ts +1 -1
  27. package/dist/prices/providers/CoinPaprikaPriceProvider.js +1 -1
  28. package/dist/prices/providers/CustomPriceProvider.d.ts +1 -1
  29. package/dist/prices/providers/CustomPriceProvider.js +1 -1
  30. package/dist/prices/providers/KrakenPriceProvider.d.ts +1 -1
  31. package/dist/prices/providers/KrakenPriceProvider.js +1 -1
  32. package/dist/prices/providers/OKXPriceProvider.d.ts +1 -1
  33. package/dist/prices/providers/OKXPriceProvider.js +1 -1
  34. package/dist/swapper/Swapper.d.ts +80 -7
  35. package/dist/swapper/Swapper.js +7 -5
  36. package/dist/swapper/SwapperFactory.d.ts +25 -1
  37. package/dist/swapper/SwapperFactory.js +1 -1
  38. package/dist/swaps/IAddressSwap.d.ts +2 -2
  39. package/dist/swaps/IAddressSwap.js +1 -1
  40. package/dist/swaps/IBTCWalletSwap.d.ts +2 -2
  41. package/dist/swaps/IBTCWalletSwap.js +1 -1
  42. package/dist/swaps/IClaimableSwap.d.ts +3 -3
  43. package/dist/swaps/IClaimableSwap.js +1 -1
  44. package/dist/swaps/IClaimableSwapWrapper.d.ts +1 -1
  45. package/dist/swaps/IRefundableSwap.d.ts +2 -2
  46. package/dist/swaps/IRefundableSwap.js +1 -1
  47. package/dist/swaps/ISwap.d.ts +3 -3
  48. package/dist/swaps/ISwap.js +2 -2
  49. package/dist/swaps/ISwapWithGasDrop.d.ts +2 -2
  50. package/dist/swaps/ISwapWithGasDrop.js +1 -1
  51. package/dist/swaps/ISwapWrapper.d.ts +4 -4
  52. package/dist/swaps/ISwapWrapper.js +1 -1
  53. package/dist/swaps/escrow_swaps/IEscrowSelfInitSwap.d.ts +4 -2
  54. package/dist/swaps/escrow_swaps/IEscrowSelfInitSwap.js +1 -1
  55. package/dist/swaps/escrow_swaps/IEscrowSwap.d.ts +1 -1
  56. package/dist/swaps/escrow_swaps/IEscrowSwap.js +1 -1
  57. package/dist/swaps/escrow_swaps/IEscrowSwapWrapper.d.ts +1 -1
  58. package/dist/swaps/escrow_swaps/IEscrowSwapWrapper.js +1 -1
  59. package/dist/swaps/escrow_swaps/frombtc/IFromBTCLNWrapper.d.ts +1 -1
  60. package/dist/swaps/escrow_swaps/frombtc/IFromBTCLNWrapper.js +1 -1
  61. package/dist/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.d.ts +9 -5
  62. package/dist/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.js +5 -4
  63. package/dist/swaps/escrow_swaps/frombtc/IFromBTCWrapper.d.ts +1 -1
  64. package/dist/swaps/escrow_swaps/frombtc/IFromBTCWrapper.js +1 -1
  65. package/dist/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.d.ts +6 -5
  66. package/dist/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.js +6 -5
  67. package/dist/swaps/escrow_swaps/frombtc/ln/FromBTCLNWrapper.d.ts +1 -1
  68. package/dist/swaps/escrow_swaps/frombtc/ln/FromBTCLNWrapper.js +1 -1
  69. package/dist/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.d.ts +4 -3
  70. package/dist/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.js +4 -3
  71. package/dist/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoWrapper.d.ts +1 -1
  72. package/dist/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoWrapper.js +1 -1
  73. package/dist/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.d.ts +18 -7
  74. package/dist/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.js +18 -7
  75. package/dist/swaps/escrow_swaps/frombtc/onchain/FromBTCWrapper.d.ts +1 -1
  76. package/dist/swaps/escrow_swaps/frombtc/onchain/FromBTCWrapper.js +1 -1
  77. package/dist/swaps/escrow_swaps/tobtc/IToBTCSwap.d.ts +3 -7
  78. package/dist/swaps/escrow_swaps/tobtc/IToBTCSwap.js +3 -7
  79. package/dist/swaps/escrow_swaps/tobtc/IToBTCWrapper.d.ts +1 -1
  80. package/dist/swaps/escrow_swaps/tobtc/IToBTCWrapper.js +1 -1
  81. package/dist/swaps/escrow_swaps/tobtc/ln/ToBTCLNSwap.d.ts +1 -1
  82. package/dist/swaps/escrow_swaps/tobtc/ln/ToBTCLNSwap.js +1 -1
  83. package/dist/swaps/escrow_swaps/tobtc/ln/ToBTCLNWrapper.d.ts +1 -1
  84. package/dist/swaps/escrow_swaps/tobtc/ln/ToBTCLNWrapper.js +1 -1
  85. package/dist/swaps/escrow_swaps/tobtc/onchain/ToBTCSwap.d.ts +1 -1
  86. package/dist/swaps/escrow_swaps/tobtc/onchain/ToBTCSwap.js +1 -1
  87. package/dist/swaps/escrow_swaps/tobtc/onchain/ToBTCWrapper.d.ts +1 -1
  88. package/dist/swaps/escrow_swaps/tobtc/onchain/ToBTCWrapper.js +1 -1
  89. package/dist/swaps/spv_swaps/SpvFromBTCSwap.d.ts +36 -10
  90. package/dist/swaps/spv_swaps/SpvFromBTCSwap.js +36 -10
  91. package/dist/swaps/spv_swaps/SpvFromBTCWrapper.d.ts +1 -1
  92. package/dist/swaps/spv_swaps/SpvFromBTCWrapper.js +7 -4
  93. package/dist/swaps/trusted/ln/LnForGasSwap.d.ts +2 -2
  94. package/dist/swaps/trusted/ln/LnForGasSwap.js +2 -2
  95. package/dist/swaps/trusted/ln/LnForGasWrapper.d.ts +1 -1
  96. package/dist/swaps/trusted/ln/LnForGasWrapper.js +1 -1
  97. package/dist/swaps/trusted/onchain/OnchainForGasSwap.d.ts +2 -2
  98. package/dist/swaps/trusted/onchain/OnchainForGasSwap.js +2 -2
  99. package/dist/swaps/trusted/onchain/OnchainForGasWrapper.d.ts +1 -1
  100. package/dist/swaps/trusted/onchain/OnchainForGasWrapper.js +1 -1
  101. package/dist/types/CustomPriceFunction.d.ts +1 -1
  102. package/dist/types/PriceInfoType.d.ts +4 -4
  103. package/dist/types/PriceInfoType.js +3 -3
  104. package/dist/types/SwapExecutionAction.d.ts +17 -6
  105. package/dist/types/SwapWithSigner.d.ts +1 -1
  106. package/dist/types/fees/Fee.d.ts +1 -1
  107. package/dist/types/fees/FeeBreakdown.d.ts +1 -1
  108. package/dist/types/fees/PercentagePPM.d.ts +2 -2
  109. package/dist/types/fees/PercentagePPM.js +1 -1
  110. package/dist/types/lnurl/LNURLPay.d.ts +6 -6
  111. package/dist/types/lnurl/LNURLPay.js +2 -2
  112. package/dist/types/lnurl/LNURLWithdraw.d.ts +5 -5
  113. package/dist/types/lnurl/LNURLWithdraw.js +2 -2
  114. package/dist/types/wallets/LightningInvoiceCreateService.d.ts +4 -0
  115. package/dist/types/wallets/MinimalLightningNetworkWalletInterface.d.ts +1 -1
  116. package/dist/utils/SwapUtils.d.ts +2 -0
  117. package/dist/utils/SwapUtils.js +2 -0
  118. package/package.json +1 -1
  119. package/src/bitcoin/coinselect2/utils.ts +6 -0
  120. package/src/bitcoin/wallet/SingleAddressBitcoinWallet.ts +7 -0
  121. package/src/enums/FeeType.ts +1 -1
  122. package/src/index.ts +6 -0
  123. package/src/intermediaries/Intermediary.ts +4 -4
  124. package/src/intermediaries/IntermediaryDiscovery.ts +9 -7
  125. package/src/prices/RedundantSwapPrice.ts +2 -2
  126. package/src/prices/SingleSwapPrice.ts +1 -1
  127. package/src/prices/SwapPriceWithChain.ts +6 -7
  128. package/src/prices/abstract/IPriceProvider.ts +4 -4
  129. package/src/prices/abstract/ISwapPrice.ts +1 -1
  130. package/src/prices/providers/BinancePriceProvider.ts +1 -1
  131. package/src/prices/providers/CoinGeckoPriceProvider.ts +1 -1
  132. package/src/prices/providers/CoinPaprikaPriceProvider.ts +1 -1
  133. package/src/prices/providers/CustomPriceProvider.ts +1 -1
  134. package/src/prices/providers/KrakenPriceProvider.ts +1 -1
  135. package/src/prices/providers/OKXPriceProvider.ts +1 -1
  136. package/src/swapper/Swapper.ts +88 -13
  137. package/src/swapper/SwapperFactory.ts +29 -3
  138. package/src/swaps/IAddressSwap.ts +2 -2
  139. package/src/swaps/IBTCWalletSwap.ts +2 -2
  140. package/src/swaps/IClaimableSwap.ts +3 -3
  141. package/src/swaps/IClaimableSwapWrapper.ts +1 -1
  142. package/src/swaps/IRefundableSwap.ts +2 -2
  143. package/src/swaps/ISwap.ts +3 -3
  144. package/src/swaps/ISwapWithGasDrop.ts +2 -2
  145. package/src/swaps/ISwapWrapper.ts +4 -4
  146. package/src/swaps/escrow_swaps/IEscrowSelfInitSwap.ts +4 -2
  147. package/src/swaps/escrow_swaps/IEscrowSwap.ts +1 -1
  148. package/src/swaps/escrow_swaps/IEscrowSwapWrapper.ts +1 -1
  149. package/src/swaps/escrow_swaps/frombtc/IFromBTCLNWrapper.ts +1 -1
  150. package/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts +9 -5
  151. package/src/swaps/escrow_swaps/frombtc/IFromBTCWrapper.ts +1 -1
  152. package/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts +6 -5
  153. package/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNWrapper.ts +1 -1
  154. package/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts +4 -3
  155. package/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoWrapper.ts +1 -1
  156. package/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts +18 -7
  157. package/src/swaps/escrow_swaps/frombtc/onchain/FromBTCWrapper.ts +1 -1
  158. package/src/swaps/escrow_swaps/tobtc/IToBTCSwap.ts +3 -7
  159. package/src/swaps/escrow_swaps/tobtc/IToBTCWrapper.ts +1 -1
  160. package/src/swaps/escrow_swaps/tobtc/ln/ToBTCLNSwap.ts +1 -1
  161. package/src/swaps/escrow_swaps/tobtc/ln/ToBTCLNWrapper.ts +1 -1
  162. package/src/swaps/escrow_swaps/tobtc/onchain/ToBTCSwap.ts +1 -1
  163. package/src/swaps/escrow_swaps/tobtc/onchain/ToBTCWrapper.ts +1 -1
  164. package/src/swaps/spv_swaps/SpvFromBTCSwap.ts +36 -10
  165. package/src/swaps/spv_swaps/SpvFromBTCWrapper.ts +7 -4
  166. package/src/swaps/trusted/ln/LnForGasSwap.ts +2 -2
  167. package/src/swaps/trusted/ln/LnForGasWrapper.ts +1 -1
  168. package/src/swaps/trusted/onchain/OnchainForGasSwap.ts +2 -2
  169. package/src/swaps/trusted/onchain/OnchainForGasWrapper.ts +1 -1
  170. package/src/types/CustomPriceFunction.ts +1 -1
  171. package/src/types/PriceInfoType.ts +4 -4
  172. package/src/types/SwapExecutionAction.ts +19 -6
  173. package/src/types/SwapWithSigner.ts +1 -1
  174. package/src/types/fees/Fee.ts +1 -1
  175. package/src/types/fees/FeeBreakdown.ts +1 -1
  176. package/src/types/fees/PercentagePPM.ts +2 -2
  177. package/src/types/lnurl/LNURLPay.ts +6 -6
  178. package/src/types/lnurl/LNURLWithdraw.ts +5 -5
  179. package/src/types/wallets/LightningInvoiceCreateService.ts +4 -0
  180. package/src/types/wallets/MinimalLightningNetworkWalletInterface.ts +1 -1
  181. package/src/utils/SwapUtils.ts +2 -0
@@ -2,7 +2,7 @@ import {toBigInt} from "../utils/Utils";
2
2
 
3
3
  /**
4
4
  * Pricing information for swap validation
5
- * @category Pricing and LPs
5
+ * @category Pricing
6
6
  */
7
7
  export type PriceInfoType = {
8
8
  isValid: boolean,
@@ -16,7 +16,7 @@ export type PriceInfoType = {
16
16
 
17
17
  /**
18
18
  * Type guard for PriceInfoType
19
- * @category Pricing and LPs
19
+ * @category Pricing
20
20
  */
21
21
  export function isPriceInfoType(obj: any): obj is PriceInfoType {
22
22
  return obj != null &&
@@ -31,7 +31,7 @@ export function isPriceInfoType(obj: any): obj is PriceInfoType {
31
31
 
32
32
  /**
33
33
  * Serializes PriceInfoType for storage
34
- * @category Pricing and LPs
34
+ * @category Pricing
35
35
  */
36
36
  export function serializePriceInfoType(obj: PriceInfoType | undefined): any {
37
37
  if (obj == null) return null;
@@ -48,7 +48,7 @@ export function serializePriceInfoType(obj: PriceInfoType | undefined): any {
48
48
 
49
49
  /**
50
50
  * Deserializes PriceInfoType from storage
51
- * @category Pricing and LPs
51
+ * @category Pricing
52
52
  */
53
53
  export function deserializePriceInfoType(obj: any): PriceInfoType | undefined {
54
54
  if (obj == null) return;
@@ -4,7 +4,7 @@ import {Transaction} from "@scure/btc-signer";
4
4
  /**
5
5
  * Swap execution action requiring a payment of the provided bolt11 lightning network invoice
6
6
  *
7
- * @category Swaps
7
+ * @category Swap Actions
8
8
  */
9
9
  export type SwapExecutionActionLightning = {
10
10
  name: "Payment",
@@ -24,7 +24,7 @@ export type SwapExecutionActionLightning = {
24
24
  * - `"RAW_PSBT"` - Raw PSBT without the inputs, the implementor needs to add the input UTXOs before signing
25
25
  * the transaction
26
26
  *
27
- * @category Swaps
27
+ * @category Swap Actions
28
28
  */
29
29
  export type SwapExecutionActionBitcoin<
30
30
  T extends "ADDRESS" | "FUNDED_PSBT" | "RAW_PSBT" = "ADDRESS" | "FUNDED_PSBT" | "RAW_PSBT"
@@ -55,7 +55,7 @@ export type SwapExecutionActionBitcoin<
55
55
  /**
56
56
  * Swap execution action for committing (initiating) the escrow on the smart chain side
57
57
  *
58
- * @category Swaps
58
+ * @category Swap Actions
59
59
  */
60
60
  export type SwapExecutionActionCommit<T extends ChainType> = {
61
61
  name: "Commit",
@@ -67,7 +67,7 @@ export type SwapExecutionActionCommit<T extends ChainType> = {
67
67
  /**
68
68
  * Swap execution action for claiming (settling) the swap on the smart chain side
69
69
  *
70
- * @category Swaps
70
+ * @category Swap Actions
71
71
  */
72
72
  export type SwapExecutionActionClaim<T extends ChainType> = {
73
73
  name: "Claim",
@@ -76,12 +76,25 @@ export type SwapExecutionActionClaim<T extends ChainType> = {
76
76
  txs: T["TX"][]
77
77
  }
78
78
 
79
+ /**
80
+ * Swap execution action for refunding the swap on the smart chain side after it fails
81
+ *
82
+ * @category Swap Actions
83
+ */
84
+ export type SwapExecutionActionRefund<T extends ChainType> = {
85
+ name: "Refund",
86
+ description: string,
87
+ chain: T["ChainId"],
88
+ txs: T["TX"][]
89
+ }
90
+
79
91
  /**
80
92
  * Swap execution action, a single step in the swapping process
81
93
  *
82
- * @category Swaps
94
+ * @category Swap Actions
83
95
  */
84
96
  export type SwapExecutionAction<T extends ChainType> = SwapExecutionActionLightning |
85
97
  SwapExecutionActionBitcoin |
86
98
  SwapExecutionActionCommit<T> |
87
- SwapExecutionActionClaim<T>;
99
+ SwapExecutionActionClaim<T> |
100
+ SwapExecutionActionRefund<T>;
@@ -9,7 +9,7 @@ import {SpvFromBTCSwap} from "../swaps/spv_swaps/SpvFromBTCSwap";
9
9
  /**
10
10
  * Proxy type that auto-injects a smart chain signer into swap methods
11
11
  *
12
- * @category Swaps
12
+ * @category Swaps/Base
13
13
  */
14
14
  export type SwapWithSigner<T extends ISwap> = {
15
15
  [K in keyof T]:
@@ -6,7 +6,7 @@ import {Token} from "../Token";
6
6
  * Fee represented in both, source and destination tokens, as well as providing USD valuation helpers and
7
7
  * fee composition
8
8
  *
9
- * @category Pricing and LPs
9
+ * @category Pricing
10
10
  */
11
11
  export type Fee<
12
12
  ChainIdentifier extends string = string,
@@ -4,7 +4,7 @@ import {Fee} from "./Fee";
4
4
  /**
5
5
  * Breakdown of fees by type (swap fee, network fee, etc.)
6
6
  *
7
- * @category Pricing and LPs
7
+ * @category Pricing
8
8
  */
9
9
  export type FeeBreakdown<ChainIdentifier extends string = string> = {
10
10
  type: FeeType,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Parts-per-million fee representation with conversion helpers
3
3
  *
4
- * @category Pricing and LPs
4
+ * @category Pricing
5
5
  */
6
6
  export type PercentagePPM = {
7
7
  ppm: bigint,
@@ -13,7 +13,7 @@ export type PercentagePPM = {
13
13
  /**
14
14
  * Converts parts-per-million to percentage representation
15
15
  *
16
- * @category Pricing and LPs
16
+ * @category Pricing
17
17
  */
18
18
  export function ppmToPercentage(ppm: bigint): PercentagePPM {
19
19
  const percentage = Number(ppm) / 10_000;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Response of the LNURL-pay link
3
3
  *
4
- * @category Bitcoin
4
+ * @category Lightning
5
5
  */
6
6
  export type LNURLPayParams = {
7
7
  tag: "payRequest";
@@ -17,14 +17,14 @@ export type LNURLPayParams = {
17
17
  /**
18
18
  * Response of the LNURL-pay link with the added original url
19
19
  *
20
- * @category Bitcoin
20
+ * @category Lightning
21
21
  */
22
22
  export type LNURLPayParamsWithUrl = LNURLPayParams & { url: string };
23
23
 
24
24
  /**
25
25
  * Parsed LNURL-pay specification
26
26
  *
27
- * @category Bitcoin
27
+ * @category Lightning
28
28
  */
29
29
  export type LNURLPay = {
30
30
  type: "pay",
@@ -40,7 +40,7 @@ export type LNURLPay = {
40
40
  /**
41
41
  * Type guard for {@link LNURLPayParams}
42
42
  *
43
- * @category Bitcoin
43
+ * @category Lightning
44
44
  * @internal
45
45
  */
46
46
  export function isLNURLPayParams(obj: any): obj is LNURLPayParams {
@@ -50,7 +50,7 @@ export function isLNURLPayParams(obj: any): obj is LNURLPayParams {
50
50
  /**
51
51
  * Type guard for {@link LNURLPay}
52
52
  *
53
- * @category Bitcoin
53
+ * @category Lightning
54
54
  * @internal
55
55
  */
56
56
  export function isLNURLPay(value: any): value is LNURLPay {
@@ -71,7 +71,7 @@ export function isLNURLPay(value: any): value is LNURLPay {
71
71
  /**
72
72
  * Decoded LNURL-pay success action, revealed after a lightning payment is finished
73
73
  *
74
- * @category Bitcoin
74
+ * @category Lightning
75
75
  */
76
76
  export type LNURLDecodedSuccessAction = {
77
77
  description: string,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Response of the LNURL-withdraw link
3
3
  *
4
- * @category Bitcoin
4
+ * @category Lightning
5
5
  */
6
6
  export type LNURLWithdrawParams = {
7
7
  tag: "withdrawRequest";
@@ -18,14 +18,14 @@ export type LNURLWithdrawParams = {
18
18
  /**
19
19
  * Response of the LNURL-withdraw link with the added original url
20
20
  *
21
- * @category Bitcoin
21
+ * @category Lightning
22
22
  */
23
23
  export type LNURLWithdrawParamsWithUrl = LNURLWithdrawParams & { url: string };
24
24
 
25
25
  /**
26
26
  * Parsed LNURL-withdraw specification
27
27
  *
28
- * @category Bitcoin
28
+ * @category Lightning
29
29
  */
30
30
  export type LNURLWithdraw = {
31
31
  type: "withdraw",
@@ -37,7 +37,7 @@ export type LNURLWithdraw = {
37
37
  /**
38
38
  * Type guard for {@link LNURLWithdraw}
39
39
  *
40
- * @category Bitcoin
40
+ * @category Lightning
41
41
  * @internal
42
42
  */
43
43
  export function isLNURLWithdraw(value: any): value is LNURLWithdraw {
@@ -54,7 +54,7 @@ export function isLNURLWithdraw(value: any): value is LNURLWithdraw {
54
54
  /**
55
55
  * Type guard for {@link LNURLWithdrawParams}
56
56
  *
57
- * @category Bitcoin
57
+ * @category Lightning
58
58
  * @internal
59
59
  */
60
60
  export function isLNURLWithdrawParams(obj: any): obj is LNURLWithdrawParams {
@@ -1,11 +1,15 @@
1
1
  /**
2
2
  * Invoice getter callback for the {@link LightningInvoiceCreateService}
3
+ *
4
+ * @category Lightning
3
5
  */
4
6
  export type LightningWalletCallback = (valueSats: number, abortSignal?: AbortSignal) => Promise<string>;
5
7
  /**
6
8
  * Service that creates on-demand fixed amount bolt11 lightning network invoices, optionally
7
9
  * specifying minimum and maximum swappable sats amount. This used for exact input Smart chain ->
8
10
  * Lightning swaps.
11
+ *
12
+ * @category Lightning
9
13
  */
10
14
  export type LightningInvoiceCreateService = {
11
15
  getInvoice: LightningWalletCallback,
@@ -2,7 +2,7 @@
2
2
  * A type with minimum possible required functionality to be usable with lightning network swaps, i.e.
3
3
  * a function to pay bolt11 lightning network invoices.
4
4
  *
5
- * @category Bitcoin
5
+ * @category Lightning
6
6
  */
7
7
  export type MinimalLightningNetworkWalletInterface = {
8
8
  payInvoice: (bolt11PaymentRequest: string) => Promise<string>
@@ -49,6 +49,8 @@ export function isSwapType<T extends ChainType, S extends SwapType>(swap: ISwap<
49
49
  * arbitrary transactions
50
50
  * - `supportsGasDrop`: Whether a swap supports the "gas drop" feature, allowing to user to receive a small
51
51
  * amount of native token as part of the swap when swapping to smart chains
52
+ *
53
+ * @category Core
52
54
  */
53
55
  export const SwapProtocolInfo = {
54
56
  [SwapType.TO_BTC]: {