@buildonspark/spark-sdk 0.5.0 → 0.5.1

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 (81) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/bare/index.cjs +1608 -3635
  3. package/dist/bare/index.d.cts +27 -435
  4. package/dist/bare/index.d.ts +27 -435
  5. package/dist/bare/index.js +1608 -3634
  6. package/dist/{chunk-RU434ZAE.js → chunk-F3BFSHVR.js} +357 -391
  7. package/dist/{chunk-UYEB2VPG.js → chunk-IOIEBLMK.js} +7 -1
  8. package/dist/{chunk-EU3I7GFB.js → chunk-STB6WMU7.js} +1 -1
  9. package/dist/{chunk-JE3MXMPW.js → chunk-UTECVGQQ.js} +93 -202
  10. package/dist/{chunk-ZP6Z6DFX.js → chunk-YFVVYZCS.js} +37 -5
  11. package/dist/{client-D1dLzWu0.d.ts → client-C9kc4cog.d.cts} +9 -3
  12. package/dist/{client-CVn0R_eM.d.cts → client-eyjf4knu.d.ts} +9 -3
  13. package/dist/graphql/objects/index.cjs +7 -1
  14. package/dist/graphql/objects/index.d.cts +3 -3
  15. package/dist/graphql/objects/index.d.ts +3 -3
  16. package/dist/graphql/objects/index.js +1 -1
  17. package/dist/index.browser.d.ts +27 -435
  18. package/dist/index.browser.js +1613 -3639
  19. package/dist/index.node.cjs +1613 -3640
  20. package/dist/index.node.d.cts +7 -8
  21. package/dist/index.node.d.ts +7 -8
  22. package/dist/index.node.js +5 -7
  23. package/dist/native/index.react-native.cjs +1613 -3640
  24. package/dist/native/index.react-native.d.cts +27 -435
  25. package/dist/native/index.react-native.d.ts +27 -435
  26. package/dist/native/index.react-native.js +1613 -3639
  27. package/dist/proto/spark.cjs +93 -202
  28. package/dist/proto/spark.d.cts +1 -1
  29. package/dist/proto/spark.d.ts +1 -1
  30. package/dist/proto/spark.js +1 -1
  31. package/dist/proto/spark_token.cjs +36 -4
  32. package/dist/proto/spark_token.d.cts +4 -1
  33. package/dist/proto/spark_token.d.ts +4 -1
  34. package/dist/proto/spark_token.js +2 -2
  35. package/dist/{spark-2Fxnvl8K.d.cts → spark-d6w3BLGZ.d.cts} +10 -328
  36. package/dist/{spark-2Fxnvl8K.d.ts → spark-d6w3BLGZ.d.ts} +10 -328
  37. package/dist/{spark-wallet.node-DlhZiDgY.d.ts → spark-wallet.node-MReThHBY.d.ts} +6 -7
  38. package/dist/{spark-wallet.node-xKJXzAEd.d.cts → spark-wallet.node-eR0svGws.d.cts} +6 -7
  39. package/dist/tests/test-utils.cjs +409 -2429
  40. package/dist/tests/test-utils.d.cts +3 -3
  41. package/dist/tests/test-utils.d.ts +3 -3
  42. package/dist/tests/test-utils.js +5 -5
  43. package/dist/types/index.cjs +100 -203
  44. package/dist/types/index.d.cts +2 -2
  45. package/dist/types/index.d.ts +2 -2
  46. package/dist/types/index.js +3 -3
  47. package/package.json +3 -3
  48. package/src/graphql/client.ts +36 -1
  49. package/src/graphql/objects/LightningSendRequestStatus.ts +25 -13
  50. package/src/proto/common.ts +1 -1
  51. package/src/proto/google/protobuf/descriptor.ts +1 -1
  52. package/src/proto/google/protobuf/duration.ts +1 -1
  53. package/src/proto/google/protobuf/empty.ts +1 -1
  54. package/src/proto/google/protobuf/timestamp.ts +1 -1
  55. package/src/proto/mock.ts +1 -1
  56. package/src/proto/spark.ts +113 -446
  57. package/src/proto/spark_authn.ts +1 -1
  58. package/src/proto/spark_token.ts +41 -2
  59. package/src/proto/validate/validate.ts +1 -1
  60. package/src/services/connection/connection.ts +23 -60
  61. package/src/services/coop-exit.ts +3 -5
  62. package/src/services/deposit.ts +1 -1
  63. package/src/services/lightning.ts +1 -1
  64. package/src/services/signing.ts +5 -6
  65. package/src/services/transfer.ts +250 -240
  66. package/src/services/wallet-config.ts +22 -5
  67. package/src/spark-wallet/proto-descriptors.ts +1 -1
  68. package/src/spark-wallet/proto-reflection.ts +0 -2
  69. package/src/spark-wallet/spark-wallet.ts +2 -2
  70. package/src/spark_descriptors.pb +0 -0
  71. package/src/tests/bufbuild-reflection.test.ts +2 -3
  72. package/src/tests/integration/coop-exit.test.ts +6 -1
  73. package/src/tests/integration/htlc.test.ts +5 -0
  74. package/src/tests/integration/lightning.test.ts +24 -4
  75. package/src/tests/integration/time-sync.test.ts +18 -0
  76. package/src/tests/integration/transfer.test.ts +42 -7
  77. package/src/tests/ssp-client-retry.test.ts +161 -0
  78. package/src/tests/token-hashing.test.ts +92 -0
  79. package/src/utils/token-hashing.ts +4 -51
  80. package/src/utils/transaction.ts +1 -2
  81. package/src/utils/unilateral-exit.ts +139 -142
