@buildonspark/spark-sdk 0.1.41 → 0.1.43

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 (156) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/android/src/main/jniLibs/arm64-v8a/libuniffi_spark_frost.so +0 -0
  3. package/android/src/main/jniLibs/armeabi-v7a/libuniffi_spark_frost.so +0 -0
  4. package/android/src/main/jniLibs/x86/libuniffi_spark_frost.so +0 -0
  5. package/android/src/main/jniLibs/x86_64/libuniffi_spark_frost.so +0 -0
  6. package/dist/LightningSendFeeEstimateInput-BgOhEAI-.d.cts +10 -0
  7. package/dist/LightningSendFeeEstimateInput-BgOhEAI-.d.ts +10 -0
  8. package/dist/{RequestLightningSendInput-mXUWn_cp.d.ts → RequestLightningSendInput-D7fZdT4A.d.ts} +35 -16
  9. package/dist/{RequestLightningSendInput-DXcLoiCe.d.cts → RequestLightningSendInput-Na1mHdWg.d.cts} +35 -16
  10. package/dist/address/index.cjs +38 -7
  11. package/dist/address/index.d.cts +2 -2
  12. package/dist/address/index.d.ts +2 -2
  13. package/dist/address/index.js +3 -3
  14. package/dist/{chunk-ATEHMLKP.js → chunk-6AFUC5M2.js} +1 -1
  15. package/dist/{chunk-ZXDE2XMU.js → chunk-BUTZWYBW.js} +9 -6
  16. package/dist/{chunk-7EFSUADA.js → chunk-DOA6QXYQ.js} +1 -0
  17. package/dist/{chunk-J5W5Q2ZP.js → chunk-DQYKQJRZ.js} +291 -7
  18. package/dist/{chunk-TWF35O6M.js → chunk-GSI4OLXZ.js} +32 -1
  19. package/dist/{chunk-2ZXXLPG2.js → chunk-GYQR4B4P.js} +5 -4
  20. package/dist/{chunk-ROKY5KS4.js → chunk-HRQRRDSS.js} +53 -15
  21. package/dist/{chunk-YEZDPUFY.js → chunk-IRW5TWMH.js} +8 -8
  22. package/dist/{chunk-7VMYMQLF.js → chunk-NSJF5F5O.js} +1 -1
  23. package/dist/{chunk-TM4TOEOX.js → chunk-O4RYNJNB.js} +3 -3
  24. package/dist/{chunk-MGPRLH6Q.js → chunk-QNNSEJ4P.js} +1 -1
  25. package/dist/{chunk-UKT6OFLO.js → chunk-TIUBYNN5.js} +13 -7
  26. package/dist/{chunk-6YVPOQ2A.js → chunk-TOSP3INR.js} +235 -143
  27. package/dist/chunk-VFJQNBFX.js +21 -0
  28. package/dist/{chunk-KKSU7OZO.js → chunk-WWOTVNPP.js} +195 -67
  29. package/dist/{chunk-HK6LPV6Z.js → chunk-Z5HIAYFT.js} +1 -1
  30. package/dist/graphql/objects/index.cjs +229 -135
  31. package/dist/graphql/objects/index.d.cts +54 -9
  32. package/dist/graphql/objects/index.d.ts +54 -9
  33. package/dist/graphql/objects/index.js +3 -3
  34. package/dist/{index-OSDtPMmC.d.ts → index-7RYRH5wc.d.ts} +10 -8
  35. package/dist/{index-CFh4uWzi.d.cts → index-BJOc8Ur-.d.cts} +10 -8
  36. package/dist/index.cjs +790 -315
  37. package/dist/index.d.cts +8 -7
  38. package/dist/index.d.ts +8 -7
  39. package/dist/index.js +26 -26
  40. package/dist/index.node.cjs +790 -315
  41. package/dist/index.node.d.cts +9 -8
  42. package/dist/index.node.d.ts +9 -8
  43. package/dist/index.node.js +26 -26
  44. package/dist/native/index.cjs +812 -332
  45. package/dist/native/index.d.cts +53 -18
  46. package/dist/native/index.d.ts +53 -18
  47. package/dist/native/index.js +659 -181
  48. package/dist/{network-BiwBmoOg.d.cts → network-D5lKssVl.d.cts} +1 -1
  49. package/dist/{network-BF2GYPye.d.ts → network-xkBSpaTn.d.ts} +1 -1
  50. package/dist/proto/lrc20.d.cts +1 -1
  51. package/dist/proto/lrc20.d.ts +1 -1
  52. package/dist/proto/spark.d.cts +1 -1
  53. package/dist/proto/spark.d.ts +1 -1
  54. package/dist/proto/spark_token.d.cts +1 -1
  55. package/dist/proto/spark_token.d.ts +1 -1
  56. package/dist/{sdk-types-CfhdFnsA.d.cts → sdk-types-B-q9py_P.d.cts} +1 -1
  57. package/dist/{sdk-types-MnQrHolg.d.ts → sdk-types-BPoPgzda.d.ts} +1 -1
  58. package/dist/services/config.cjs +118 -69
  59. package/dist/services/config.d.cts +6 -4
  60. package/dist/services/config.d.ts +6 -4
  61. package/dist/services/config.js +9 -9
  62. package/dist/services/connection.cjs +95 -15
  63. package/dist/services/connection.d.cts +6 -4
  64. package/dist/services/connection.d.ts +6 -4
  65. package/dist/services/connection.js +3 -3
  66. package/dist/services/index.cjs +487 -117
  67. package/dist/services/index.d.cts +5 -4
  68. package/dist/services/index.d.ts +5 -4
  69. package/dist/services/index.js +19 -19
  70. package/dist/services/lrc-connection.cjs +50 -7
  71. package/dist/services/lrc-connection.d.cts +5 -4
  72. package/dist/services/lrc-connection.d.ts +5 -4
  73. package/dist/services/lrc-connection.js +3 -3
  74. package/dist/services/token-transactions.cjs +351 -36
  75. package/dist/services/token-transactions.d.cts +5 -4
  76. package/dist/services/token-transactions.d.ts +5 -4
  77. package/dist/services/token-transactions.js +6 -6
  78. package/dist/services/wallet-config.cjs +1 -0
  79. package/dist/services/wallet-config.d.cts +6 -4
  80. package/dist/services/wallet-config.d.ts +6 -4
  81. package/dist/services/wallet-config.js +1 -1
  82. package/dist/signer/signer.cjs +117 -64
  83. package/dist/signer/signer.d.cts +4 -3
  84. package/dist/signer/signer.d.ts +4 -3
  85. package/dist/signer/signer.js +15 -7
  86. package/dist/{signer-CylxIujU.d.ts → signer-IO3oMRNj.d.cts} +2 -1
  87. package/dist/{signer-BhLS7SYR.d.cts → signer-wqesWifN.d.ts} +2 -1
  88. package/dist/{spark-DjR1b3TC.d.cts → spark-CDm4gqS6.d.cts} +1 -1
  89. package/dist/{spark-DjR1b3TC.d.ts → spark-CDm4gqS6.d.ts} +1 -1
  90. package/dist/types/index.cjs +282 -188
  91. package/dist/types/index.d.cts +7 -6
  92. package/dist/types/index.d.ts +7 -6
  93. package/dist/types/index.js +3 -3
  94. package/dist/utils/index.cjs +90 -58
  95. package/dist/utils/index.d.cts +6 -5
  96. package/dist/utils/index.d.ts +6 -5
  97. package/dist/utils/index.js +16 -16
  98. package/ios/spark_frostFFI.xcframework/ios-arm64/SparkFrost +0 -0
  99. package/ios/spark_frostFFI.xcframework/ios-arm64/spark_frostFFI.framework/spark_frostFFI +0 -0
  100. package/ios/spark_frostFFI.xcframework/ios-arm64_x86_64-simulator/SparkFrost +0 -0
  101. package/ios/spark_frostFFI.xcframework/ios-arm64_x86_64-simulator/spark_frostFFI.framework/spark_frostFFI +0 -0
  102. package/ios/spark_frostFFI.xcframework/macos-arm64_x86_64/spark_frostFFI.framework/spark_frostFFI +0 -0
  103. package/package.json +4 -4
  104. package/src/constants.ts +21 -0
  105. package/src/errors/base.ts +43 -1
  106. package/src/graphql/client.ts +4 -0
  107. package/src/graphql/mutations/RequestLightningSend.ts +2 -0
  108. package/src/graphql/objects/ClaimStaticDepositInput.ts +1 -1
  109. package/src/graphql/objects/ClaimStaticDepositStatus.ts +4 -2
  110. package/src/graphql/objects/Connection.ts +7 -7
  111. package/src/graphql/objects/CoopExitFeeEstimate.ts +1 -1
  112. package/src/graphql/objects/CoopExitFeeQuote.ts +202 -0
  113. package/src/graphql/objects/CoopExitFeeQuoteInput.ts +41 -0
  114. package/src/graphql/objects/CoopExitFeeQuoteOutput.ts +45 -0
  115. package/src/graphql/objects/CoopExitRequest.ts +21 -0
  116. package/src/graphql/objects/CurrencyUnit.ts +26 -28
  117. package/src/graphql/objects/Entity.ts +84 -0
  118. package/src/graphql/objects/Invoice.ts +2 -2
  119. package/src/graphql/objects/Leaf.ts +1 -1
  120. package/src/graphql/objects/LeavesSwapFeeEstimateOutput.ts +1 -1
  121. package/src/graphql/objects/LeavesSwapRequest.ts +6 -0
  122. package/src/graphql/objects/LightningReceiveRequest.ts +11 -0
  123. package/src/graphql/objects/LightningSendFeeEstimateInput.ts +8 -0
  124. package/src/graphql/objects/LightningSendFeeEstimateOutput.ts +1 -1
  125. package/src/graphql/objects/LightningSendRequest.ts +3 -0
  126. package/src/graphql/objects/RequestCoopExitInput.ts +8 -0
  127. package/src/graphql/objects/RequestLeavesSwapInput.ts +5 -1
  128. package/src/graphql/objects/RequestLightningReceiveInput.ts +9 -2
  129. package/src/graphql/objects/RequestLightningSendInput.ts +8 -0
  130. package/src/graphql/objects/SparkCoopExitRequestStatus.ts +2 -0
  131. package/src/graphql/objects/SparkUserRequestType.ts +2 -0
  132. package/src/graphql/objects/SparkWalletUser.ts +20 -0
  133. package/src/graphql/objects/UserRequest.ts +32 -0
  134. package/src/graphql/objects/VerifyChallengeInput.ts +1 -1
  135. package/src/graphql/objects/index.ts +12 -3
  136. package/src/graphql/queries/LightningSendFeeEstimate.ts +2 -0
  137. package/src/logger.ts +3 -0
  138. package/src/native/index.ts +1 -0
  139. package/src/services/config.ts +4 -0
  140. package/src/services/connection.ts +68 -29
  141. package/src/services/coop-exit.ts +1 -1
  142. package/src/services/lightning.ts +25 -1
  143. package/src/services/lrc-connection.ts +3 -3
  144. package/src/services/token-transactions.ts +6 -2
  145. package/src/services/wallet-config.ts +2 -0
  146. package/src/signer/signer.ts +4 -1
  147. package/src/spark-wallet/spark-wallet.ts +51 -15
  148. package/src/spark-wallet/types.ts +1 -0
  149. package/src/tests/errors.test.ts +58 -0
  150. package/src/tests/integration/lightning.test.ts +184 -0
  151. package/src/tests/integration/ssp/static_deposit.test.ts +1 -2
  152. package/src/tests/tokens.test.ts +52 -3
  153. package/src/utils/token-hashing.ts +335 -1
  154. package/dist/LightningSendFeeEstimateInput-CJvPnCSB.d.cts +0 -5
  155. package/dist/LightningSendFeeEstimateInput-CJvPnCSB.d.ts +0 -5
  156. package/dist/chunk-HKAKEKCE.js +0 -8
