@buildonspark/spark-sdk 0.2.7 → 0.2.8

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 (87) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/bare/index.cjs +1657 -1879
  3. package/dist/bare/index.d.cts +65 -115
  4. package/dist/bare/index.d.ts +65 -115
  5. package/dist/bare/index.js +1578 -1807
  6. package/dist/{chunk-GIDAHHDB.js → chunk-6CMNEDBK.js} +217 -9
  7. package/dist/{chunk-J24LM4RO.js → chunk-76SYPHOC.js} +1 -1
  8. package/dist/{chunk-2HD3USKS.js → chunk-A5M55UR3.js} +0 -24
  9. package/dist/{chunk-7LY7PJQL.js → chunk-G2RIVSSI.js} +14 -5
  10. package/dist/{chunk-R5VUHUJR.js → chunk-HMJO7LPI.js} +4160 -3739
  11. package/dist/{client-DmjOifnt.d.ts → client-B5vlztPA.d.ts} +1 -1
  12. package/dist/{client-BmnZ1xDg.d.cts → client-TLqKGhj8.d.cts} +1 -1
  13. package/dist/debug.cjs +1664 -1945
  14. package/dist/debug.d.cts +12 -7
  15. package/dist/debug.d.ts +12 -7
  16. package/dist/debug.js +6 -8
  17. package/dist/graphql/objects/index.d.cts +3 -3
  18. package/dist/graphql/objects/index.d.ts +3 -3
  19. package/dist/index.cjs +1703 -1926
  20. package/dist/index.d.cts +18 -6
  21. package/dist/index.d.ts +18 -6
  22. package/dist/index.js +17 -8
  23. package/dist/index.node.cjs +1703 -1926
  24. package/dist/index.node.d.cts +7 -6
  25. package/dist/index.node.d.ts +7 -6
  26. package/dist/index.node.js +22 -6
  27. package/dist/native/index.cjs +1697 -1927
  28. package/dist/native/index.d.cts +78 -123
  29. package/dist/native/index.d.ts +78 -123
  30. package/dist/native/index.js +1626 -1862
  31. package/dist/proto/spark.cjs +0 -24
  32. package/dist/proto/spark.d.cts +1 -1
  33. package/dist/proto/spark.d.ts +1 -1
  34. package/dist/proto/spark.js +1 -1
  35. package/dist/proto/spark_token.cjs +221 -8
  36. package/dist/proto/spark_token.d.cts +25 -2
  37. package/dist/proto/spark_token.d.ts +25 -2
  38. package/dist/proto/spark_token.js +12 -2
  39. package/dist/{spark-B305mDNB.d.cts → spark-CBBjw5AY.d.cts} +2 -30
  40. package/dist/{spark-B305mDNB.d.ts → spark-CBBjw5AY.d.ts} +2 -30
  41. package/dist/{spark-wallet-BdwARy70.d.cts → spark-wallet-CIuHgbSR.d.cts} +38 -29
  42. package/dist/{spark-wallet-enp968Uc.d.ts → spark-wallet-CrNWPa9p.d.ts} +38 -29
  43. package/dist/{spark-wallet.node-CtpJlYBs.d.cts → spark-wallet.node-BvfiSwh_.d.cts} +1 -1
  44. package/dist/{spark-wallet.node-DqWcsNb6.d.ts → spark-wallet.node-pnKSb-aa.d.ts} +1 -1
  45. package/dist/tests/test-utils.cjs +483 -1120
  46. package/dist/tests/test-utils.d.cts +8 -4
  47. package/dist/tests/test-utils.d.ts +8 -4
  48. package/dist/tests/test-utils.js +5 -6
  49. package/dist/{token-transactions-3-pVToE0.d.cts → token-transactions-ChvD_wLe.d.cts} +15 -10
  50. package/dist/{token-transactions-84Hp0hGz.d.ts → token-transactions-e8UUOjFk.d.ts} +15 -10
  51. package/dist/types/index.cjs +0 -24
  52. package/dist/types/index.d.cts +2 -2
  53. package/dist/types/index.d.ts +2 -2
  54. package/dist/types/index.js +2 -2
  55. package/dist/{xchain-address-BtuJEbzG.d.cts → xchain-address-CDnNobbB.d.ts} +9 -3
  56. package/dist/{xchain-address-Q1BrcwID.d.ts → xchain-address-CtqVOuWz.d.cts} +9 -3
  57. package/package.json +1 -1
  58. package/src/constants.ts +7 -1
  59. package/src/debug.ts +1 -1
  60. package/src/proto/spark.ts +2 -48
  61. package/src/proto/spark_token.ts +255 -7
  62. package/src/services/token-transactions.ts +57 -14
  63. package/src/services/transfer.ts +20 -17
  64. package/src/services/wallet-config.ts +2 -0
  65. package/src/signer/signer.react-native.ts +0 -2
  66. package/src/spark-wallet/spark-wallet.browser.ts +9 -8
  67. package/src/spark-wallet/spark-wallet.node.ts +8 -4
  68. package/src/spark-wallet/spark-wallet.ts +424 -227
  69. package/src/tests/address.test.ts +87 -1
  70. package/src/tests/integration/retry.test.ts +78 -0
  71. package/src/tests/integration/transfer.test.ts +285 -1
  72. package/src/tests/integration/wallet.test.ts +160 -0
  73. package/src/tests/{tokens.test.ts → token-hashing.test.ts} +150 -162
  74. package/src/tests/token-outputs.test.ts +194 -0
  75. package/src/tests/utils/spark-testing-wallet.ts +16 -8
  76. package/src/utils/address.ts +152 -11
  77. package/src/utils/invoice-hashing.test.ts +235 -0
  78. package/src/utils/invoice-hashing.ts +227 -0
  79. package/src/utils/mempool.ts +6 -0
  80. package/src/utils/retry.ts +116 -0
  81. package/src/utils/token-hashing.ts +566 -0
  82. package/src/utils/token-transactions.ts +9 -5
  83. package/dist/chunk-7N6R7G3E.js +0 -7
  84. package/dist/spark-wallet.browser-BYlprQpX.d.ts +0 -12
  85. package/dist/spark-wallet.browser-CVI2Ss3u.d.cts +0 -12
  86. package/src/services/tree-creation.ts +0 -893
  87. package/src/tests/integration/tree-creation.test.ts +0 -46
