@buildonspark/spark-sdk 0.3.2 → 0.3.4
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.
- package/CHANGELOG.md +15 -0
- package/dist/bare/index.cjs +953 -1567
- package/dist/bare/index.d.cts +132 -29
- package/dist/bare/index.d.ts +132 -29
- package/dist/bare/index.js +948 -1565
- package/dist/{chunk-MGCUXELA.js → chunk-IC4IUEOS.js} +931 -125
- package/dist/{chunk-MH7BMOLL.js → chunk-J2P3KTQP.js} +1 -1
- package/dist/{chunk-JDQKNT7G.js → chunk-KIQTO4FX.js} +403 -1808
- package/dist/{chunk-73GJOG5R.js → chunk-XWLR6G5C.js} +1 -1
- package/dist/{chunk-4KGN75J4.js → chunk-YH7MDVTT.js} +1 -1
- package/dist/{client-DrjQwET9.d.ts → client-DBZ43pJT.d.ts} +1 -1
- package/dist/{client-DUFejFfn.d.cts → client-DWml6sjL.d.cts} +1 -1
- package/dist/debug.cjs +957 -1569
- package/dist/debug.d.cts +8 -5
- package/dist/debug.d.ts +8 -5
- package/dist/debug.js +4 -4
- package/dist/graphql/objects/index.d.cts +3 -3
- package/dist/graphql/objects/index.d.ts +3 -3
- package/dist/index.cjs +913 -1528
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +9 -5
- package/dist/index.node.cjs +913 -1528
- package/dist/index.node.d.cts +6 -6
- package/dist/index.node.d.ts +6 -6
- package/dist/index.node.js +8 -4
- package/dist/{logging-IsaT3wjW.d.ts → logging-BUpzk4Z6.d.cts} +5 -5
- package/dist/{logging-Bt2FNHFR.d.cts → logging-Dt2ooQiP.d.ts} +5 -5
- package/dist/native/index.cjs +913 -1528
- package/dist/native/index.d.cts +133 -44
- package/dist/native/index.d.ts +133 -44
- package/dist/native/index.js +912 -1529
- package/dist/proto/spark.cjs +931 -125
- package/dist/proto/spark.d.cts +1 -1
- package/dist/proto/spark.d.ts +1 -1
- package/dist/proto/spark.js +17 -1
- package/dist/proto/spark_token.d.cts +1 -1
- package/dist/proto/spark_token.d.ts +1 -1
- package/dist/proto/spark_token.js +2 -2
- package/dist/{spark-CLz4-Ln8.d.cts → spark-DasxuVfm.d.cts} +150 -5
- package/dist/{spark-CLz4-Ln8.d.ts → spark-DasxuVfm.d.ts} +150 -5
- package/dist/{spark-wallet-V03V4Tgm.d.cts → spark-wallet-BoMIOPWW.d.cts} +15 -26
- package/dist/{spark-wallet-KI68-_jO.d.ts → spark-wallet-jlC0XN5f.d.ts} +15 -26
- package/dist/{spark-wallet.node-Cuvw8Kvq.d.ts → spark-wallet.node-07PksUHH.d.cts} +1 -1
- package/dist/{spark-wallet.node-BtkqW5vn.d.cts → spark-wallet.node-CdWkKMSq.d.ts} +1 -1
- package/dist/tests/test-utils.cjs +951 -147
- package/dist/tests/test-utils.d.cts +4 -4
- package/dist/tests/test-utils.d.ts +4 -4
- package/dist/tests/test-utils.js +5 -5
- package/dist/{token-transactions-5XxBewhV.d.ts → token-transactions-BDzCrQSk.d.cts} +5 -19
- package/dist/{token-transactions-fTnCtBpp.d.cts → token-transactions-DscJaJOE.d.ts} +5 -19
- package/dist/types/index.cjs +923 -125
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +2 -2
- package/package.json +1 -1
- package/src/proto/spark.ts +1167 -103
- package/src/services/config.ts +0 -4
- package/src/services/token-transactions.ts +11 -703
- package/src/services/transfer.ts +2 -213
- package/src/services/wallet-config.ts +0 -2
- package/src/spark-wallet/proto-descriptors.ts +1 -1
- package/src/spark-wallet/spark-wallet.ts +47 -215
- package/src/spark_descriptors.pb +0 -0
- package/src/tests/address.test.ts +141 -0
- package/src/tests/integration/address.test.ts +4 -0
- package/src/tests/integration/lightning.test.ts +14 -9
- package/src/tests/integration/token-output.test.ts +0 -1
- package/src/tests/integration/transfer.test.ts +108 -2
- package/src/tests/token-hashing.test.ts +0 -247
- package/src/utils/address.ts +58 -35
- package/src/utils/token-hashing.ts +1 -420
- package/src/utils/token-transaction-validation.ts +0 -330
- package/src/utils/transaction.ts +8 -8
- package/src/tests/integration/swap.test.ts +0 -780
package/dist/index.node.d.cts
CHANGED
|
@@ -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-
|
|
2
|
-
export { B as Bech32mTokenIdentifier,
|
|
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, ai as LOGGER_NAMES, a5 as LeafInfo, aj as LoggerName, ak as SparkSdkLogger, 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 './logging-
|
|
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-
|
|
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-BDzCrQSk.cjs';
|
|
2
|
+
export { B as Bech32mTokenIdentifier, x as Bech32mTokenIdentifierData, b as ConfigOptions, C as ConnectionManager, E as CreateLightningInvoiceParams, D as DecodedSparkAddressData, M as DepositParams, H as FulfillSparkInvoiceResponse, K as GroupSparkInvoicesResult, X as InitWalletResponse, J as InvalidInvoice, s as LRC_WALLET_NETWORK, L as LegacySparkAddressFormat, N as Network, p as NetworkToProto, o as NetworkType, P as PayLightningInvoiceParams, R as RawTokenIdentifierHex, c as SparkAddressData, S as SparkAddressFormat, Z as SparkWalletEvent, _ as SparkWalletEventType, $ as SparkWalletEvents, Y as SparkWalletProps, O as TokenBalanceMap, I as TokenInvoice, V as TokenMetadataMap, Q as TokenOutputsMap, T as TransferParams, G as TransferWithInvoiceOutcome, F as TransferWithInvoiceParams, U as UserTokenMetadata, a as WalletConfig, W as WalletConfigService, l as assertBech32, m as bech32mDecode, z as decodeBech32mTokenIdentifier, f as decodeSparkAddress, y as encodeBech32mTokenIdentifier, e as encodeSparkAddress, d as encodeSparkAddressWithSignature, r as getNetwork, u as getNetworkFromAddress, A as getNetworkFromBech32mTokenIdentifier, g as getNetworkFromSparkAddress, w as getNetworkFromString, i as isLegacySparkAddress, n as isSafeForNumber, j as isValidPublicKey, h as isValidSparkAddress, q as protoToNetwork, t as toProtoTimestamp, v as validateSparkInvoiceFields, k as validateSparkInvoiceSignature } from './spark-wallet-BoMIOPWW.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, ai as LOGGER_NAMES, a5 as LeafInfo, aj as LoggerName, ak as SparkSdkLogger, 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 './logging-BUpzk4Z6.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-DWml6sjL.cjs';
|
|
5
5
|
export { I as IKeyPackage } from './types-B3hMoTYO.cjs';
|
|
6
|
-
export { S as SparkWallet, i as initializeTracerEnv } from './spark-wallet.node-
|
|
7
|
-
import './spark-
|
|
6
|
+
export { S as SparkWallet, i as initializeTracerEnv } from './spark-wallet.node-07PksUHH.cjs';
|
|
7
|
+
import './spark-DasxuVfm.cjs';
|
|
8
8
|
import '@bufbuild/protobuf/wire';
|
|
9
9
|
import 'nice-grpc-common';
|
|
10
10
|
import './proto/spark_token.cjs';
|
package/dist/index.node.d.ts
CHANGED
|
@@ -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-
|
|
2
|
-
export { B as Bech32mTokenIdentifier,
|
|
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, ai as LOGGER_NAMES, a5 as LeafInfo, aj as LoggerName, ak as SparkSdkLogger, 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 './logging-
|
|
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-
|
|
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-DscJaJOE.js';
|
|
2
|
+
export { B as Bech32mTokenIdentifier, x as Bech32mTokenIdentifierData, b as ConfigOptions, C as ConnectionManager, E as CreateLightningInvoiceParams, D as DecodedSparkAddressData, M as DepositParams, H as FulfillSparkInvoiceResponse, K as GroupSparkInvoicesResult, X as InitWalletResponse, J as InvalidInvoice, s as LRC_WALLET_NETWORK, L as LegacySparkAddressFormat, N as Network, p as NetworkToProto, o as NetworkType, P as PayLightningInvoiceParams, R as RawTokenIdentifierHex, c as SparkAddressData, S as SparkAddressFormat, Z as SparkWalletEvent, _ as SparkWalletEventType, $ as SparkWalletEvents, Y as SparkWalletProps, O as TokenBalanceMap, I as TokenInvoice, V as TokenMetadataMap, Q as TokenOutputsMap, T as TransferParams, G as TransferWithInvoiceOutcome, F as TransferWithInvoiceParams, U as UserTokenMetadata, a as WalletConfig, W as WalletConfigService, l as assertBech32, m as bech32mDecode, z as decodeBech32mTokenIdentifier, f as decodeSparkAddress, y as encodeBech32mTokenIdentifier, e as encodeSparkAddress, d as encodeSparkAddressWithSignature, r as getNetwork, u as getNetworkFromAddress, A as getNetworkFromBech32mTokenIdentifier, g as getNetworkFromSparkAddress, w as getNetworkFromString, i as isLegacySparkAddress, n as isSafeForNumber, j as isValidPublicKey, h as isValidSparkAddress, q as protoToNetwork, t as toProtoTimestamp, v as validateSparkInvoiceFields, k as validateSparkInvoiceSignature } from './spark-wallet-jlC0XN5f.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, ai as LOGGER_NAMES, a5 as LeafInfo, aj as LoggerName, ak as SparkSdkLogger, 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 './logging-Dt2ooQiP.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-DBZ43pJT.js';
|
|
5
5
|
export { I as IKeyPackage } from './types-B3hMoTYO.js';
|
|
6
|
-
export { S as SparkWallet, i as initializeTracerEnv } from './spark-wallet.node-
|
|
7
|
-
import './spark-
|
|
6
|
+
export { S as SparkWallet, i as initializeTracerEnv } from './spark-wallet.node-CdWkKMSq.js';
|
|
7
|
+
import './spark-DasxuVfm.js';
|
|
8
8
|
import '@bufbuild/protobuf/wire';
|
|
9
9
|
import 'nice-grpc-common';
|
|
10
10
|
import './proto/spark_token.js';
|
package/dist/index.node.js
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
addPublicKeys,
|
|
30
30
|
applyAdaptorToSignature,
|
|
31
31
|
applyAdditiveTweakToPublicKey,
|
|
32
|
+
assertBech32,
|
|
32
33
|
bech32mDecode,
|
|
33
34
|
bigIntToPrivateKey,
|
|
34
35
|
checkIfSelectedOutputsAreAvailable,
|
|
@@ -91,6 +92,7 @@ import {
|
|
|
91
92
|
getTxId,
|
|
92
93
|
getTxIdNoReverse,
|
|
93
94
|
isEphemeralAnchorOutput,
|
|
95
|
+
isLegacySparkAddress,
|
|
94
96
|
isSafeForNumber,
|
|
95
97
|
isTxBroadcast,
|
|
96
98
|
isValidPublicKey,
|
|
@@ -113,14 +115,14 @@ import {
|
|
|
113
115
|
validateShare,
|
|
114
116
|
validateSparkInvoiceFields,
|
|
115
117
|
validateSparkInvoiceSignature
|
|
116
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-KIQTO4FX.js";
|
|
117
119
|
import {
|
|
118
120
|
LOGGER_NAMES,
|
|
119
121
|
SparkSdkLogger
|
|
120
122
|
} from "./chunk-NX5KPN5F.js";
|
|
121
|
-
import "./chunk-
|
|
122
|
-
import "./chunk-
|
|
123
|
-
import "./chunk-
|
|
123
|
+
import "./chunk-XWLR6G5C.js";
|
|
124
|
+
import "./chunk-J2P3KTQP.js";
|
|
125
|
+
import "./chunk-IC4IUEOS.js";
|
|
124
126
|
import "./chunk-CQY5ML2A.js";
|
|
125
127
|
import "./chunk-MVRQ5US7.js";
|
|
126
128
|
|
|
@@ -223,6 +225,7 @@ export {
|
|
|
223
225
|
addPublicKeys,
|
|
224
226
|
applyAdaptorToSignature,
|
|
225
227
|
applyAdditiveTweakToPublicKey,
|
|
228
|
+
assertBech32,
|
|
226
229
|
bech32mDecode,
|
|
227
230
|
bigIntToPrivateKey,
|
|
228
231
|
checkIfSelectedOutputsAreAvailable,
|
|
@@ -286,6 +289,7 @@ export {
|
|
|
286
289
|
getTxIdNoReverse,
|
|
287
290
|
initializeTracerEnvNodeJS as initializeTracerEnv,
|
|
288
291
|
isEphemeralAnchorOutput,
|
|
292
|
+
isLegacySparkAddress,
|
|
289
293
|
isSafeForNumber,
|
|
290
294
|
isTxBroadcast,
|
|
291
295
|
isValidPublicKey,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as btc from '@scure/btc-signer';
|
|
2
2
|
import { Transaction } from '@scure/btc-signer';
|
|
3
3
|
import { TransactionOutput, TransactionInput } from '@scure/btc-signer/psbt';
|
|
4
|
-
import { N as Network,
|
|
5
|
-
import { j as SigningNonce, k as SigningCommitment } from './client-
|
|
6
|
-
import { O as OutputWithPreviousTransactionData, g as TransferPackage,
|
|
4
|
+
import { N as Network, Q as TokenOutputsMap, B as Bech32mTokenIdentifier, O as TokenBalanceMap, S as SparkAddressFormat } from './spark-wallet-BoMIOPWW.cjs';
|
|
5
|
+
import { j as SigningNonce, k as SigningCommitment } from './client-DWml6sjL.cjs';
|
|
6
|
+
import { O as OutputWithPreviousTransactionData, g as TransferPackage, c as SparkServiceClient } from './spark-DasxuVfm.cjs';
|
|
7
7
|
import { Logger, LoggingLevel } from '@lightsparkdev/core';
|
|
8
8
|
|
|
9
9
|
declare function generateSignatureFromExistingAdaptor(signature: Uint8Array, adaptorPrivateKeyBytes: Uint8Array): Uint8Array;
|
|
@@ -65,9 +65,9 @@ declare function filterTokenBalanceForTokenIdentifier(tokenBalances: TokenBalanc
|
|
|
65
65
|
declare function getTransferPackageSigningPayload(transferID: string, transferPackage: TransferPackage): Uint8Array;
|
|
66
66
|
|
|
67
67
|
declare const DIRECT_TIMELOCK_OFFSET = 50;
|
|
68
|
-
declare const INITIAL_SEQUENCE
|
|
68
|
+
declare const INITIAL_SEQUENCE: number;
|
|
69
69
|
declare const INITIAL_DIRECT_SEQUENCE: number;
|
|
70
|
-
declare const TEST_UNILATERAL_SEQUENCE
|
|
70
|
+
declare const TEST_UNILATERAL_SEQUENCE: number;
|
|
71
71
|
declare const TEST_UNILATERAL_DIRECT_SEQUENCE: number;
|
|
72
72
|
declare const DEFAULT_FEE_SATS: number;
|
|
73
73
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as btc from '@scure/btc-signer';
|
|
2
2
|
import { Transaction } from '@scure/btc-signer';
|
|
3
3
|
import { TransactionOutput, TransactionInput } from '@scure/btc-signer/psbt';
|
|
4
|
-
import { N as Network,
|
|
5
|
-
import { j as SigningNonce, k as SigningCommitment } from './client-
|
|
6
|
-
import { O as OutputWithPreviousTransactionData, g as TransferPackage,
|
|
4
|
+
import { N as Network, Q as TokenOutputsMap, B as Bech32mTokenIdentifier, O as TokenBalanceMap, S as SparkAddressFormat } from './spark-wallet-jlC0XN5f.js';
|
|
5
|
+
import { j as SigningNonce, k as SigningCommitment } from './client-DBZ43pJT.js';
|
|
6
|
+
import { O as OutputWithPreviousTransactionData, g as TransferPackage, c as SparkServiceClient } from './spark-DasxuVfm.js';
|
|
7
7
|
import { Logger, LoggingLevel } from '@lightsparkdev/core';
|
|
8
8
|
|
|
9
9
|
declare function generateSignatureFromExistingAdaptor(signature: Uint8Array, adaptorPrivateKeyBytes: Uint8Array): Uint8Array;
|
|
@@ -65,9 +65,9 @@ declare function filterTokenBalanceForTokenIdentifier(tokenBalances: TokenBalanc
|
|
|
65
65
|
declare function getTransferPackageSigningPayload(transferID: string, transferPackage: TransferPackage): Uint8Array;
|
|
66
66
|
|
|
67
67
|
declare const DIRECT_TIMELOCK_OFFSET = 50;
|
|
68
|
-
declare const INITIAL_SEQUENCE
|
|
68
|
+
declare const INITIAL_SEQUENCE: number;
|
|
69
69
|
declare const INITIAL_DIRECT_SEQUENCE: number;
|
|
70
|
-
declare const TEST_UNILATERAL_SEQUENCE
|
|
70
|
+
declare const TEST_UNILATERAL_SEQUENCE: number;
|
|
71
71
|
declare const TEST_UNILATERAL_DIRECT_SEQUENCE: number;
|
|
72
72
|
declare const DEFAULT_FEE_SATS: number;
|
|
73
73
|
/**
|