@@ -1,12 +1,12 @@
1
- import { a as SparkError, b as SparkErrorContextArg, c as SparkAuthnServiceDefinition, N as Network, T as TokenOutputsMap, B as Bech32mTokenIdentifier, d as TokenBalanceMap, e as SparkAddressFormat, S as SparkWalletNodeJS } from './spark-wallet.node-xKJXzAEd.cjs';
2
- export { g as BaseConnectionManager, G as Bech32mTokenIdentifierData, C as ConfigOptions, f as ConnectionManager, a7 as CreateHTLCParams, M as CreateLightningInvoiceParams, D as DecodedSparkAddressData, Z as DepositParams, U as FulfillSparkInvoiceResponse, Y as GroupSparkInvoicesResult, a3 as HandlePublicMethodErrorParams, a1 as InitWalletResponse, X as InvalidInvoice, L as LegacySparkAddressFormat, y as NetworkToProto, x as NetworkType, P as PayLightningInvoiceParams, $ as RawTokenIdentifierHex, j as SparkAddressData, a4 as SparkWalletEvent, a5 as SparkWalletEventType, a6 as SparkWalletEvents, a2 as SparkWalletProps, V as TokenInvoice, a0 as TokenMetadataMap, h as TokenTransactionService, O as TransferParams, R as TransferWithInvoiceOutcome, Q as TransferWithInvoiceParams, _ as UserTokenMetadata, i as WalletConfig, W as WalletConfigService, K as WithdrawParams, s as assertBech32, u as bech32mDecode, I as decodeBech32mTokenIdentifier, m as decodeSparkAddress, H as encodeBech32mTokenIdentifier, k as encodeSparkAddress, l as encodeSparkAddressWithSignature, A as getNetwork, E as getNetworkFromAddress, J as getNetworkFromBech32mTokenIdentifier, n as getNetworkFromSparkAddress, F as getNetworkFromString, o as isLegacySparkAddress, w as isSafeForNumber, q as isValidPublicKey, p as isValidSparkAddress, z as protoToNetwork, t as toProtoTimestamp, v as validateSparkInvoiceFields, r as validateSparkInvoiceSignature } from './spark-wallet.node-xKJXzAEd.cjs';
3
- import { d as SparkServiceDefinition, e as TransferPackage, f as SparkServiceClient } from './spark-2Fxnvl8K.cjs';
1
+ import { a as SparkError, b as SparkErrorContextArg, c as SparkAuthnServiceDefinition, N as Network, T as TokenOutputsMap, B as Bech32mTokenIdentifier, d as TokenBalanceMap, e as SparkAddressFormat, S as SparkWalletNodeJS } from './spark-wallet.node-eR0svGws.cjs';
2
+ export { g as BaseConnectionManager, G as Bech32mTokenIdentifierData, C as ConfigOptions, f as ConnectionManager, a7 as CreateHTLCParams, M as CreateLightningInvoiceParams, D as DecodedSparkAddressData, Z as DepositParams, U as FulfillSparkInvoiceResponse, Y as GroupSparkInvoicesResult, a3 as HandlePublicMethodErrorParams, a1 as InitWalletResponse, X as InvalidInvoice, L as LegacySparkAddressFormat, y as NetworkToProto, x as NetworkType, P as PayLightningInvoiceParams, $ as RawTokenIdentifierHex, j as SparkAddressData, a4 as SparkWalletEvent, a5 as SparkWalletEventType, a6 as SparkWalletEvents, a2 as SparkWalletProps, V as TokenInvoice, a0 as TokenMetadataMap, h as TokenTransactionService, O as TransferParams, R as TransferWithInvoiceOutcome, Q as TransferWithInvoiceParams, _ as UserTokenMetadata, i as WalletConfig, W as WalletConfigService, K as WithdrawParams, s as assertBech32, u as bech32mDecode, I as decodeBech32mTokenIdentifier, m as decodeSparkAddress, H as encodeBech32mTokenIdentifier, k as encodeSparkAddress, l as encodeSparkAddressWithSignature, A as getNetwork, E as getNetworkFromAddress, J as getNetworkFromBech32mTokenIdentifier, n as getNetworkFromSparkAddress, F as getNetworkFromString, o as isLegacySparkAddress, w as isSafeForNumber, q as isValidPublicKey, p as isValidSparkAddress, z as protoToNetwork, t as toProtoTimestamp, v as validateSparkInvoiceFields, r as validateSparkInvoiceSignature } from './spark-wallet.node-eR0svGws.cjs';
3
+ import { d as SparkServiceDefinition, e as TransferPackage, f as SparkServiceClient } from './spark-d6w3BLGZ.cjs';
4
4
  import { SparkTokenServiceDefinition, OutputWithPreviousTransactionData } from './proto/spark_token.cjs';