@@ -1,16 +1,17 @@
1
1
  import { B as BitcoinNetwork } from '../../BitcoinNetwork-TnABML0T.js';
2
2
  import { Query } from '@lightsparkdev/core';
3
- import { h as CurrencyAmount, P as PageInfo, D as SspClient } from '../../RequestLightningSendInput-mXUWn_cp.js';
4
- export { C as ClaimStaticDepositOutput, a as CompleteCoopExitInput, b as CompleteLeavesSwapInput, c as CoopExitFeeEstimate, d as CoopExitFeeEstimatesInput, e as CoopExitFeeEstimatesOutput, f as CoopExitRequest, i as CurrencyUnit, E as ExitSpeed, G as GetChallengeOutput, I as Invoice, L as Leaf, j as LeavesSwapFeeEstimateOutput, l as LeavesSwapRequest, n as LightningReceiveRequest, o as LightningReceiveRequestStatus, p as LightningSendFeeEstimateOutput, r as LightningSendRequest, s as LightningSendRequestStatus, R as RequestCoopExitInput, t as RequestLeavesSwapInput, u as RequestLightningReceiveInput, v as RequestLightningSendInput, S as SparkCoopExitRequestStatus, w as SparkLeavesSwapRequestStatus, x as SparkTransferToLeavesConnection, y as StaticDepositQuoteInput, z as StaticDepositQuoteOutput, A as SwapLeaf, T as Transfer, U as UserLeafInput, V as VerifyChallengeOutput, g as getCoopExitRequestQuery, k as getLeavesSwapRequestQuery, m as getLightningReceiveRequestQuery, q as getLightningSendRequestQuery } from '../../RequestLightningSendInput-mXUWn_cp.js';
5
- export { L as LightningSendFeeEstimateInput } from '../../LightningSendFeeEstimateInput-CJvPnCSB.js';
6
- import '../../signer-CylxIujU.js';
3
+ import { h as CurrencyAmount, P as PageInfo, D as SspClient } from '../../RequestLightningSendInput-D7fZdT4A.js';
4
+ export { C as ClaimStaticDepositOutput, a as CompleteCoopExitInput, b as CompleteLeavesSwapInput, c as CoopExitFeeEstimate, d as CoopExitFeeEstimatesInput, e as CoopExitFeeEstimatesOutput, f as CoopExitRequest, i as CurrencyUnit, E as ExitSpeed, G as GetChallengeOutput, I as Invoice, L as Leaf, j as LeavesSwapFeeEstimateOutput, l as LeavesSwapRequest, n as LightningReceiveRequest, o as LightningReceiveRequestStatus, p as LightningSendFeeEstimateOutput, r as LightningSendRequest, s as LightningSendRequestStatus, R as RequestCoopExitInput, t as RequestLeavesSwapInput, u as RequestLightningReceiveInput, v as RequestLightningSendInput, S as SparkCoopExitRequestStatus, w as SparkLeavesSwapRequestStatus, x as SparkTransferToLeavesConnection, y as StaticDepositQuoteInput, z as StaticDepositQuoteOutput, A as SwapLeaf, T as Transfer, U as UserLeafInput, V as VerifyChallengeOutput, g as getCoopExitRequestQuery, k as getLeavesSwapRequestQuery, m as getLightningReceiveRequestQuery, q as getLightningSendRequestQuery } from '../../RequestLightningSendInput-D7fZdT4A.js';
5
+ export { L as LightningSendFeeEstimateInput } from '../../LightningSendFeeEstimateInput-BgOhEAI-.js';
6
+ import '../../signer-wqesWifN.js';
7
7
  import '@scure/bip32';