@@ -1,10 +1,10 @@
1
- export { A as AuthenticationError, C as ConfigurationError, I as InternalValidationError, N as NetworkError, a as NotImplementedError, R as RPCError, S as SparkSDKError, T as TokenTransactionService, V as ValidationError } from './token-transactions-3-pVToE0.cjs';
2
- export { B as Bech32mTokenIdentifier, m as Bech32mTokenIdentifierData, b as ConfigOptions, C as ConnectionManager, r as CreateLightningInvoiceParams, D as DecodedSparkAddressData, s as DepositParams, I as InitWalletResponse, L as LRC_WALLET_NETWORK, N as Network, h as NetworkToProto, g as NetworkType, P as PayLightningInvoiceParams, R as RawTokenIdentifierHex, c as SparkAddressData, S as SparkAddressFormat, y as SparkWalletEvents, x as SparkWalletProps, t as TokenBalanceMap, w as TokenMetadataMap, u as TokenOutputsMap, T as TransferParams, U as UserTokenMetadata, a as WalletConfig, W as WalletConfigService, o as decodeBech32mTokenIdentifier, d as decodeSparkAddress, n as encodeBech32mTokenIdentifier, e as encodeSparkAddress, j as getNetwork, k as getNetworkFromAddress, q as getNetworkFromBech32mTokenIdentifier, l as getNetworkFromString, f as isValidPublicKey, i as isValidSparkAddress, p as protoToNetwork, v as validateSparkInvoiceFields } from './spark-wallet-BdwARy70.cjs';
3
- export { ab as BroadcastConfig, ac as BroadcastResult, Q as DEFAULT_FEE_SATS, M as DIRECT_TIMELOCK_OFFSET, a9 as FeeBumpTxChain, a8 as FeeBumpTxPackage, a7 as FeeRate, O as INITIAL_DIRECT_SEQUENCE, N as INITIAL_SEQUENCE, a5 as LeafInfo, P as TEST_UNILATERAL_DIRECT_SEQUENCE, T as TEST_UNILATERAL_SEQUENCE, aa as TxChain, a6 as Utxo, q as addPrivateKeys, o as addPublicKeys, b as applyAdaptorToSignature, p as applyAdditiveTweakToPublicKey, J as checkIfSelectedOutputsAreAvailable, a1 as checkIfValidSequence, z as collectResponses, c as computeTaprootKeyNoScript, ag as constructFeeBumpTx, af as constructUnilateralExitFeeBumpPackages, ae as constructUnilateralExitTxs, _ as createConnectorRefundTransactions, X as createLeafNodeTx, V as createNodeTx, W as createNodeTxs, Y as createRefundTx, Z as createRefundTxs, S as createRootTx, F as createSigningCommitment, B as createSigningNonce, U as createSplitTx, H as decodeBytesToSigningCommitment, E as decodeBytesToSigningNonce, a2 as doesLeafNeedRefresh, G as encodeSigningCommitmentToBytes, D as encodeSigningNonceToBytes, K as filterTokenBalanceForTokenIdentifier, a as generateAdaptorFromSignature, g as generateSignatureFromExistingAdaptor, $ as getCurrentTimelock, a4 as getEphemeralAnchorOutput, w as getLatestDepositTxId, a3 as getNextTransactionSequence, f as getP2TRAddressFromPkScript, e as getP2TRAddressFromPublicKey, d as getP2TRScriptFromPublicKey, h as getP2WPKHAddressFromPublicKey, A as getRandomSigningNonce, k as getSigHashFromTx, C as getSigningCommitmentFromNonce, ah as getSparkAddressFromTaproot, a0 as getTransactionSequence, L as getTransferPackageSigningPayload, n as getTxEstimatedVbytesSizeByNumberOfInputsOutputs, j as getTxFromRawTxBytes, i as getTxFromRawTxHex, l as getTxId, m as getTxIdNoReverse, ad as isEphemeralAnchorOutput, x as isTxBroadcast, u as lastKeyWithTarget, R as maybeApplyFee, y as proofOfPossessionMessageHashForDepositAddress, r as subtractPrivateKeys, s as subtractPublicKeys, I as sumAvailableTokens, t as sumOfPrivateKeys, v as validateOutboundAdaptorSignature } from './xchain-address-BtuJEbzG.cjs';
4
- export { A as AggregateFrostParams, D as DefaultSparkSigner, p as DerivedHDKey, l as KeyDerivation, K as KeyDerivationType, q as KeyPair, n as SignFrostParams, k as SigningCommitment, i as SigningCommitmentWithOptionalNonce, j as SigningNonce, S as SparkSigner, o as SplitSecretWithProofsParams, T as TaprootOutputKeysGenerator, a as TaprootSparkSigner, U as UnsafeStatelessSparkSigner, V as VerifiableSecretShare, h as bigIntToPrivateKey, c as computerLagrangeCoefficients, e as evaluatePolynomial, f as fieldDiv, b as generatePolynomialForSecretSharing, g as getRandomBigInt, m as modInverse, r as recoverSecret, s as splitSecret, d as splitSecretWithProofs, v as validateShare } from './client-BmnZ1xDg.cjs';
1
+ export { A as AuthenticationError, C as ConfigurationError, I as InternalValidationError, N as NetworkError, a as NotImplementedError, R as RPCError, S as SparkSDKError, T as TokenTransactionService, V as ValidationError } from './token-transactions-ChvD_wLe.cjs';
2
+ export { B as Bech32mTokenIdentifier, r as Bech32mTokenIdentifierData, b as ConfigOptions, C as ConnectionManager, x as CreateLightningInvoiceParams, D as DecodedSparkAddressData, y as DepositParams, I as InitWalletResponse, L as LRC_WALLET_NETWORK, N as Network, m as NetworkToProto, l as NetworkType, P as PayLightningInvoiceParams, R as RawTokenIdentifierHex, c as SparkAddressData, S as SparkAddressFormat, G as SparkWalletEvents, F as SparkWalletProps, z as TokenBalanceMap, E as TokenMetadataMap, A as TokenOutputsMap, T as TransferParams, U as UserTokenMetadata, a as WalletConfig, W as WalletConfigService, k as bech32mDecode, u as decodeBech32mTokenIdentifier, f as decodeSparkAddress, s as encodeBech32mTokenIdentifier, e as encodeSparkAddress, d as encodeSparkAddressWithSignature, n as getNetwork, o as getNetworkFromAddress, w as getNetworkFromBech32mTokenIdentifier, j as getNetworkFromSparkAddress, q as getNetworkFromString, g as isValidPublicKey, i as isValidSparkAddress, p as protoToNetwork, t as toProtoTimestamp, v as validateSparkInvoiceFields, h as validateSparkInvoiceSignature } from './spark-wallet-CIuHgbSR.cjs';
3
+ export { ab as BroadcastConfig, ac as BroadcastResult, Q as DEFAULT_FEE_SATS, M as DIRECT_TIMELOCK_OFFSET, a9 as FeeBumpTxChain, a8 as FeeBumpTxPackage, a7 as FeeRate, O as INITIAL_DIRECT_SEQUENCE, N as INITIAL_SEQUENCE, a5 as LeafInfo, P as TEST_UNILATERAL_DIRECT_SEQUENCE, T as TEST_UNILATERAL_SEQUENCE, aa as TxChain, a6 as Utxo, q as addPrivateKeys, o as addPublicKeys, b as applyAdaptorToSignature, p as applyAdditiveTweakToPublicKey, J as checkIfSelectedOutputsAreAvailable, a1 as checkIfValidSequence, z as collectResponses, c as computeTaprootKeyNoScript, ag as constructFeeBumpTx, af as constructUnilateralExitFeeBumpPackages, ae as constructUnilateralExitTxs, _ as createConnectorRefundTransactions, X as createLeafNodeTx, V as createNodeTx, W as createNodeTxs, Y as createRefundTx, Z as createRefundTxs, S as createRootTx, F as createSigningCommitment, B as createSigningNonce, U as createSplitTx, H as decodeBytesToSigningCommitment, E as decodeBytesToSigningNonce, a2 as doesLeafNeedRefresh, G as encodeSigningCommitmentToBytes, D as encodeSigningNonceToBytes, K as filterTokenBalanceForTokenIdentifier, a as generateAdaptorFromSignature, g as generateSignatureFromExistingAdaptor, $ as getCurrentTimelock, a4 as getEphemeralAnchorOutput, w as getLatestDepositTxId, a3 as getNextTransactionSequence, f as getP2TRAddressFromPkScript, e as getP2TRAddressFromPublicKey, d as getP2TRScriptFromPublicKey, h as getP2WPKHAddressFromPublicKey, A as getRandomSigningNonce, k as getSigHashFromTx, C as getSigningCommitmentFromNonce, ah as getSparkAddressFromTaproot, a0 as getTransactionSequence, L as getTransferPackageSigningPayload, n as getTxEstimatedVbytesSizeByNumberOfInputsOutputs, j as getTxFromRawTxBytes, i as getTxFromRawTxHex, l as getTxId, m as getTxIdNoReverse, ad as isEphemeralAnchorOutput, x as isTxBroadcast, u as lastKeyWithTarget, R as maybeApplyFee, y as proofOfPossessionMessageHashForDepositAddress, r as subtractPrivateKeys, s as subtractPublicKeys, I as sumAvailableTokens, t as sumOfPrivateKeys, v as validateOutboundAdaptorSignature } from './xchain-address-CtqVOuWz.cjs';
4
+ export { A as AggregateFrostParams, D as DefaultSparkSigner, p as DerivedHDKey, l as KeyDerivation, K as KeyDerivationType, q as KeyPair, n as SignFrostParams, k as SigningCommitment, i as SigningCommitmentWithOptionalNonce, j as SigningNonce, S as SparkSigner, o as SplitSecretWithProofsParams, T as TaprootOutputKeysGenerator, a as TaprootSparkSigner, U as UnsafeStatelessSparkSigner, V as VerifiableSecretShare, h as bigIntToPrivateKey, c as computerLagrangeCoefficients, e as evaluatePolynomial, f as fieldDiv, b as generatePolynomialForSecretSharing, g as getRandomBigInt, m as modInverse, r as recoverSecret, s as splitSecret, d as splitSecretWithProofs, v as validateShare } from './client-TLqKGhj8.cjs';
5
5
  export { I as IKeyPackage } from './types-B3hMoTYO.cjs';