5
5
  import * as btc from '@scure/btc-signer';
6
6
  import { Transaction } from '@scure/btc-signer';
7
7
  import { TransactionOutput, TransactionInput } from '@scure/btc-signer/psbt';
8
- import { a9 as SigningNonce, aa as SigningCommitment, ab as SignFrostBindingParams, ac as AggregateFrostBindingParams, ad as DummyTx } from './client-CVn0R_eM.cjs';
9
- export { aj as AggregateFrostParams, a8 as DefaultSparkSigner, al as DerivedHDKey, ap as IKeyPackage, ah as KeyDerivation, ag as KeyDerivationType, am as KeyPair, ai as SignFrostParams, af as SigningCommitmentWithOptionalNonce, a7 as SparkSigner, ak as SplitSecretWithProofsParams, an as SubtractSplitAndEncryptParams, ao as SubtractSplitAndEncryptResult, ae as UnsafeStatelessSparkSigner, aq as VerifiableSecretShare, aB as bigIntToPrivateKey, av as computerLagrangeCoefficients, at as evaluatePolynomial, au as fieldDiv, aw as generatePolynomialForSecretSharing, ar as getRandomBigInt, as as modInverse, az as recoverSecret, ax as splitSecret, ay as splitSecretWithProofs, aA as validateShare } from './client-CVn0R_eM.cjs';
8
+ import { a9 as SigningNonce, aa as SigningCommitment, ab as SignFrostBindingParams, ac as AggregateFrostBindingParams, ad as DummyTx } from './client-C9kc4cog.cjs';
9
+ export { aj as AggregateFrostParams, a8 as DefaultSparkSigner, al as DerivedHDKey, ap as IKeyPackage, ah as KeyDerivation, ag as KeyDerivationType, am as KeyPair, ai as SignFrostParams, af as SigningCommitmentWithOptionalNonce, a7 as SparkSigner, ak as SplitSecretWithProofsParams, an as SubtractSplitAndEncryptParams, ao as SubtractSplitAndEncryptResult, ae as UnsafeStatelessSparkSigner, aq as VerifiableSecretShare, aB as bigIntToPrivateKey, av as computerLagrangeCoefficients, at as evaluatePolynomial, au as fieldDiv, aw as generatePolynomialForSecretSharing, ar as getRandomBigInt, as as modInverse, az as recoverSecret, ax as splitSecret, ay as splitSecretWithProofs, aA as validateShare } from './client-C9kc4cog.cjs';
10
10
  import { Logger, LoggingLevel } from '@lightsparkdev/core';
11
11
  import '@opentelemetry/api';
12
12
  import '@scure/base';
@@ -248,13 +248,12 @@ interface BroadcastResult {
248
248
  broadcastedPackages?: number;
249
249
  }
250
250
  declare function isEphemeralAnchorOutput(script?: Uint8Array, amount?: bigint): boolean;
251
- declare function constructUnilateralExitTxs(nodeHexStrings: string[], sparkClient?: SparkServiceClient, network?: any): Promise<TxChain[]>;
252
251
  declare function constructUnilateralExitFeeBumpPackages(nodeHexStrings: string[], utxos: Utxo[], feeRate: FeeRate, electrsUrl: string, sparkClient?: SparkServiceClient, network?: any): Promise<FeeBumpTxChain[]>;
253
252
  declare function hash160(data: Uint8Array): Uint8Array;
254
253
  declare function constructFeeBumpTx(txHex: string, utxos: Utxo[], feeRate: FeeRate, previousFeeBumpTx?: string): {
255
254
  feeBumpPsbt: string;
256
255
  usedUtxos: Utxo[];
257
- correctedParentTx?: string;
256
+ parentTx?: string;
258
257
  };
259
258
 
260
259
  declare function getSparkAddressFromTaproot(taprootAddress: string): SparkAddressFormat;
@@ -285,4 +284,4 @@ declare function getSparkFrost(): SparkFrostBase;
285
284
 
