@buildonspark/spark-sdk 0.1.41 → 0.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/android/src/main/jniLibs/arm64-v8a/libuniffi_spark_frost.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libuniffi_spark_frost.so +0 -0
- package/android/src/main/jniLibs/x86/libuniffi_spark_frost.so +0 -0
- package/android/src/main/jniLibs/x86_64/libuniffi_spark_frost.so +0 -0
- package/dist/LightningSendFeeEstimateInput-BgOhEAI-.d.cts +10 -0
- package/dist/LightningSendFeeEstimateInput-BgOhEAI-.d.ts +10 -0
- package/dist/{RequestLightningSendInput-mXUWn_cp.d.ts → RequestLightningSendInput-D7fZdT4A.d.ts} +35 -16
- package/dist/{RequestLightningSendInput-DXcLoiCe.d.cts → RequestLightningSendInput-Na1mHdWg.d.cts} +35 -16
- package/dist/address/index.cjs +38 -7
- package/dist/address/index.d.cts +2 -2
- package/dist/address/index.d.ts +2 -2
- package/dist/address/index.js +3 -3
- package/dist/{chunk-ATEHMLKP.js → chunk-6AFUC5M2.js} +1 -1
- package/dist/{chunk-ZXDE2XMU.js → chunk-BUTZWYBW.js} +9 -6
- package/dist/{chunk-7EFSUADA.js → chunk-DOA6QXYQ.js} +1 -0
- package/dist/{chunk-J5W5Q2ZP.js → chunk-DQYKQJRZ.js} +291 -7
- package/dist/{chunk-TWF35O6M.js → chunk-GSI4OLXZ.js} +32 -1
- package/dist/{chunk-2ZXXLPG2.js → chunk-GYQR4B4P.js} +5 -4
- package/dist/{chunk-ROKY5KS4.js → chunk-HRQRRDSS.js} +53 -15
- package/dist/{chunk-YEZDPUFY.js → chunk-IRW5TWMH.js} +8 -8
- package/dist/{chunk-7VMYMQLF.js → chunk-NSJF5F5O.js} +1 -1
- package/dist/{chunk-TM4TOEOX.js → chunk-O4RYNJNB.js} +3 -3
- package/dist/{chunk-MGPRLH6Q.js → chunk-QNNSEJ4P.js} +1 -1
- package/dist/{chunk-UKT6OFLO.js → chunk-TIUBYNN5.js} +13 -7
- package/dist/{chunk-6YVPOQ2A.js → chunk-TOSP3INR.js} +235 -143
- package/dist/chunk-VFJQNBFX.js +21 -0
- package/dist/{chunk-KKSU7OZO.js → chunk-WWOTVNPP.js} +195 -67
- package/dist/{chunk-HK6LPV6Z.js → chunk-Z5HIAYFT.js} +1 -1
- package/dist/graphql/objects/index.cjs +229 -135
- package/dist/graphql/objects/index.d.cts +54 -9
- package/dist/graphql/objects/index.d.ts +54 -9
- package/dist/graphql/objects/index.js +3 -3
- package/dist/{index-OSDtPMmC.d.ts → index-7RYRH5wc.d.ts} +10 -8
- package/dist/{index-CFh4uWzi.d.cts → index-BJOc8Ur-.d.cts} +10 -8
- package/dist/index.cjs +790 -315
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +26 -26
- package/dist/index.node.cjs +790 -315
- package/dist/index.node.d.cts +9 -8
- package/dist/index.node.d.ts +9 -8
- package/dist/index.node.js +26 -26
- package/dist/native/index.cjs +812 -332
- package/dist/native/index.d.cts +53 -18
- package/dist/native/index.d.ts +53 -18
- package/dist/native/index.js +659 -181
- package/dist/{network-BiwBmoOg.d.cts → network-D5lKssVl.d.cts} +1 -1
- package/dist/{network-BF2GYPye.d.ts → network-xkBSpaTn.d.ts} +1 -1
- 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/{sdk-types-CfhdFnsA.d.cts → sdk-types-B-q9py_P.d.cts} +1 -1
- package/dist/{sdk-types-MnQrHolg.d.ts → sdk-types-BPoPgzda.d.ts} +1 -1
- package/dist/services/config.cjs +118 -69
- package/dist/services/config.d.cts +6 -4
- package/dist/services/config.d.ts +6 -4
- package/dist/services/config.js +9 -9
- package/dist/services/connection.cjs +95 -15
- package/dist/services/connection.d.cts +6 -4
- package/dist/services/connection.d.ts +6 -4
- package/dist/services/connection.js +3 -3
- package/dist/services/index.cjs +487 -117
- package/dist/services/index.d.cts +5 -4
- package/dist/services/index.d.ts +5 -4
- package/dist/services/index.js +19 -19
- package/dist/services/lrc-connection.cjs +50 -7
- package/dist/services/lrc-connection.d.cts +5 -4
- package/dist/services/lrc-connection.d.ts +5 -4
- package/dist/services/lrc-connection.js +3 -3
- package/dist/services/token-transactions.cjs +351 -36
- package/dist/services/token-transactions.d.cts +5 -4
- package/dist/services/token-transactions.d.ts +5 -4
- package/dist/services/token-transactions.js +6 -6
- package/dist/services/wallet-config.cjs +1 -0
- package/dist/services/wallet-config.d.cts +6 -4
- package/dist/services/wallet-config.d.ts +6 -4
- package/dist/services/wallet-config.js +1 -1
- package/dist/signer/signer.cjs +117 -64
- package/dist/signer/signer.d.cts +4 -3
- package/dist/signer/signer.d.ts +4 -3
- package/dist/signer/signer.js +15 -7
- package/dist/{signer-CylxIujU.d.ts → signer-IO3oMRNj.d.cts} +2 -1
- package/dist/{signer-BhLS7SYR.d.cts → signer-wqesWifN.d.ts} +2 -1
- package/dist/{spark-DjR1b3TC.d.cts → spark-CDm4gqS6.d.cts} +1 -1
- package/dist/{spark-DjR1b3TC.d.ts → spark-CDm4gqS6.d.ts} +1 -1
- package/dist/types/index.cjs +282 -188
- package/dist/types/index.d.cts +7 -6
- package/dist/types/index.d.ts +7 -6
- package/dist/types/index.js +3 -3
- package/dist/utils/index.cjs +90 -58
- package/dist/utils/index.d.cts +6 -5
- package/dist/utils/index.d.ts +6 -5
- package/dist/utils/index.js +16 -16
- package/ios/spark_frostFFI.xcframework/ios-arm64/SparkFrost +0 -0
- package/ios/spark_frostFFI.xcframework/ios-arm64/spark_frostFFI.framework/spark_frostFFI +0 -0
- package/ios/spark_frostFFI.xcframework/ios-arm64_x86_64-simulator/SparkFrost +0 -0
- package/ios/spark_frostFFI.xcframework/ios-arm64_x86_64-simulator/spark_frostFFI.framework/spark_frostFFI +0 -0
- package/ios/spark_frostFFI.xcframework/macos-arm64_x86_64/spark_frostFFI.framework/spark_frostFFI +0 -0
- package/package.json +4 -4
- package/src/constants.ts +21 -0
- package/src/errors/base.ts +43 -1
- package/src/graphql/client.ts +4 -0
- package/src/graphql/mutations/RequestLightningSend.ts +2 -0
- package/src/graphql/objects/ClaimStaticDepositInput.ts +1 -1
- package/src/graphql/objects/ClaimStaticDepositStatus.ts +4 -2
- package/src/graphql/objects/Connection.ts +7 -7
- package/src/graphql/objects/CoopExitFeeEstimate.ts +1 -1
- package/src/graphql/objects/CoopExitFeeQuote.ts +202 -0
- package/src/graphql/objects/CoopExitFeeQuoteInput.ts +41 -0
- package/src/graphql/objects/CoopExitFeeQuoteOutput.ts +45 -0
- package/src/graphql/objects/CoopExitRequest.ts +21 -0
- package/src/graphql/objects/CurrencyUnit.ts +26 -28
- package/src/graphql/objects/Entity.ts +84 -0
- package/src/graphql/objects/Invoice.ts +2 -2
- package/src/graphql/objects/Leaf.ts +1 -1
- package/src/graphql/objects/LeavesSwapFeeEstimateOutput.ts +1 -1
- package/src/graphql/objects/LeavesSwapRequest.ts +6 -0
- package/src/graphql/objects/LightningReceiveRequest.ts +11 -0
- package/src/graphql/objects/LightningSendFeeEstimateInput.ts +8 -0
- package/src/graphql/objects/LightningSendFeeEstimateOutput.ts +1 -1
- package/src/graphql/objects/LightningSendRequest.ts +3 -0
- package/src/graphql/objects/RequestCoopExitInput.ts +8 -0
- package/src/graphql/objects/RequestLeavesSwapInput.ts +5 -1
- package/src/graphql/objects/RequestLightningReceiveInput.ts +9 -2
- package/src/graphql/objects/RequestLightningSendInput.ts +8 -0
- package/src/graphql/objects/SparkCoopExitRequestStatus.ts +2 -0
- package/src/graphql/objects/SparkUserRequestType.ts +2 -0
- package/src/graphql/objects/SparkWalletUser.ts +20 -0
- package/src/graphql/objects/UserRequest.ts +32 -0
- package/src/graphql/objects/VerifyChallengeInput.ts +1 -1
- package/src/graphql/objects/index.ts +12 -3
- package/src/graphql/queries/LightningSendFeeEstimate.ts +2 -0
- package/src/logger.ts +3 -0
- package/src/native/index.ts +1 -0
- package/src/services/config.ts +4 -0
- package/src/services/connection.ts +68 -29
- package/src/services/coop-exit.ts +1 -1
- package/src/services/lightning.ts +25 -1
- package/src/services/lrc-connection.ts +3 -3
- package/src/services/token-transactions.ts +6 -2
- package/src/services/wallet-config.ts +2 -0
- package/src/signer/signer.ts +4 -1
- package/src/spark-wallet/spark-wallet.ts +51 -15
- package/src/spark-wallet/types.ts +1 -0
- package/src/tests/errors.test.ts +58 -0
- package/src/tests/integration/lightning.test.ts +184 -0
- package/src/tests/integration/ssp/static_deposit.test.ts +1 -2
- package/src/tests/tokens.test.ts +52 -3
- package/src/utils/token-hashing.ts +335 -1
- package/dist/LightningSendFeeEstimateInput-CJvPnCSB.d.cts +0 -5
- package/dist/LightningSendFeeEstimateInput-CJvPnCSB.d.ts +0 -5
- package/dist/chunk-HKAKEKCE.js +0 -8
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { B as BitcoinNetwork } from '../../BitcoinNetwork-TnABML0T.js';
|
|
2
2
|
import { Query } from '@lightsparkdev/core';
|
|
3
|
-
import { h as CurrencyAmount, P as PageInfo, D as SspClient } from '../../RequestLightningSendInput-
|
|
4
|
-
export { C as ClaimStaticDepositOutput, a as CompleteCoopExitInput, b as CompleteLeavesSwapInput, c as CoopExitFeeEstimate, d as CoopExitFeeEstimatesInput, e as CoopExitFeeEstimatesOutput, f as CoopExitRequest, i as CurrencyUnit, E as ExitSpeed, G as GetChallengeOutput, I as Invoice, L as Leaf, j as LeavesSwapFeeEstimateOutput, l as LeavesSwapRequest, n as LightningReceiveRequest, o as LightningReceiveRequestStatus, p as LightningSendFeeEstimateOutput, r as LightningSendRequest, s as LightningSendRequestStatus, R as RequestCoopExitInput, t as RequestLeavesSwapInput, u as RequestLightningReceiveInput, v as RequestLightningSendInput, S as SparkCoopExitRequestStatus, w as SparkLeavesSwapRequestStatus, x as SparkTransferToLeavesConnection, y as StaticDepositQuoteInput, z as StaticDepositQuoteOutput, A as SwapLeaf, T as Transfer, U as UserLeafInput, V as VerifyChallengeOutput, g as getCoopExitRequestQuery, k as getLeavesSwapRequestQuery, m as getLightningReceiveRequestQuery, q as getLightningSendRequestQuery } from '../../RequestLightningSendInput-
|
|
5
|
-
export { L as LightningSendFeeEstimateInput } from '../../LightningSendFeeEstimateInput-
|
|
6
|
-
import '../../signer-
|
|
3
|
+
import { h as CurrencyAmount, P as PageInfo, D as SspClient } from '../../RequestLightningSendInput-D7fZdT4A.js';
|
|
4
|
+
export { C as ClaimStaticDepositOutput, a as CompleteCoopExitInput, b as CompleteLeavesSwapInput, c as CoopExitFeeEstimate, d as CoopExitFeeEstimatesInput, e as CoopExitFeeEstimatesOutput, f as CoopExitRequest, i as CurrencyUnit, E as ExitSpeed, G as GetChallengeOutput, I as Invoice, L as Leaf, j as LeavesSwapFeeEstimateOutput, l as LeavesSwapRequest, n as LightningReceiveRequest, o as LightningReceiveRequestStatus, p as LightningSendFeeEstimateOutput, r as LightningSendRequest, s as LightningSendRequestStatus, R as RequestCoopExitInput, t as RequestLeavesSwapInput, u as RequestLightningReceiveInput, v as RequestLightningSendInput, S as SparkCoopExitRequestStatus, w as SparkLeavesSwapRequestStatus, x as SparkTransferToLeavesConnection, y as StaticDepositQuoteInput, z as StaticDepositQuoteOutput, A as SwapLeaf, T as Transfer, U as UserLeafInput, V as VerifyChallengeOutput, g as getCoopExitRequestQuery, k as getLeavesSwapRequestQuery, m as getLightningReceiveRequestQuery, q as getLightningSendRequestQuery } from '../../RequestLightningSendInput-D7fZdT4A.js';
|
|
5
|
+
export { L as LightningSendFeeEstimateInput } from '../../LightningSendFeeEstimateInput-BgOhEAI-.js';
|
|
6
|
+
import '../../signer-wqesWifN.js';
|
|
7
7
|
import '@scure/bip32';
|
|
8
|
-
import '../../spark-
|
|
8
|
+
import '../../spark-CDm4gqS6.js';
|
|
9
9
|
import '@bufbuild/protobuf/wire';
|
|
10
10
|
import 'nice-grpc-common';
|
|
11
11
|
import '@buildonspark/lrc20-sdk';
|
|
12
12
|
import '@scure/btc-signer';
|
|
13
13
|
import 'bitcoinjs-lib';
|
|
14
|
+
import '@buildonspark/lrc20-sdk/lrc/types';
|
|
14
15
|
|
|
15
16
|
declare enum ClaimStaticDepositStatus {
|
|
16
17
|
/**
|
|
@@ -24,8 +25,9 @@ declare enum ClaimStaticDepositStatus {
|
|
|
24
25
|
REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED = "REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED",
|
|
25
26
|
REFUND_SIGNING_FAILED = "REFUND_SIGNING_FAILED",
|
|
26
27
|
UTXO_SWAPPING_FAILED = "UTXO_SWAPPING_FAILED",
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
TRANSFER_COMPLETED = "TRANSFER_COMPLETED",
|
|
29
|
+
SPEND_TX_CREATED = "SPEND_TX_CREATED",
|
|
30
|
+
SPEND_TX_BROADCAST = "SPEND_TX_BROADCAST"
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
interface ClaimStaticDeposit {
|
|
@@ -119,6 +121,48 @@ interface Connection {
|
|
|
119
121
|
typename: string;
|
|
120
122
|
}
|
|
121
123
|
|
|
124
|
+
interface CoopExitFeeQuote {
|
|
125
|
+
/**
|
|
126
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
127
|
+
* string.
|
|
128
|
+
**/
|
|
129
|
+
id: string;
|
|
130
|
+
/** The date and time when the entity was first created. **/
|
|
131
|
+
createdAt: string;
|
|
132
|
+
/** The date and time when the entity was last updated. **/
|
|
133
|
+
updatedAt: string;
|
|
134
|
+
/** The network the coop exit fee quote is on. **/
|
|
135
|
+
network: BitcoinNetwork;
|
|
136
|
+
/** The total currency amount of all the nodes user swapped for the coop exit quote. **/
|
|
137
|
+
totalAmount: CurrencyAmount;
|
|
138
|
+
/** The fee user pays for the coop exit not including the L1 broadcast fee when exit speed is fast. **/
|
|
139
|
+
userFeeFast: CurrencyAmount;
|
|
140
|
+
/** The fee user pays for the coop exit not including the L1 broadcast fee when exit speed is medium. **/
|
|
141
|
+
userFeeMedium: CurrencyAmount;
|
|
142
|
+
/** The fee user pays for the coop exit not including the L1 broadcast fee when exit speed is slow. **/
|
|
143
|
+
userFeeSlow: CurrencyAmount;
|
|
144
|
+
/** The L1 broadcast fee user pays for the coop exit when exit speed is fast. **/
|
|
145
|
+
l1BroadcastFeeFast: CurrencyAmount;
|
|
146
|
+
/** The L1 broadcast fee user pays for the coop exit when exit speed is medium. **/
|
|
147
|
+
l1BroadcastFeeMedium: CurrencyAmount;
|
|
148
|
+
/** The L1 broadcast fee user pays for the coop exit when exit speed is slow. **/
|
|
149
|
+
l1BroadcastFeeSlow: CurrencyAmount;
|
|
150
|
+
/** The time when the coop exit fee quote expires. **/
|
|
151
|
+
expiresAt: string;
|
|
152
|
+
/** The typename of the object **/
|
|
153
|
+
typename: string;
|
|
154
|
+
}
|
|
155
|
+
declare const getCoopExitFeeQuoteQuery: (id: string) => Query<CoopExitFeeQuote>;
|
|
156
|
+
|
|
157
|
+
interface CoopExitFeeQuoteInput {
|
|
158
|
+
leafExternalIds: string[];
|
|
159
|
+
withdrawalAddress: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface CoopExitFeeQuoteOutput {
|
|
163
|
+
quoteId: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
122
166
|
/** This interface is used by all the entities in the Lightspark system. It defines a few core fields that are available everywhere. Any object that implements this interface can be queried using the `entity` query and its ID. **/
|
|
123
167
|
interface Entity {
|
|
124
168
|
/**
|
|
@@ -191,7 +235,8 @@ declare enum SparkUserRequestType {
|
|
|
191
235
|
LIGHTNING_SEND = "LIGHTNING_SEND",
|
|
192
236
|
LIGHTNING_RECEIVE = "LIGHTNING_RECEIVE",
|
|
193
237
|
COOP_EXIT = "COOP_EXIT",
|
|
194
|
-
LEAVES_SWAP = "LEAVES_SWAP"
|
|
238
|
+
LEAVES_SWAP = "LEAVES_SWAP",
|
|
239
|
+
CLAIM_STATIC_DEPOSIT = "CLAIM_STATIC_DEPOSIT"
|
|
195
240
|
}
|
|
196
241
|
|
|
197
242
|
interface UserRequest {
|
|
@@ -283,4 +328,4 @@ interface WalletUserIdentityPublicKeyOutput {
|
|
|
283
328
|
identityPublicKey: string;
|
|
284
329
|
}
|
|
285
330
|
|
|
286
|
-
export { BitcoinNetwork, type ClaimStaticDeposit, type ClaimStaticDepositInput, ClaimStaticDepositRequestType, ClaimStaticDepositStatus, type CompleteCoopExitOutput, type CompleteLeavesSwapOutput, type CompleteSeedReleaseInput, type CompleteSeedReleaseOutput, type Connection, CurrencyAmount, 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, getClaimStaticDepositQuery, getUserRequestQuery };
|
|
331
|
+
export { BitcoinNetwork, type ClaimStaticDeposit, type ClaimStaticDepositInput, ClaimStaticDepositRequestType, ClaimStaticDepositStatus, type CompleteCoopExitOutput, type CompleteLeavesSwapOutput, type CompleteSeedReleaseInput, type CompleteSeedReleaseOutput, type Connection, type CoopExitFeeQuote, type CoopExitFeeQuoteInput, type CoopExitFeeQuoteOutput, CurrencyAmount, 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, getClaimStaticDepositQuery, getCoopExitFeeQuoteQuery, getUserRequestQuery };
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
SparkWalletUser_default,
|
|
13
13
|
Transfer_default,
|
|
14
14
|
getClaimStaticDepositQuery,
|
|
15
|
-
|
|
15
|
+
getCoopExitFeeQuoteQuery,
|
|
16
16
|
getLeavesSwapRequestQuery,
|
|
17
17
|
getLightningReceiveRequestQuery,
|
|
18
18
|
getLightningSendRequestQuery,
|
|
19
19
|
getUserRequestQuery
|
|
20
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-TOSP3INR.js";
|
|
21
21
|
import {
|
|
22
22
|
BitcoinNetwork_default
|
|
23
23
|
} from "../../chunk-HMLOC6TE.js";
|
|
@@ -37,7 +37,7 @@ export {
|
|
|
37
37
|
SparkWalletUser_default as SparkWalletUser,
|
|
38
38
|
Transfer_default as Transfer,
|
|
39
39
|
getClaimStaticDepositQuery,
|
|
40
|
-
|
|
40
|
+
getCoopExitFeeQuoteQuery,
|
|
41
41
|
getLeavesSwapRequestQuery,
|
|
42
42
|
getLightningReceiveRequestQuery,
|
|
43
43
|
getLightningSendRequestQuery,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as LeavesSwapFeeEstimateOutput, z as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, n as LightningReceiveRequest, r as LightningSendRequest, E as ExitSpeed, f as CoopExitRequest, e as CoopExitFeeEstimatesOutput, T as Transfer$1 } from './RequestLightningSendInput-
|
|
2
|
-
import { L as LightningSendFeeEstimateInput } from './LightningSendFeeEstimateInput-
|
|
3
|
-
import { h as SigningCommitment, V as VerifiableSecretShare, S as SparkSigner } from './signer-
|
|
4
|
-
import { h as RequestedSigningCommitments, U as UserSignedTxSigningJob,
|
|
1
|
+
import { j as LeavesSwapFeeEstimateOutput, z as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, n as LightningReceiveRequest, r as LightningSendRequest, E as ExitSpeed, f as CoopExitRequest, e as CoopExitFeeEstimatesOutput, T as Transfer$1 } from './RequestLightningSendInput-D7fZdT4A.js';
|
|
2
|
+
import { L as LightningSendFeeEstimateInput } from './LightningSendFeeEstimateInput-BgOhEAI-.js';
|
|
3
|
+
import { h as SigningCommitment, V as VerifiableSecretShare, S as SparkSigner } from './signer-wqesWifN.js';
|
|
4
|
+
import { h as RequestedSigningCommitments, U as UserSignedTxSigningJob, d as TreeNode, f as Transfer, L as LeafRefundTxSigningResult, i as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, j as OutputWithPreviousTransactionData, k as TokenTransactionWithStatus } from './spark-CDm4gqS6.js';
|
|
5
5
|
import { WalletConfigService } from './services/config.js';
|
|
6
6
|
import { ConnectionManager } from './services/connection.js';
|
|
7
7
|
import { Lrc20ConnectionManager } from './services/lrc-connection.js';
|
|
@@ -10,9 +10,9 @@ import { ConfigOptions } from './services/wallet-config.js';
|
|
|
10
10
|
import { LRCWallet } from '@buildonspark/lrc20-sdk';
|
|
11
11
|
import { EventEmitter } from 'eventemitter3';
|
|
12
12
|
import { SparkAddressFormat } from './address/index.js';
|
|
13
|
-
import { a as WalletTransfer, W as WalletLeaf } from './sdk-types-
|
|
13
|
+
import { a as WalletTransfer, W as WalletLeaf } from './sdk-types-BPoPgzda.js';
|
|
14
14
|
import './utils/index.js';
|
|
15
|
-
import './network-
|
|
15
|
+
import './network-xkBSpaTn.js';
|
|
16
16
|
|
|
17
17
|
declare class SparkSDKError extends Error {
|
|
18
18
|
readonly context: Record<string, unknown>;
|
|
@@ -240,6 +240,7 @@ type PayLightningInvoiceParams = {
|
|
|
240
240
|
invoice: string;
|
|
241
241
|
maxFeeSats: number;
|
|
242
242
|
preferSpark?: boolean;
|
|
243
|
+
amountSatsToSend?: number;
|
|
243
244
|
};
|
|
244
245
|
type TransferParams = {
|
|
245
246
|
amountSats: number;
|
|
@@ -586,16 +587,17 @@ declare class SparkWallet extends EventEmitter {
|
|
|
586
587
|
* @param {Object} params - Parameters for paying the invoice
|
|
587
588
|
* @param {string} params.invoice - The BOLT11-encoded Lightning invoice to pay
|
|
588
589
|
* @param {boolean} [params.preferSpark] - Whether to prefer a spark transfer over lightning for the payment
|
|
590
|
+
* @param {number} [params.amountSatsToSend] - The amount in sats to send. This is only valid for 0 amount lightning invoices.
|
|
589
591
|
* @returns {Promise<LightningSendRequest>} The Lightning payment request details
|
|
590
592
|
*/
|
|
591
|
-
payLightningInvoice({ invoice, maxFeeSats, preferSpark, }: PayLightningInvoiceParams): Promise<LightningSendRequest | WalletTransfer>;
|
|
593
|
+
payLightningInvoice({ invoice, maxFeeSats, preferSpark, amountSatsToSend, }: PayLightningInvoiceParams): Promise<LightningSendRequest | WalletTransfer>;
|
|
592
594
|
/**
|
|
593
595
|
* Gets fee estimate for sending Lightning payments.
|
|
594
596
|
*
|
|
595
597
|
* @param {LightningSendFeeEstimateInput} params - Input parameters for fee estimation
|
|
596
598
|
* @returns {Promise<number>} Fee estimate for sending Lightning payments
|
|
597
599
|
*/
|
|
598
|
-
getLightningSendFeeEstimate({ encodedInvoice, }: LightningSendFeeEstimateInput): Promise<number>;
|
|
600
|
+
getLightningSendFeeEstimate({ encodedInvoice, amountSats, }: LightningSendFeeEstimateInput): Promise<number>;
|
|
599
601
|
/**
|
|
600
602
|
* Generates a deposit address for a tree.
|
|
601
603
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as LeavesSwapFeeEstimateOutput, z as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, n as LightningReceiveRequest, r as LightningSendRequest, E as ExitSpeed, f as CoopExitRequest, e as CoopExitFeeEstimatesOutput, T as Transfer$1 } from './RequestLightningSendInput-
|
|
2
|
-
import { L as LightningSendFeeEstimateInput } from './LightningSendFeeEstimateInput-
|
|
3
|
-
import { h as SigningCommitment, V as VerifiableSecretShare, S as SparkSigner } from './signer-
|
|
4
|
-
import { h as RequestedSigningCommitments, U as UserSignedTxSigningJob,
|
|
1
|
+
import { j as LeavesSwapFeeEstimateOutput, z as StaticDepositQuoteOutput, C as ClaimStaticDepositOutput, n as LightningReceiveRequest, r as LightningSendRequest, E as ExitSpeed, f as CoopExitRequest, e as CoopExitFeeEstimatesOutput, T as Transfer$1 } from './RequestLightningSendInput-Na1mHdWg.cjs';
|
|
2
|
+
import { L as LightningSendFeeEstimateInput } from './LightningSendFeeEstimateInput-BgOhEAI-.cjs';
|
|
3
|
+
import { h as SigningCommitment, V as VerifiableSecretShare, S as SparkSigner } from './signer-IO3oMRNj.cjs';
|
|
4
|
+
import { h as RequestedSigningCommitments, U as UserSignedTxSigningJob, d as TreeNode, f as Transfer, L as LeafRefundTxSigningResult, i as NodeSignatures, F as FinalizeNodeSignaturesResponse, Q as QueryTransfersResponse, j as OutputWithPreviousTransactionData, k as TokenTransactionWithStatus } from './spark-CDm4gqS6.cjs';
|
|
5
5
|
import { WalletConfigService } from './services/config.cjs';
|
|
6
6
|
import { ConnectionManager } from './services/connection.cjs';
|
|
7
7
|
import { Lrc20ConnectionManager } from './services/lrc-connection.cjs';
|
|
@@ -10,9 +10,9 @@ import { ConfigOptions } from './services/wallet-config.cjs';
|
|
|
10
10
|
import { LRCWallet } from '@buildonspark/lrc20-sdk';
|
|
11
11
|
import { EventEmitter } from 'eventemitter3';
|
|
12
12
|
import { SparkAddressFormat } from './address/index.cjs';
|
|
13
|
-
import { a as WalletTransfer, W as WalletLeaf } from './sdk-types-
|
|
13
|
+
import { a as WalletTransfer, W as WalletLeaf } from './sdk-types-B-q9py_P.cjs';
|
|
14
14
|
import './utils/index.cjs';
|
|
15
|
-
import './network-
|
|
15
|
+
import './network-D5lKssVl.cjs';
|
|
16
16
|
|
|
17
17
|
declare class SparkSDKError extends Error {
|
|
18
18
|
readonly context: Record<string, unknown>;
|
|
@@ -240,6 +240,7 @@ type PayLightningInvoiceParams = {
|
|
|
240
240
|
invoice: string;
|
|
241
241
|
maxFeeSats: number;
|
|
242
242
|
preferSpark?: boolean;
|
|
243
|
+
amountSatsToSend?: number;
|
|
243
244
|
};
|
|
244
245
|
type TransferParams = {
|
|
245
246
|
amountSats: number;
|
|
@@ -586,16 +587,17 @@ declare class SparkWallet extends EventEmitter {
|
|
|
586
587
|
* @param {Object} params - Parameters for paying the invoice
|
|
587
588
|
* @param {string} params.invoice - The BOLT11-encoded Lightning invoice to pay
|
|
588
589
|
* @param {boolean} [params.preferSpark] - Whether to prefer a spark transfer over lightning for the payment
|
|
590
|
+
* @param {number} [params.amountSatsToSend] - The amount in sats to send. This is only valid for 0 amount lightning invoices.
|
|
589
591
|
* @returns {Promise<LightningSendRequest>} The Lightning payment request details
|
|
590
592
|
*/
|
|
591
|
-
payLightningInvoice({ invoice, maxFeeSats, preferSpark, }: PayLightningInvoiceParams): Promise<LightningSendRequest | WalletTransfer>;
|
|
593
|
+
payLightningInvoice({ invoice, maxFeeSats, preferSpark, amountSatsToSend, }: PayLightningInvoiceParams): Promise<LightningSendRequest | WalletTransfer>;
|
|
592
594
|
/**
|
|
593
595
|
* Gets fee estimate for sending Lightning payments.
|
|
594
596
|
*
|
|
595
597
|
* @param {LightningSendFeeEstimateInput} params - Input parameters for fee estimation
|
|
596
598
|
* @returns {Promise<number>} Fee estimate for sending Lightning payments
|
|
597
599
|
*/
|
|
598
|
-
getLightningSendFeeEstimate({ encodedInvoice, }: LightningSendFeeEstimateInput): Promise<number>;
|
|
600
|
+
getLightningSendFeeEstimate({ encodedInvoice, amountSats, }: LightningSendFeeEstimateInput): Promise<number>;
|
|
599
601
|
/**
|
|
600
602
|
* Generates a deposit address for a tree.
|
|
601
603
|
*
|