6
- export { S as SparkWallet, i as initializeTracerEnv } from './spark-wallet.node-CtpJlYBs.cjs';
7
- import './spark-B305mDNB.cjs';
6
+ export { S as SparkWallet, i as initializeTracerEnv } from './spark-wallet.node-BvfiSwh_.cjs';
7
+ import './spark-CBBjw5AY.cjs';
8
8
  import '@bufbuild/protobuf/wire';
9
9
  import 'nice-grpc-common';
10
10
  import './proto/spark_token.cjs';
@@ -14,6 +14,7 @@ import 'nice-grpc';
14
14
  import 'nice-grpc-web';
15
15
  import '@opentelemetry/sdk-trace-base';
16
16
  import 'eventemitter3';
17
+ import '@scure/base';
17
18
  import '@scure/btc-signer/psbt';
18
19
  import '@lightsparkdev/core';
19
20
  import '@scure/bip32';
@@ -1,10 +1,10 @@
1
- export { A as AuthenticationError, C as ConfigurationError, I as InternalValidationError, N as NetworkError, a as NotImplementedError, R as RPCError, S as SparkSDKError, T as TokenTransactionService, V as ValidationError } from './token-transactions-84Hp0hGz.js';
2
- export { B as Bech32mTokenIdentifier, m as Bech32mTokenIdentifierData, b as ConfigOptions, C as ConnectionManager, r as CreateLightningInvoiceParams, D as DecodedSparkAddressData, s as DepositParams, I as InitWalletResponse, L as LRC_WALLET_NETWORK, N as Network, h as NetworkToProto, g as NetworkType, P as PayLightningInvoiceParams, R as RawTokenIdentifierHex, c as SparkAddressData, S as SparkAddressFormat, y as SparkWalletEvents, x as SparkWalletProps, t as TokenBalanceMap, w as TokenMetadataMap, u as TokenOutputsMap, T as TransferParams, U as UserTokenMetadata, a as WalletConfig, W as WalletConfigService, o as decodeBech32mTokenIdentifier, d as decodeSparkAddress, n as encodeBech32mTokenIdentifier, e as encodeSparkAddress, j as getNetwork, k as getNetworkFromAddress, q as getNetworkFromBech32mTokenIdentifier, l as getNetworkFromString, f as isValidPublicKey, i as isValidSparkAddress, p as protoToNetwork, v as validateSparkInvoiceFields } from './spark-wallet-enp968Uc.js';
3
- export { ab as BroadcastConfig, ac as BroadcastResult, Q as DEFAULT_FEE_SATS, M as DIRECT_TIMELOCK_OFFSET, a9 as FeeBumpTxChain, a8 as FeeBumpTxPackage, a7 as FeeRate, O as INITIAL_DIRECT_SEQUENCE, N as INITIAL_SEQUENCE, a5 as LeafInfo, P as TEST_UNILATERAL_DIRECT_SEQUENCE, T as TEST_UNILATERAL_SEQUENCE, aa as TxChain, a6 as Utxo, q as addPrivateKeys, o as addPublicKeys, b as applyAdaptorToSignature, p as applyAdditiveTweakToPublicKey, J as checkIfSelectedOutputsAreAvailable, a1 as checkIfValidSequence, z as collectResponses, c as computeTaprootKeyNoScript, ag as constructFeeBumpTx, af as constructUnilateralExitFeeBumpPackages, ae as constructUnilateralExitTxs, _ as createConnectorRefundTransactions, X as createLeafNodeTx, V as createNodeTx, W as createNodeTxs, Y as createRefundTx, Z as createRefundTxs, S as createRootTx, F as createSigningCommitment, B as createSigningNonce, U as createSplitTx, H as decodeBytesToSigningCommitment, E as decodeBytesToSigningNonce, a2 as doesLeafNeedRefresh, G as encodeSigningCommitmentToBytes, D as encodeSigningNonceToBytes, K as filterTokenBalanceForTokenIdentifier, a as generateAdaptorFromSignature, g as generateSignatureFromExistingAdaptor, $ as getCurrentTimelock, a4 as getEphemeralAnchorOutput, w as getLatestDepositTxId, a3 as getNextTransactionSequence, f as getP2TRAddressFromPkScript, e as getP2TRAddressFromPublicKey, d as getP2TRScriptFromPublicKey, h as getP2WPKHAddressFromPublicKey, A as getRandomSigningNonce, k as getSigHashFromTx, C as getSigningCommitmentFromNonce, ah as getSparkAddressFromTaproot, a0 as getTransactionSequence, L as getTransferPackageSigningPayload, n as getTxEstimatedVbytesSizeByNumberOfInputsOutputs, j as getTxFromRawTxBytes, i as getTxFromRawTxHex, l as getTxId, m as getTxIdNoReverse, ad as isEphemeralAnchorOutput, x as isTxBroadcast, u as lastKeyWithTarget, R as maybeApplyFee, y as proofOfPossessionMessageHashForDepositAddress, r as subtractPrivateKeys, s as subtractPublicKeys, I as sumAvailableTokens, t as sumOfPrivateKeys, v as validateOutboundAdaptorSignature } from './xchain-address-Q1BrcwID.js';
4
- export { A as AggregateFrostParams, D as DefaultSparkSigner, p as DerivedHDKey, l as KeyDerivation, K as KeyDerivationType, q as KeyPair, n as SignFrostParams, k as SigningCommitment, i as SigningCommitmentWithOptionalNonce, j as SigningNonce, S as SparkSigner, o as SplitSecretWithProofsParams, T as TaprootOutputKeysGenerator, a as TaprootSparkSigner, U as UnsafeStatelessSparkSigner, V as VerifiableSecretShare, h as bigIntToPrivateKey, c as computerLagrangeCoefficients, e as evaluatePolynomial, f as fieldDiv, b as generatePolynomialForSecretSharing, g as getRandomBigInt, m as modInverse, r as recoverSecret, s as splitSecret, d as splitSecretWithProofs, v as validateShare } from './client-DmjOifnt.js';
1
+ export { A as AuthenticationError, C as ConfigurationError, I as InternalValidationError, N as NetworkError, a as NotImplementedError, R as RPCError, S as SparkSDKError, T as TokenTransactionService, V as ValidationError } from './token-transactions-e8UUOjFk.js';
2
+ export { B as Bech32mTokenIdentifier, r as Bech32mTokenIdentifierData, b as ConfigOptions, C as ConnectionManager, x as CreateLightningInvoiceParams, D as DecodedSparkAddressData, y as DepositParams, I as InitWalletResponse, L as LRC_WALLET_NETWORK, N as Network, m as NetworkToProto, l as NetworkType, P as PayLightningInvoiceParams, R as RawTokenIdentifierHex, c as SparkAddressData, S as SparkAddressFormat, G as SparkWalletEvents, F as SparkWalletProps, z as TokenBalanceMap, E as TokenMetadataMap, A as TokenOutputsMap, T as TransferParams, U as UserTokenMetadata, a as WalletConfig, W as WalletConfigService, k as bech32mDecode, u as decodeBech32mTokenIdentifier, f as decodeSparkAddress, s as encodeBech32mTokenIdentifier, e as encodeSparkAddress, d as encodeSparkAddressWithSignature, n as getNetwork, o as getNetworkFromAddress, w as getNetworkFromBech32mTokenIdentifier, j as getNetworkFromSparkAddress, q as getNetworkFromString, g as isValidPublicKey, i as isValidSparkAddress, p as protoToNetwork, t as toProtoTimestamp, v as validateSparkInvoiceFields, h as validateSparkInvoiceSignature } from './spark-wallet-CrNWPa9p.js';
3
+ export { ab as BroadcastConfig, ac as BroadcastResult, Q as DEFAULT_FEE_SATS, M as DIRECT_TIMELOCK_OFFSET, a9 as FeeBumpTxChain, a8 as FeeBumpTxPackage, a7 as FeeRate, O as INITIAL_DIRECT_SEQUENCE, N as INITIAL_SEQUENCE, a5 as LeafInfo, P as TEST_UNILATERAL_DIRECT_SEQUENCE, T as TEST_UNILATERAL_SEQUENCE, aa as TxChain, a6 as Utxo, q as addPrivateKeys, o as addPublicKeys, b as applyAdaptorToSignature, p as applyAdditiveTweakToPublicKey, J as checkIfSelectedOutputsAreAvailable, a1 as checkIfValidSequence, z as collectResponses, c as computeTaprootKeyNoScript, ag as constructFeeBumpTx, af as constructUnilateralExitFeeBumpPackages, ae as constructUnilateralExitTxs, _ as createConnectorRefundTransactions, X as createLeafNodeTx, V as createNodeTx, W as createNodeTxs, Y as createRefundTx, Z as createRefundTxs, S as createRootTx, F as createSigningCommitment, B as createSigningNonce, U as createSplitTx, H as decodeBytesToSigningCommitment, E as decodeBytesToSigningNonce, a2 as doesLeafNeedRefresh, G as encodeSigningCommitmentToBytes, D as encodeSigningNonceToBytes, K as filterTokenBalanceForTokenIdentifier, a as generateAdaptorFromSignature, g as generateSignatureFromExistingAdaptor, $ as getCurrentTimelock, a4 as getEphemeralAnchorOutput, w as getLatestDepositTxId, a3 as getNextTransactionSequence, f as getP2TRAddressFromPkScript, e as getP2TRAddressFromPublicKey, d as getP2TRScriptFromPublicKey, h as getP2WPKHAddressFromPublicKey, A as getRandomSigningNonce, k as getSigHashFromTx, C as getSigningCommitmentFromNonce, ah as getSparkAddressFromTaproot, a0 as getTransactionSequence, L as getTransferPackageSigningPayload, n as getTxEstimatedVbytesSizeByNumberOfInputsOutputs, j as getTxFromRawTxBytes, i as getTxFromRawTxHex, l as getTxId, m as getTxIdNoReverse, ad as isEphemeralAnchorOutput, x as isTxBroadcast, u as lastKeyWithTarget, R as maybeApplyFee, y as proofOfPossessionMessageHashForDepositAddress, r as subtractPrivateKeys, s as subtractPublicKeys, I as sumAvailableTokens, t as sumOfPrivateKeys, v as validateOutboundAdaptorSignature } from './xchain-address-CDnNobbB.js';
4
+ export { A as AggregateFrostParams, D as DefaultSparkSigner, p as DerivedHDKey, l as KeyDerivation, K as KeyDerivationType, q as KeyPair, n as SignFrostParams, k as SigningCommitment, i as SigningCommitmentWithOptionalNonce, j as SigningNonce, S as SparkSigner, o as SplitSecretWithProofsParams, T as TaprootOutputKeysGenerator, a as TaprootSparkSigner, U as UnsafeStatelessSparkSigner, V as VerifiableSecretShare, h as bigIntToPrivateKey, c as computerLagrangeCoefficients, e as evaluatePolynomial, f as fieldDiv, b as generatePolynomialForSecretSharing, g as getRandomBigInt, m as modInverse, r as recoverSecret, s as splitSecret, d as splitSecretWithProofs, v as validateShare } from './client-B5vlztPA.js';
5
5
  export { I as IKeyPackage } from './types-B3hMoTYO.js';