286
285
  declare function initializeTracerEnvNodeJS({ spanProcessors, traceUrls, }: Parameters<SparkWalletNodeJS["initializeTracerEnv"]>[0]): void;
287
286
 
288
- export { AuthenticationError, Bech32mTokenIdentifier, type BroadcastConfig, type BroadcastResult, ConfigurationError, DEFAULT_FEE_SATS, DIRECT_HTLC_TIMELOCK_OFFSET, DIRECT_TIMELOCK_OFFSET, DummyTx, type FeeBumpTxChain, type FeeBumpTxPackage, type FeeRate, HTLC_TIMELOCK_OFFSET, INITIAL_SEQUENCE, InternalValidationError, LOGGER_NAMES, type LeafInfo, type LoggerName, Network, NetworkError, RPCError, SigningCommitment, SigningNonce, SparkAddressFormat, SparkAuthenticationError, SparkError, SparkErrorContextArg, SparkRequestError, SparkSdkError, SparkSdkLogger, SparkValidationError, SparkWalletNodeJS as SparkWallet, TEST_UNILATERAL_DIRECT_SEQUENCE, TEST_UNILATERAL_SEQUENCE, TIME_LOCK_INTERVAL, TokenBalanceMap, TokenOutputsMap, type TxChain, type Utxo, ValidationError, addPrivateKeys, addPublicKeys, applyAdaptorToSignature, applyAdditiveTweakToPublicKey, checkIfSelectedOutputsAreAvailable, checkIfValidSequence, collectResponses, computeTaprootKeyNoScript, constructFeeBumpTx, constructUnilateralExitFeeBumpPackages, constructUnilateralExitTxs, createConnectorRefundTxs, createCurrentTimelockRefundTxs, createDecrementedTimelockNodeTx, createDecrementedTimelockRefundTxs, createInitialTimelockNodeTx, createInitialTimelockRefundTxs, createRootNodeTx, createSigningCommitment, createSigningNonce, createTestUnilateralRefundTxs, createTestUnilateralTimelockNodeTx, createZeroTimelockNodeTx, decodeBytesToSigningCommitment, decodeBytesToSigningNonce, doesLeafNeedRefresh, doesTxnNeedRenewed, encodeSigningCommitmentToBytes, encodeSigningNonceToBytes, filterTokenBalanceForTokenIdentifier, generateAdaptorFromSignature, generateSignatureFromExistingAdaptor, getCurrentTimelock, getEphemeralAnchorOutput, getLatestDepositTxId, getNextHTLCTransactionSequence, getNextTransactionSequence, getP2TRAddressFromPkScript, getP2TRAddressFromPublicKey, getP2TRScriptFromPublicKey, getP2WPKHAddressFromPublicKey, getRandomSigningNonce, getSigHashFromTx, getSigningCommitmentFromNonce, getSparkAddressFromTaproot, getSparkFrost, getTransactionSequence, getTransferPackageSigningPayload, getTxEstimatedVbytesSizeByNumberOfInputsOutputs, getTxFromRawTxBytes, getTxFromRawTxHex, getTxId, getTxIdNoReverse, hash160, initializeTracerEnvNodeJS as initializeTracerEnv, isEphemeralAnchorOutput, isTxBroadcast, isZeroTimelock, lastKeyWithTarget, maybeApplyFee, proofOfPossessionMessageHashForDepositAddress, subtractPrivateKeys, subtractPublicKeys, sumAvailableTokens, sumOfPrivateKeys, validateOutboundAdaptorSignature };
287
+ export { AuthenticationError, Bech32mTokenIdentifier, type BroadcastConfig, type BroadcastResult, ConfigurationError, DEFAULT_FEE_SATS, DIRECT_HTLC_TIMELOCK_OFFSET, DIRECT_TIMELOCK_OFFSET, DummyTx, type FeeBumpTxChain, type FeeBumpTxPackage, type FeeRate, HTLC_TIMELOCK_OFFSET, INITIAL_SEQUENCE, InternalValidationError, LOGGER_NAMES, type LeafInfo, type LoggerName, Network, NetworkError, RPCError, SigningCommitment, SigningNonce, SparkAddressFormat, SparkAuthenticationError, SparkError, SparkErrorContextArg, SparkRequestError, SparkSdkError, SparkSdkLogger, SparkValidationError, SparkWalletNodeJS as SparkWallet, TEST_UNILATERAL_DIRECT_SEQUENCE, TEST_UNILATERAL_SEQUENCE, TIME_LOCK_INTERVAL, TokenBalanceMap, TokenOutputsMap, type TxChain, type Utxo, ValidationError, addPrivateKeys, addPublicKeys, applyAdaptorToSignature, applyAdditiveTweakToPublicKey, checkIfSelectedOutputsAreAvailable, checkIfValidSequence, collectResponses, computeTaprootKeyNoScript, constructFeeBumpTx, constructUnilateralExitFeeBumpPackages, createConnectorRefundTxs, createCurrentTimelockRefundTxs, createDecrementedTimelockNodeTx, createDecrementedTimelockRefundTxs, createInitialTimelockNodeTx, createInitialTimelockRefundTxs, createRootNodeTx, createSigningCommitment, createSigningNonce, createTestUnilateralRefundTxs, createTestUnilateralTimelockNodeTx, createZeroTimelockNodeTx, decodeBytesToSigningCommitment, decodeBytesToSigningNonce, doesLeafNeedRefresh, doesTxnNeedRenewed, encodeSigningCommitmentToBytes, encodeSigningNonceToBytes, filterTokenBalanceForTokenIdentifier, generateAdaptorFromSignature, generateSignatureFromExistingAdaptor, getCurrentTimelock, getEphemeralAnchorOutput, getLatestDepositTxId, getNextHTLCTransactionSequence, getNextTransactionSequence, getP2TRAddressFromPkScript, getP2TRAddressFromPublicKey, getP2TRScriptFromPublicKey, getP2WPKHAddressFromPublicKey, getRandomSigningNonce, getSigHashFromTx, getSigningCommitmentFromNonce, getSparkAddressFromTaproot, getSparkFrost, getTransactionSequence, getTransferPackageSigningPayload, getTxEstimatedVbytesSizeByNumberOfInputsOutputs, getTxFromRawTxBytes, getTxFromRawTxHex, getTxId, getTxIdNoReverse, hash160, initializeTracerEnvNodeJS as initializeTracerEnv, isEphemeralAnchorOutput, isTxBroadcast, isZeroTimelock, lastKeyWithTarget, maybeApplyFee, proofOfPossessionMessageHashForDepositAddress, subtractPrivateKeys, subtractPublicKeys, sumAvailableTokens, sumOfPrivateKeys, validateOutboundAdaptorSignature };
@@ -1,12 +1,12 @@
1
- import { a as SparkError, b as SparkErrorContextArg, c as SparkAuthnServiceDefinition, N as Network, T as TokenOutputsMap, B as Bech32mTokenIdentifier, d as TokenBalanceMap, e as SparkAddressFormat, S as SparkWalletNodeJS } from './spark-wallet.node-DlhZiDgY.js';
2
- export { g as BaseConnectionManager, G as Bech32mTokenIdentifierData, C as ConfigOptions, f as ConnectionManager, a7 as CreateHTLCParams, M as CreateLightningInvoiceParams, D as DecodedSparkAddressData, Z as DepositParams, U as FulfillSparkInvoiceResponse, Y as GroupSparkInvoicesResult, a3 as HandlePublicMethodErrorParams, a1 as InitWalletResponse, X as InvalidInvoice, L as LegacySparkAddressFormat, y as NetworkToProto, x as NetworkType, P as PayLightningInvoiceParams, $ as RawTokenIdentifierHex, j as SparkAddressData, a4 as SparkWalletEvent, a5 as SparkWalletEventType, a6 as SparkWalletEvents, a2 as SparkWalletProps, V as TokenInvoice, a0 as TokenMetadataMap, h as TokenTransactionService, O as TransferParams, R as TransferWithInvoiceOutcome, Q as TransferWithInvoiceParams, _ as UserTokenMetadata, i as WalletConfig, W as WalletConfigService, K as WithdrawParams, s as assertBech32, u as bech32mDecode, I as decodeBech32mTokenIdentifier, m as decodeSparkAddress, H as encodeBech32mTokenIdentifier, k as encodeSparkAddress, l as encodeSparkAddressWithSignature, A as getNetwork, E as getNetworkFromAddress, J as getNetworkFromBech32mTokenIdentifier, n as getNetworkFromSparkAddress, F as getNetworkFromString, o as isLegacySparkAddress, w as isSafeForNumber, q as isValidPublicKey, p as isValidSparkAddress, z as protoToNetwork, t as toProtoTimestamp, v as validateSparkInvoiceFields, r as validateSparkInvoiceSignature } from './spark-wallet.node-DlhZiDgY.js';
3
- import { d as SparkServiceDefinition, e as TransferPackage, f as SparkServiceClient } from './spark-2Fxnvl8K.js';
1
+ import { a as SparkError, b as SparkErrorContextArg, c as SparkAuthnServiceDefinition, N as Network, T as TokenOutputsMap, B as Bech32mTokenIdentifier, d as TokenBalanceMap, e as SparkAddressFormat, S as SparkWalletNodeJS } from './spark-wallet.node-MReThHBY.js';
2
+ export { g as BaseConnectionManager, G as Bech32mTokenIdentifierData, C as ConfigOptions, f as ConnectionManager, a7 as CreateHTLCParams, M as CreateLightningInvoiceParams, D as DecodedSparkAddressData, Z as DepositParams, U as FulfillSparkInvoiceResponse, Y as GroupSparkInvoicesResult, a3 as HandlePublicMethodErrorParams, a1 as InitWalletResponse, X as InvalidInvoice, L as LegacySparkAddressFormat, y as NetworkToProto, x as NetworkType, P as PayLightningInvoiceParams, $ as RawTokenIdentifierHex, j as SparkAddressData, a4 as SparkWalletEvent, a5 as SparkWalletEventType, a6 as SparkWalletEvents, a2 as SparkWalletProps, V as TokenInvoice, a0 as TokenMetadataMap, h as TokenTransactionService, O as TransferParams, R as TransferWithInvoiceOutcome, Q as TransferWithInvoiceParams, _ as UserTokenMetadata, i as WalletConfig, W as WalletConfigService, K as WithdrawParams, s as assertBech32, u as bech32mDecode, I as decodeBech32mTokenIdentifier, m as decodeSparkAddress, H as encodeBech32mTokenIdentifier, k as encodeSparkAddress, l as encodeSparkAddressWithSignature, A as getNetwork, E as getNetworkFromAddress, J as getNetworkFromBech32mTokenIdentifier, n as getNetworkFromSparkAddress, F as getNetworkFromString, o as isLegacySparkAddress, w as isSafeForNumber, q as isValidPublicKey, p as isValidSparkAddress, z as protoToNetwork, t as toProtoTimestamp, v as validateSparkInvoiceFields, r as validateSparkInvoiceSignature } from './spark-wallet.node-MReThHBY.js';
3
+ import { d as SparkServiceDefinition, e as TransferPackage, f as SparkServiceClient } from './spark-d6w3BLGZ.js';
4
4
  import { SparkTokenServiceDefinition, OutputWithPreviousTransactionData } from './proto/spark_token.js';
