@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,7 +1,7 @@
1
1
  import { NetworkType as NetworkType$1 } from '@buildonspark/lrc20-sdk';
2
2
  import * as btc from '@scure/btc-signer';
3
3
  import * as bitcoin from 'bitcoinjs-lib';
4
- import { N as Network$1 } from './spark-DjR1b3TC.cjs';
4
+ import { N as Network$1 } from './spark-CDm4gqS6.cjs';
5
5
  import { B as BitcoinNetwork } from './BitcoinNetwork-TnABML0T.cjs';
6
6
 
7
7
  declare enum Network {
@@ -1,7 +1,7 @@
1
1
  import { NetworkType as NetworkType$1 } from '@buildonspark/lrc20-sdk';
2
2
  import * as btc from '@scure/btc-signer';
3
3
  import * as bitcoin from 'bitcoinjs-lib';
4
- import { N as Network$1 } from './spark-DjR1b3TC.js';
4
+ import { N as Network$1 } from './spark-CDm4gqS6.js';
5
5
  import { B as BitcoinNetwork } from './BitcoinNetwork-TnABML0T.js';
6
6
 
7
7
  declare enum Network {
@@ -1,4 +1,4 @@
1
- import { f as TokenTransaction, O as OperatorSpecificOwnerSignature, R as RevocationSecretWithIndex, E as Empty, M as MessageFns$1 } from '../spark-DjR1b3TC.cjs';
1
+ import { T as TokenTransaction, O as OperatorSpecificOwnerSignature, R as RevocationSecretWithIndex, E as Empty, M as MessageFns$1 } from '../spark-CDm4gqS6.cjs';
2
2
  import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
3
3
  import { CallOptions, CallContext } from 'nice-grpc-common';
4
4
 
@@ -1,4 +1,4 @@
1
- import { f as TokenTransaction, O as OperatorSpecificOwnerSignature, R as RevocationSecretWithIndex, E as Empty, M as MessageFns$1 } from '../spark-DjR1b3TC.js';
1
+ import { T as TokenTransaction, O as OperatorSpecificOwnerSignature, R as RevocationSecretWithIndex, E as Empty, M as MessageFns$1 } from '../spark-CDm4gqS6.js';
2
2
  import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
3
3
  import { CallOptions, CallContext } from 'nice-grpc-common';
4
4
 
@@ -1,3 +1,3 @@
1
- export { K as Address, bd as AddressNode, bb as AddressRequestNode, aM as AggregateNodesRequest, aN as AggregateNodesResponse, bK as BitcoinTransactionOutput, bv as CancelTransferRequest, bw as CancelTransferResponse, aH as ClaimLeafKeyTweak, aI as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aK as ClaimTransferSignRefundsRequest, aL as ClaimTransferSignRefundsResponse, aJ as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b1 as CooperativeExitRequest, b2 as CooperativeExitResponse, b3 as CounterLeafSwapRequest, b4 as CounterLeafSwapResponse, bg as CreateTreeRequest, bi as CreateTreeResponse, bf as CreationNode, bh as CreationResponseNode, bW as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, bz as DepositAddressQueryResult, G as DepositEvent, bJ as ExitSingleNodeTreeSigningResult, bL as ExitSingleNodeTreesRequest, bM as ExitSingleNodeTreesResponse, bI as ExitingTree, b8 as ExtendLeafRequest, ba as ExtendLeafResponse, b9 as ExtendLeafSigningResult, as as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, ak as FinalizeTokenTransactionRequest, aD as FinalizeTransferRequest, aF as FinalizeTransferResponse, aE as FinalizeTransferWithTransferPackageRequest, al as FreezeTokensPayload, am as FreezeTokensRequest, an as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aQ as GetSigningCommitmentsRequest, aR as GetSigningCommitmentsResponse, bk as GetSigningOperatorListResponse, bl as GetSigningOperatorListResponse_SigningOperatorsEntry, aX as InitiatePreimageSwapRequest, aY as InitiatePreimageSwapRequest_Reason, a$ as InitiatePreimageSwapResponse, bG as InitiateUtxoSwapRequest, bH as InitiateUtxoSwapResponse, bN as InvestigateLeavesRequest, aW as InvoiceAmount, aV as InvoiceAmountProof, ai as KeyshareWithIndex, av as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, bY as MessageFns, N as Network, X as NodeOutput, a1 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ag as OperatorSpecificTokenTransactionSignablePayload, b0 as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bc as PrepareTreeAddressRequest, be as PrepareTreeAddressResponse, bo as ProvidePreimageRequest, bp as ProvidePreimageResponse, bC as QueryBalanceRequest, bD as QueryBalanceResponse, bE as QueryBalanceResponse_NodeBalancesEntry, bR as QueryNodesByValueRequest, bS as QueryNodesByValueResponse, bT as QueryNodesByValueResponse_NodesEntry, bO as QueryNodesDistributionRequest, bP as QueryNodesDistributionResponse, bQ as QueryNodesDistributionResponse_NodeDistributionEntry, bs as QueryNodesRequest, bt as QueryNodesResponse, bu as QueryNodesResponse_NodesEntry, by as QueryStaticDepositAddressesRequest, bB as QueryStaticDepositAddressesResponse, ao as QueryTokenOutputsRequest, ar as QueryTokenOutputsResponse, ap as QueryTokenTransactionsRequest, aq as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bx as QueryUnusedDepositAddressesRequest, bA as QueryUnusedDepositAddressesResponse, bm as QueryUserSignedRefundsRequest, bn as QueryUserSignedRefundsResponse, b5 as RefreshTimelockRequest, b7 as RefreshTimelockResponse, b6 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aP as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bq as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, au as SecretProof, at as SecretShare, aB as SendLeafKeyTweak, aC as SendLeafKeyTweak_PubkeySharesTweakEntry, aA as SendLeafKeyTweaks, bX as ServerStreamingMethodResult, ah as SignTokenTransactionRequest, aj as SignTokenTransactionResponse, ac as SignatureWithIndex, aS as SigningCommitments, aT as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, bj as SigningOperatorInfo, Z as SigningResult, _ as SigningResult_PublicKeysEntry, a0 as SigningResult_SignatureSharesEntry, $ as SigningResult_SigningNonceCommitmentsEntry, bF as SparkAddress, g as SparkServiceClient, bU as SparkServiceDefinition, bV as SparkServiceImplementation, aa as SpentTokenOutputMetadata, a4 as StartDepositTreeCreationRequest, a5 as StartDepositTreeCreationResponse, ae as StartTokenTransactionRequest, af as StartTokenTransactionResponse, ax as StartTransferRequest, ay as StartTransferResponse, a2 as StartTreeCreationRequest, a3 as StartTreeCreationResponse, aw as StartUserSignedTransferRequest, aO as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, a8 as TokenMintInput, a9 as TokenOutput, a6 as TokenOutputToSpend, f as TokenTransaction, ab as TokenTransactionConfirmationMetadata, ad as TokenTransactionSignatures, o as TokenTransactionStatus, k as TokenTransactionWithStatus, a7 as TokenTransferInput, e as Transfer, D as TransferEvent, aG as TransferFilter, d as TransferLeaf, l as TransferPackage, az as TransferPackage_KeyTweakPackageEntry, T as TransferStatus, a as TransferType, b as TreeNode, br as TreeNodeIds, W as UTXO, aU as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aZ as initiatePreimageSwapRequest_ReasonFromJSON, a_ as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, m as networkToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, q as tokenTransactionStatusToJSON, r as transferStatusFromJSON, u as transferStatusToJSON, v as transferTypeFromJSON, w as transferTypeToJSON, y as utxoSwapRequestTypeFromJSON, z as utxoSwapRequestTypeToJSON } from '../spark-DjR1b3TC.cjs';
1
+ export { K as Address, bd as AddressNode, bb as AddressRequestNode, aM as AggregateNodesRequest, aN as AggregateNodesResponse, bK as BitcoinTransactionOutput, bv as CancelTransferRequest, bw as CancelTransferResponse, aH as ClaimLeafKeyTweak, aI as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aK as ClaimTransferSignRefundsRequest, aL as ClaimTransferSignRefundsResponse, aJ as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b1 as CooperativeExitRequest, b2 as CooperativeExitResponse, b3 as CounterLeafSwapRequest, b4 as CounterLeafSwapResponse, bg as CreateTreeRequest, bi as CreateTreeResponse, bf as CreationNode, bh as CreationResponseNode, bW as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, bz as DepositAddressQueryResult, G as DepositEvent, bJ as ExitSingleNodeTreeSigningResult, bL as ExitSingleNodeTreesRequest, bM as ExitSingleNodeTreesResponse, bI as ExitingTree, b8 as ExtendLeafRequest, ba as ExtendLeafResponse, b9 as ExtendLeafSigningResult, as as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, ak as FinalizeTokenTransactionRequest, aD as FinalizeTransferRequest, aF as FinalizeTransferResponse, aE as FinalizeTransferWithTransferPackageRequest, al as FreezeTokensPayload, am as FreezeTokensRequest, an as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aQ as GetSigningCommitmentsRequest, aR as GetSigningCommitmentsResponse, bk as GetSigningOperatorListResponse, bl as GetSigningOperatorListResponse_SigningOperatorsEntry, aX as InitiatePreimageSwapRequest, aY as InitiatePreimageSwapRequest_Reason, a$ as InitiatePreimageSwapResponse, bG as InitiateUtxoSwapRequest, bH as InitiateUtxoSwapResponse, bN as InvestigateLeavesRequest, aW as InvoiceAmount, aV as InvoiceAmountProof, ai as KeyshareWithIndex, av as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, bY as MessageFns, N as Network, X as NodeOutput, a1 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ag as OperatorSpecificTokenTransactionSignablePayload, b0 as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bc as PrepareTreeAddressRequest, be as PrepareTreeAddressResponse, bo as ProvidePreimageRequest, bp as ProvidePreimageResponse, bC as QueryBalanceRequest, bD as QueryBalanceResponse, bE as QueryBalanceResponse_NodeBalancesEntry, bR as QueryNodesByValueRequest, bS as QueryNodesByValueResponse, bT as QueryNodesByValueResponse_NodesEntry, bO as QueryNodesDistributionRequest, bP as QueryNodesDistributionResponse, bQ as QueryNodesDistributionResponse_NodeDistributionEntry, bs as QueryNodesRequest, bt as QueryNodesResponse, bu as QueryNodesResponse_NodesEntry, by as QueryStaticDepositAddressesRequest, bB as QueryStaticDepositAddressesResponse, ao as QueryTokenOutputsRequest, ar as QueryTokenOutputsResponse, ap as QueryTokenTransactionsRequest, aq as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bx as QueryUnusedDepositAddressesRequest, bA as QueryUnusedDepositAddressesResponse, bm as QueryUserSignedRefundsRequest, bn as QueryUserSignedRefundsResponse, b5 as RefreshTimelockRequest, b7 as RefreshTimelockResponse, b6 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aP as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bq as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, au as SecretProof, at as SecretShare, aB as SendLeafKeyTweak, aC as SendLeafKeyTweak_PubkeySharesTweakEntry, aA as SendLeafKeyTweaks, bX as ServerStreamingMethodResult, ah as SignTokenTransactionRequest, aj as SignTokenTransactionResponse, ac as SignatureWithIndex, aS as SigningCommitments, aT as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, bj as SigningOperatorInfo, Z as SigningResult, _ as SigningResult_PublicKeysEntry, a0 as SigningResult_SignatureSharesEntry, $ as SigningResult_SigningNonceCommitmentsEntry, bF as SparkAddress, g as SparkServiceClient, bU as SparkServiceDefinition, bV as SparkServiceImplementation, aa as SpentTokenOutputMetadata, a4 as StartDepositTreeCreationRequest, a5 as StartDepositTreeCreationResponse, ae as StartTokenTransactionRequest, af as StartTokenTransactionResponse, ax as StartTransferRequest, ay as StartTransferResponse, a2 as StartTreeCreationRequest, a3 as StartTreeCreationResponse, aw as StartUserSignedTransferRequest, aO as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, a8 as TokenMintInput, a9 as TokenOutput, a6 as TokenOutputToSpend, T as TokenTransaction, ab as TokenTransactionConfirmationMetadata, ad as TokenTransactionSignatures, o as TokenTransactionStatus, k as TokenTransactionWithStatus, a7 as TokenTransferInput, f as Transfer, D as TransferEvent, aG as TransferFilter, e as TransferLeaf, l as TransferPackage, az as TransferPackage_KeyTweakPackageEntry, a as TransferStatus, b as TransferType, d as TreeNode, br as TreeNodeIds, W as UTXO, aU as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aZ as initiatePreimageSwapRequest_ReasonFromJSON, a_ as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, m as networkToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, q as tokenTransactionStatusToJSON, r as transferStatusFromJSON, u as transferStatusToJSON, v as transferTypeFromJSON, w as transferTypeToJSON, y as utxoSwapRequestTypeFromJSON, z as utxoSwapRequestTypeToJSON } from '../spark-CDm4gqS6.cjs';
2
2
  import '@bufbuild/protobuf/wire';
3
3
  import 'nice-grpc-common';
@@ -1,3 +1,3 @@
1
- export { K as Address, bd as AddressNode, bb as AddressRequestNode, aM as AggregateNodesRequest, aN as AggregateNodesResponse, bK as BitcoinTransactionOutput, bv as CancelTransferRequest, bw as CancelTransferResponse, aH as ClaimLeafKeyTweak, aI as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aK as ClaimTransferSignRefundsRequest, aL as ClaimTransferSignRefundsResponse, aJ as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b1 as CooperativeExitRequest, b2 as CooperativeExitResponse, b3 as CounterLeafSwapRequest, b4 as CounterLeafSwapResponse, bg as CreateTreeRequest, bi as CreateTreeResponse, bf as CreationNode, bh as CreationResponseNode, bW as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, bz as DepositAddressQueryResult, G as DepositEvent, bJ as ExitSingleNodeTreeSigningResult, bL as ExitSingleNodeTreesRequest, bM as ExitSingleNodeTreesResponse, bI as ExitingTree, b8 as ExtendLeafRequest, ba as ExtendLeafResponse, b9 as ExtendLeafSigningResult, as as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, ak as FinalizeTokenTransactionRequest, aD as FinalizeTransferRequest, aF as FinalizeTransferResponse, aE as FinalizeTransferWithTransferPackageRequest, al as FreezeTokensPayload, am as FreezeTokensRequest, an as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aQ as GetSigningCommitmentsRequest, aR as GetSigningCommitmentsResponse, bk as GetSigningOperatorListResponse, bl as GetSigningOperatorListResponse_SigningOperatorsEntry, aX as InitiatePreimageSwapRequest, aY as InitiatePreimageSwapRequest_Reason, a$ as InitiatePreimageSwapResponse, bG as InitiateUtxoSwapRequest, bH as InitiateUtxoSwapResponse, bN as InvestigateLeavesRequest, aW as InvoiceAmount, aV as InvoiceAmountProof, ai as KeyshareWithIndex, av as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, bY as MessageFns, N as Network, X as NodeOutput, a1 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ag as OperatorSpecificTokenTransactionSignablePayload, b0 as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bc as PrepareTreeAddressRequest, be as PrepareTreeAddressResponse, bo as ProvidePreimageRequest, bp as ProvidePreimageResponse, bC as QueryBalanceRequest, bD as QueryBalanceResponse, bE as QueryBalanceResponse_NodeBalancesEntry, bR as QueryNodesByValueRequest, bS as QueryNodesByValueResponse, bT as QueryNodesByValueResponse_NodesEntry, bO as QueryNodesDistributionRequest, bP as QueryNodesDistributionResponse, bQ as QueryNodesDistributionResponse_NodeDistributionEntry, bs as QueryNodesRequest, bt as QueryNodesResponse, bu as QueryNodesResponse_NodesEntry, by as QueryStaticDepositAddressesRequest, bB as QueryStaticDepositAddressesResponse, ao as QueryTokenOutputsRequest, ar as QueryTokenOutputsResponse, ap as QueryTokenTransactionsRequest, aq as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bx as QueryUnusedDepositAddressesRequest, bA as QueryUnusedDepositAddressesResponse, bm as QueryUserSignedRefundsRequest, bn as QueryUserSignedRefundsResponse, b5 as RefreshTimelockRequest, b7 as RefreshTimelockResponse, b6 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aP as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bq as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, au as SecretProof, at as SecretShare, aB as SendLeafKeyTweak, aC as SendLeafKeyTweak_PubkeySharesTweakEntry, aA as SendLeafKeyTweaks, bX as ServerStreamingMethodResult, ah as SignTokenTransactionRequest, aj as SignTokenTransactionResponse, ac as SignatureWithIndex, aS as SigningCommitments, aT as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, bj as SigningOperatorInfo, Z as SigningResult, _ as SigningResult_PublicKeysEntry, a0 as SigningResult_SignatureSharesEntry, $ as SigningResult_SigningNonceCommitmentsEntry, bF as SparkAddress, g as SparkServiceClient, bU as SparkServiceDefinition, bV as SparkServiceImplementation, aa as SpentTokenOutputMetadata, a4 as StartDepositTreeCreationRequest, a5 as StartDepositTreeCreationResponse, ae as StartTokenTransactionRequest, af as StartTokenTransactionResponse, ax as StartTransferRequest, ay as StartTransferResponse, a2 as StartTreeCreationRequest, a3 as StartTreeCreationResponse, aw as StartUserSignedTransferRequest, aO as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, a8 as TokenMintInput, a9 as TokenOutput, a6 as TokenOutputToSpend, f as TokenTransaction, ab as TokenTransactionConfirmationMetadata, ad as TokenTransactionSignatures, o as TokenTransactionStatus, k as TokenTransactionWithStatus, a7 as TokenTransferInput, e as Transfer, D as TransferEvent, aG as TransferFilter, d as TransferLeaf, l as TransferPackage, az as TransferPackage_KeyTweakPackageEntry, T as TransferStatus, a as TransferType, b as TreeNode, br as TreeNodeIds, W as UTXO, aU as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aZ as initiatePreimageSwapRequest_ReasonFromJSON, a_ as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, m as networkToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, q as tokenTransactionStatusToJSON, r as transferStatusFromJSON, u as transferStatusToJSON, v as transferTypeFromJSON, w as transferTypeToJSON, y as utxoSwapRequestTypeFromJSON, z as utxoSwapRequestTypeToJSON } from '../spark-DjR1b3TC.js';
1
+ export { K as Address, bd as AddressNode, bb as AddressRequestNode, aM as AggregateNodesRequest, aN as AggregateNodesResponse, bK as BitcoinTransactionOutput, bv as CancelTransferRequest, bw as CancelTransferResponse, aH as ClaimLeafKeyTweak, aI as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aK as ClaimTransferSignRefundsRequest, aL as ClaimTransferSignRefundsResponse, aJ as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b1 as CooperativeExitRequest, b2 as CooperativeExitResponse, b3 as CounterLeafSwapRequest, b4 as CounterLeafSwapResponse, bg as CreateTreeRequest, bi as CreateTreeResponse, bf as CreationNode, bh as CreationResponseNode, bW as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, bz as DepositAddressQueryResult, G as DepositEvent, bJ as ExitSingleNodeTreeSigningResult, bL as ExitSingleNodeTreesRequest, bM as ExitSingleNodeTreesResponse, bI as ExitingTree, b8 as ExtendLeafRequest, ba as ExtendLeafResponse, b9 as ExtendLeafSigningResult, as as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, ak as FinalizeTokenTransactionRequest, aD as FinalizeTransferRequest, aF as FinalizeTransferResponse, aE as FinalizeTransferWithTransferPackageRequest, al as FreezeTokensPayload, am as FreezeTokensRequest, an as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aQ as GetSigningCommitmentsRequest, aR as GetSigningCommitmentsResponse, bk as GetSigningOperatorListResponse, bl as GetSigningOperatorListResponse_SigningOperatorsEntry, aX as InitiatePreimageSwapRequest, aY as InitiatePreimageSwapRequest_Reason, a$ as InitiatePreimageSwapResponse, bG as InitiateUtxoSwapRequest, bH as InitiateUtxoSwapResponse, bN as InvestigateLeavesRequest, aW as InvoiceAmount, aV as InvoiceAmountProof, ai as KeyshareWithIndex, av as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, bY as MessageFns, N as Network, X as NodeOutput, a1 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ag as OperatorSpecificTokenTransactionSignablePayload, b0 as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bc as PrepareTreeAddressRequest, be as PrepareTreeAddressResponse, bo as ProvidePreimageRequest, bp as ProvidePreimageResponse, bC as QueryBalanceRequest, bD as QueryBalanceResponse, bE as QueryBalanceResponse_NodeBalancesEntry, bR as QueryNodesByValueRequest, bS as QueryNodesByValueResponse, bT as QueryNodesByValueResponse_NodesEntry, bO as QueryNodesDistributionRequest, bP as QueryNodesDistributionResponse, bQ as QueryNodesDistributionResponse_NodeDistributionEntry, bs as QueryNodesRequest, bt as QueryNodesResponse, bu as QueryNodesResponse_NodesEntry, by as QueryStaticDepositAddressesRequest, bB as QueryStaticDepositAddressesResponse, ao as QueryTokenOutputsRequest, ar as QueryTokenOutputsResponse, ap as QueryTokenTransactionsRequest, aq as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bx as QueryUnusedDepositAddressesRequest, bA as QueryUnusedDepositAddressesResponse, bm as QueryUserSignedRefundsRequest, bn as QueryUserSignedRefundsResponse, b5 as RefreshTimelockRequest, b7 as RefreshTimelockResponse, b6 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aP as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bq as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, au as SecretProof, at as SecretShare, aB as SendLeafKeyTweak, aC as SendLeafKeyTweak_PubkeySharesTweakEntry, aA as SendLeafKeyTweaks, bX as ServerStreamingMethodResult, ah as SignTokenTransactionRequest, aj as SignTokenTransactionResponse, ac as SignatureWithIndex, aS as SigningCommitments, aT as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, bj as SigningOperatorInfo, Z as SigningResult, _ as SigningResult_PublicKeysEntry, a0 as SigningResult_SignatureSharesEntry, $ as SigningResult_SigningNonceCommitmentsEntry, bF as SparkAddress, g as SparkServiceClient, bU as SparkServiceDefinition, bV as SparkServiceImplementation, aa as SpentTokenOutputMetadata, a4 as StartDepositTreeCreationRequest, a5 as StartDepositTreeCreationResponse, ae as StartTokenTransactionRequest, af as StartTokenTransactionResponse, ax as StartTransferRequest, ay as StartTransferResponse, a2 as StartTreeCreationRequest, a3 as StartTreeCreationResponse, aw as StartUserSignedTransferRequest, aO as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, a8 as TokenMintInput, a9 as TokenOutput, a6 as TokenOutputToSpend, T as TokenTransaction, ab as TokenTransactionConfirmationMetadata, ad as TokenTransactionSignatures, o as TokenTransactionStatus, k as TokenTransactionWithStatus, a7 as TokenTransferInput, f as Transfer, D as TransferEvent, aG as TransferFilter, e as TransferLeaf, l as TransferPackage, az as TransferPackage_KeyTweakPackageEntry, a as TransferStatus, b as TransferType, d as TreeNode, br as TreeNodeIds, W as UTXO, aU as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aZ as initiatePreimageSwapRequest_ReasonFromJSON, a_ as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, m as networkToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, q as tokenTransactionStatusToJSON, r as transferStatusFromJSON, u as transferStatusToJSON, v as transferTypeFromJSON, w as transferTypeToJSON, y as utxoSwapRequestTypeFromJSON, z as utxoSwapRequestTypeToJSON } from '../spark-CDm4gqS6.js';
2
2
  import '@bufbuild/protobuf/wire';
3
3
  import 'nice-grpc-common';
@@ -1,6 +1,6 @@
1
1
  import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
2
  import { CallOptions, CallContext } from 'nice-grpc-common';
3
- import { N as Network, S as SigningKeyshare } from '../spark-DjR1b3TC.cjs';
3
+ import { N as Network, S as SigningKeyshare } from '../spark-CDm4gqS6.cjs';
4
4
 
5
5
  declare const protobufPackage = "spark_token";
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
2
  import { CallOptions, CallContext } from 'nice-grpc-common';
3
- import { N as Network, S as SigningKeyshare } from '../spark-DjR1b3TC.js';
3
+ import { N as Network, S as SigningKeyshare } from '../spark-CDm4gqS6.js';
4
4
 
5
5
  declare const protobufPackage = "spark_token";
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { T as TransferStatus, S as SigningKeyshare, N as Network, a as TransferType, b as TreeNode, d as TransferLeaf, e as Transfer } from './spark-DjR1b3TC.cjs';
1
+ import { a as TransferStatus, S as SigningKeyshare, N as Network, b as TransferType, d as TreeNode, e as TransferLeaf, f as Transfer } from './spark-CDm4gqS6.cjs';
2
2
 
3
3
  interface WalletLeaf {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { T as TransferStatus, S as SigningKeyshare, N as Network, a as TransferType, b as TreeNode, d as TransferLeaf, e as Transfer } from './spark-DjR1b3TC.js';
1
+ import { a as TransferStatus, S as SigningKeyshare, N as Network, b as TransferType, d as TreeNode, e as TransferLeaf, f as Transfer } from './spark-CDm4gqS6.js';
2
2
 
3
3
  interface WalletLeaf {
4
4
  id: string;
@@ -1123,7 +1123,7 @@ init_buffer();
1123
1123
 
1124
1124
  // src/signer/signer.ts
1125
1125
  init_buffer();
1126
- var import_utils4 = require("@noble/curves/abstract/utils");
1126
+ var import_utils5 = require("@noble/curves/abstract/utils");
1127
1127
  var import_secp256k15 = require("@noble/curves/secp256k1");
1128
1128
  var import_bip32 = require("@scure/bip32");
1129
1129
  var import_bip39 = require("@scure/bip39");
@@ -1132,14 +1132,27 @@ var ecies = __toESM(require("eciesjs"), 1);
1132
1132
 
1133
1133
  // src/constants.ts
1134
1134
  init_buffer();
1135
+ var import_core = require("@lightsparkdev/core");
1135
1136
  var isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative";
1136
1137
  var isBun = globalThis.Bun !== void 0;
1138
+ var packageVersion = true ? "0.1.43" : "unknown";
1139
+ var baseEnvStr = "unknown";
1140
+ if (import_core.isNode) {
1141
+ baseEnvStr = `node/${process.version}`;
1142
+ } else if (isReactNative) {
1143
+ baseEnvStr = "react-native";
1144
+ } else {
1145
+ const userAgent = typeof navigator !== "undefined" && navigator.userAgent || "unknown-user-agent";
1146
+ baseEnvStr = `browser/${userAgent}`;
1147
+ }
1148
+ var clientEnv = `js-spark-sdk/${packageVersion} ${baseEnvStr}`;
1137
1149
 
1138
1150
  // src/errors/types.ts
1139
1151
  init_buffer();
1140
1152
 
1141
1153
  // src/errors/base.ts
1142
1154
  init_buffer();
1155
+ var import_utils = require("@noble/hashes/utils");
1143
1156
  var SparkSDKError = class extends Error {
1144
1157
  context;
1145
1158
  originalError;
@@ -1171,12 +1184,42 @@ var SparkSDKError = class extends Error {
1171
1184
  }
1172
1185
  };
1173
1186
  function getMessage(message, context = {}, originalError) {
1174
- const contextStr = Object.entries(context).map(([key, value]) => `${key}: ${JSON.stringify(value)}`).join(", ");
1187
+ const contextStr = Object.entries(context).map(([key, value]) => `${key}: ${safeStringify(value)}`).join(", ");
1175
1188
  const originalErrorStr = originalError ? `
1176
1189
  Original Error: ${originalError.message}` : "";
1177
1190
  return `SparkSDKError: ${message}${contextStr ? `
1178
1191
  Context: ${contextStr}` : ""}${originalErrorStr}`;
1179
1192
  }
1193
+ function safeStringify(value) {
1194
+ const replacer = (_, v) => {
1195
+ if (typeof v === "bigint") {
1196
+ return v.toString();
1197
+ }
1198
+ if (v instanceof Uint8Array) {
1199
+ return formatUint8Array(v);
1200
+ }
1201
+ return v;
1202
+ };
1203
+ if (typeof value === "bigint") {
1204
+ return `"${value.toString()}"`;
1205
+ }
1206
+ if (value instanceof Uint8Array) {
1207
+ return `"${formatUint8Array(value)}"`;
1208
+ }
1209
+ try {
1210
+ const result = JSON.stringify(value, replacer);
1211
+ return result === void 0 ? String(value) : result;
1212
+ } catch {
1213
+ try {
1214
+ return String(value);
1215
+ } catch {
1216
+ return "[Unserializable]";
1217
+ }
1218
+ }
1219
+ }
1220
+ function formatUint8Array(arr) {
1221
+ return `Uint8Array(0x${(0, import_utils.bytesToHex)(arr)})`;
1222
+ }
1180
1223
 
1181
1224
  // src/errors/types.ts
1182
1225
  var ValidationError = class extends SparkSDKError {
@@ -1193,7 +1236,7 @@ var ConfigurationError = class extends SparkSDKError {
1193
1236
  // src/utils/adaptor-signature.ts
1194
1237
  init_buffer();
1195
1238
  var import_modular = require("@noble/curves/abstract/modular");
1196
- var import_utils = require("@noble/curves/abstract/utils");
1239
+ var import_utils2 = require("@noble/curves/abstract/utils");
1197
1240
  var import_secp256k1 = require("@noble/curves/secp256k1");
1198
1241
 
1199
1242
  // src/errors/index.ts
@@ -1203,10 +1246,10 @@ init_buffer();
1203
1246
  function generateAdaptorFromSignature(signature) {
1204
1247
  const adaptorPrivateKey = import_secp256k1.secp256k1.utils.randomPrivateKey();
1205
1248
  const { r, s } = parseSignature(signature);
1206
- const sBigInt = (0, import_utils.bytesToNumberBE)(s);
1207
- const tBigInt = (0, import_utils.bytesToNumberBE)(adaptorPrivateKey);
1249
+ const sBigInt = (0, import_utils2.bytesToNumberBE)(s);
1250
+ const tBigInt = (0, import_utils2.bytesToNumberBE)(adaptorPrivateKey);
1208
1251
  const newS = (0, import_modular.mod)(sBigInt - tBigInt, import_secp256k1.secp256k1.CURVE.n);
1209
- const newSignature = new Uint8Array([...r, ...(0, import_utils.numberToBytesBE)(newS, 32)]);
1252
+ const newSignature = new Uint8Array([...r, ...(0, import_utils2.numberToBytesBE)(newS, 32)]);
1210
1253
  return {
1211
1254
  adaptorSignature: newSignature,
1212
1255
  adaptorPrivateKey
@@ -1227,15 +1270,15 @@ function parseSignature(signature) {
1227
1270
  }
1228
1271
  const r = signature.slice(0, 32);
1229
1272
  const s = signature.slice(32, 64);
1230
- if ((0, import_utils.bytesToNumberBE)(r) >= import_secp256k1.secp256k1.CURVE.Fp.ORDER) {
1273
+ if ((0, import_utils2.bytesToNumberBE)(r) >= import_secp256k1.secp256k1.CURVE.Fp.ORDER) {
1231
1274
  throw new ValidationError("Invalid signature: r >= field prime", {
1232
- rValue: (0, import_utils.bytesToNumberBE)(r),
1275
+ rValue: (0, import_utils2.bytesToNumberBE)(r),
1233
1276
  fieldPrime: import_secp256k1.secp256k1.CURVE.Fp.ORDER
1234
1277
  });
1235
1278
  }
1236
- if ((0, import_utils.bytesToNumberBE)(s) >= import_secp256k1.secp256k1.CURVE.n) {
1279
+ if ((0, import_utils2.bytesToNumberBE)(s) >= import_secp256k1.secp256k1.CURVE.n) {
1237
1280
  throw new ValidationError("Invalid signature: s >= group order", {
1238
- sValue: (0, import_utils.bytesToNumberBE)(s),
1281
+ sValue: (0, import_utils2.bytesToNumberBE)(s),
1239
1282
  groupOrder: import_secp256k1.secp256k1.CURVE.n
1240
1283
  });
1241
1284
  }
@@ -1244,7 +1287,7 @@ function parseSignature(signature) {
1244
1287
 
1245
1288
  // src/utils/keys.ts
1246
1289
  init_buffer();
1247
- var import_utils2 = require("@noble/curves/abstract/utils");
1290
+ var import_utils3 = require("@noble/curves/abstract/utils");
1248
1291
  var import_secp256k12 = require("@noble/curves/secp256k1");
1249
1292
  function subtractPrivateKeys(a, b) {
1250
1293
  if (a.length !== 32 || b.length !== 32) {
@@ -1257,12 +1300,12 @@ function subtractPrivateKeys(a, b) {
1257
1300
  const privA = import_secp256k12.secp256k1.utils.normPrivateKeyToScalar(a);
1258
1301
  const privB = import_secp256k12.secp256k1.utils.normPrivateKeyToScalar(b);
1259
1302
  const sum = (import_secp256k12.secp256k1.CURVE.n - privB + privA) % import_secp256k12.secp256k1.CURVE.n;
1260
- return (0, import_utils2.numberToBytesBE)(sum, 32);
1303
+ return (0, import_utils3.numberToBytesBE)(sum, 32);
1261
1304
  }
1262
1305
 
1263
1306
  // src/utils/secret-sharing.ts
1264
1307
  init_buffer();
1265
- var import_utils3 = require("@noble/curves/abstract/utils");
1308
+ var import_utils4 = require("@noble/curves/abstract/utils");
1266
1309
  var import_secp256k13 = require("@noble/curves/secp256k1");
1267
1310
 
1268
1311
  // src/utils/crypto.ts
@@ -1281,7 +1324,7 @@ function getRandomBigInt(max) {
1281
1324
  const mask = (1n << BigInt(max.toString(2).length)) - 1n;
1282
1325
  while (true) {
1283
1326
  const randBytes = crypto.getRandomValues(new Uint8Array(byteLength + 1));
1284
- const randValue = BigInt("0x" + (0, import_utils3.bytesToHex)(randBytes)) & mask;
1327
+ const randValue = BigInt("0x" + (0, import_utils4.bytesToHex)(randBytes)) & mask;
1285
1328
  if (randValue < maxBigInt) {
1286
1329
  return randValue;
1287
1330
  }
@@ -1373,7 +1416,9 @@ function getSigningCommitmentFromNonce(nonce) {
1373
1416
  var import_secp256k16 = require("@bitcoinerlab/secp256k1");
1374
1417
  var import_lrc20_sdk = require("@buildonspark/lrc20-sdk");
1375
1418
  var import_sha2 = require("@noble/hashes/sha2");
1376
- var import_utils5 = require("@scure/btc-signer/utils");
1419
+ var import_utils6 = require("@scure/btc-signer/utils");
1420
+ var import_lrc20_sdk2 = require("@buildonspark/lrc20-sdk");
1421
+ var import_types2 = require("@buildonspark/lrc20-sdk/lrc/types");
1377
1422
  var sparkFrostModule = void 0;
1378
1423
  var getSparkFrostModule = async () => {
1379
1424
  if (isReactNative) {
@@ -1472,28 +1517,28 @@ var DefaultSparkSigner = class {
1472
1517
  const privateKey = this.deriveSigningKey(hash);
1473
1518
  const publicKey = import_secp256k15.secp256k1.getPublicKey(privateKey);
1474
1519
  this.publicKeyToPrivateKeyMap.set(
1475
- (0, import_utils4.bytesToHex)(publicKey),
1476
- (0, import_utils4.bytesToHex)(privateKey)
1520
+ (0, import_utils5.bytesToHex)(publicKey),
1521
+ (0, import_utils5.bytesToHex)(privateKey)
1477
1522
  );
1478
1523
  }
1479
1524
  }
1480
1525
  async getSchnorrPublicKey(publicKey) {
1481
- const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils4.bytesToHex)(publicKey));
1526
+ const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils5.bytesToHex)(publicKey));
1482
1527
  if (!privateKey) {
1483
1528
  throw new ValidationError("Private key is not set", {
1484
1529
  field: "privateKey"
1485
1530
  });
1486
1531
  }
1487
- return import_secp256k15.schnorr.getPublicKey((0, import_utils4.hexToBytes)(privateKey));
1532
+ return import_secp256k15.schnorr.getPublicKey((0, import_utils5.hexToBytes)(privateKey));
1488
1533
  }
1489
1534
  async signSchnorr(message, publicKey) {
1490
- const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils4.bytesToHex)(publicKey));
1535
+ const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils5.bytesToHex)(publicKey));
1491
1536
  if (!privateKey) {
1492
1537
  throw new ValidationError("Private key is not set", {
1493
1538
  field: "privateKey"
1494
1539
  });
1495
1540
  }
1496
- return import_secp256k15.schnorr.sign(message, (0, import_utils4.hexToBytes)(privateKey));
1541
+ return import_secp256k15.schnorr.sign(message, (0, import_utils5.hexToBytes)(privateKey));
1497
1542
  }
1498
1543
  async signSchnorrWithIdentityKey(message) {
1499
1544
  if (!this.identityKey?.privateKey) {
@@ -1535,8 +1580,8 @@ var DefaultSparkSigner = class {
1535
1580
  );
1536
1581
  this.staticDepositKeyMap.set(idx, staticDepositKey);
1537
1582
  this.publicKeyToPrivateKeyMap.set(
1538
- (0, import_utils4.bytesToHex)(staticDepositKey.publicKey),
1539
- (0, import_utils4.bytesToHex)(staticDepositKey.privateKey)
1583
+ (0, import_utils5.bytesToHex)(staticDepositKey.publicKey),
1584
+ (0, import_utils5.bytesToHex)(staticDepositKey.privateKey)
1540
1585
  );
1541
1586
  return staticDepositKey.publicKey;
1542
1587
  }
@@ -1581,7 +1626,7 @@ var DefaultSparkSigner = class {
1581
1626
  return await (0, import_bip39.mnemonicToSeed)(mnemonic);
1582
1627
  }
1583
1628
  async getTrackedPublicKeys() {
1584
- return Array.from(this.publicKeyToPrivateKeyMap.keys()).map(import_utils4.hexToBytes);
1629
+ return Array.from(this.publicKeyToPrivateKeyMap.keys()).map(import_utils5.hexToBytes);
1585
1630
  }
1586
1631
  async generatePublicKey(hash) {
1587
1632
  if (!this.signingKey) {
@@ -1601,31 +1646,31 @@ var DefaultSparkSigner = class {
1601
1646
  });
1602
1647
  }
1603
1648
  const publicKey = import_secp256k15.secp256k1.getPublicKey(newPrivateKey);
1604
- const pubKeyHex = (0, import_utils4.bytesToHex)(publicKey);
1605
- const privKeyHex = (0, import_utils4.bytesToHex)(newPrivateKey);
1649
+ const pubKeyHex = (0, import_utils5.bytesToHex)(publicKey);
1650
+ const privKeyHex = (0, import_utils5.bytesToHex)(newPrivateKey);
1606
1651
  this.publicKeyToPrivateKeyMap.set(pubKeyHex, privKeyHex);
1607
1652
  return publicKey;
1608
1653
  }
1609
1654
  async removePublicKey(publicKey) {
1610
- this.publicKeyToPrivateKeyMap.delete((0, import_utils4.bytesToHex)(publicKey));
1655
+ this.publicKeyToPrivateKeyMap.delete((0, import_utils5.bytesToHex)(publicKey));
1611
1656
  }
1612
1657
  async subtractPrivateKeysGivenPublicKeys(first, second) {
1613
- const firstPubKeyHex = (0, import_utils4.bytesToHex)(first);
1614
- const secondPubKeyHex = (0, import_utils4.bytesToHex)(second);
1658
+ const firstPubKeyHex = (0, import_utils5.bytesToHex)(first);
1659
+ const secondPubKeyHex = (0, import_utils5.bytesToHex)(second);
1615
1660
  const firstPrivateKeyHex = this.publicKeyToPrivateKeyMap.get(firstPubKeyHex);
1616
1661
  const secondPrivateKeyHex = this.publicKeyToPrivateKeyMap.get(secondPubKeyHex);
1617
1662
  if (!firstPrivateKeyHex || !secondPrivateKeyHex) {
1618
1663
  throw new Error("Private key is not set");
1619
1664
  }
1620
- const firstPrivateKey = (0, import_utils4.hexToBytes)(firstPrivateKeyHex);
1621
- const secondPrivateKey = (0, import_utils4.hexToBytes)(secondPrivateKeyHex);
1665
+ const firstPrivateKey = (0, import_utils5.hexToBytes)(firstPrivateKeyHex);
1666
+ const secondPrivateKey = (0, import_utils5.hexToBytes)(secondPrivateKeyHex);
1622
1667
  const resultPrivKey = subtractPrivateKeys(
1623
1668
  firstPrivateKey,
1624
1669
  secondPrivateKey
1625
1670
  );
1626
1671
  const resultPubKey = import_secp256k15.secp256k1.getPublicKey(resultPrivKey);
1627
- const resultPrivKeyHex = (0, import_utils4.bytesToHex)(resultPrivKey);
1628
- const resultPubKeyHex = (0, import_utils4.bytesToHex)(resultPubKey);
1672
+ const resultPrivKeyHex = (0, import_utils5.bytesToHex)(resultPrivKey);
1673
+ const resultPubKeyHex = (0, import_utils5.bytesToHex)(resultPubKey);
1629
1674
  this.publicKeyToPrivateKeyMap.set(resultPubKeyHex, resultPrivKeyHex);
1630
1675
  return resultPubKey;
1631
1676
  }
@@ -1637,14 +1682,14 @@ var DefaultSparkSigner = class {
1637
1682
  isSecretPubkey = false
1638
1683
  }) {
1639
1684
  if (isSecretPubkey) {
1640
- const pubKeyHex = (0, import_utils4.bytesToHex)(secret);
1685
+ const pubKeyHex = (0, import_utils5.bytesToHex)(secret);
1641
1686
  const privateKey = this.publicKeyToPrivateKeyMap.get(pubKeyHex);
1642
1687
  if (!privateKey) {
1643
1688
  throw new Error("Private key is not set");
1644
1689
  }
1645
- secret = (0, import_utils4.hexToBytes)(privateKey);
1690
+ secret = (0, import_utils5.hexToBytes)(privateKey);
1646
1691
  }
1647
- const secretAsInt = (0, import_utils4.bytesToNumberBE)(secret);
1692
+ const secretAsInt = (0, import_utils5.bytesToNumberBE)(secret);
1648
1693
  return splitSecretWithProofs(secretAsInt, curveOrder, threshold, numShares);
1649
1694
  }
1650
1695
  async signFrost({
@@ -1662,7 +1707,7 @@ var DefaultSparkSigner = class {
1662
1707
  field: "SparkFrost"
1663
1708
  });
1664
1709
  }
1665
- const privateAsPubKeyHex = (0, import_utils4.bytesToHex)(privateAsPubKey);
1710
+ const privateAsPubKeyHex = (0, import_utils5.bytesToHex)(privateAsPubKey);
1666
1711
  const signingPrivateKey = this.publicKeyToPrivateKeyMap.get(privateAsPubKeyHex);
1667
1712
  if (!signingPrivateKey) {
1668
1713
  throw new ValidationError("Private key not found for public key", {
@@ -1676,7 +1721,7 @@ var DefaultSparkSigner = class {
1676
1721
  });
1677
1722
  }
1678
1723
  const keyPackage = {
1679
- secretKey: (0, import_utils4.hexToBytes)(signingPrivateKey),
1724
+ secretKey: (0, import_utils5.hexToBytes)(signingPrivateKey),
1680
1725
  publicKey,
1681
1726
  verifyingKey
1682
1727
  };
@@ -1720,7 +1765,7 @@ var DefaultSparkSigner = class {
1720
1765
  }
1721
1766
  async createSparkWalletFromSeed(seed, accountNumber) {
1722
1767
  if (typeof seed === "string") {
1723
- seed = (0, import_utils4.hexToBytes)(seed);
1768
+ seed = (0, import_utils5.hexToBytes)(seed);
1724
1769
  }
1725
1770
  const {
1726
1771
  masterPublicKey,
@@ -1735,28 +1780,28 @@ var DefaultSparkSigner = class {
1735
1780
  this.signingKey = signingKey.hdKey;
1736
1781
  this.staticDepositKey = staticDepositKey.hdKey;
1737
1782
  this.publicKeyToPrivateKeyMap.set(
1738
- (0, import_utils4.bytesToHex)(identityKey.publicKey),
1739
- (0, import_utils4.bytesToHex)(identityKey.privateKey)
1783
+ (0, import_utils5.bytesToHex)(identityKey.publicKey),
1784
+ (0, import_utils5.bytesToHex)(identityKey.privateKey)
1740
1785
  );
1741
1786
  this.publicKeyToPrivateKeyMap.set(
1742
- (0, import_utils4.bytesToHex)(depositKey.publicKey),
1743
- (0, import_utils4.bytesToHex)(depositKey.privateKey)
1787
+ (0, import_utils5.bytesToHex)(depositKey.publicKey),
1788
+ (0, import_utils5.bytesToHex)(depositKey.privateKey)
1744
1789
  );
1745
1790
  this.publicKeyToPrivateKeyMap.set(
1746
- (0, import_utils4.bytesToHex)(staticDepositKey.publicKey),
1747
- (0, import_utils4.bytesToHex)(staticDepositKey.privateKey)
1791
+ (0, import_utils5.bytesToHex)(staticDepositKey.publicKey),
1792
+ (0, import_utils5.bytesToHex)(staticDepositKey.privateKey)
1748
1793
  );
1749
- return (0, import_utils4.bytesToHex)(identityKey.publicKey);
1794
+ return (0, import_utils5.bytesToHex)(identityKey.publicKey);
1750
1795
  }
1751
1796
  async signMessageWithPublicKey(message, publicKey, compact) {
1752
- const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils4.bytesToHex)(publicKey));
1797
+ const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils5.bytesToHex)(publicKey));
1753
1798
  if (!privateKey) {
1754
1799
  throw new ValidationError("Private key not found for public key", {
1755
1800
  field: "privateKey",
1756
- value: (0, import_utils4.bytesToHex)(publicKey)
1801
+ value: (0, import_utils5.bytesToHex)(publicKey)
1757
1802
  });
1758
1803
  }
1759
- const signature = import_secp256k15.secp256k1.sign(message, (0, import_utils4.hexToBytes)(privateKey));
1804
+ const signature = import_secp256k15.secp256k1.sign(message, (0, import_utils5.hexToBytes)(privateKey));
1760
1805
  if (compact) {
1761
1806
  return signature.toCompactRawBytes();
1762
1807
  }
@@ -1775,12 +1820,12 @@ var DefaultSparkSigner = class {
1775
1820
  return signature.toDERRawBytes();
1776
1821
  }
1777
1822
  async encryptLeafPrivateKeyEcies(receiverPublicKey, publicKey) {
1778
- const publicKeyHex = (0, import_utils4.bytesToHex)(publicKey);
1823
+ const publicKeyHex = (0, import_utils5.bytesToHex)(publicKey);
1779
1824
  const privateKey = this.publicKeyToPrivateKeyMap.get(publicKeyHex);
1780
1825
  if (!privateKey) {
1781
1826
  throw new Error("Private key is not set");
1782
1827
  }
1783
- return ecies.encrypt(receiverPublicKey, (0, import_utils4.hexToBytes)(privateKey));
1828
+ return ecies.encrypt(receiverPublicKey, (0, import_utils5.hexToBytes)(privateKey));
1784
1829
  }
1785
1830
  async decryptEcies(ciphertext) {
1786
1831
  if (!this.identityKey?.privateKey) {
@@ -1789,12 +1834,12 @@ var DefaultSparkSigner = class {
1789
1834
  });
1790
1835
  }
1791
1836
  const receiverEciesPrivKey = ecies.PrivateKey.fromHex(
1792
- (0, import_utils4.bytesToHex)(this.identityKey.privateKey)
1837
+ (0, import_utils5.bytesToHex)(this.identityKey.privateKey)
1793
1838
  );
1794
1839
  const privateKey = ecies.decrypt(receiverEciesPrivKey.toHex(), ciphertext);
1795
1840
  const publicKey = import_secp256k15.secp256k1.getPublicKey(privateKey);
1796
- const publicKeyHex = (0, import_utils4.bytesToHex)(publicKey);
1797
- const privateKeyHex = (0, import_utils4.bytesToHex)(privateKey);
1841
+ const publicKeyHex = (0, import_utils5.bytesToHex)(publicKey);
1842
+ const privateKeyHex = (0, import_utils5.bytesToHex)(privateKey);
1798
1843
  this.publicKeyToPrivateKeyMap.set(publicKeyHex, privateKeyHex);
1799
1844
  return publicKey;
1800
1845
  }
@@ -1811,8 +1856,8 @@ var DefaultSparkSigner = class {
1811
1856
  const adaptor = generateAdaptorFromSignature(signature);
1812
1857
  const adaptorPublicKey = import_secp256k15.secp256k1.getPublicKey(adaptor.adaptorPrivateKey);
1813
1858
  this.publicKeyToPrivateKeyMap.set(
1814
- (0, import_utils4.bytesToHex)(adaptorPublicKey),
1815
- (0, import_utils4.bytesToHex)(adaptor.adaptorPrivateKey)
1859
+ (0, import_utils5.bytesToHex)(adaptorPublicKey),
1860
+ (0, import_utils5.bytesToHex)(adaptor.adaptorPrivateKey)
1816
1861
  );
1817
1862
  return {
1818
1863
  adaptorSignature: signature,
@@ -1863,19 +1908,19 @@ var DefaultSparkSigner = class {
1863
1908
  }
1864
1909
  signTransactionIndex(tx, index, publicKey) {
1865
1910
  let privateKey;
1866
- if ((0, import_utils4.equalBytes)(publicKey, this.identityKey?.publicKey ?? new Uint8Array())) {
1911
+ if ((0, import_utils5.equalBytes)(publicKey, this.identityKey?.publicKey ?? new Uint8Array())) {
1867
1912
  privateKey = this.identityKey?.privateKey;
1868
- } else if ((0, import_utils4.equalBytes)(publicKey, this.depositKey?.publicKey ?? new Uint8Array())) {
1913
+ } else if ((0, import_utils5.equalBytes)(publicKey, this.depositKey?.publicKey ?? new Uint8Array())) {
1869
1914
  privateKey = this.depositKey?.privateKey;
1870
1915
  } else {
1871
- privateKey = (0, import_utils4.hexToBytes)(
1872
- this.publicKeyToPrivateKeyMap.get((0, import_utils4.bytesToHex)(publicKey)) ?? ""
1916
+ privateKey = (0, import_utils5.hexToBytes)(
1917
+ this.publicKeyToPrivateKeyMap.get((0, import_utils5.bytesToHex)(publicKey)) ?? ""
1873
1918
  );
1874
1919
  }
1875
1920
  if (!privateKey) {
1876
1921
  throw new ValidationError("Private key not found for public key", {
1877
1922
  field: "privateKey",
1878
- value: (0, import_utils4.bytesToHex)(publicKey)
1923
+ value: (0, import_utils5.bytesToHex)(publicKey)
1879
1924
  });
1880
1925
  }
1881
1926
  tx.signIdx(privateKey, index);
@@ -1884,7 +1929,7 @@ var DefaultSparkSigner = class {
1884
1929
 
1885
1930
  // src/utils/network.ts
1886
1931
  init_buffer();
1887
- var import_lrc20_sdk2 = require("@buildonspark/lrc20-sdk");
1932
+ var import_lrc20_sdk3 = require("@buildonspark/lrc20-sdk");
1888
1933
  var btc = __toESM(require("@scure/btc-signer"), 1);
1889
1934
  var bitcoin = __toESM(require("bitcoinjs-lib"), 1);
1890
1935
 
@@ -1935,11 +1980,11 @@ var LRC_WALLET_NETWORK = Object.freeze({
1935
1980
  [4 /* LOCAL */]: bitcoin.networks.regtest
1936
1981
  });
1937
1982
  var LRC_WALLET_NETWORK_TYPE = Object.freeze({
1938
- [0 /* MAINNET */]: import_lrc20_sdk2.NetworkType.MAINNET,
1939
- [1 /* TESTNET */]: import_lrc20_sdk2.NetworkType.TESTNET,
1940
- [2 /* SIGNET */]: import_lrc20_sdk2.NetworkType.TESTNET,
1941
- [3 /* REGTEST */]: import_lrc20_sdk2.NetworkType.REGTEST,
1942
- [4 /* LOCAL */]: import_lrc20_sdk2.NetworkType.LOCAL
1983
+ [0 /* MAINNET */]: import_lrc20_sdk3.NetworkType.MAINNET,
1984
+ [1 /* TESTNET */]: import_lrc20_sdk3.NetworkType.TESTNET,
1985
+ [2 /* SIGNET */]: import_lrc20_sdk3.NetworkType.TESTNET,
1986
+ [3 /* REGTEST */]: import_lrc20_sdk3.NetworkType.REGTEST,
1987
+ [4 /* LOCAL */]: import_lrc20_sdk3.NetworkType.LOCAL
1943
1988
  });
1944
1989
 
1945
1990
  // src/services/wallet-config.ts
@@ -1947,10 +1992,10 @@ init_buffer();
1947
1992
 
1948
1993
  // src/tests/isHermeticTest.ts
1949
1994
  init_buffer();
1950
- var import_core = require("@lightsparkdev/core");
1995
+ var import_core2 = require("@lightsparkdev/core");
1951
1996
  var import_fs = __toESM(require("fs"), 1);
1952
1997
  function isHermeticTest() {
1953
- if (import_core.isNode) {
1998
+ if (import_core2.isNode) {
1954
1999
  return (import_fs.default?.existsSync?.("/tmp/spark_hermetic") ?? false) || process.env.HERMETIC_TEST === "true";
1955
2000
  }
1956
2001
  return typeof process !== "undefined" && process.env?.HERMETIC_TEST === "true" || false;
@@ -2078,6 +2123,7 @@ var BASE_CONFIG = {
2078
2123
  signingOperators: getLocalSigningOperators(),
2079
2124
  tokenSignatures: "SCHNORR",
2080
2125
  tokenTransactionVersion: "V0",
2126
+ tokenValidityDurationSeconds: 180,
2081
2127
  electrsUrl: getElectrsUrl("LOCAL"),
2082
2128
  expectedWithdrawBondSats: 1e4,
2083
2129
  expectedWithdrawRelativeBlockLocktime: 1e3,
@@ -2288,6 +2334,9 @@ var WalletConfigService = class {
2288
2334
  getTokenTransactionVersion() {
2289
2335
  return this.config.tokenTransactionVersion;
2290
2336
  }
2337
+ getTokenValidityDurationSeconds() {
2338
+ return this.config.tokenValidityDurationSeconds;
2339
+ }
2291
2340
  getElectrsUrl() {
2292
2341
  return this.config.electrsUrl;
2293
2342
  }
@@ -1,16 +1,17 @@
1
1
  import { HasLrc20WalletApiConfig, LRC20WalletApiConfig } from '@buildonspark/lrc20-sdk';
2
- import { H as HasSspClientOptions, B as SspClientOptions } from '../RequestLightningSendInput-DXcLoiCe.cjs';
2
+ import { H as HasSspClientOptions, B as SspClientOptions } from '../RequestLightningSendInput-Na1mHdWg.cjs';
3
3
  import { B as BitcoinNetwork } from '../BitcoinNetwork-TnABML0T.cjs';
4
- import { S as SparkSigner } from '../signer-BhLS7SYR.cjs';
5
- import { N as Network, a as NetworkType } from '../network-BiwBmoOg.cjs';
4
+ import { S as SparkSigner } from '../signer-IO3oMRNj.cjs';
5
+ import { N as Network, a as NetworkType } from '../network-D5lKssVl.cjs';
6
6
  import { ConfigOptions, SigningOperator } from './wallet-config.cjs';
7
7
  import '@lightsparkdev/core';
8
8
  import '@scure/bip32';
9
- import '../spark-DjR1b3TC.cjs';
9
+ import '../spark-CDm4gqS6.cjs';
10
10
  import '@bufbuild/protobuf/wire';
11
11
  import 'nice-grpc-common';
12
12
  import '@scure/btc-signer';
13
13
  import 'bitcoinjs-lib';
14
+ import '@buildonspark/lrc20-sdk/lrc/types';
14
15
 
15
16
  declare class WalletConfigService implements HasLrc20WalletApiConfig, HasSspClientOptions {
16
17
  private readonly config;
@@ -32,6 +33,7 @@ declare class WalletConfigService implements HasLrc20WalletApiConfig, HasSspClie
32
33
  getNetworkProto(): number;
33
34
  getTokenSignatures(): "ECDSA" | "SCHNORR";
34
35
  getTokenTransactionVersion(): "V0" | "V1";
36
+ getTokenValidityDurationSeconds(): number;
35
37
  getElectrsUrl(): string;
36
38
  getSspIdentityPublicKey(): string;
37
39
  }