8
- import '../../spark-DjR1b3TC.js';
8
+ import '../../spark-CDm4gqS6.js';
9
9
  import '@bufbuild/protobuf/wire';
10
10
  import 'nice-grpc-common';
11
11
  import '@buildonspark/lrc20-sdk';
12
12
  import '@scure/btc-signer';
13
13
  import 'bitcoinjs-lib';
14
+ import '@buildonspark/lrc20-sdk/lrc/types';
14
15
 
15
16
  declare enum ClaimStaticDepositStatus {
16
17
  /**
@@ -24,8 +25,9 @@ declare enum ClaimStaticDepositStatus {
24
25
  REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED = "REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED",
25
26
  REFUND_SIGNING_FAILED = "REFUND_SIGNING_FAILED",
26
27
  UTXO_SWAPPING_FAILED = "UTXO_SWAPPING_FAILED",
27
- TRANSFER_FAILED = "TRANSFER_FAILED",
28
- TRANSFER_COMPLETED = "TRANSFER_COMPLETED"
28
+ TRANSFER_COMPLETED = "TRANSFER_COMPLETED",
29
+ SPEND_TX_CREATED = "SPEND_TX_CREATED",
30
+ SPEND_TX_BROADCAST = "SPEND_TX_BROADCAST"
29
31
  }
30
32
 
31
33
  interface ClaimStaticDeposit {
@@ -119,6 +121,48 @@ interface Connection {
119
121
  typename: string;
120
122
  }
121
123
 
124
+ interface CoopExitFeeQuote {
125
+ /**
126
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
127
+ * string.
128
+ **/
129
+ id: string;
130
+ /** The date and time when the entity was first created. **/
131
+ createdAt: string;
132
+ /** The date and time when the entity was last updated. **/
133
+ updatedAt: string;
134
+ /** The network the coop exit fee quote is on. **/
135
+ network: BitcoinNetwork;
136
+ /** The total currency amount of all the nodes user swapped for the coop exit quote. **/
137
+ totalAmount: CurrencyAmount;
138
+ /** The fee user pays for the coop exit not including the L1 broadcast fee when exit speed is fast. **/
139
+ userFeeFast: CurrencyAmount;
140
+ /** The fee user pays for the coop exit not including the L1 broadcast fee when exit speed is medium. **/
141
+ userFeeMedium: CurrencyAmount;
142
+ /** The fee user pays for the coop exit not including the L1 broadcast fee when exit speed is slow. **/
143
+ userFeeSlow: CurrencyAmount;
144
+ /** The L1 broadcast fee user pays for the coop exit when exit speed is fast. **/
145
+ l1BroadcastFeeFast: CurrencyAmount;
146
+ /** The L1 broadcast fee user pays for the coop exit when exit speed is medium. **/
147
+ l1BroadcastFeeMedium: CurrencyAmount;
148
+ /** The L1 broadcast fee user pays for the coop exit when exit speed is slow. **/
149
+ l1BroadcastFeeSlow: CurrencyAmount;
150
+ /** The time when the coop exit fee quote expires. **/
151
+ expiresAt: string;
152
+ /** The typename of the object **/
153
+ typename: string;
154
+ }
155
+ declare const getCoopExitFeeQuoteQuery: (id: string) => Query<CoopExitFeeQuote>;
156
+
157
+ interface CoopExitFeeQuoteInput {
158
+ leafExternalIds: string[];
159
+ withdrawalAddress: string;
160
+ }
161
+
162
+ interface CoopExitFeeQuoteOutput {
163
+ quoteId: string;
164
+ }
165
+
122
166
  /** This interface is used by all the entities in the Lightspark system. It defines a few core fields that are available everywhere. Any object that implements this interface can be queried using the `entity` query and its ID. **/