5
5
  import * as btc from '@scure/btc-signer';
6
6
  import { Transaction } from '@scure/btc-signer';
7
7
  import { TransactionOutput, TransactionInput } from '@scure/btc-signer/psbt';
8
- import { a9 as SigningNonce, aa as SigningCommitment, ab as SignFrostBindingParams, ac as AggregateFrostBindingParams, ad as DummyTx } from './client-D1dLzWu0.js';
9
- export { aj as AggregateFrostParams, a8 as DefaultSparkSigner, al as DerivedHDKey, ap as IKeyPackage, ah as KeyDerivation, ag as KeyDerivationType, am as KeyPair, ai as SignFrostParams, af as SigningCommitmentWithOptionalNonce, a7 as SparkSigner, ak as SplitSecretWithProofsParams, an as SubtractSplitAndEncryptParams, ao as SubtractSplitAndEncryptResult, ae as UnsafeStatelessSparkSigner, aq as VerifiableSecretShare, aB as bigIntToPrivateKey, av as computerLagrangeCoefficients, at as evaluatePolynomial, au as fieldDiv, aw as generatePolynomialForSecretSharing, ar as getRandomBigInt, as as modInverse, az as recoverSecret, ax as splitSecret, ay as splitSecretWithProofs, aA as validateShare } from './client-D1dLzWu0.js';
8
+ import { a9 as SigningNonce, aa as SigningCommitment, ab as SignFrostBindingParams, ac as AggregateFrostBindingParams, ad as DummyTx } from './client-eyjf4knu.js';
9
+ export { aj as AggregateFrostParams, a8 as DefaultSparkSigner, al as DerivedHDKey, ap as IKeyPackage, ah as KeyDerivation, ag as KeyDerivationType, am as KeyPair, ai as SignFrostParams, af as SigningCommitmentWithOptionalNonce, a7 as SparkSigner, ak as SplitSecretWithProofsParams, an as SubtractSplitAndEncryptParams, ao as SubtractSplitAndEncryptResult, ae as UnsafeStatelessSparkSigner, aq as VerifiableSecretShare, aB as bigIntToPrivateKey, av as computerLagrangeCoefficients, at as evaluatePolynomial, au as fieldDiv, aw as generatePolynomialForSecretSharing, ar as getRandomBigInt, as as modInverse, az as recoverSecret, ax as splitSecret, ay as splitSecretWithProofs, aA as validateShare } from './client-eyjf4knu.js';
10
10
  import { Logger, LoggingLevel } from '@lightsparkdev/core';
