@buildonspark/spark-sdk 0.2.3 → 0.2.5
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 +17 -0
- package/dist/{chunk-3SEOTO43.js → chunk-3SPMJMUX.js} +3 -2
- package/dist/{chunk-CDLETEDT.js → chunk-CQY5ML2A.js} +16 -3
- package/dist/{chunk-PTRXJS7Q.js → chunk-LQZL2D3Y.js} +1 -1
- package/dist/{chunk-PLLJIZC3.js → chunk-U7LRIWTF.js} +2471 -822
- package/dist/{client-CcYzmpmj.d.cts → client-C88GCTPB.d.cts} +211 -104
- package/dist/{client-CGTRS23n.d.ts → client-Dg6vS_2I.d.ts} +211 -104
- package/dist/debug.cjs +2511 -831
- package/dist/debug.d.cts +19 -6
- package/dist/debug.d.ts +19 -6
- package/dist/debug.js +3 -3
- package/dist/graphql/objects/index.cjs +13 -1
- package/dist/graphql/objects/index.d.cts +6 -51
- package/dist/graphql/objects/index.d.ts +6 -51
- package/dist/graphql/objects/index.js +1 -1
- package/dist/index.cjs +2491 -797
- package/dist/index.d.cts +189 -9
- package/dist/index.d.ts +189 -9
- package/dist/index.js +32 -4
- package/dist/index.node.cjs +2596 -799
- package/dist/index.node.d.cts +9 -190
- package/dist/index.node.d.ts +9 -190
- package/dist/index.node.js +134 -4
- package/dist/native/index.cjs +2491 -797
- package/dist/native/index.d.cts +309 -174
- package/dist/native/index.d.ts +309 -174
- package/dist/native/index.js +2495 -814
- package/dist/proto/lrc20.d.cts +1 -1
- package/dist/proto/lrc20.d.ts +1 -1
- package/dist/proto/spark.d.cts +1 -1
- package/dist/proto/spark.d.ts +1 -1
- package/dist/proto/spark_token.d.cts +1 -1
- package/dist/proto/spark_token.d.ts +1 -1
- package/dist/{spark-B_7nZx6T.d.cts → spark-ESAfZARg.d.cts} +1 -1
- package/dist/{spark-B_7nZx6T.d.ts → spark-ESAfZARg.d.ts} +1 -1
- package/dist/{spark-wallet-CxcGPXRB.d.ts → spark-wallet-B2WwKN8W.d.ts} +57 -35
- package/dist/{spark-wallet-DJJm19BP.d.cts → spark-wallet-Di65w0Us.d.cts} +57 -35
- package/dist/spark-wallet.node-7R0Rxyj9.d.cts +13 -0
- package/dist/spark-wallet.node-CSPWOWRu.d.ts +13 -0
- package/dist/tests/test-utils.cjs +578 -77
- package/dist/tests/test-utils.d.cts +12 -13
- package/dist/tests/test-utils.d.ts +12 -13
- package/dist/tests/test-utils.js +54 -17
- package/dist/types/index.cjs +16 -3
- package/dist/types/index.d.cts +3 -4
- package/dist/types/index.d.ts +3 -4
- package/dist/types/index.js +2 -2
- package/dist/{xchain-address-Bh9w1SeC.d.ts → xchain-address-BsveIy5l.d.ts} +56 -8
- package/dist/{xchain-address-SZ7dkVUE.d.cts → xchain-address-CqRu3F21.d.cts} +56 -8
- package/package.json +1 -1
- package/src/graphql/client.ts +57 -8
- package/src/graphql/mutations/CompleteLeavesSwap.ts +9 -1
- package/src/graphql/mutations/RequestSwapLeaves.ts +4 -0
- package/src/graphql/objects/CompleteLeavesSwapInput.ts +34 -34
- package/src/graphql/objects/LeavesSwapRequest.ts +4 -0
- package/src/graphql/objects/RequestLeavesSwapInput.ts +48 -47
- package/src/graphql/objects/SparkWalletUser.ts +1 -1
- package/src/graphql/objects/SwapLeaf.ts +40 -32
- package/src/graphql/objects/UserLeafInput.ts +24 -0
- package/src/graphql/objects/UserRequest.ts +4 -0
- package/src/graphql/queries/Transfers.ts +15 -0
- package/src/index.node.ts +1 -1
- package/src/native/index.ts +4 -5
- package/src/services/coop-exit.ts +171 -36
- package/src/services/deposit.ts +471 -74
- package/src/services/lightning.ts +18 -5
- package/src/services/signing.ts +162 -50
- package/src/services/transfer.ts +950 -384
- package/src/services/tree-creation.ts +342 -121
- package/src/spark-wallet/spark-wallet.node.ts +71 -66
- package/src/spark-wallet/spark-wallet.ts +561 -192
- package/src/tests/integration/coop-exit.test.ts +3 -8
- package/src/tests/integration/deposit.test.ts +3 -3
- package/src/tests/integration/lightning.test.ts +521 -466
- package/src/tests/integration/ssp/static_deposit.test.ts +83 -1
- package/src/tests/integration/ssp/transfers.test.ts +97 -0
- package/src/tests/integration/swap.test.ts +559 -307
- package/src/tests/integration/transfer.test.ts +625 -623
- package/src/tests/integration/wallet.test.ts +2 -2
- package/src/tests/integration/watchtower.test.ts +211 -0
- package/src/tests/test-utils.ts +63 -14
- package/src/tests/utils/test-faucet.ts +4 -2
- package/src/types/sdk-types.ts +15 -0
- package/src/utils/adaptor-signature.ts +15 -5
- package/src/utils/bitcoin.ts +13 -0
- package/src/utils/fetch.ts +75 -0
- package/src/utils/mempool.ts +9 -4
- package/src/utils/transaction.ts +388 -26
- package/dist/sdk-types-CB9HrW5O.d.cts +0 -44
- package/dist/sdk-types-CkRNraXT.d.ts +0 -44
- package/src/graphql/queries/Transfer.ts +0 -10
package/dist/debug.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as Bech32mTokenIdentifier,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import './spark-
|
|
1
|
+
import { B as Bech32mTokenIdentifier, n as Bech32mTokenIdentifierData, D as DecodedSparkAddressData, L as LRC_WALLET_NETWORK, k as LRC_WALLET_NETWORK_TYPE, N as Network, h as NetworkToProto, g as NetworkType, c as SparkAddressData, S as SparkAddressFormat, q as decodeBech32mTokenIdentifier, d as decodeSparkAddress, o as encodeBech32mTokenIdentifier, e as encodeSparkAddress, j as getNetwork, l as getNetworkFromAddress, m as getNetworkFromString, f as isValidPublicKey, i as isValidSparkAddress, p as protoToNetwork, y as SparkWallet, b as ConfigOptions } from './spark-wallet-Di65w0Us.cjs';
|
|
2
|
+
import { 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 filterTokenBalanceForTokenPublicKey, 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-CqRu3F21.cjs';
|
|
3
|
+
import { 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-C88GCTPB.cjs';
|
|
4
|
+
import './spark-ESAfZARg.cjs';
|
|
5
5
|
import '@bufbuild/protobuf/wire';
|
|
6
6
|
import 'nice-grpc-common';
|
|
7
7
|
import '@buildonspark/lrc20-sdk';
|
|
@@ -11,7 +11,6 @@ import 'nice-grpc';
|
|
|
11
11
|
import 'nice-grpc-web';
|
|
12
12
|
import './proto/spark_token.cjs';
|
|
13
13
|
import 'eventemitter3';
|
|
14
|
-
import './sdk-types-CB9HrW5O.cjs';
|
|
15
14
|
import '@scure/btc-signer/psbt';
|
|
16
15
|
import '@lightsparkdev/core';
|
|
17
16
|
import '@scure/bip32';
|
|
@@ -22,10 +21,13 @@ declare const utils_Bech32mTokenIdentifierData: typeof Bech32mTokenIdentifierDat
|
|
|
22
21
|
declare const utils_BroadcastConfig: typeof BroadcastConfig;
|
|
23
22
|
declare const utils_BroadcastResult: typeof BroadcastResult;
|
|
24
23
|
declare const utils_DEFAULT_FEE_SATS: typeof DEFAULT_FEE_SATS;
|
|
24
|
+
declare const utils_DIRECT_TIMELOCK_OFFSET: typeof DIRECT_TIMELOCK_OFFSET;
|
|
25
25
|
declare const utils_DecodedSparkAddressData: typeof DecodedSparkAddressData;
|
|
26
26
|
declare const utils_FeeBumpTxChain: typeof FeeBumpTxChain;
|
|
27
27
|
declare const utils_FeeBumpTxPackage: typeof FeeBumpTxPackage;
|
|
28
28
|
declare const utils_FeeRate: typeof FeeRate;
|
|
29
|
+
declare const utils_INITIAL_DIRECT_SEQUENCE: typeof INITIAL_DIRECT_SEQUENCE;
|
|
30
|
+
declare const utils_INITIAL_SEQUENCE: typeof INITIAL_SEQUENCE;
|
|
29
31
|
declare const utils_LRC_WALLET_NETWORK: typeof LRC_WALLET_NETWORK;
|
|
30
32
|
declare const utils_LRC_WALLET_NETWORK_TYPE: typeof LRC_WALLET_NETWORK_TYPE;
|
|
31
33
|
declare const utils_LeafInfo: typeof LeafInfo;
|
|
@@ -34,6 +36,8 @@ declare const utils_NetworkToProto: typeof NetworkToProto;
|
|
|
34
36
|
declare const utils_NetworkType: typeof NetworkType;
|
|
35
37
|
declare const utils_SparkAddressData: typeof SparkAddressData;
|
|
36
38
|
declare const utils_SparkAddressFormat: typeof SparkAddressFormat;
|
|
39
|
+
declare const utils_TEST_UNILATERAL_DIRECT_SEQUENCE: typeof TEST_UNILATERAL_DIRECT_SEQUENCE;
|
|
40
|
+
declare const utils_TEST_UNILATERAL_SEQUENCE: typeof TEST_UNILATERAL_SEQUENCE;
|
|
37
41
|
declare const utils_TxChain: typeof TxChain;
|
|
38
42
|
declare const utils_Utxo: typeof Utxo;
|
|
39
43
|
declare const utils_VerifiableSecretShare: typeof VerifiableSecretShare;
|
|
@@ -50,13 +54,21 @@ declare const utils_computerLagrangeCoefficients: typeof computerLagrangeCoeffic
|
|
|
50
54
|
declare const utils_constructFeeBumpTx: typeof constructFeeBumpTx;
|
|
51
55
|
declare const utils_constructUnilateralExitFeeBumpPackages: typeof constructUnilateralExitFeeBumpPackages;
|
|
52
56
|
declare const utils_constructUnilateralExitTxs: typeof constructUnilateralExitTxs;
|
|
57
|
+
declare const utils_createConnectorRefundTransactions: typeof createConnectorRefundTransactions;
|
|
58
|
+
declare const utils_createLeafNodeTx: typeof createLeafNodeTx;
|
|
59
|
+
declare const utils_createNodeTx: typeof createNodeTx;
|
|
60
|
+
declare const utils_createNodeTxs: typeof createNodeTxs;
|
|
53
61
|
declare const utils_createRefundTx: typeof createRefundTx;
|
|
62
|
+
declare const utils_createRefundTxs: typeof createRefundTxs;
|
|
63
|
+
declare const utils_createRootTx: typeof createRootTx;
|
|
54
64
|
declare const utils_createSigningCommitment: typeof createSigningCommitment;
|
|
55
65
|
declare const utils_createSigningNonce: typeof createSigningNonce;
|
|
66
|
+
declare const utils_createSplitTx: typeof createSplitTx;
|
|
56
67
|
declare const utils_decodeBech32mTokenIdentifier: typeof decodeBech32mTokenIdentifier;
|
|
57
68
|
declare const utils_decodeBytesToSigningCommitment: typeof decodeBytesToSigningCommitment;
|
|
58
69
|
declare const utils_decodeBytesToSigningNonce: typeof decodeBytesToSigningNonce;
|
|
59
70
|
declare const utils_decodeSparkAddress: typeof decodeSparkAddress;
|
|
71
|
+
declare const utils_doesLeafNeedRefresh: typeof doesLeafNeedRefresh;
|
|
60
72
|
declare const utils_encodeBech32mTokenIdentifier: typeof encodeBech32mTokenIdentifier;
|
|
61
73
|
declare const utils_encodeSigningCommitmentToBytes: typeof encodeSigningCommitmentToBytes;
|
|
62
74
|
declare const utils_encodeSigningNonceToBytes: typeof encodeSigningNonceToBytes;
|
|
@@ -85,6 +97,7 @@ declare const utils_getSigningCommitmentFromNonce: typeof getSigningCommitmentFr
|
|
|
85
97
|
declare const utils_getSparkAddressFromTaproot: typeof getSparkAddressFromTaproot;
|
|
86
98
|
declare const utils_getTransactionSequence: typeof getTransactionSequence;
|
|
87
99
|
declare const utils_getTransferPackageSigningPayload: typeof getTransferPackageSigningPayload;
|
|
100
|
+
declare const utils_getTxEstimatedVbytesSizeByNumberOfInputsOutputs: typeof getTxEstimatedVbytesSizeByNumberOfInputsOutputs;
|
|
88
101
|
declare const utils_getTxFromRawTxBytes: typeof getTxFromRawTxBytes;
|
|
89
102
|
declare const utils_getTxFromRawTxHex: typeof getTxFromRawTxHex;
|
|
90
103
|
declare const utils_getTxId: typeof getTxId;
|
|
@@ -108,7 +121,7 @@ declare const utils_sumOfPrivateKeys: typeof sumOfPrivateKeys;
|
|
|
108
121
|
declare const utils_validateOutboundAdaptorSignature: typeof validateOutboundAdaptorSignature;
|
|
109
122
|
declare const utils_validateShare: typeof validateShare;
|
|
110
123
|
declare namespace utils {
|
|
111
|
-
export { utils_Bech32mTokenIdentifier as Bech32mTokenIdentifier, utils_Bech32mTokenIdentifierData as Bech32mTokenIdentifierData, utils_BroadcastConfig as BroadcastConfig, utils_BroadcastResult as BroadcastResult, utils_DEFAULT_FEE_SATS as DEFAULT_FEE_SATS, utils_DecodedSparkAddressData as DecodedSparkAddressData, utils_FeeBumpTxChain as FeeBumpTxChain, utils_FeeBumpTxPackage as FeeBumpTxPackage, utils_FeeRate as FeeRate, utils_LRC_WALLET_NETWORK as LRC_WALLET_NETWORK, utils_LRC_WALLET_NETWORK_TYPE as LRC_WALLET_NETWORK_TYPE, utils_LeafInfo as LeafInfo, utils_Network as Network, utils_NetworkToProto as NetworkToProto, utils_NetworkType as NetworkType, utils_SparkAddressData as SparkAddressData, utils_SparkAddressFormat as SparkAddressFormat, utils_TxChain as TxChain, utils_Utxo as Utxo, utils_VerifiableSecretShare as VerifiableSecretShare, utils_addPrivateKeys as addPrivateKeys, utils_addPublicKeys as addPublicKeys, utils_applyAdaptorToSignature as applyAdaptorToSignature, utils_applyAdditiveTweakToPublicKey as applyAdditiveTweakToPublicKey, utils_bigIntToPrivateKey as bigIntToPrivateKey, utils_checkIfSelectedOutputsAreAvailable as checkIfSelectedOutputsAreAvailable, utils_checkIfValidSequence as checkIfValidSequence, utils_collectResponses as collectResponses, utils_computeTaprootKeyNoScript as computeTaprootKeyNoScript, utils_computerLagrangeCoefficients as computerLagrangeCoefficients, utils_constructFeeBumpTx as constructFeeBumpTx, utils_constructUnilateralExitFeeBumpPackages as constructUnilateralExitFeeBumpPackages, utils_constructUnilateralExitTxs as constructUnilateralExitTxs, utils_createRefundTx as createRefundTx, utils_createSigningCommitment as createSigningCommitment, utils_createSigningNonce as createSigningNonce, utils_decodeBech32mTokenIdentifier as decodeBech32mTokenIdentifier, utils_decodeBytesToSigningCommitment as decodeBytesToSigningCommitment, utils_decodeBytesToSigningNonce as decodeBytesToSigningNonce, utils_decodeSparkAddress as decodeSparkAddress, utils_encodeBech32mTokenIdentifier as encodeBech32mTokenIdentifier, utils_encodeSigningCommitmentToBytes as encodeSigningCommitmentToBytes, utils_encodeSigningNonceToBytes as encodeSigningNonceToBytes, utils_encodeSparkAddress as encodeSparkAddress, utils_evaluatePolynomial as evaluatePolynomial, utils_fieldDiv as fieldDiv, utils_filterTokenBalanceForTokenPublicKey as filterTokenBalanceForTokenPublicKey, utils_generateAdaptorFromSignature as generateAdaptorFromSignature, utils_generatePolynomialForSecretSharing as generatePolynomialForSecretSharing, utils_generateSignatureFromExistingAdaptor as generateSignatureFromExistingAdaptor, utils_getCurrentTimelock as getCurrentTimelock, utils_getEphemeralAnchorOutput as getEphemeralAnchorOutput, utils_getLatestDepositTxId as getLatestDepositTxId, utils_getNetwork as getNetwork, utils_getNetworkFromAddress as getNetworkFromAddress, utils_getNetworkFromString as getNetworkFromString, utils_getNextTransactionSequence as getNextTransactionSequence, utils_getP2TRAddressFromPkScript as getP2TRAddressFromPkScript, utils_getP2TRAddressFromPublicKey as getP2TRAddressFromPublicKey, utils_getP2TRScriptFromPublicKey as getP2TRScriptFromPublicKey, utils_getP2WPKHAddressFromPublicKey as getP2WPKHAddressFromPublicKey, utils_getRandomBigInt as getRandomBigInt, utils_getRandomSigningNonce as getRandomSigningNonce, utils_getSigHashFromTx as getSigHashFromTx, utils_getSigningCommitmentFromNonce as getSigningCommitmentFromNonce, utils_getSparkAddressFromTaproot as getSparkAddressFromTaproot, utils_getTransactionSequence as getTransactionSequence, utils_getTransferPackageSigningPayload as getTransferPackageSigningPayload, utils_getTxFromRawTxBytes as getTxFromRawTxBytes, utils_getTxFromRawTxHex as getTxFromRawTxHex, utils_getTxId as getTxId, utils_getTxIdNoReverse as getTxIdNoReverse, utils_isEphemeralAnchorOutput as isEphemeralAnchorOutput, utils_isTxBroadcast as isTxBroadcast, utils_isValidPublicKey as isValidPublicKey, utils_isValidSparkAddress as isValidSparkAddress, utils_lastKeyWithTarget as lastKeyWithTarget, utils_maybeApplyFee as maybeApplyFee, utils_modInverse as modInverse, utils_proofOfPossessionMessageHashForDepositAddress as proofOfPossessionMessageHashForDepositAddress, utils_protoToNetwork as protoToNetwork, utils_recoverSecret as recoverSecret, utils_splitSecret as splitSecret, utils_splitSecretWithProofs as splitSecretWithProofs, utils_subtractPrivateKeys as subtractPrivateKeys, utils_subtractPublicKeys as subtractPublicKeys, utils_sumAvailableTokens as sumAvailableTokens, utils_sumOfPrivateKeys as sumOfPrivateKeys, utils_validateOutboundAdaptorSignature as validateOutboundAdaptorSignature, utils_validateShare as validateShare };
|
|
124
|
+
export { utils_Bech32mTokenIdentifier as Bech32mTokenIdentifier, utils_Bech32mTokenIdentifierData as Bech32mTokenIdentifierData, utils_BroadcastConfig as BroadcastConfig, utils_BroadcastResult as BroadcastResult, utils_DEFAULT_FEE_SATS as DEFAULT_FEE_SATS, utils_DIRECT_TIMELOCK_OFFSET as DIRECT_TIMELOCK_OFFSET, utils_DecodedSparkAddressData as DecodedSparkAddressData, utils_FeeBumpTxChain as FeeBumpTxChain, utils_FeeBumpTxPackage as FeeBumpTxPackage, utils_FeeRate as FeeRate, utils_INITIAL_DIRECT_SEQUENCE as INITIAL_DIRECT_SEQUENCE, utils_INITIAL_SEQUENCE as INITIAL_SEQUENCE, utils_LRC_WALLET_NETWORK as LRC_WALLET_NETWORK, utils_LRC_WALLET_NETWORK_TYPE as LRC_WALLET_NETWORK_TYPE, utils_LeafInfo as LeafInfo, utils_Network as Network, utils_NetworkToProto as NetworkToProto, utils_NetworkType as NetworkType, utils_SparkAddressData as SparkAddressData, utils_SparkAddressFormat as SparkAddressFormat, utils_TEST_UNILATERAL_DIRECT_SEQUENCE as TEST_UNILATERAL_DIRECT_SEQUENCE, utils_TEST_UNILATERAL_SEQUENCE as TEST_UNILATERAL_SEQUENCE, utils_TxChain as TxChain, utils_Utxo as Utxo, utils_VerifiableSecretShare as VerifiableSecretShare, utils_addPrivateKeys as addPrivateKeys, utils_addPublicKeys as addPublicKeys, utils_applyAdaptorToSignature as applyAdaptorToSignature, utils_applyAdditiveTweakToPublicKey as applyAdditiveTweakToPublicKey, utils_bigIntToPrivateKey as bigIntToPrivateKey, utils_checkIfSelectedOutputsAreAvailable as checkIfSelectedOutputsAreAvailable, utils_checkIfValidSequence as checkIfValidSequence, utils_collectResponses as collectResponses, utils_computeTaprootKeyNoScript as computeTaprootKeyNoScript, utils_computerLagrangeCoefficients as computerLagrangeCoefficients, utils_constructFeeBumpTx as constructFeeBumpTx, utils_constructUnilateralExitFeeBumpPackages as constructUnilateralExitFeeBumpPackages, utils_constructUnilateralExitTxs as constructUnilateralExitTxs, utils_createConnectorRefundTransactions as createConnectorRefundTransactions, utils_createLeafNodeTx as createLeafNodeTx, utils_createNodeTx as createNodeTx, utils_createNodeTxs as createNodeTxs, utils_createRefundTx as createRefundTx, utils_createRefundTxs as createRefundTxs, utils_createRootTx as createRootTx, utils_createSigningCommitment as createSigningCommitment, utils_createSigningNonce as createSigningNonce, utils_createSplitTx as createSplitTx, utils_decodeBech32mTokenIdentifier as decodeBech32mTokenIdentifier, utils_decodeBytesToSigningCommitment as decodeBytesToSigningCommitment, utils_decodeBytesToSigningNonce as decodeBytesToSigningNonce, utils_decodeSparkAddress as decodeSparkAddress, utils_doesLeafNeedRefresh as doesLeafNeedRefresh, utils_encodeBech32mTokenIdentifier as encodeBech32mTokenIdentifier, utils_encodeSigningCommitmentToBytes as encodeSigningCommitmentToBytes, utils_encodeSigningNonceToBytes as encodeSigningNonceToBytes, utils_encodeSparkAddress as encodeSparkAddress, utils_evaluatePolynomial as evaluatePolynomial, utils_fieldDiv as fieldDiv, utils_filterTokenBalanceForTokenPublicKey as filterTokenBalanceForTokenPublicKey, utils_generateAdaptorFromSignature as generateAdaptorFromSignature, utils_generatePolynomialForSecretSharing as generatePolynomialForSecretSharing, utils_generateSignatureFromExistingAdaptor as generateSignatureFromExistingAdaptor, utils_getCurrentTimelock as getCurrentTimelock, utils_getEphemeralAnchorOutput as getEphemeralAnchorOutput, utils_getLatestDepositTxId as getLatestDepositTxId, utils_getNetwork as getNetwork, utils_getNetworkFromAddress as getNetworkFromAddress, utils_getNetworkFromString as getNetworkFromString, utils_getNextTransactionSequence as getNextTransactionSequence, utils_getP2TRAddressFromPkScript as getP2TRAddressFromPkScript, utils_getP2TRAddressFromPublicKey as getP2TRAddressFromPublicKey, utils_getP2TRScriptFromPublicKey as getP2TRScriptFromPublicKey, utils_getP2WPKHAddressFromPublicKey as getP2WPKHAddressFromPublicKey, utils_getRandomBigInt as getRandomBigInt, utils_getRandomSigningNonce as getRandomSigningNonce, utils_getSigHashFromTx as getSigHashFromTx, utils_getSigningCommitmentFromNonce as getSigningCommitmentFromNonce, utils_getSparkAddressFromTaproot as getSparkAddressFromTaproot, utils_getTransactionSequence as getTransactionSequence, utils_getTransferPackageSigningPayload as getTransferPackageSigningPayload, utils_getTxEstimatedVbytesSizeByNumberOfInputsOutputs as getTxEstimatedVbytesSizeByNumberOfInputsOutputs, utils_getTxFromRawTxBytes as getTxFromRawTxBytes, utils_getTxFromRawTxHex as getTxFromRawTxHex, utils_getTxId as getTxId, utils_getTxIdNoReverse as getTxIdNoReverse, utils_isEphemeralAnchorOutput as isEphemeralAnchorOutput, utils_isTxBroadcast as isTxBroadcast, utils_isValidPublicKey as isValidPublicKey, utils_isValidSparkAddress as isValidSparkAddress, utils_lastKeyWithTarget as lastKeyWithTarget, utils_maybeApplyFee as maybeApplyFee, utils_modInverse as modInverse, utils_proofOfPossessionMessageHashForDepositAddress as proofOfPossessionMessageHashForDepositAddress, utils_protoToNetwork as protoToNetwork, utils_recoverSecret as recoverSecret, utils_splitSecret as splitSecret, utils_splitSecretWithProofs as splitSecretWithProofs, utils_subtractPrivateKeys as subtractPrivateKeys, utils_subtractPublicKeys as subtractPublicKeys, utils_sumAvailableTokens as sumAvailableTokens, utils_sumOfPrivateKeys as sumOfPrivateKeys, utils_validateOutboundAdaptorSignature as validateOutboundAdaptorSignature, utils_validateShare as validateShare };
|
|
112
125
|
}
|
|
113
126
|
|
|
114
127
|
declare const s: {
|
package/dist/debug.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as Bech32mTokenIdentifier,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import './spark-
|
|
1
|
+
import { B as Bech32mTokenIdentifier, n as Bech32mTokenIdentifierData, D as DecodedSparkAddressData, L as LRC_WALLET_NETWORK, k as LRC_WALLET_NETWORK_TYPE, N as Network, h as NetworkToProto, g as NetworkType, c as SparkAddressData, S as SparkAddressFormat, q as decodeBech32mTokenIdentifier, d as decodeSparkAddress, o as encodeBech32mTokenIdentifier, e as encodeSparkAddress, j as getNetwork, l as getNetworkFromAddress, m as getNetworkFromString, f as isValidPublicKey, i as isValidSparkAddress, p as protoToNetwork, y as SparkWallet, b as ConfigOptions } from './spark-wallet-B2WwKN8W.js';
|
|
2
|
+
import { 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 filterTokenBalanceForTokenPublicKey, 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-BsveIy5l.js';
|
|
3
|
+
import { 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-Dg6vS_2I.js';
|
|
4
|
+
import './spark-ESAfZARg.js';
|
|
5
5
|
import '@bufbuild/protobuf/wire';
|
|
6
6
|
import 'nice-grpc-common';
|
|
7
7
|
import '@buildonspark/lrc20-sdk';
|
|
@@ -11,7 +11,6 @@ import 'nice-grpc';
|
|
|
11
11
|
import 'nice-grpc-web';
|
|
12
12
|
import './proto/spark_token.js';
|
|
13
13
|
import 'eventemitter3';
|
|
14
|
-
import './sdk-types-CkRNraXT.js';
|
|
15
14
|
import '@scure/btc-signer/psbt';
|
|
16
15
|
import '@lightsparkdev/core';
|
|
17
16
|
import '@scure/bip32';
|
|
@@ -22,10 +21,13 @@ declare const utils_Bech32mTokenIdentifierData: typeof Bech32mTokenIdentifierDat
|
|
|
22
21
|
declare const utils_BroadcastConfig: typeof BroadcastConfig;
|
|
23
22
|
declare const utils_BroadcastResult: typeof BroadcastResult;
|
|
24
23
|
declare const utils_DEFAULT_FEE_SATS: typeof DEFAULT_FEE_SATS;
|
|
24
|
+
declare const utils_DIRECT_TIMELOCK_OFFSET: typeof DIRECT_TIMELOCK_OFFSET;
|
|
25
25
|
declare const utils_DecodedSparkAddressData: typeof DecodedSparkAddressData;
|
|
26
26
|
declare const utils_FeeBumpTxChain: typeof FeeBumpTxChain;
|
|
27
27
|
declare const utils_FeeBumpTxPackage: typeof FeeBumpTxPackage;
|
|
28
28
|
declare const utils_FeeRate: typeof FeeRate;
|
|
29
|
+
declare const utils_INITIAL_DIRECT_SEQUENCE: typeof INITIAL_DIRECT_SEQUENCE;
|
|
30
|
+
declare const utils_INITIAL_SEQUENCE: typeof INITIAL_SEQUENCE;
|
|
29
31
|
declare const utils_LRC_WALLET_NETWORK: typeof LRC_WALLET_NETWORK;
|
|
30
32
|
declare const utils_LRC_WALLET_NETWORK_TYPE: typeof LRC_WALLET_NETWORK_TYPE;
|
|
31
33
|
declare const utils_LeafInfo: typeof LeafInfo;
|
|
@@ -34,6 +36,8 @@ declare const utils_NetworkToProto: typeof NetworkToProto;
|
|
|
34
36
|
declare const utils_NetworkType: typeof NetworkType;
|
|
35
37
|
declare const utils_SparkAddressData: typeof SparkAddressData;
|
|
36
38
|
declare const utils_SparkAddressFormat: typeof SparkAddressFormat;
|
|
39
|
+
declare const utils_TEST_UNILATERAL_DIRECT_SEQUENCE: typeof TEST_UNILATERAL_DIRECT_SEQUENCE;
|
|
40
|
+
declare const utils_TEST_UNILATERAL_SEQUENCE: typeof TEST_UNILATERAL_SEQUENCE;
|
|
37
41
|
declare const utils_TxChain: typeof TxChain;
|
|
38
42
|
declare const utils_Utxo: typeof Utxo;
|
|
39
43
|
declare const utils_VerifiableSecretShare: typeof VerifiableSecretShare;
|
|
@@ -50,13 +54,21 @@ declare const utils_computerLagrangeCoefficients: typeof computerLagrangeCoeffic
|
|
|
50
54
|
declare const utils_constructFeeBumpTx: typeof constructFeeBumpTx;
|
|
51
55
|
declare const utils_constructUnilateralExitFeeBumpPackages: typeof constructUnilateralExitFeeBumpPackages;
|
|
52
56
|
declare const utils_constructUnilateralExitTxs: typeof constructUnilateralExitTxs;
|
|
57
|
+
declare const utils_createConnectorRefundTransactions: typeof createConnectorRefundTransactions;
|
|
58
|
+
declare const utils_createLeafNodeTx: typeof createLeafNodeTx;
|
|
59
|
+
declare const utils_createNodeTx: typeof createNodeTx;
|
|
60
|
+
declare const utils_createNodeTxs: typeof createNodeTxs;
|
|
53
61
|
declare const utils_createRefundTx: typeof createRefundTx;
|
|
62
|
+
declare const utils_createRefundTxs: typeof createRefundTxs;
|
|
63
|
+
declare const utils_createRootTx: typeof createRootTx;
|
|
54
64
|
declare const utils_createSigningCommitment: typeof createSigningCommitment;
|
|
55
65
|
declare const utils_createSigningNonce: typeof createSigningNonce;
|
|
66
|
+
declare const utils_createSplitTx: typeof createSplitTx;
|
|
56
67
|
declare const utils_decodeBech32mTokenIdentifier: typeof decodeBech32mTokenIdentifier;
|
|
57
68
|
declare const utils_decodeBytesToSigningCommitment: typeof decodeBytesToSigningCommitment;
|
|
58
69
|
declare const utils_decodeBytesToSigningNonce: typeof decodeBytesToSigningNonce;
|
|
59
70
|
declare const utils_decodeSparkAddress: typeof decodeSparkAddress;
|
|
71
|
+
declare const utils_doesLeafNeedRefresh: typeof doesLeafNeedRefresh;
|
|
60
72
|
declare const utils_encodeBech32mTokenIdentifier: typeof encodeBech32mTokenIdentifier;
|
|
61
73
|
declare const utils_encodeSigningCommitmentToBytes: typeof encodeSigningCommitmentToBytes;
|
|
62
74
|
declare const utils_encodeSigningNonceToBytes: typeof encodeSigningNonceToBytes;
|
|
@@ -85,6 +97,7 @@ declare const utils_getSigningCommitmentFromNonce: typeof getSigningCommitmentFr
|
|
|
85
97
|
declare const utils_getSparkAddressFromTaproot: typeof getSparkAddressFromTaproot;
|
|
86
98
|
declare const utils_getTransactionSequence: typeof getTransactionSequence;
|
|
87
99
|
declare const utils_getTransferPackageSigningPayload: typeof getTransferPackageSigningPayload;
|
|
100
|
+
declare const utils_getTxEstimatedVbytesSizeByNumberOfInputsOutputs: typeof getTxEstimatedVbytesSizeByNumberOfInputsOutputs;
|
|
88
101
|
declare const utils_getTxFromRawTxBytes: typeof getTxFromRawTxBytes;
|
|
89
102
|
declare const utils_getTxFromRawTxHex: typeof getTxFromRawTxHex;
|
|
90
103
|
declare const utils_getTxId: typeof getTxId;
|
|
@@ -108,7 +121,7 @@ declare const utils_sumOfPrivateKeys: typeof sumOfPrivateKeys;
|
|
|
108
121
|
declare const utils_validateOutboundAdaptorSignature: typeof validateOutboundAdaptorSignature;
|
|
109
122
|
declare const utils_validateShare: typeof validateShare;
|
|
110
123
|
declare namespace utils {
|
|
111
|
-
export { utils_Bech32mTokenIdentifier as Bech32mTokenIdentifier, utils_Bech32mTokenIdentifierData as Bech32mTokenIdentifierData, utils_BroadcastConfig as BroadcastConfig, utils_BroadcastResult as BroadcastResult, utils_DEFAULT_FEE_SATS as DEFAULT_FEE_SATS, utils_DecodedSparkAddressData as DecodedSparkAddressData, utils_FeeBumpTxChain as FeeBumpTxChain, utils_FeeBumpTxPackage as FeeBumpTxPackage, utils_FeeRate as FeeRate, utils_LRC_WALLET_NETWORK as LRC_WALLET_NETWORK, utils_LRC_WALLET_NETWORK_TYPE as LRC_WALLET_NETWORK_TYPE, utils_LeafInfo as LeafInfo, utils_Network as Network, utils_NetworkToProto as NetworkToProto, utils_NetworkType as NetworkType, utils_SparkAddressData as SparkAddressData, utils_SparkAddressFormat as SparkAddressFormat, utils_TxChain as TxChain, utils_Utxo as Utxo, utils_VerifiableSecretShare as VerifiableSecretShare, utils_addPrivateKeys as addPrivateKeys, utils_addPublicKeys as addPublicKeys, utils_applyAdaptorToSignature as applyAdaptorToSignature, utils_applyAdditiveTweakToPublicKey as applyAdditiveTweakToPublicKey, utils_bigIntToPrivateKey as bigIntToPrivateKey, utils_checkIfSelectedOutputsAreAvailable as checkIfSelectedOutputsAreAvailable, utils_checkIfValidSequence as checkIfValidSequence, utils_collectResponses as collectResponses, utils_computeTaprootKeyNoScript as computeTaprootKeyNoScript, utils_computerLagrangeCoefficients as computerLagrangeCoefficients, utils_constructFeeBumpTx as constructFeeBumpTx, utils_constructUnilateralExitFeeBumpPackages as constructUnilateralExitFeeBumpPackages, utils_constructUnilateralExitTxs as constructUnilateralExitTxs, utils_createRefundTx as createRefundTx, utils_createSigningCommitment as createSigningCommitment, utils_createSigningNonce as createSigningNonce, utils_decodeBech32mTokenIdentifier as decodeBech32mTokenIdentifier, utils_decodeBytesToSigningCommitment as decodeBytesToSigningCommitment, utils_decodeBytesToSigningNonce as decodeBytesToSigningNonce, utils_decodeSparkAddress as decodeSparkAddress, utils_encodeBech32mTokenIdentifier as encodeBech32mTokenIdentifier, utils_encodeSigningCommitmentToBytes as encodeSigningCommitmentToBytes, utils_encodeSigningNonceToBytes as encodeSigningNonceToBytes, utils_encodeSparkAddress as encodeSparkAddress, utils_evaluatePolynomial as evaluatePolynomial, utils_fieldDiv as fieldDiv, utils_filterTokenBalanceForTokenPublicKey as filterTokenBalanceForTokenPublicKey, utils_generateAdaptorFromSignature as generateAdaptorFromSignature, utils_generatePolynomialForSecretSharing as generatePolynomialForSecretSharing, utils_generateSignatureFromExistingAdaptor as generateSignatureFromExistingAdaptor, utils_getCurrentTimelock as getCurrentTimelock, utils_getEphemeralAnchorOutput as getEphemeralAnchorOutput, utils_getLatestDepositTxId as getLatestDepositTxId, utils_getNetwork as getNetwork, utils_getNetworkFromAddress as getNetworkFromAddress, utils_getNetworkFromString as getNetworkFromString, utils_getNextTransactionSequence as getNextTransactionSequence, utils_getP2TRAddressFromPkScript as getP2TRAddressFromPkScript, utils_getP2TRAddressFromPublicKey as getP2TRAddressFromPublicKey, utils_getP2TRScriptFromPublicKey as getP2TRScriptFromPublicKey, utils_getP2WPKHAddressFromPublicKey as getP2WPKHAddressFromPublicKey, utils_getRandomBigInt as getRandomBigInt, utils_getRandomSigningNonce as getRandomSigningNonce, utils_getSigHashFromTx as getSigHashFromTx, utils_getSigningCommitmentFromNonce as getSigningCommitmentFromNonce, utils_getSparkAddressFromTaproot as getSparkAddressFromTaproot, utils_getTransactionSequence as getTransactionSequence, utils_getTransferPackageSigningPayload as getTransferPackageSigningPayload, utils_getTxFromRawTxBytes as getTxFromRawTxBytes, utils_getTxFromRawTxHex as getTxFromRawTxHex, utils_getTxId as getTxId, utils_getTxIdNoReverse as getTxIdNoReverse, utils_isEphemeralAnchorOutput as isEphemeralAnchorOutput, utils_isTxBroadcast as isTxBroadcast, utils_isValidPublicKey as isValidPublicKey, utils_isValidSparkAddress as isValidSparkAddress, utils_lastKeyWithTarget as lastKeyWithTarget, utils_maybeApplyFee as maybeApplyFee, utils_modInverse as modInverse, utils_proofOfPossessionMessageHashForDepositAddress as proofOfPossessionMessageHashForDepositAddress, utils_protoToNetwork as protoToNetwork, utils_recoverSecret as recoverSecret, utils_splitSecret as splitSecret, utils_splitSecretWithProofs as splitSecretWithProofs, utils_subtractPrivateKeys as subtractPrivateKeys, utils_subtractPublicKeys as subtractPublicKeys, utils_sumAvailableTokens as sumAvailableTokens, utils_sumOfPrivateKeys as sumOfPrivateKeys, utils_validateOutboundAdaptorSignature as validateOutboundAdaptorSignature, utils_validateShare as validateShare };
|
|
124
|
+
export { utils_Bech32mTokenIdentifier as Bech32mTokenIdentifier, utils_Bech32mTokenIdentifierData as Bech32mTokenIdentifierData, utils_BroadcastConfig as BroadcastConfig, utils_BroadcastResult as BroadcastResult, utils_DEFAULT_FEE_SATS as DEFAULT_FEE_SATS, utils_DIRECT_TIMELOCK_OFFSET as DIRECT_TIMELOCK_OFFSET, utils_DecodedSparkAddressData as DecodedSparkAddressData, utils_FeeBumpTxChain as FeeBumpTxChain, utils_FeeBumpTxPackage as FeeBumpTxPackage, utils_FeeRate as FeeRate, utils_INITIAL_DIRECT_SEQUENCE as INITIAL_DIRECT_SEQUENCE, utils_INITIAL_SEQUENCE as INITIAL_SEQUENCE, utils_LRC_WALLET_NETWORK as LRC_WALLET_NETWORK, utils_LRC_WALLET_NETWORK_TYPE as LRC_WALLET_NETWORK_TYPE, utils_LeafInfo as LeafInfo, utils_Network as Network, utils_NetworkToProto as NetworkToProto, utils_NetworkType as NetworkType, utils_SparkAddressData as SparkAddressData, utils_SparkAddressFormat as SparkAddressFormat, utils_TEST_UNILATERAL_DIRECT_SEQUENCE as TEST_UNILATERAL_DIRECT_SEQUENCE, utils_TEST_UNILATERAL_SEQUENCE as TEST_UNILATERAL_SEQUENCE, utils_TxChain as TxChain, utils_Utxo as Utxo, utils_VerifiableSecretShare as VerifiableSecretShare, utils_addPrivateKeys as addPrivateKeys, utils_addPublicKeys as addPublicKeys, utils_applyAdaptorToSignature as applyAdaptorToSignature, utils_applyAdditiveTweakToPublicKey as applyAdditiveTweakToPublicKey, utils_bigIntToPrivateKey as bigIntToPrivateKey, utils_checkIfSelectedOutputsAreAvailable as checkIfSelectedOutputsAreAvailable, utils_checkIfValidSequence as checkIfValidSequence, utils_collectResponses as collectResponses, utils_computeTaprootKeyNoScript as computeTaprootKeyNoScript, utils_computerLagrangeCoefficients as computerLagrangeCoefficients, utils_constructFeeBumpTx as constructFeeBumpTx, utils_constructUnilateralExitFeeBumpPackages as constructUnilateralExitFeeBumpPackages, utils_constructUnilateralExitTxs as constructUnilateralExitTxs, utils_createConnectorRefundTransactions as createConnectorRefundTransactions, utils_createLeafNodeTx as createLeafNodeTx, utils_createNodeTx as createNodeTx, utils_createNodeTxs as createNodeTxs, utils_createRefundTx as createRefundTx, utils_createRefundTxs as createRefundTxs, utils_createRootTx as createRootTx, utils_createSigningCommitment as createSigningCommitment, utils_createSigningNonce as createSigningNonce, utils_createSplitTx as createSplitTx, utils_decodeBech32mTokenIdentifier as decodeBech32mTokenIdentifier, utils_decodeBytesToSigningCommitment as decodeBytesToSigningCommitment, utils_decodeBytesToSigningNonce as decodeBytesToSigningNonce, utils_decodeSparkAddress as decodeSparkAddress, utils_doesLeafNeedRefresh as doesLeafNeedRefresh, utils_encodeBech32mTokenIdentifier as encodeBech32mTokenIdentifier, utils_encodeSigningCommitmentToBytes as encodeSigningCommitmentToBytes, utils_encodeSigningNonceToBytes as encodeSigningNonceToBytes, utils_encodeSparkAddress as encodeSparkAddress, utils_evaluatePolynomial as evaluatePolynomial, utils_fieldDiv as fieldDiv, utils_filterTokenBalanceForTokenPublicKey as filterTokenBalanceForTokenPublicKey, utils_generateAdaptorFromSignature as generateAdaptorFromSignature, utils_generatePolynomialForSecretSharing as generatePolynomialForSecretSharing, utils_generateSignatureFromExistingAdaptor as generateSignatureFromExistingAdaptor, utils_getCurrentTimelock as getCurrentTimelock, utils_getEphemeralAnchorOutput as getEphemeralAnchorOutput, utils_getLatestDepositTxId as getLatestDepositTxId, utils_getNetwork as getNetwork, utils_getNetworkFromAddress as getNetworkFromAddress, utils_getNetworkFromString as getNetworkFromString, utils_getNextTransactionSequence as getNextTransactionSequence, utils_getP2TRAddressFromPkScript as getP2TRAddressFromPkScript, utils_getP2TRAddressFromPublicKey as getP2TRAddressFromPublicKey, utils_getP2TRScriptFromPublicKey as getP2TRScriptFromPublicKey, utils_getP2WPKHAddressFromPublicKey as getP2WPKHAddressFromPublicKey, utils_getRandomBigInt as getRandomBigInt, utils_getRandomSigningNonce as getRandomSigningNonce, utils_getSigHashFromTx as getSigHashFromTx, utils_getSigningCommitmentFromNonce as getSigningCommitmentFromNonce, utils_getSparkAddressFromTaproot as getSparkAddressFromTaproot, utils_getTransactionSequence as getTransactionSequence, utils_getTransferPackageSigningPayload as getTransferPackageSigningPayload, utils_getTxEstimatedVbytesSizeByNumberOfInputsOutputs as getTxEstimatedVbytesSizeByNumberOfInputsOutputs, utils_getTxFromRawTxBytes as getTxFromRawTxBytes, utils_getTxFromRawTxHex as getTxFromRawTxHex, utils_getTxId as getTxId, utils_getTxIdNoReverse as getTxIdNoReverse, utils_isEphemeralAnchorOutput as isEphemeralAnchorOutput, utils_isTxBroadcast as isTxBroadcast, utils_isValidPublicKey as isValidPublicKey, utils_isValidSparkAddress as isValidSparkAddress, utils_lastKeyWithTarget as lastKeyWithTarget, utils_maybeApplyFee as maybeApplyFee, utils_modInverse as modInverse, utils_proofOfPossessionMessageHashForDepositAddress as proofOfPossessionMessageHashForDepositAddress, utils_protoToNetwork as protoToNetwork, utils_recoverSecret as recoverSecret, utils_splitSecret as splitSecret, utils_splitSecretWithProofs as splitSecretWithProofs, utils_subtractPrivateKeys as subtractPrivateKeys, utils_subtractPublicKeys as subtractPublicKeys, utils_sumAvailableTokens as sumAvailableTokens, utils_sumOfPrivateKeys as sumOfPrivateKeys, utils_validateOutboundAdaptorSignature as validateOutboundAdaptorSignature, utils_validateShare as validateShare };
|
|
112
125
|
}
|
|
113
126
|
|
|
114
127
|
declare const s: {
|
package/dist/debug.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
SparkWallet,
|
|
3
3
|
WalletConfig,
|
|
4
4
|
utils_exports
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-U7LRIWTF.js";
|
|
6
6
|
import "./chunk-G4MSZ6DE.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-3SPMJMUX.js";
|
|
8
|
+
import "./chunk-CQY5ML2A.js";
|
|
9
9
|
import "./chunk-AAZWSPUK.js";
|
|
10
10
|
import "./chunk-MVRQ5US7.js";
|
|
11
11
|
|
|
@@ -347,7 +347,11 @@ var SwapLeafFromJson = (obj) => {
|
|
|
347
347
|
return {
|
|
348
348
|
leafId: obj["swap_leaf_leaf_id"],
|
|
349
349
|
rawUnsignedRefundTransaction: obj["swap_leaf_raw_unsigned_refund_transaction"],
|
|
350
|
-
adaptorSignedSignature: obj["swap_leaf_adaptor_signed_signature"]
|
|
350
|
+
adaptorSignedSignature: obj["swap_leaf_adaptor_signed_signature"],
|
|
351
|
+
directRawUnsignedRefundTransaction: obj["swap_leaf_direct_raw_unsigned_refund_transaction"],
|
|
352
|
+
directAdaptorSignedSignature: obj["swap_leaf_direct_adaptor_signed_signature"],
|
|
353
|
+
directFromCpfpRawUnsignedRefundTransaction: obj["swap_leaf_direct_from_cpfp_raw_unsigned_refund_transaction"],
|
|
354
|
+
directFromCpfpAdaptorSignedSignature: obj["swap_leaf_direct_from_cpfp_adaptor_signed_signature"]
|
|
351
355
|
};
|
|
352
356
|
};
|
|
353
357
|
|
|
@@ -578,6 +582,10 @@ fragment LeavesSwapRequestFragment on LeavesSwapRequest {
|
|
|
578
582
|
swap_leaf_leaf_id: leaf_id
|
|
579
583
|
swap_leaf_raw_unsigned_refund_transaction: raw_unsigned_refund_transaction
|
|
580
584
|
swap_leaf_adaptor_signed_signature: adaptor_signed_signature
|
|
585
|
+
swap_leaf_direct_raw_unsigned_refund_transaction: direct_raw_unsigned_refund_transaction
|
|
586
|
+
swap_leaf_direct_adaptor_signed_signature: direct_adaptor_signed_signature
|
|
587
|
+
swap_leaf_direct_from_cpfp_raw_unsigned_refund_transaction: direct_from_cpfp_raw_unsigned_refund_transaction
|
|
588
|
+
swap_leaf_direct_from_cpfp_adaptor_signed_signature: direct_from_cpfp_adaptor_signed_signature
|
|
581
589
|
}
|
|
582
590
|
}`;
|
|
583
591
|
var getLeavesSwapRequestQuery = (id) => {
|
|
@@ -1082,6 +1090,10 @@ fragment UserRequestFragment on UserRequest {
|
|
|
1082
1090
|
swap_leaf_leaf_id: leaf_id
|
|
1083
1091
|
swap_leaf_raw_unsigned_refund_transaction: raw_unsigned_refund_transaction
|
|
1084
1092
|
swap_leaf_adaptor_signed_signature: adaptor_signed_signature
|
|
1093
|
+
swap_leaf_direct_raw_unsigned_refund_transaction: direct_raw_unsigned_refund_transaction
|
|
1094
|
+
swap_leaf_direct_adaptor_signed_signature: direct_adaptor_signed_signature
|
|
1095
|
+
swap_leaf_direct_from_cpfp_raw_unsigned_refund_transaction: direct_from_cpfp_raw_unsigned_refund_transaction
|
|
1096
|
+
swap_leaf_direct_from_cpfp_adaptor_signed_signature: direct_from_cpfp_adaptor_signed_signature
|
|
1085
1097
|
}
|
|
1086
1098
|
}
|
|
1087
1099
|
... on LightningReceiveRequest {
|
|
@@ -1,59 +1,14 @@
|
|
|
1
|
-
import { B as BitcoinNetwork,
|
|
2
|
-
export { C as ClaimStaticDepositOutput,
|
|
1
|
+
import { B as BitcoinNetwork, P as PageInfo, J as SspClient } from '../../client-C88GCTPB.cjs';
|
|
2
|
+
export { O as ClaimStaticDeposit, C as ClaimStaticDepositOutput, Q as ClaimStaticDepositStatus, R as CompleteCoopExitInput, X as CompleteLeavesSwapInput, Y as CoopExitFeeEstimate, Z as CoopExitFeeEstimatesInput, _ as CoopExitFeeEstimatesOutput, F as CoopExitFeeQuote, a0 as CoopExitFeeQuoteInput, G as CoopExitRequest, a2 as CurrencyAmount, a3 as CurrencyUnit, E as ExitSpeed, a4 as GetChallengeOutput, a5 as Invoice, a6 as Leaf, L as LeavesSwapFeeEstimateOutput, a8 as LeavesSwapRequest, x as LightningReceiveRequest, aa as LightningReceiveRequestStatus, z as LightningSendFeeEstimateInput, ab as LightningSendFeeEstimateOutput, y as LightningSendRequest, ad as LightningSendRequestStatus, ae as RequestCoopExitInput, af as RequestLeavesSwapInput, ag as RequestLightningReceiveInput, ah as RequestLightningSendInput, ai as SparkCoopExitRequestStatus, aj as SparkLeavesSwapRequestStatus, ak as SparkTransferToLeavesConnection, al as StaticDepositQuoteInput, u as StaticDepositQuoteOutput, am as SwapLeaf, an as Transfer, ao as UserLeafInput, ap as VerifyChallengeOutput, N as getClaimStaticDepositQuery, $ as getCoopExitFeeQuoteQuery, a1 as getCoopExitRequestQuery, a7 as getLeavesSwapRequestQuery, a9 as getLightningReceiveRequestQuery, ac as getLightningSendRequestQuery } from '../../client-C88GCTPB.cjs';
|
|
3
3
|
import { Query } from '@lightsparkdev/core';
|
|
4
|
+
import '../../spark-ESAfZARg.cjs';
|
|
4
5
|
import '@buildonspark/lrc20-sdk';
|
|
5
6
|
import '@scure/btc-signer';
|
|
6
7
|
import 'bitcoinjs-lib';
|
|
7
8
|
import '@scure/bip32';
|
|
8
9
|
import '../../types-BADxR3bm.cjs';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* This is an enum value that represents values that could be added in the future.
|
|
13
|
-
* Clients should support unknown values as more of them could be added without notice.
|
|
14
|
-
*/
|
|
15
|
-
FUTURE_VALUE = "FUTURE_VALUE",
|
|
16
|
-
CREATED = "CREATED",
|
|
17
|
-
TRANSFER_CREATED = "TRANSFER_CREATED",
|
|
18
|
-
TRANSFER_CREATION_FAILED = "TRANSFER_CREATION_FAILED",
|
|
19
|
-
REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED = "REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED",
|
|
20
|
-
REFUND_SIGNING_FAILED = "REFUND_SIGNING_FAILED",
|
|
21
|
-
UTXO_SWAPPING_FAILED = "UTXO_SWAPPING_FAILED",
|
|
22
|
-
TRANSFER_COMPLETED = "TRANSFER_COMPLETED",
|
|
23
|
-
SPEND_TX_CREATED = "SPEND_TX_CREATED",
|
|
24
|
-
SPEND_TX_BROADCAST = "SPEND_TX_BROADCAST"
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
interface ClaimStaticDeposit {
|
|
28
|
-
/**
|
|
29
|
-
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
30
|
-
* string.
|
|
31
|
-
**/
|
|
32
|
-
id: string;
|
|
33
|
-
/** The date and time when the entity was first created. **/
|
|
34
|
-
createdAt: string;
|
|
35
|
-
/** The date and time when the entity was last updated. **/
|
|
36
|
-
updatedAt: string;
|
|
37
|
-
/** The network the lightning send request is on. **/
|
|
38
|
-
network: BitcoinNetwork;
|
|
39
|
-
/** The amount of credit to be added to the user's balance. **/
|
|
40
|
-
creditAmount: CurrencyAmount;
|
|
41
|
-
/** The maximum fee that the user is willing to pay. **/
|
|
42
|
-
maxFee: CurrencyAmount;
|
|
43
|
-
/** The status of the request. **/
|
|
44
|
-
status: ClaimStaticDepositStatus;
|
|
45
|
-
/** The transaction id of the deposit. **/
|
|
46
|
-
transactionId: string;
|
|
47
|
-
/** The output index of the deposit. **/
|
|
48
|
-
outputIndex: number;
|
|
49
|
-
/** The Bitcoin network of the deposit. **/
|
|
50
|
-
bitcoinNetwork: BitcoinNetwork;
|
|
51
|
-
/** The typename of the object **/
|
|
52
|
-
typename: string;
|
|
53
|
-
/** The id of the transfer. **/
|
|
54
|
-
transferSparkId?: string | undefined;
|
|
55
|
-
}
|
|
56
|
-
declare const getClaimStaticDepositQuery: (id: string) => Query<ClaimStaticDeposit>;
|
|
10
|
+
import '@bufbuild/protobuf/wire';
|
|
11
|
+
import 'nice-grpc-common';
|
|
57
12
|
|
|
58
13
|
declare enum ClaimStaticDepositRequestType {
|
|
59
14
|
/**
|
|
@@ -284,4 +239,4 @@ interface WalletUserIdentityPublicKeyOutput {
|
|
|
284
239
|
identityPublicKey: string;
|
|
285
240
|
}
|
|
286
241
|
|
|
287
|
-
export { BitcoinNetwork, type
|
|
242
|
+
export { BitcoinNetwork, type ClaimStaticDepositInput, ClaimStaticDepositRequestType, type CompleteCoopExitOutput, type CompleteLeavesSwapOutput, type CompleteSeedReleaseInput, type CompleteSeedReleaseOutput, type Connection, type CoopExitFeeQuoteOutput, type Entity, type GetChallengeInput, type LeavesSwapFeeEstimateInput, type NotifyReceiverTransferInput, PageInfo, type Provider, type RequestCoopExitOutput, type RequestLeavesSwapOutput, type RequestLightningReceiveOutput, type RequestLightningSendOutput, SparkUserRequestStatus, SparkUserRequestType, SparkWalletUser, type SparkWalletUserToUserRequestsConnection, type StartSeedReleaseInput, type UserRequest, type VerifyChallengeInput, type WalletUserIdentityPublicKeyInput, type WalletUserIdentityPublicKeyOutput, getUserRequestQuery };
|
|
@@ -1,59 +1,14 @@
|
|
|
1
|
-
import { B as BitcoinNetwork,
|
|
2
|
-
export { C as ClaimStaticDepositOutput,
|
|
1
|
+
import { B as BitcoinNetwork, P as PageInfo, J as SspClient } from '../../client-Dg6vS_2I.js';
|
|
2
|
+
export { O as ClaimStaticDeposit, C as ClaimStaticDepositOutput, Q as ClaimStaticDepositStatus, R as CompleteCoopExitInput, X as CompleteLeavesSwapInput, Y as CoopExitFeeEstimate, Z as CoopExitFeeEstimatesInput, _ as CoopExitFeeEstimatesOutput, F as CoopExitFeeQuote, a0 as CoopExitFeeQuoteInput, G as CoopExitRequest, a2 as CurrencyAmount, a3 as CurrencyUnit, E as ExitSpeed, a4 as GetChallengeOutput, a5 as Invoice, a6 as Leaf, L as LeavesSwapFeeEstimateOutput, a8 as LeavesSwapRequest, x as LightningReceiveRequest, aa as LightningReceiveRequestStatus, z as LightningSendFeeEstimateInput, ab as LightningSendFeeEstimateOutput, y as LightningSendRequest, ad as LightningSendRequestStatus, ae as RequestCoopExitInput, af as RequestLeavesSwapInput, ag as RequestLightningReceiveInput, ah as RequestLightningSendInput, ai as SparkCoopExitRequestStatus, aj as SparkLeavesSwapRequestStatus, ak as SparkTransferToLeavesConnection, al as StaticDepositQuoteInput, u as StaticDepositQuoteOutput, am as SwapLeaf, an as Transfer, ao as UserLeafInput, ap as VerifyChallengeOutput, N as getClaimStaticDepositQuery, $ as getCoopExitFeeQuoteQuery, a1 as getCoopExitRequestQuery, a7 as getLeavesSwapRequestQuery, a9 as getLightningReceiveRequestQuery, ac as getLightningSendRequestQuery } from '../../client-Dg6vS_2I.js';
|
|
3
3
|
import { Query } from '@lightsparkdev/core';
|
|
4
|
+
import '../../spark-ESAfZARg.js';
|
|
4
5
|
import '@buildonspark/lrc20-sdk';
|
|
5
6
|
import '@scure/btc-signer';
|
|
6
7
|
import 'bitcoinjs-lib';
|
|
7
8
|
import '@scure/bip32';
|
|
8
9
|
import '../../types-BADxR3bm.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* This is an enum value that represents values that could be added in the future.
|
|
13
|
-
* Clients should support unknown values as more of them could be added without notice.
|
|
14
|
-
*/
|
|
15
|
-
FUTURE_VALUE = "FUTURE_VALUE",
|
|
16
|
-
CREATED = "CREATED",
|
|
17
|
-
TRANSFER_CREATED = "TRANSFER_CREATED",
|
|
18
|
-
TRANSFER_CREATION_FAILED = "TRANSFER_CREATION_FAILED",
|
|
19
|
-
REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED = "REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED",
|
|
20
|
-
REFUND_SIGNING_FAILED = "REFUND_SIGNING_FAILED",
|
|
21
|
-
UTXO_SWAPPING_FAILED = "UTXO_SWAPPING_FAILED",
|
|
22
|
-
TRANSFER_COMPLETED = "TRANSFER_COMPLETED",
|
|
23
|
-
SPEND_TX_CREATED = "SPEND_TX_CREATED",
|
|
24
|
-
SPEND_TX_BROADCAST = "SPEND_TX_BROADCAST"
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
interface ClaimStaticDeposit {
|
|
28
|
-
/**
|
|
29
|
-
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
30
|
-
* string.
|
|
31
|
-
**/
|
|
32
|
-
id: string;
|
|
33
|
-
/** The date and time when the entity was first created. **/
|
|
34
|
-
createdAt: string;
|
|
35
|
-
/** The date and time when the entity was last updated. **/
|
|
36
|
-
updatedAt: string;
|
|
37
|
-
/** The network the lightning send request is on. **/
|
|
38
|
-
network: BitcoinNetwork;
|
|
39
|
-
/** The amount of credit to be added to the user's balance. **/
|
|
40
|
-
creditAmount: CurrencyAmount;
|
|
41
|
-
/** The maximum fee that the user is willing to pay. **/
|
|
42
|
-
maxFee: CurrencyAmount;
|
|
43
|
-
/** The status of the request. **/
|
|
44
|
-
status: ClaimStaticDepositStatus;
|
|
45
|
-
/** The transaction id of the deposit. **/
|
|
46
|
-
transactionId: string;
|
|
47
|
-
/** The output index of the deposit. **/
|
|
48
|
-
outputIndex: number;
|
|
49
|
-
/** The Bitcoin network of the deposit. **/
|
|
50
|
-
bitcoinNetwork: BitcoinNetwork;
|
|
51
|
-
/** The typename of the object **/
|
|
52
|
-
typename: string;
|
|
53
|
-
/** The id of the transfer. **/
|
|
54
|
-
transferSparkId?: string | undefined;
|
|
55
|
-
}
|
|
56
|
-
declare const getClaimStaticDepositQuery: (id: string) => Query<ClaimStaticDeposit>;
|
|
10
|
+
import '@bufbuild/protobuf/wire';
|
|
11
|
+
import 'nice-grpc-common';
|
|
57
12
|
|
|
58
13
|
declare enum ClaimStaticDepositRequestType {
|
|
59
14
|
/**
|
|
@@ -284,4 +239,4 @@ interface WalletUserIdentityPublicKeyOutput {
|
|
|
284
239
|
identityPublicKey: string;
|
|
285
240
|
}
|
|
286
241
|
|
|
287
|
-
export { BitcoinNetwork, type
|
|
242
|
+
export { BitcoinNetwork, type ClaimStaticDepositInput, ClaimStaticDepositRequestType, type CompleteCoopExitOutput, type CompleteLeavesSwapOutput, type CompleteSeedReleaseInput, type CompleteSeedReleaseOutput, type Connection, type CoopExitFeeQuoteOutput, type Entity, type GetChallengeInput, type LeavesSwapFeeEstimateInput, type NotifyReceiverTransferInput, PageInfo, type Provider, type RequestCoopExitOutput, type RequestLeavesSwapOutput, type RequestLightningReceiveOutput, type RequestLightningSendOutput, SparkUserRequestStatus, SparkUserRequestType, SparkWalletUser, type SparkWalletUserToUserRequestsConnection, type StartSeedReleaseInput, type UserRequest, type VerifyChallengeInput, type WalletUserIdentityPublicKeyInput, type WalletUserIdentityPublicKeyOutput, getUserRequestQuery };
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
getLightningReceiveRequestQuery,
|
|
19
19
|
getLightningSendRequestQuery,
|
|
20
20
|
getUserRequestQuery
|
|
21
|
-
} from "../../chunk-
|
|
21
|
+
} from "../../chunk-CQY5ML2A.js";
|
|
22
22
|
import "../../chunk-MVRQ5US7.js";
|
|
23
23
|
export {
|
|
24
24
|
BitcoinNetwork_default as BitcoinNetwork,
|