6
- export { S as SparkWallet, i as initializeTracerEnv } from './spark-wallet.node-DqWcsNb6.js';
7
- import './spark-B305mDNB.js';
6
+ export { S as SparkWallet, i as initializeTracerEnv } from './spark-wallet.node-pnKSb-aa.js';
7
+ import './spark-CBBjw5AY.js';
8
8
  import '@bufbuild/protobuf/wire';
9
9
  import 'nice-grpc-common';
10
10
  import './proto/spark_token.js';
@@ -14,6 +14,7 @@ import 'nice-grpc';
14
14
  import 'nice-grpc-web';
15
15
  import '@opentelemetry/sdk-trace-base';
16
16
  import 'eventemitter3';
17
+ import '@scure/base';
17
18
  import '@scure/btc-signer/psbt';
18
19
  import '@lightsparkdev/core';
19
20
  import '@scure/bip32';
@@ -29,6 +29,7 @@ import {
29
29
  addPublicKeys,
30
30
  applyAdaptorToSignature,
31
31
  applyAdditiveTweakToPublicKey,
32
+ bech32mDecode,
32
33
  bigIntToPrivateKey,
33
34
  checkIfSelectedOutputsAreAvailable,
34
35
  checkIfValidSequence,
@@ -57,6 +58,7 @@ import {
57
58
  encodeSigningCommitmentToBytes,
58
59
  encodeSigningNonceToBytes,
59
60
  encodeSparkAddress,
61
+ encodeSparkAddressWithSignature,
60
62
  evaluatePolynomial,
61
63
  fieldDiv,
62
64
  filterTokenBalanceForTokenIdentifier,
@@ -69,6 +71,7 @@ import {
69
71
  getNetwork,
70
72
  getNetworkFromAddress,
71
73
  getNetworkFromBech32mTokenIdentifier,
74
+ getNetworkFromSparkAddress,
72
75
  getNetworkFromString,
73
76
  getNextTransactionSequence,
74
77
  getP2TRAddressFromPkScript,
@@ -104,13 +107,15 @@ import {
104
107
  subtractPublicKeys,
105
108
  sumAvailableTokens,
106
109
  sumOfPrivateKeys,
110
+ toProtoTimestamp,
107
111
  validateOutboundAdaptorSignature,
108
112
  validateShare,
109
- validateSparkInvoiceFields
110
- } from "./chunk-R5VUHUJR.js";
111
- import "./chunk-GIDAHHDB.js";
112
- import "./chunk-J24LM4RO.js";
113
- import "./chunk-2HD3USKS.js";
113
+ validateSparkInvoiceFields,
114
+ validateSparkInvoiceSignature
115
+ } from "./chunk-HMJO7LPI.js";
116
+ import "./chunk-6CMNEDBK.js";
117
+ import "./chunk-76SYPHOC.js";
118
+ import "./chunk-A5M55UR3.js";
114
119
  import "./chunk-CQY5ML2A.js";
115
120
  import "./chunk-MVRQ5US7.js";
116
121
 
@@ -132,6 +137,12 @@ var SparkWalletNodeJS = class _SparkWalletNodeJS extends SparkWallet {
132
137
  }) {
133
138
  const wallet = new _SparkWalletNodeJS(options, signer);
134
139
  wallet.initializeTracer(wallet);
140
+ if (options && options.signerWithPreExistingKeys) {
141
+ await wallet.initWalletWithoutSeed();
142
+ return {
143
+ wallet
144
+ };
145
+ }
135
146
  const initResponse = await wallet.initWallet(mnemonicOrSeed, accountNumber);
136
147
  return {
137
148
  wallet,
@@ -204,6 +215,7 @@ export {
204
215
  addPublicKeys,
205
216
  applyAdaptorToSignature,
206
217
  applyAdditiveTweakToPublicKey,
218
+ bech32mDecode,
207
219
  bigIntToPrivateKey,
208
220
  checkIfSelectedOutputsAreAvailable,
209
221
  checkIfValidSequence,
@@ -232,6 +244,7 @@ export {
232
244
  encodeSigningCommitmentToBytes,
233
245
  encodeSigningNonceToBytes,
234
246
  encodeSparkAddress,
247
+ encodeSparkAddressWithSignature,
235
248
  evaluatePolynomial,
236
249
  fieldDiv,
237
250
  filterTokenBalanceForTokenIdentifier,
@@ -244,6 +257,7 @@ export {
244
257
  getNetwork,
245
258
  getNetworkFromAddress,
246
259
  getNetworkFromBech32mTokenIdentifier,
260
+ getNetworkFromSparkAddress,
247
261
  getNetworkFromString,
248
262
  getNextTransactionSequence,
249
263
  getP2TRAddressFromPkScript,
@@ -279,7 +293,9 @@ export {
279
293
  subtractPublicKeys,
280
294
  sumAvailableTokens,
281
295
  sumOfPrivateKeys,
296
+ toProtoTimestamp,
282
297
  validateOutboundAdaptorSignature,
283
298
  validateShare,
284
- validateSparkInvoiceFields
299
+ validateSparkInvoiceFields,
300
+ validateSparkInvoiceSignature
285
301
  };