11
11
  import '@opentelemetry/api';
12
12
  import '@scure/base';
@@ -248,13 +248,12 @@ interface BroadcastResult {
248
248
  broadcastedPackages?: number;
249
249
  }
250
250
  declare function isEphemeralAnchorOutput(script?: Uint8Array, amount?: bigint): boolean;
251
- declare function constructUnilateralExitTxs(nodeHexStrings: string[], sparkClient?: SparkServiceClient, network?: any): Promise<TxChain[]>;
252
251
  declare function constructUnilateralExitFeeBumpPackages(nodeHexStrings: string[], utxos: Utxo[], feeRate: FeeRate, electrsUrl: string, sparkClient?: SparkServiceClient, network?: any): Promise<FeeBumpTxChain[]>;
253
252
  declare function hash160(data: Uint8Array): Uint8Array;
254
253
  declare function constructFeeBumpTx(txHex: string, utxos: Utxo[], feeRate: FeeRate, previousFeeBumpTx?: string): {
255
254
  feeBumpPsbt: string;
256
255
  usedUtxos: Utxo[];
257
- correctedParentTx?: string;
256
+ parentTx?: string;
258
257
  };
259
258
 
260
259
  declare function getSparkAddressFromTaproot(taprootAddress: string): SparkAddressFormat;