123
167
  interface Entity {
124
168
  /**
@@ -191,7 +235,8 @@ declare enum SparkUserRequestType {
191
235
  LIGHTNING_SEND = "LIGHTNING_SEND",
192
236
  LIGHTNING_RECEIVE = "LIGHTNING_RECEIVE",
193
237
  COOP_EXIT = "COOP_EXIT",
194
- LEAVES_SWAP = "LEAVES_SWAP"
238
+ LEAVES_SWAP = "LEAVES_SWAP",
239
+ CLAIM_STATIC_DEPOSIT = "CLAIM_STATIC_DEPOSIT"
195
240
  }
196
241
 
197
242
  interface UserRequest {
@@ -283,4 +328,4 @@ interface WalletUserIdentityPublicKeyOutput {
283
328
  identityPublicKey: string;
284
329
  }
285
330
 
286
- export { BitcoinNetwork, type ClaimStaticDeposit, type ClaimStaticDepositInput, ClaimStaticDepositRequestType, ClaimStaticDepositStatus, type CompleteCoopExitOutput, type CompleteLeavesSwapOutput, type CompleteSeedReleaseInput, type CompleteSeedReleaseOutput, type Connection, CurrencyAmount, type Entity, type GetChallengeInput, type LeavesSwapFeeEstimateInput, type NotifyReceiverTransferInput, PageInfo, type Provider, type RequestCoopExitOutput, type RequestLeavesSwapOutput, type RequestLightningReceiveOutput, type RequestLightningSendOutput, SparkUserRequestStatus, SparkUserRequestType, SparkWalletUser, type SparkWalletUserToUserRequestsConnection, type StartSeedReleaseInput, type UserRequest, type VerifyChallengeInput, type WalletUserIdentityPublicKeyInput, type WalletUserIdentityPublicKeyOutput, getClaimStaticDepositQuery, getUserRequestQuery };
331
+ export { BitcoinNetwork, type ClaimStaticDeposit, type ClaimStaticDepositInput, ClaimStaticDepositRequestType, ClaimStaticDepositStatus, type CompleteCoopExitOutput, type CompleteLeavesSwapOutput, type CompleteSeedReleaseInput, type CompleteSeedReleaseOutput, type Connection, type CoopExitFeeQuote, type CoopExitFeeQuoteInput, type CoopExitFeeQuoteOutput, CurrencyAmount, type Entity, type GetChallengeInput, type LeavesSwapFeeEstimateInput, type NotifyReceiverTransferInput, PageInfo, type Provider, type RequestCoopExitOutput, type RequestLeavesSwapOutput, type RequestLightningReceiveOutput, type RequestLightningSendOutput, SparkUserRequestStatus, SparkUserRequestType, SparkWalletUser, type SparkWalletUserToUserRequestsConnection, type StartSeedReleaseInput, type UserRequest, type VerifyChallengeInput, type WalletUserIdentityPublicKeyInput, type WalletUserIdentityPublicKeyOutput, getClaimStaticDepositQuery, getCoopExitFeeQuoteQuery, getUserRequestQuery };
@@ -12,12 +12,12 @@ import {
12
12
  SparkWalletUser_default,
13
13
  Transfer_default,
14
14
  getClaimStaticDepositQuery,
15
- getCoopExitRequestQuery,
15
+ getCoopExitFeeQuoteQuery,
16
16
  getLeavesSwapRequestQuery,
17
17
  getLightningReceiveRequestQuery,
18
18
  getLightningSendRequestQuery,
19
19
  getUserRequestQuery
20
- } from "../../chunk-6YVPOQ2A.js";
20
+ } from "../../chunk-TOSP3INR.js";
21
21
  import {
22
22
  BitcoinNetwork_default
23
23
  } from "../../chunk-HMLOC6TE.js";
@@ -37,7 +37,7 @@ export {
37
37
  SparkWalletUser_default as SparkWalletUser,
38
38
  Transfer_default as Transfer,
39
39
  getClaimStaticDepositQuery,
40
- getCoopExitRequestQuery,
40
+ getCoopExitFeeQuoteQuery,
41
41
  getLeavesSwapRequestQuery,
42
42
  getLightningReceiveRequestQuery,
43
43
  getLightningSendRequestQuery,
@@ -1,7 +1,7 @@
1
- import { j as LeavesSwapFeeEstimateOutput, z as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, n as LightningReceiveRequest, r as LightningSendRequest, E as ExitSpeed, f as CoopExitRequest, e as CoopExitFeeEstimatesOutput, T as Transfer$1 } from './RequestLightningSendInput-mXUWn_cp.js';
2
- import { L as LightningSendFeeEstimateInput } from './LightningSendFeeEstimateInput-CJvPnCSB.js';
3
- import { h as SigningCommitment, V as VerifiableSecretShare, S as SparkSigner } from './signer-CylxIujU.js';
4
- import { h as RequestedSigningCommitments, U as UserSignedTxSigningJob, b as TreeNode, e as Transfer, L as LeafRefundTxSigningResult, i as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, j as OutputWithPreviousTransactionData, k as TokenTransactionWithStatus } from './spark-DjR1b3TC.js';
1
+ import { j as LeavesSwapFeeEstimateOutput, z as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, n as LightningReceiveRequest, r as LightningSendRequest, E as ExitSpeed, f as CoopExitRequest, e as CoopExitFeeEstimatesOutput, T as Transfer$1 } from './RequestLightningSendInput-D7fZdT4A.js';
2
+ import { L as LightningSendFeeEstimateInput } from './LightningSendFeeEstimateInput-BgOhEAI-.js';
3
+ import { h as SigningCommitment, V as VerifiableSecretShare, S as SparkSigner } from './signer-wqesWifN.js';
4
+ import { h as RequestedSigningCommitments, U as UserSignedTxSigningJob, d as TreeNode, f as Transfer, L as LeafRefundTxSigningResult, i as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, j as OutputWithPreviousTransactionData, k as TokenTransactionWithStatus } from './spark-CDm4gqS6.js';
5
5
  import { WalletConfigService } from './services/config.js';
6
6
  import { ConnectionManager } from './services/connection.js';
7
7
  import { Lrc20ConnectionManager } from './services/lrc-connection.js';
@@ -10,9 +10,9 @@ import { ConfigOptions } from './services/wallet-config.js';
10
10
  import { LRCWallet } from '@buildonspark/lrc20-sdk';
11
11
  import { EventEmitter } from 'eventemitter3';
12
12
  import { SparkAddressFormat } from './address/index.js';
13
- import { a as WalletTransfer, W as WalletLeaf } from './sdk-types-MnQrHolg.js';
13
+ import { a as WalletTransfer, W as WalletLeaf } from './sdk-types-BPoPgzda.js';
14
14
  import './utils/index.js';
15
- import './network-BF2GYPye.js';
15
+ import './network-xkBSpaTn.js';
16
16
 
17
17
  declare class SparkSDKError extends Error {
18
18
  readonly context: Record<string, unknown>;
@@ -240,6 +240,7 @@ type PayLightningInvoiceParams = {
240
240
  invoice: string;
241
241
  maxFeeSats: number;
242
242
  preferSpark?: boolean;
243
+ amountSatsToSend?: number;
243
244
  };
244
245
  type TransferParams = {
245
246
  amountSats: number;
@@ -586,16 +587,17 @@ declare class SparkWallet extends EventEmitter {
586
587
  * @param {Object} params - Parameters for paying the invoice
587
588
  * @param {string} params.invoice - The BOLT11-encoded Lightning invoice to pay
588
589
  * @param {boolean} [params.preferSpark] - Whether to prefer a spark transfer over lightning for the payment
590
+ * @param {number} [params.amountSatsToSend] - The amount in sats to send. This is only valid for 0 amount lightning invoices.
589
591
  * @returns {Promise<LightningSendRequest>} The Lightning payment request details
590
592
  */
591
- payLightningInvoice({ invoice, maxFeeSats, preferSpark, }: PayLightningInvoiceParams): Promise<LightningSendRequest | WalletTransfer>;
593
+ payLightningInvoice({ invoice, maxFeeSats, preferSpark, amountSatsToSend, }: PayLightningInvoiceParams): Promise<LightningSendRequest | WalletTransfer>;
592
594
  /**
593
595
  * Gets fee estimate for sending Lightning payments.
594
596
  *
595
597
  * @param {LightningSendFeeEstimateInput} params - Input parameters for fee estimation
596
598
  * @returns {Promise<number>} Fee estimate for sending Lightning payments
597
599
  */
598
- getLightningSendFeeEstimate({ encodedInvoice, }: LightningSendFeeEstimateInput): Promise<number>;
600
+ getLightningSendFeeEstimate({ encodedInvoice, amountSats, }: LightningSendFeeEstimateInput): Promise<number>;
599
601
  /**
600
602
  * Generates a deposit address for a tree.
601
603
  *
@@ -1,7 +1,7 @@
1
- import { j as LeavesSwapFeeEstimateOutput, z as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, n as LightningReceiveRequest, r as LightningSendRequest, E as ExitSpeed, f as CoopExitRequest, e as CoopExitFeeEstimatesOutput, T as Transfer$1 } from './RequestLightningSendInput-DXcLoiCe.cjs';
2
- import { L as LightningSendFeeEstimateInput } from './LightningSendFeeEstimateInput-CJvPnCSB.cjs';
3
- import { h as SigningCommitment, V as VerifiableSecretShare, S as SparkSigner } from './signer-BhLS7SYR.cjs';
4
- import { h as RequestedSigningCommitments, U as UserSignedTxSigningJob, b as TreeNode, e as Transfer, L as LeafRefundTxSigningResult, i as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, j as OutputWithPreviousTransactionData, k as TokenTransactionWithStatus } from './spark-DjR1b3TC.cjs';
1
+ import { j as LeavesSwapFeeEstimateOutput, z as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, n as LightningReceiveRequest, r as LightningSendRequest, E as ExitSpeed, f as CoopExitRequest, e as CoopExitFeeEstimatesOutput, T as Transfer$1 } from './RequestLightningSendInput-Na1mHdWg.cjs';
2
+ import { L as LightningSendFeeEstimateInput } from './LightningSendFeeEstimateInput-BgOhEAI-.cjs';
3
+ import { h as SigningCommitment, V as VerifiableSecretShare, S as SparkSigner } from './signer-IO3oMRNj.cjs';
4
+ import { h as RequestedSigningCommitments, U as UserSignedTxSigningJob, d as TreeNode, f as Transfer, L as LeafRefundTxSigningResult, i as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, j as OutputWithPreviousTransactionData, k as TokenTransactionWithStatus } from './spark-CDm4gqS6.cjs';
5
5
  import { WalletConfigService } from './services/config.cjs';
6
6
  import { ConnectionManager } from './services/connection.cjs';
7
7
  import { Lrc20ConnectionManager } from './services/lrc-connection.cjs';
@@ -10,9 +10,9 @@ import { ConfigOptions } from './services/wallet-config.cjs';
10
10
  import { LRCWallet } from '@buildonspark/lrc20-sdk';
11
11
  import { EventEmitter } from 'eventemitter3';
12
12
  import { SparkAddressFormat } from './address/index.cjs';
13
- import { a as WalletTransfer, W as WalletLeaf } from './sdk-types-CfhdFnsA.cjs';
13
+ import { a as WalletTransfer, W as WalletLeaf } from './sdk-types-B-q9py_P.cjs';
14
14
  import './utils/index.cjs';
15
- import './network-BiwBmoOg.cjs';
15
+ import './network-D5lKssVl.cjs';
16
16
 
17
17
  declare class SparkSDKError extends Error {
18
18
  readonly context: Record<string, unknown>;
@@ -240,6 +240,7 @@ type PayLightningInvoiceParams = {
240
240
  invoice: string;
241
241
  maxFeeSats: number;
242
242
  preferSpark?: boolean;
243
+ amountSatsToSend?: number;
243
244
  };
244
245
  type TransferParams = {
245
246
  amountSats: number;
@@ -586,16 +587,17 @@ declare class SparkWallet extends EventEmitter {
586
587
  * @param {Object} params - Parameters for paying the invoice
587
588
  * @param {string} params.invoice - The BOLT11-encoded Lightning invoice to pay
588
589
  * @param {boolean} [params.preferSpark] - Whether to prefer a spark transfer over lightning for the payment
590
+ * @param {number} [params.amountSatsToSend] - The amount in sats to send. This is only valid for 0 amount lightning invoices.
589
591
  * @returns {Promise<LightningSendRequest>} The Lightning payment request details
590
592
  */
591
- payLightningInvoice({ invoice, maxFeeSats, preferSpark, }: PayLightningInvoiceParams): Promise<LightningSendRequest | WalletTransfer>;
593
+ payLightningInvoice({ invoice, maxFeeSats, preferSpark, amountSatsToSend, }: PayLightningInvoiceParams): Promise<LightningSendRequest | WalletTransfer>;
592
594
  /**
593
595
  * Gets fee estimate for sending Lightning payments.
594
596
  *
595
597
  * @param {LightningSendFeeEstimateInput} params - Input parameters for fee estimation
596
598
  * @returns {Promise<number>} Fee estimate for sending Lightning payments
597
599
  */
598
- getLightningSendFeeEstimate({ encodedInvoice, }: LightningSendFeeEstimateInput): Promise<number>;
600
+ getLightningSendFeeEstimate({ encodedInvoice, amountSats, }: LightningSendFeeEstimateInput): Promise<number>;
599
601
  /**
600
602
  * Generates a deposit address for a tree.
601
603
  *