@@ -285,4 +284,4 @@ declare function getSparkFrost(): SparkFrostBase;
285
284
 
286
285
  declare function initializeTracerEnvNodeJS({ spanProcessors, traceUrls, }: Parameters<SparkWalletNodeJS["initializeTracerEnv"]>[0]): void;
287
286
 
288
- export { AuthenticationError, Bech32mTokenIdentifier, type BroadcastConfig, type BroadcastResult, ConfigurationError, DEFAULT_FEE_SATS, DIRECT_HTLC_TIMELOCK_OFFSET, DIRECT_TIMELOCK_OFFSET, DummyTx, type FeeBumpTxChain, type FeeBumpTxPackage, type FeeRate, HTLC_TIMELOCK_OFFSET, INITIAL_SEQUENCE, InternalValidationError, LOGGER_NAMES, type LeafInfo, type LoggerName, Network, NetworkError, RPCError, SigningCommitment, SigningNonce, SparkAddressFormat, SparkAuthenticationError, SparkError, SparkErrorContextArg, SparkRequestError, SparkSdkError, SparkSdkLogger, SparkValidationError, SparkWalletNodeJS as SparkWallet, TEST_UNILATERAL_DIRECT_SEQUENCE, TEST_UNILATERAL_SEQUENCE, TIME_LOCK_INTERVAL, TokenBalanceMap, TokenOutputsMap, type TxChain, type Utxo, ValidationError, addPrivateKeys, addPublicKeys, applyAdaptorToSignature, applyAdditiveTweakToPublicKey, checkIfSelectedOutputsAreAvailable, checkIfValidSequence, collectResponses, computeTaprootKeyNoScript, constructFeeBumpTx, constructUnilateralExitFeeBumpPackages, constructUnilateralExitTxs, createConnectorRefundTxs, createCurrentTimelockRefundTxs, createDecrementedTimelockNodeTx, createDecrementedTimelockRefundTxs, createInitialTimelockNodeTx, createInitialTimelockRefundTxs, createRootNodeTx, createSigningCommitment, createSigningNonce, createTestUnilateralRefundTxs, createTestUnilateralTimelockNodeTx, createZeroTimelockNodeTx, decodeBytesToSigningCommitment, decodeBytesToSigningNonce, doesLeafNeedRefresh, doesTxnNeedRenewed, encodeSigningCommitmentToBytes, encodeSigningNonceToBytes, filterTokenBalanceForTokenIdentifier, generateAdaptorFromSignature, generateSignatureFromExistingAdaptor, getCurrentTimelock, getEphemeralAnchorOutput, getLatestDepositTxId, getNextHTLCTransactionSequence, getNextTransactionSequence, getP2TRAddressFromPkScript, getP2TRAddressFromPublicKey, getP2TRScriptFromPublicKey, getP2WPKHAddressFromPublicKey, getRandomSigningNonce, getSigHashFromTx, getSigningCommitmentFromNonce, getSparkAddressFromTaproot, getSparkFrost, getTransactionSequence, getTransferPackageSigningPayload, getTxEstimatedVbytesSizeByNumberOfInputsOutputs, getTxFromRawTxBytes, getTxFromRawTxHex, getTxId, getTxIdNoReverse, hash160, initializeTracerEnvNodeJS as initializeTracerEnv, isEphemeralAnchorOutput, isTxBroadcast, isZeroTimelock, lastKeyWithTarget, maybeApplyFee, proofOfPossessionMessageHashForDepositAddress, subtractPrivateKeys, subtractPublicKeys, sumAvailableTokens, sumOfPrivateKeys, validateOutboundAdaptorSignature };
287
+ export { AuthenticationError, Bech32mTokenIdentifier, type BroadcastConfig, type BroadcastResult, ConfigurationError, DEFAULT_FEE_SATS, DIRECT_HTLC_TIMELOCK_OFFSET, DIRECT_TIMELOCK_OFFSET, DummyTx, type FeeBumpTxChain, type FeeBumpTxPackage, type FeeRate, HTLC_TIMELOCK_OFFSET, INITIAL_SEQUENCE, InternalValidationError, LOGGER_NAMES, type LeafInfo, type LoggerName, Network, NetworkError, RPCError, SigningCommitment, SigningNonce, SparkAddressFormat, SparkAuthenticationError, SparkError, SparkErrorContextArg, SparkRequestError, SparkSdkError, SparkSdkLogger, SparkValidationError, SparkWalletNodeJS as SparkWallet, TEST_UNILATERAL_DIRECT_SEQUENCE, TEST_UNILATERAL_SEQUENCE, TIME_LOCK_INTERVAL, TokenBalanceMap, TokenOutputsMap, type TxChain, type Utxo, ValidationError, addPrivateKeys, addPublicKeys, applyAdaptorToSignature, applyAdditiveTweakToPublicKey, checkIfSelectedOutputsAreAvailable, checkIfValidSequence, collectResponses, computeTaprootKeyNoScript, constructFeeBumpTx, constructUnilateralExitFeeBumpPackages, createConnectorRefundTxs, createCurrentTimelockRefundTxs, createDecrementedTimelockNodeTx, createDecrementedTimelockRefundTxs, createInitialTimelockNodeTx, createInitialTimelockRefundTxs, createRootNodeTx, createSigningCommitment, createSigningNonce, createTestUnilateralRefundTxs, createTestUnilateralTimelockNodeTx, createZeroTimelockNodeTx, decodeBytesToSigningCommitment, decodeBytesToSigningNonce, doesLeafNeedRefresh, doesTxnNeedRenewed, encodeSigningCommitmentToBytes, encodeSigningNonceToBytes, filterTokenBalanceForTokenIdentifier, generateAdaptorFromSignature, generateSignatureFromExistingAdaptor, getCurrentTimelock, getEphemeralAnchorOutput, getLatestDepositTxId, getNextHTLCTransactionSequence, getNextTransactionSequence, getP2TRAddressFromPkScript, getP2TRAddressFromPublicKey, getP2TRScriptFromPublicKey, getP2WPKHAddressFromPublicKey, getRandomSigningNonce, getSigHashFromTx, getSigningCommitmentFromNonce, getSparkAddressFromTaproot, getSparkFrost, getTransactionSequence, getTransferPackageSigningPayload, getTxEstimatedVbytesSizeByNumberOfInputsOutputs, getTxFromRawTxBytes, getTxFromRawTxHex, getTxId, getTxIdNoReverse, hash160, initializeTracerEnvNodeJS as initializeTracerEnv, isEphemeralAnchorOutput, isTxBroadcast, isZeroTimelock, lastKeyWithTarget, maybeApplyFee, proofOfPossessionMessageHashForDepositAddress, subtractPrivateKeys, subtractPublicKeys, sumAvailableTokens, sumOfPrivateKeys, validateOutboundAdaptorSignature };
@@ -43,7 +43,6 @@ import {
43
43
  computerLagrangeCoefficients,
44
44
  constructFeeBumpTx,
45
45
  constructUnilateralExitFeeBumpPackages,
46
- constructUnilateralExitTxs,
47
46
  createConnectorRefundTxs,
48
47
  createCurrentTimelockRefundTxs,
49
48
  createDecrementedTimelockNodeTx,
@@ -126,11 +125,11 @@ import {
126
125
  validateShare,
127
126
  validateSparkInvoiceFields,
128
127
  validateSparkInvoiceSignature
129
- } from "./chunk-RU434ZAE.js";
130
- import "./chunk-ZP6Z6DFX.js";
131
- import "./chunk-EU3I7GFB.js";
132
- import "./chunk-JE3MXMPW.js";
133
- import "./chunk-UYEB2VPG.js";
128
+ } from "./chunk-F3BFSHVR.js";
129
+ import "./chunk-YFVVYZCS.js";
130
+ import "./chunk-STB6WMU7.js";
131
+ import "./chunk-UTECVGQQ.js";
132
+ import "./chunk-IOIEBLMK.js";
134
133
  import "./chunk-MVRQ5US7.js";
135
134
  export {
136
135
  AuthenticationError,
@@ -177,7 +176,6 @@ export {
177
176
  computerLagrangeCoefficients,
178
177
  constructFeeBumpTx,
179
178
  constructUnilateralExitFeeBumpPackages,
180
- constructUnilateralExitTxs,
181
179
  createConnectorRefundTxs,
182
180
  createCurrentTimelockRefundTxs,
183
181
  createDecrementedTimelockNodeTx,