@lightsparkdev/lightspark-sdk 1.8.9 → 1.8.10
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 +9 -0
- package/dist/{index-DqbEQJCG.d.ts → index-1psIIljd.d.ts} +4 -1
- package/dist/{index-jTkpKHc9.d.cts → index-DrqTCl6I.d.cts} +4 -1
- package/dist/index.cjs +13 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -6
- package/dist/objects/index.d.cts +1 -1
- package/dist/objects/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/client.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lightsparkdev/lightspark-sdk
|
|
2
2
|
|
|
3
|
+
## 1.8.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 47733a2: - Allow injecting a custom fetchImpl into the JS SDK. This is helpful for clients who need custom requesting logic, logging, etc.
|
|
8
|
+
- Updated dependencies [47733a2]
|
|
9
|
+
- @lightsparkdev/core@1.2.8
|
|
10
|
+
- @lightsparkdev/crypto-wasm@0.1.11
|
|
11
|
+
|
|
3
12
|
## 1.8.9
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -2970,6 +2970,8 @@ declare class LightsparkClient {
|
|
|
2970
2970
|
private authProvider;
|
|
2971
2971
|
private readonly serverUrl;
|
|
2972
2972
|
private readonly cryptoImpl;
|
|
2973
|
+
private readonly signingKey?;
|
|
2974
|
+
private readonly fetchImpl;
|
|
2973
2975
|
private requester;
|
|
2974
2976
|
private readonly nodeKeyCache;
|
|
2975
2977
|
private readonly nodeKeyLoaderCache;
|
|
@@ -2984,8 +2986,9 @@ declare class LightsparkClient {
|
|
|
2984
2986
|
* @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto.
|
|
2985
2987
|
* For React Native, you should use the `ReactNativeCrypto`
|
|
2986
2988
|
* implementation from `@lightsparkdev/react-native`.
|
|
2989
|
+
* @param signingKey Passing in a signing key enables you to overload the default signing behavior. You can implement your own SigningKey class to make requests to a secure environment to sign or load a locally persisted key. WARNING: Typically, you won't need to set this parameter unless you want to customize the OSK signing flow. Most users should just use `loadNodeSigningKey` instead of passing this parameter.
|
|
2987
2990
|
*/
|
|
2988
|
-
constructor(authProvider?: AuthProvider, serverUrl?: string, cryptoImpl?: CryptoInterface);
|
|
2991
|
+
constructor(authProvider?: AuthProvider, serverUrl?: string, cryptoImpl?: CryptoInterface, signingKey?: SigningKey | undefined, fetchImpl?: typeof fetch);
|
|
2989
2992
|
/**
|
|
2990
2993
|
* Sets the key loader for a node. This unlocks client operations that
|
|
2991
2994
|
* require a private key. Passing in [NodeIdAndPasswordSigningKeyLoaderArgs]
|
|
@@ -2970,6 +2970,8 @@ declare class LightsparkClient {
|
|
|
2970
2970
|
private authProvider;
|
|
2971
2971
|
private readonly serverUrl;
|
|
2972
2972
|
private readonly cryptoImpl;
|
|
2973
|
+
private readonly signingKey?;
|
|
2974
|
+
private readonly fetchImpl;
|
|
2973
2975
|
private requester;
|
|
2974
2976
|
private readonly nodeKeyCache;
|
|
2975
2977
|
private readonly nodeKeyLoaderCache;
|
|
@@ -2984,8 +2986,9 @@ declare class LightsparkClient {
|
|
|
2984
2986
|
* @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto.
|
|
2985
2987
|
* For React Native, you should use the `ReactNativeCrypto`
|
|
2986
2988
|
* implementation from `@lightsparkdev/react-native`.
|
|
2989
|
+
* @param signingKey Passing in a signing key enables you to overload the default signing behavior. You can implement your own SigningKey class to make requests to a secure environment to sign or load a locally persisted key. WARNING: Typically, you won't need to set this parameter unless you want to customize the OSK signing flow. Most users should just use `loadNodeSigningKey` instead of passing this parameter.
|
|
2987
2990
|
*/
|
|
2988
|
-
constructor(authProvider?: AuthProvider, serverUrl?: string, cryptoImpl?: CryptoInterface);
|
|
2991
|
+
constructor(authProvider?: AuthProvider, serverUrl?: string, cryptoImpl?: CryptoInterface, signingKey?: SigningKey | undefined, fetchImpl?: typeof fetch);
|
|
2989
2992
|
/**
|
|
2990
2993
|
* Sets the key loader for a node. This unlocks client operations that
|
|
2991
2994
|
* require a private key. Passing in [NodeIdAndPasswordSigningKeyLoaderArgs]
|
package/dist/index.cjs
CHANGED
|
@@ -176,7 +176,7 @@ var import_core28 = require("@lightsparkdev/core");
|
|
|
176
176
|
// package.json
|
|
177
177
|
var package_default = {
|
|
178
178
|
name: "@lightsparkdev/lightspark-sdk",
|
|
179
|
-
version: "1.8.
|
|
179
|
+
version: "1.8.10",
|
|
180
180
|
description: "Lightspark JS SDK",
|
|
181
181
|
author: "Lightspark Inc.",
|
|
182
182
|
keywords: [
|
|
@@ -258,8 +258,8 @@ var package_default = {
|
|
|
258
258
|
},
|
|
259
259
|
license: "Apache-2.0",
|
|
260
260
|
dependencies: {
|
|
261
|
-
"@lightsparkdev/core": "1.2.
|
|
262
|
-
"@lightsparkdev/crypto-wasm": "0.1.
|
|
261
|
+
"@lightsparkdev/core": "1.2.8",
|
|
262
|
+
"@lightsparkdev/crypto-wasm": "0.1.11",
|
|
263
263
|
"crypto-browserify": "^3.12.0",
|
|
264
264
|
dayjs: "^1.11.7",
|
|
265
265
|
dotenv: "^16.3.1",
|
|
@@ -10491,11 +10491,14 @@ var LightsparkClient = class {
|
|
|
10491
10491
|
* @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto.
|
|
10492
10492
|
* For React Native, you should use the `ReactNativeCrypto`
|
|
10493
10493
|
* implementation from `@lightsparkdev/react-native`.
|
|
10494
|
+
* @param signingKey Passing in a signing key enables you to overload the default signing behavior. You can implement your own SigningKey class to make requests to a secure environment to sign or load a locally persisted key. WARNING: Typically, you won't need to set this parameter unless you want to customize the OSK signing flow. Most users should just use `loadNodeSigningKey` instead of passing this parameter.
|
|
10494
10495
|
*/
|
|
10495
|
-
constructor(authProvider = new import_core28.StubAuthProvider(), serverUrl = "api.lightspark.com", cryptoImpl = import_core28.DefaultCrypto) {
|
|
10496
|
+
constructor(authProvider = new import_core28.StubAuthProvider(), serverUrl = "api.lightspark.com", cryptoImpl = import_core28.DefaultCrypto, signingKey, fetchImpl = fetch) {
|
|
10496
10497
|
this.authProvider = authProvider;
|
|
10497
10498
|
this.serverUrl = serverUrl;
|
|
10498
10499
|
this.cryptoImpl = cryptoImpl;
|
|
10500
|
+
this.signingKey = signingKey;
|
|
10501
|
+
this.fetchImpl = fetchImpl;
|
|
10499
10502
|
this.nodeKeyCache = new import_core28.NodeKeyCache(this.cryptoImpl);
|
|
10500
10503
|
this.nodeKeyLoaderCache = new NodeKeyLoaderCache(
|
|
10501
10504
|
this.nodeKeyCache,
|
|
@@ -10507,7 +10510,9 @@ var LightsparkClient = class {
|
|
|
10507
10510
|
`js-lightspark-sdk/${sdkVersion}`,
|
|
10508
10511
|
authProvider,
|
|
10509
10512
|
serverUrl,
|
|
10510
|
-
this.cryptoImpl
|
|
10513
|
+
this.cryptoImpl,
|
|
10514
|
+
this.signingKey,
|
|
10515
|
+
this.fetchImpl
|
|
10511
10516
|
);
|
|
10512
10517
|
autoBind(this);
|
|
10513
10518
|
}
|
|
@@ -10554,7 +10559,9 @@ var LightsparkClient = class {
|
|
|
10554
10559
|
`js-lightspark-sdk/${sdkVersion}`,
|
|
10555
10560
|
authProvider,
|
|
10556
10561
|
this.serverUrl,
|
|
10557
|
-
this.cryptoImpl
|
|
10562
|
+
this.cryptoImpl,
|
|
10563
|
+
this.signingKey,
|
|
10564
|
+
this.fetchImpl
|
|
10558
10565
|
);
|
|
10559
10566
|
this.authProvider = authProvider;
|
|
10560
10567
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthProvider } from '@lightsparkdev/core';
|
|
2
|
-
import { W as WebhookEventType, L as LightsparkClient } from './index-
|
|
3
|
-
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateTestModeInvoiceInput, R as CreateTestModeInvoiceOutput, S as CreateTestModePaymentInput, T as CreateTestModePaymentoutput, U as CreateUmaInvitationInput, V as CreateUmaInvitationOutput, X as CreateUmaInvoiceInput, Y as CurrencyAmount, Z as CurrencyUnit, _ as DailyLiquidityForecast, $ as DeclineToSignMessagesInput, a0 as DeclineToSignMessagesOutput, a1 as DeleteApiTokenInput, a2 as DeleteApiTokenOutput, a3 as Deposit, a5 as Entity, a6 as FailHtlcsInput, a7 as FailHtlcsOutput, a8 as FeeEstimate, a9 as FundNodeInput, aa as FundNodeOutput, ab as GraphNode, ac as Hop, ae as HtlcAttemptFailureCode, af as IdAndSignature, ag as IncentivesIneligibilityReason, ah as IncentivesStatus, ai as IncomingPayment, aj as IncomingPaymentAttempt, al as IncomingPaymentAttemptStatus, aq as IncomingPaymentToAttemptsConnection, am as IncomingPaymentsForInvoiceQueryInput, an as IncomingPaymentsForInvoiceQueryOutput, ao as IncomingPaymentsForPaymentHashQueryInput, ap as IncomingPaymentsForPaymentHashQueryOutput, ar as Invoice, at as InvoiceData, au as InvoiceForPaymentHashInput, av as InvoiceForPaymentHashOutput, aw as InvoiceType, ax as LightningFeeEstimateForInvoiceInput, ay as LightningFeeEstimateForNodeInput, az as LightningFeeEstimateOutput, aA as LightningPaymentDirection, aB as LightningTransaction, aD as LightsparkNode, aF as LightsparkNodeOwner, aH as LightsparkNodeStatus, aI as LightsparkNodeToChannelsConnection, aJ as LightsparkNodeToDailyLiquidityForecastsConnection, aK as LightsparkNodeWithOSK, aL as LightsparkNodeWithRemoteSigning, aM as MultiSigAddressValidationParameters, aN as Node, aP as NodeAddress, aQ as NodeAddressType, aR as NodeToAddressesConnection, aS as OnChainFeeTarget, aT as OnChainTransaction, aV as OutgoingPayment, aW as OutgoingPaymentAttempt, aX as OutgoingPaymentAttemptStatus, aY as OutgoingPaymentAttemptToHopsConnection, aZ as OutgoingPaymentForIdempotencyKeyInput, a_ as OutgoingPaymentForIdempotencyKeyOutput, b3 as OutgoingPaymentToAttemptsConnection, a$ as OutgoingPaymentsForInvoiceQueryInput, b0 as OutgoingPaymentsForInvoiceQueryOutput, b1 as OutgoingPaymentsForPaymentHashQueryInput, b2 as OutgoingPaymentsForPaymentHashQueryOutput, b4 as PageInfo, b5 as PayInvoiceInput, b6 as PayInvoiceOutput, bd as PayUmaInvoiceInput, b7 as PaymentDirection, b8 as PaymentFailureReason, b9 as PaymentRequest, bb as PaymentRequestData, bc as PaymentRequestStatus, be as Permission, bf as PostTransactionData, bg as RegionCode, bh as RegisterPaymentInput, bi as RegisterPaymentOutput, bj as ReleaseChannelPerCommitmentSecretInput, bk as ReleaseChannelPerCommitmentSecretOutput, bl as ReleasePaymentPreimageInput, bm as ReleasePaymentPreimageOutput, bn as RemoteSigningSubEventType, bo as RequestInitiator, bp as RequestWithdrawalInput, bq as RequestWithdrawalOutput, br as RichText, bs as RiskRating, bt as RoutingTransaction, bv as RoutingTransactionFailureReason, bw as ScreenNodeInput, bx as ScreenNodeOutput, by as Secret, bz as SendPaymentInput, bA as SendPaymentOutput, bB as SetInvoicePaymentHashInput, bC as SetInvoicePaymentHashOutput, bI as SignInvoiceInput, bJ as SignInvoiceOutput, bK as SignMessagesInput, bL as SignMessagesOutput, bD as Signable, bF as SignablePayload, bH as SignablePayloadStatus, bM as SingleNodeDashboard, bN as Transaction, bP as TransactionFailures, bQ as TransactionStatus, bR as TransactionType, bS as TransactionUpdate, bT as UmaInvitation, bV as UpdateChannelPerCommitmentPointInput, bW as UpdateChannelPerCommitmentPointOutput, bX as UpdateNodeSharedSecretInput, bY as UpdateNodeSharedSecretOutput, bZ as Wallet, b_ as WalletStatus, b$ as WalletToPaymentRequestsConnection, c0 as WalletToTransactionsConnection, c1 as WalletToWithdrawalRequestsConnection, c2 as Withdrawal, c4 as WithdrawalFeeEstimateInput, c5 as WithdrawalFeeEstimateOutput, c6 as WithdrawalMode, c7 as WithdrawalRequest, c8 as WithdrawalRequestStatus, c9 as WithdrawalRequestToChannelClosingTransactionsConnection, ca as WithdrawalRequestToChannelOpeningTransactionsConnection, cb as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a4 as getDepositQuery, ad as getHopQuery, ak as getIncomingPaymentAttemptQuery, as as getInvoiceQuery, aC as getLightningTransactionQuery, aG as getLightsparkNodeOwnerQuery, aE as getLightsparkNodeQuery, aO as getNodeQuery, aU as getOnChainTransactionQuery, ba as getPaymentRequestQuery, bu as getRoutingTransactionQuery, bG as getSignablePayloadQuery, bE as getSignableQuery, bO as getTransactionQuery, bU as getUmaInvitationQuery, c3 as getWithdrawalQuery } from './index-
|
|
2
|
+
import { W as WebhookEventType, L as LightsparkClient } from './index-DrqTCl6I.cjs';
|
|
3
|
+
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateTestModeInvoiceInput, R as CreateTestModeInvoiceOutput, S as CreateTestModePaymentInput, T as CreateTestModePaymentoutput, U as CreateUmaInvitationInput, V as CreateUmaInvitationOutput, X as CreateUmaInvoiceInput, Y as CurrencyAmount, Z as CurrencyUnit, _ as DailyLiquidityForecast, $ as DeclineToSignMessagesInput, a0 as DeclineToSignMessagesOutput, a1 as DeleteApiTokenInput, a2 as DeleteApiTokenOutput, a3 as Deposit, a5 as Entity, a6 as FailHtlcsInput, a7 as FailHtlcsOutput, a8 as FeeEstimate, a9 as FundNodeInput, aa as FundNodeOutput, ab as GraphNode, ac as Hop, ae as HtlcAttemptFailureCode, af as IdAndSignature, ag as IncentivesIneligibilityReason, ah as IncentivesStatus, ai as IncomingPayment, aj as IncomingPaymentAttempt, al as IncomingPaymentAttemptStatus, aq as IncomingPaymentToAttemptsConnection, am as IncomingPaymentsForInvoiceQueryInput, an as IncomingPaymentsForInvoiceQueryOutput, ao as IncomingPaymentsForPaymentHashQueryInput, ap as IncomingPaymentsForPaymentHashQueryOutput, ar as Invoice, at as InvoiceData, au as InvoiceForPaymentHashInput, av as InvoiceForPaymentHashOutput, aw as InvoiceType, ax as LightningFeeEstimateForInvoiceInput, ay as LightningFeeEstimateForNodeInput, az as LightningFeeEstimateOutput, aA as LightningPaymentDirection, aB as LightningTransaction, aD as LightsparkNode, aF as LightsparkNodeOwner, aH as LightsparkNodeStatus, aI as LightsparkNodeToChannelsConnection, aJ as LightsparkNodeToDailyLiquidityForecastsConnection, aK as LightsparkNodeWithOSK, aL as LightsparkNodeWithRemoteSigning, aM as MultiSigAddressValidationParameters, aN as Node, aP as NodeAddress, aQ as NodeAddressType, aR as NodeToAddressesConnection, aS as OnChainFeeTarget, aT as OnChainTransaction, aV as OutgoingPayment, aW as OutgoingPaymentAttempt, aX as OutgoingPaymentAttemptStatus, aY as OutgoingPaymentAttemptToHopsConnection, aZ as OutgoingPaymentForIdempotencyKeyInput, a_ as OutgoingPaymentForIdempotencyKeyOutput, b3 as OutgoingPaymentToAttemptsConnection, a$ as OutgoingPaymentsForInvoiceQueryInput, b0 as OutgoingPaymentsForInvoiceQueryOutput, b1 as OutgoingPaymentsForPaymentHashQueryInput, b2 as OutgoingPaymentsForPaymentHashQueryOutput, b4 as PageInfo, b5 as PayInvoiceInput, b6 as PayInvoiceOutput, bd as PayUmaInvoiceInput, b7 as PaymentDirection, b8 as PaymentFailureReason, b9 as PaymentRequest, bb as PaymentRequestData, bc as PaymentRequestStatus, be as Permission, bf as PostTransactionData, bg as RegionCode, bh as RegisterPaymentInput, bi as RegisterPaymentOutput, bj as ReleaseChannelPerCommitmentSecretInput, bk as ReleaseChannelPerCommitmentSecretOutput, bl as ReleasePaymentPreimageInput, bm as ReleasePaymentPreimageOutput, bn as RemoteSigningSubEventType, bo as RequestInitiator, bp as RequestWithdrawalInput, bq as RequestWithdrawalOutput, br as RichText, bs as RiskRating, bt as RoutingTransaction, bv as RoutingTransactionFailureReason, bw as ScreenNodeInput, bx as ScreenNodeOutput, by as Secret, bz as SendPaymentInput, bA as SendPaymentOutput, bB as SetInvoicePaymentHashInput, bC as SetInvoicePaymentHashOutput, bI as SignInvoiceInput, bJ as SignInvoiceOutput, bK as SignMessagesInput, bL as SignMessagesOutput, bD as Signable, bF as SignablePayload, bH as SignablePayloadStatus, bM as SingleNodeDashboard, bN as Transaction, bP as TransactionFailures, bQ as TransactionStatus, bR as TransactionType, bS as TransactionUpdate, bT as UmaInvitation, bV as UpdateChannelPerCommitmentPointInput, bW as UpdateChannelPerCommitmentPointOutput, bX as UpdateNodeSharedSecretInput, bY as UpdateNodeSharedSecretOutput, bZ as Wallet, b_ as WalletStatus, b$ as WalletToPaymentRequestsConnection, c0 as WalletToTransactionsConnection, c1 as WalletToWithdrawalRequestsConnection, c2 as Withdrawal, c4 as WithdrawalFeeEstimateInput, c5 as WithdrawalFeeEstimateOutput, c6 as WithdrawalMode, c7 as WithdrawalRequest, c8 as WithdrawalRequestStatus, c9 as WithdrawalRequestToChannelClosingTransactionsConnection, ca as WithdrawalRequestToChannelOpeningTransactionsConnection, cb as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a4 as getDepositQuery, ad as getHopQuery, ak as getIncomingPaymentAttemptQuery, as as getInvoiceQuery, aC as getLightningTransactionQuery, aG as getLightsparkNodeOwnerQuery, aE as getLightsparkNodeQuery, aO as getNodeQuery, aU as getOnChainTransactionQuery, ba as getPaymentRequestQuery, bu as getRoutingTransactionQuery, bG as getSignablePayloadQuery, bE as getSignableQuery, bO as getTransactionQuery, bU as getUmaInvitationQuery, c3 as getWithdrawalQuery } from './index-DrqTCl6I.cjs';
|
|
4
4
|
import { B as BitcoinNetwork } from './BitcoinNetwork-CIfB1c0X.cjs';
|
|
5
5
|
import 'zen-observable';
|
|
6
6
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthProvider } from '@lightsparkdev/core';
|
|
2
|
-
import { W as WebhookEventType, L as LightsparkClient } from './index-
|
|
3
|
-
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateTestModeInvoiceInput, R as CreateTestModeInvoiceOutput, S as CreateTestModePaymentInput, T as CreateTestModePaymentoutput, U as CreateUmaInvitationInput, V as CreateUmaInvitationOutput, X as CreateUmaInvoiceInput, Y as CurrencyAmount, Z as CurrencyUnit, _ as DailyLiquidityForecast, $ as DeclineToSignMessagesInput, a0 as DeclineToSignMessagesOutput, a1 as DeleteApiTokenInput, a2 as DeleteApiTokenOutput, a3 as Deposit, a5 as Entity, a6 as FailHtlcsInput, a7 as FailHtlcsOutput, a8 as FeeEstimate, a9 as FundNodeInput, aa as FundNodeOutput, ab as GraphNode, ac as Hop, ae as HtlcAttemptFailureCode, af as IdAndSignature, ag as IncentivesIneligibilityReason, ah as IncentivesStatus, ai as IncomingPayment, aj as IncomingPaymentAttempt, al as IncomingPaymentAttemptStatus, aq as IncomingPaymentToAttemptsConnection, am as IncomingPaymentsForInvoiceQueryInput, an as IncomingPaymentsForInvoiceQueryOutput, ao as IncomingPaymentsForPaymentHashQueryInput, ap as IncomingPaymentsForPaymentHashQueryOutput, ar as Invoice, at as InvoiceData, au as InvoiceForPaymentHashInput, av as InvoiceForPaymentHashOutput, aw as InvoiceType, ax as LightningFeeEstimateForInvoiceInput, ay as LightningFeeEstimateForNodeInput, az as LightningFeeEstimateOutput, aA as LightningPaymentDirection, aB as LightningTransaction, aD as LightsparkNode, aF as LightsparkNodeOwner, aH as LightsparkNodeStatus, aI as LightsparkNodeToChannelsConnection, aJ as LightsparkNodeToDailyLiquidityForecastsConnection, aK as LightsparkNodeWithOSK, aL as LightsparkNodeWithRemoteSigning, aM as MultiSigAddressValidationParameters, aN as Node, aP as NodeAddress, aQ as NodeAddressType, aR as NodeToAddressesConnection, aS as OnChainFeeTarget, aT as OnChainTransaction, aV as OutgoingPayment, aW as OutgoingPaymentAttempt, aX as OutgoingPaymentAttemptStatus, aY as OutgoingPaymentAttemptToHopsConnection, aZ as OutgoingPaymentForIdempotencyKeyInput, a_ as OutgoingPaymentForIdempotencyKeyOutput, b3 as OutgoingPaymentToAttemptsConnection, a$ as OutgoingPaymentsForInvoiceQueryInput, b0 as OutgoingPaymentsForInvoiceQueryOutput, b1 as OutgoingPaymentsForPaymentHashQueryInput, b2 as OutgoingPaymentsForPaymentHashQueryOutput, b4 as PageInfo, b5 as PayInvoiceInput, b6 as PayInvoiceOutput, bd as PayUmaInvoiceInput, b7 as PaymentDirection, b8 as PaymentFailureReason, b9 as PaymentRequest, bb as PaymentRequestData, bc as PaymentRequestStatus, be as Permission, bf as PostTransactionData, bg as RegionCode, bh as RegisterPaymentInput, bi as RegisterPaymentOutput, bj as ReleaseChannelPerCommitmentSecretInput, bk as ReleaseChannelPerCommitmentSecretOutput, bl as ReleasePaymentPreimageInput, bm as ReleasePaymentPreimageOutput, bn as RemoteSigningSubEventType, bo as RequestInitiator, bp as RequestWithdrawalInput, bq as RequestWithdrawalOutput, br as RichText, bs as RiskRating, bt as RoutingTransaction, bv as RoutingTransactionFailureReason, bw as ScreenNodeInput, bx as ScreenNodeOutput, by as Secret, bz as SendPaymentInput, bA as SendPaymentOutput, bB as SetInvoicePaymentHashInput, bC as SetInvoicePaymentHashOutput, bI as SignInvoiceInput, bJ as SignInvoiceOutput, bK as SignMessagesInput, bL as SignMessagesOutput, bD as Signable, bF as SignablePayload, bH as SignablePayloadStatus, bM as SingleNodeDashboard, bN as Transaction, bP as TransactionFailures, bQ as TransactionStatus, bR as TransactionType, bS as TransactionUpdate, bT as UmaInvitation, bV as UpdateChannelPerCommitmentPointInput, bW as UpdateChannelPerCommitmentPointOutput, bX as UpdateNodeSharedSecretInput, bY as UpdateNodeSharedSecretOutput, bZ as Wallet, b_ as WalletStatus, b$ as WalletToPaymentRequestsConnection, c0 as WalletToTransactionsConnection, c1 as WalletToWithdrawalRequestsConnection, c2 as Withdrawal, c4 as WithdrawalFeeEstimateInput, c5 as WithdrawalFeeEstimateOutput, c6 as WithdrawalMode, c7 as WithdrawalRequest, c8 as WithdrawalRequestStatus, c9 as WithdrawalRequestToChannelClosingTransactionsConnection, ca as WithdrawalRequestToChannelOpeningTransactionsConnection, cb as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a4 as getDepositQuery, ad as getHopQuery, ak as getIncomingPaymentAttemptQuery, as as getInvoiceQuery, aC as getLightningTransactionQuery, aG as getLightsparkNodeOwnerQuery, aE as getLightsparkNodeQuery, aO as getNodeQuery, aU as getOnChainTransactionQuery, ba as getPaymentRequestQuery, bu as getRoutingTransactionQuery, bG as getSignablePayloadQuery, bE as getSignableQuery, bO as getTransactionQuery, bU as getUmaInvitationQuery, c3 as getWithdrawalQuery } from './index-
|
|
2
|
+
import { W as WebhookEventType, L as LightsparkClient } from './index-1psIIljd.js';
|
|
3
|
+
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateTestModeInvoiceInput, R as CreateTestModeInvoiceOutput, S as CreateTestModePaymentInput, T as CreateTestModePaymentoutput, U as CreateUmaInvitationInput, V as CreateUmaInvitationOutput, X as CreateUmaInvoiceInput, Y as CurrencyAmount, Z as CurrencyUnit, _ as DailyLiquidityForecast, $ as DeclineToSignMessagesInput, a0 as DeclineToSignMessagesOutput, a1 as DeleteApiTokenInput, a2 as DeleteApiTokenOutput, a3 as Deposit, a5 as Entity, a6 as FailHtlcsInput, a7 as FailHtlcsOutput, a8 as FeeEstimate, a9 as FundNodeInput, aa as FundNodeOutput, ab as GraphNode, ac as Hop, ae as HtlcAttemptFailureCode, af as IdAndSignature, ag as IncentivesIneligibilityReason, ah as IncentivesStatus, ai as IncomingPayment, aj as IncomingPaymentAttempt, al as IncomingPaymentAttemptStatus, aq as IncomingPaymentToAttemptsConnection, am as IncomingPaymentsForInvoiceQueryInput, an as IncomingPaymentsForInvoiceQueryOutput, ao as IncomingPaymentsForPaymentHashQueryInput, ap as IncomingPaymentsForPaymentHashQueryOutput, ar as Invoice, at as InvoiceData, au as InvoiceForPaymentHashInput, av as InvoiceForPaymentHashOutput, aw as InvoiceType, ax as LightningFeeEstimateForInvoiceInput, ay as LightningFeeEstimateForNodeInput, az as LightningFeeEstimateOutput, aA as LightningPaymentDirection, aB as LightningTransaction, aD as LightsparkNode, aF as LightsparkNodeOwner, aH as LightsparkNodeStatus, aI as LightsparkNodeToChannelsConnection, aJ as LightsparkNodeToDailyLiquidityForecastsConnection, aK as LightsparkNodeWithOSK, aL as LightsparkNodeWithRemoteSigning, aM as MultiSigAddressValidationParameters, aN as Node, aP as NodeAddress, aQ as NodeAddressType, aR as NodeToAddressesConnection, aS as OnChainFeeTarget, aT as OnChainTransaction, aV as OutgoingPayment, aW as OutgoingPaymentAttempt, aX as OutgoingPaymentAttemptStatus, aY as OutgoingPaymentAttemptToHopsConnection, aZ as OutgoingPaymentForIdempotencyKeyInput, a_ as OutgoingPaymentForIdempotencyKeyOutput, b3 as OutgoingPaymentToAttemptsConnection, a$ as OutgoingPaymentsForInvoiceQueryInput, b0 as OutgoingPaymentsForInvoiceQueryOutput, b1 as OutgoingPaymentsForPaymentHashQueryInput, b2 as OutgoingPaymentsForPaymentHashQueryOutput, b4 as PageInfo, b5 as PayInvoiceInput, b6 as PayInvoiceOutput, bd as PayUmaInvoiceInput, b7 as PaymentDirection, b8 as PaymentFailureReason, b9 as PaymentRequest, bb as PaymentRequestData, bc as PaymentRequestStatus, be as Permission, bf as PostTransactionData, bg as RegionCode, bh as RegisterPaymentInput, bi as RegisterPaymentOutput, bj as ReleaseChannelPerCommitmentSecretInput, bk as ReleaseChannelPerCommitmentSecretOutput, bl as ReleasePaymentPreimageInput, bm as ReleasePaymentPreimageOutput, bn as RemoteSigningSubEventType, bo as RequestInitiator, bp as RequestWithdrawalInput, bq as RequestWithdrawalOutput, br as RichText, bs as RiskRating, bt as RoutingTransaction, bv as RoutingTransactionFailureReason, bw as ScreenNodeInput, bx as ScreenNodeOutput, by as Secret, bz as SendPaymentInput, bA as SendPaymentOutput, bB as SetInvoicePaymentHashInput, bC as SetInvoicePaymentHashOutput, bI as SignInvoiceInput, bJ as SignInvoiceOutput, bK as SignMessagesInput, bL as SignMessagesOutput, bD as Signable, bF as SignablePayload, bH as SignablePayloadStatus, bM as SingleNodeDashboard, bN as Transaction, bP as TransactionFailures, bQ as TransactionStatus, bR as TransactionType, bS as TransactionUpdate, bT as UmaInvitation, bV as UpdateChannelPerCommitmentPointInput, bW as UpdateChannelPerCommitmentPointOutput, bX as UpdateNodeSharedSecretInput, bY as UpdateNodeSharedSecretOutput, bZ as Wallet, b_ as WalletStatus, b$ as WalletToPaymentRequestsConnection, c0 as WalletToTransactionsConnection, c1 as WalletToWithdrawalRequestsConnection, c2 as Withdrawal, c4 as WithdrawalFeeEstimateInput, c5 as WithdrawalFeeEstimateOutput, c6 as WithdrawalMode, c7 as WithdrawalRequest, c8 as WithdrawalRequestStatus, c9 as WithdrawalRequestToChannelClosingTransactionsConnection, ca as WithdrawalRequestToChannelOpeningTransactionsConnection, cb as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a4 as getDepositQuery, ad as getHopQuery, ak as getIncomingPaymentAttemptQuery, as as getInvoiceQuery, aC as getLightningTransactionQuery, aG as getLightsparkNodeOwnerQuery, aE as getLightsparkNodeQuery, aO as getNodeQuery, aU as getOnChainTransactionQuery, ba as getPaymentRequestQuery, bu as getRoutingTransactionQuery, bG as getSignablePayloadQuery, bE as getSignableQuery, bO as getTransactionQuery, bU as getUmaInvitationQuery, c3 as getWithdrawalQuery } from './index-1psIIljd.js';
|
|
4
4
|
import { B as BitcoinNetwork } from './BitcoinNetwork-CIfB1c0X.js';
|
|
5
5
|
import 'zen-observable';
|
|
6
6
|
|
package/dist/index.js
CHANGED
|
@@ -151,7 +151,7 @@ import {
|
|
|
151
151
|
// package.json
|
|
152
152
|
var package_default = {
|
|
153
153
|
name: "@lightsparkdev/lightspark-sdk",
|
|
154
|
-
version: "1.8.
|
|
154
|
+
version: "1.8.10",
|
|
155
155
|
description: "Lightspark JS SDK",
|
|
156
156
|
author: "Lightspark Inc.",
|
|
157
157
|
keywords: [
|
|
@@ -233,8 +233,8 @@ var package_default = {
|
|
|
233
233
|
},
|
|
234
234
|
license: "Apache-2.0",
|
|
235
235
|
dependencies: {
|
|
236
|
-
"@lightsparkdev/core": "1.2.
|
|
237
|
-
"@lightsparkdev/crypto-wasm": "0.1.
|
|
236
|
+
"@lightsparkdev/core": "1.2.8",
|
|
237
|
+
"@lightsparkdev/crypto-wasm": "0.1.11",
|
|
238
238
|
"crypto-browserify": "^3.12.0",
|
|
239
239
|
dayjs: "^1.11.7",
|
|
240
240
|
dotenv: "^16.3.1",
|
|
@@ -1311,11 +1311,14 @@ var LightsparkClient = class {
|
|
|
1311
1311
|
* @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto.
|
|
1312
1312
|
* For React Native, you should use the `ReactNativeCrypto`
|
|
1313
1313
|
* implementation from `@lightsparkdev/react-native`.
|
|
1314
|
+
* @param signingKey Passing in a signing key enables you to overload the default signing behavior. You can implement your own SigningKey class to make requests to a secure environment to sign or load a locally persisted key. WARNING: Typically, you won't need to set this parameter unless you want to customize the OSK signing flow. Most users should just use `loadNodeSigningKey` instead of passing this parameter.
|
|
1314
1315
|
*/
|
|
1315
|
-
constructor(authProvider = new StubAuthProvider(), serverUrl = "api.lightspark.com", cryptoImpl = DefaultCrypto2) {
|
|
1316
|
+
constructor(authProvider = new StubAuthProvider(), serverUrl = "api.lightspark.com", cryptoImpl = DefaultCrypto2, signingKey, fetchImpl = fetch) {
|
|
1316
1317
|
this.authProvider = authProvider;
|
|
1317
1318
|
this.serverUrl = serverUrl;
|
|
1318
1319
|
this.cryptoImpl = cryptoImpl;
|
|
1320
|
+
this.signingKey = signingKey;
|
|
1321
|
+
this.fetchImpl = fetchImpl;
|
|
1319
1322
|
this.nodeKeyCache = new NodeKeyCache(this.cryptoImpl);
|
|
1320
1323
|
this.nodeKeyLoaderCache = new NodeKeyLoaderCache(
|
|
1321
1324
|
this.nodeKeyCache,
|
|
@@ -1327,7 +1330,9 @@ var LightsparkClient = class {
|
|
|
1327
1330
|
`js-lightspark-sdk/${sdkVersion}`,
|
|
1328
1331
|
authProvider,
|
|
1329
1332
|
serverUrl,
|
|
1330
|
-
this.cryptoImpl
|
|
1333
|
+
this.cryptoImpl,
|
|
1334
|
+
this.signingKey,
|
|
1335
|
+
this.fetchImpl
|
|
1331
1336
|
);
|
|
1332
1337
|
autoBind(this);
|
|
1333
1338
|
}
|
|
@@ -1374,7 +1379,9 @@ var LightsparkClient = class {
|
|
|
1374
1379
|
`js-lightspark-sdk/${sdkVersion}`,
|
|
1375
1380
|
authProvider,
|
|
1376
1381
|
this.serverUrl,
|
|
1377
|
-
this.cryptoImpl
|
|
1382
|
+
this.cryptoImpl,
|
|
1383
|
+
this.signingKey,
|
|
1384
|
+
this.fetchImpl
|
|
1378
1385
|
);
|
|
1379
1386
|
this.authProvider = authProvider;
|
|
1380
1387
|
}
|
package/dist/objects/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateTestModeInvoiceInput, R as CreateTestModeInvoiceOutput, S as CreateTestModePaymentInput, T as CreateTestModePaymentoutput, U as CreateUmaInvitationInput, V as CreateUmaInvitationOutput, X as CreateUmaInvoiceInput, Y as CurrencyAmount, Z as CurrencyUnit, _ as DailyLiquidityForecast, $ as DeclineToSignMessagesInput, a0 as DeclineToSignMessagesOutput, a1 as DeleteApiTokenInput, a2 as DeleteApiTokenOutput, a3 as Deposit, a5 as Entity, a6 as FailHtlcsInput, a7 as FailHtlcsOutput, a8 as FeeEstimate, a9 as FundNodeInput, aa as FundNodeOutput, ab as GraphNode, ac as Hop, ae as HtlcAttemptFailureCode, af as IdAndSignature, ag as IncentivesIneligibilityReason, ah as IncentivesStatus, ai as IncomingPayment, aj as IncomingPaymentAttempt, al as IncomingPaymentAttemptStatus, aq as IncomingPaymentToAttemptsConnection, am as IncomingPaymentsForInvoiceQueryInput, an as IncomingPaymentsForInvoiceQueryOutput, ao as IncomingPaymentsForPaymentHashQueryInput, ap as IncomingPaymentsForPaymentHashQueryOutput, ar as Invoice, at as InvoiceData, au as InvoiceForPaymentHashInput, av as InvoiceForPaymentHashOutput, aw as InvoiceType, ax as LightningFeeEstimateForInvoiceInput, ay as LightningFeeEstimateForNodeInput, az as LightningFeeEstimateOutput, aA as LightningPaymentDirection, aB as LightningTransaction, aD as LightsparkNode, aF as LightsparkNodeOwner, aH as LightsparkNodeStatus, aI as LightsparkNodeToChannelsConnection, aJ as LightsparkNodeToDailyLiquidityForecastsConnection, aK as LightsparkNodeWithOSK, aL as LightsparkNodeWithRemoteSigning, aM as MultiSigAddressValidationParameters, aN as Node, aP as NodeAddress, aQ as NodeAddressType, aR as NodeToAddressesConnection, aS as OnChainFeeTarget, aT as OnChainTransaction, aV as OutgoingPayment, aW as OutgoingPaymentAttempt, aX as OutgoingPaymentAttemptStatus, aY as OutgoingPaymentAttemptToHopsConnection, aZ as OutgoingPaymentForIdempotencyKeyInput, a_ as OutgoingPaymentForIdempotencyKeyOutput, b3 as OutgoingPaymentToAttemptsConnection, a$ as OutgoingPaymentsForInvoiceQueryInput, b0 as OutgoingPaymentsForInvoiceQueryOutput, b1 as OutgoingPaymentsForPaymentHashQueryInput, b2 as OutgoingPaymentsForPaymentHashQueryOutput, b4 as PageInfo, b5 as PayInvoiceInput, b6 as PayInvoiceOutput, bd as PayUmaInvoiceInput, b7 as PaymentDirection, b8 as PaymentFailureReason, b9 as PaymentRequest, bb as PaymentRequestData, bc as PaymentRequestStatus, be as Permission, bf as PostTransactionData, bg as RegionCode, bh as RegisterPaymentInput, bi as RegisterPaymentOutput, bj as ReleaseChannelPerCommitmentSecretInput, bk as ReleaseChannelPerCommitmentSecretOutput, bl as ReleasePaymentPreimageInput, bm as ReleasePaymentPreimageOutput, bn as RemoteSigningSubEventType, bo as RequestInitiator, bp as RequestWithdrawalInput, bq as RequestWithdrawalOutput, br as RichText, bs as RiskRating, bt as RoutingTransaction, bv as RoutingTransactionFailureReason, bw as ScreenNodeInput, bx as ScreenNodeOutput, by as Secret, bz as SendPaymentInput, bA as SendPaymentOutput, bB as SetInvoicePaymentHashInput, bC as SetInvoicePaymentHashOutput, bI as SignInvoiceInput, bJ as SignInvoiceOutput, bK as SignMessagesInput, bL as SignMessagesOutput, bD as Signable, bF as SignablePayload, bH as SignablePayloadStatus, bM as SingleNodeDashboard, bN as Transaction, bP as TransactionFailures, bQ as TransactionStatus, bR as TransactionType, bS as TransactionUpdate, bT as UmaInvitation, bV as UpdateChannelPerCommitmentPointInput, bW as UpdateChannelPerCommitmentPointOutput, bX as UpdateNodeSharedSecretInput, bY as UpdateNodeSharedSecretOutput, bZ as Wallet, b_ as WalletStatus, b$ as WalletToPaymentRequestsConnection, c0 as WalletToTransactionsConnection, c1 as WalletToWithdrawalRequestsConnection, W as WebhookEventType, c2 as Withdrawal, c4 as WithdrawalFeeEstimateInput, c5 as WithdrawalFeeEstimateOutput, c6 as WithdrawalMode, c7 as WithdrawalRequest, c8 as WithdrawalRequestStatus, c9 as WithdrawalRequestToChannelClosingTransactionsConnection, ca as WithdrawalRequestToChannelOpeningTransactionsConnection, cb as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a4 as getDepositQuery, ad as getHopQuery, ak as getIncomingPaymentAttemptQuery, as as getInvoiceQuery, aC as getLightningTransactionQuery, aG as getLightsparkNodeOwnerQuery, aE as getLightsparkNodeQuery, aO as getNodeQuery, aU as getOnChainTransactionQuery, ba as getPaymentRequestQuery, bu as getRoutingTransactionQuery, bG as getSignablePayloadQuery, bE as getSignableQuery, bO as getTransactionQuery, bU as getUmaInvitationQuery, c3 as getWithdrawalQuery } from '../index-
|
|
1
|
+
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateTestModeInvoiceInput, R as CreateTestModeInvoiceOutput, S as CreateTestModePaymentInput, T as CreateTestModePaymentoutput, U as CreateUmaInvitationInput, V as CreateUmaInvitationOutput, X as CreateUmaInvoiceInput, Y as CurrencyAmount, Z as CurrencyUnit, _ as DailyLiquidityForecast, $ as DeclineToSignMessagesInput, a0 as DeclineToSignMessagesOutput, a1 as DeleteApiTokenInput, a2 as DeleteApiTokenOutput, a3 as Deposit, a5 as Entity, a6 as FailHtlcsInput, a7 as FailHtlcsOutput, a8 as FeeEstimate, a9 as FundNodeInput, aa as FundNodeOutput, ab as GraphNode, ac as Hop, ae as HtlcAttemptFailureCode, af as IdAndSignature, ag as IncentivesIneligibilityReason, ah as IncentivesStatus, ai as IncomingPayment, aj as IncomingPaymentAttempt, al as IncomingPaymentAttemptStatus, aq as IncomingPaymentToAttemptsConnection, am as IncomingPaymentsForInvoiceQueryInput, an as IncomingPaymentsForInvoiceQueryOutput, ao as IncomingPaymentsForPaymentHashQueryInput, ap as IncomingPaymentsForPaymentHashQueryOutput, ar as Invoice, at as InvoiceData, au as InvoiceForPaymentHashInput, av as InvoiceForPaymentHashOutput, aw as InvoiceType, ax as LightningFeeEstimateForInvoiceInput, ay as LightningFeeEstimateForNodeInput, az as LightningFeeEstimateOutput, aA as LightningPaymentDirection, aB as LightningTransaction, aD as LightsparkNode, aF as LightsparkNodeOwner, aH as LightsparkNodeStatus, aI as LightsparkNodeToChannelsConnection, aJ as LightsparkNodeToDailyLiquidityForecastsConnection, aK as LightsparkNodeWithOSK, aL as LightsparkNodeWithRemoteSigning, aM as MultiSigAddressValidationParameters, aN as Node, aP as NodeAddress, aQ as NodeAddressType, aR as NodeToAddressesConnection, aS as OnChainFeeTarget, aT as OnChainTransaction, aV as OutgoingPayment, aW as OutgoingPaymentAttempt, aX as OutgoingPaymentAttemptStatus, aY as OutgoingPaymentAttemptToHopsConnection, aZ as OutgoingPaymentForIdempotencyKeyInput, a_ as OutgoingPaymentForIdempotencyKeyOutput, b3 as OutgoingPaymentToAttemptsConnection, a$ as OutgoingPaymentsForInvoiceQueryInput, b0 as OutgoingPaymentsForInvoiceQueryOutput, b1 as OutgoingPaymentsForPaymentHashQueryInput, b2 as OutgoingPaymentsForPaymentHashQueryOutput, b4 as PageInfo, b5 as PayInvoiceInput, b6 as PayInvoiceOutput, bd as PayUmaInvoiceInput, b7 as PaymentDirection, b8 as PaymentFailureReason, b9 as PaymentRequest, bb as PaymentRequestData, bc as PaymentRequestStatus, be as Permission, bf as PostTransactionData, bg as RegionCode, bh as RegisterPaymentInput, bi as RegisterPaymentOutput, bj as ReleaseChannelPerCommitmentSecretInput, bk as ReleaseChannelPerCommitmentSecretOutput, bl as ReleasePaymentPreimageInput, bm as ReleasePaymentPreimageOutput, bn as RemoteSigningSubEventType, bo as RequestInitiator, bp as RequestWithdrawalInput, bq as RequestWithdrawalOutput, br as RichText, bs as RiskRating, bt as RoutingTransaction, bv as RoutingTransactionFailureReason, bw as ScreenNodeInput, bx as ScreenNodeOutput, by as Secret, bz as SendPaymentInput, bA as SendPaymentOutput, bB as SetInvoicePaymentHashInput, bC as SetInvoicePaymentHashOutput, bI as SignInvoiceInput, bJ as SignInvoiceOutput, bK as SignMessagesInput, bL as SignMessagesOutput, bD as Signable, bF as SignablePayload, bH as SignablePayloadStatus, bM as SingleNodeDashboard, bN as Transaction, bP as TransactionFailures, bQ as TransactionStatus, bR as TransactionType, bS as TransactionUpdate, bT as UmaInvitation, bV as UpdateChannelPerCommitmentPointInput, bW as UpdateChannelPerCommitmentPointOutput, bX as UpdateNodeSharedSecretInput, bY as UpdateNodeSharedSecretOutput, bZ as Wallet, b_ as WalletStatus, b$ as WalletToPaymentRequestsConnection, c0 as WalletToTransactionsConnection, c1 as WalletToWithdrawalRequestsConnection, W as WebhookEventType, c2 as Withdrawal, c4 as WithdrawalFeeEstimateInput, c5 as WithdrawalFeeEstimateOutput, c6 as WithdrawalMode, c7 as WithdrawalRequest, c8 as WithdrawalRequestStatus, c9 as WithdrawalRequestToChannelClosingTransactionsConnection, ca as WithdrawalRequestToChannelOpeningTransactionsConnection, cb as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a4 as getDepositQuery, ad as getHopQuery, ak as getIncomingPaymentAttemptQuery, as as getInvoiceQuery, aC as getLightningTransactionQuery, aG as getLightsparkNodeOwnerQuery, aE as getLightsparkNodeQuery, aO as getNodeQuery, aU as getOnChainTransactionQuery, ba as getPaymentRequestQuery, bu as getRoutingTransactionQuery, bG as getSignablePayloadQuery, bE as getSignableQuery, bO as getTransactionQuery, bU as getUmaInvitationQuery, c3 as getWithdrawalQuery } from '../index-DrqTCl6I.cjs';
|
|
2
2
|
export { B as BitcoinNetwork } from '../BitcoinNetwork-CIfB1c0X.cjs';
|
|
3
3
|
import '@lightsparkdev/core';
|
|
4
4
|
import 'zen-observable';
|
package/dist/objects/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateTestModeInvoiceInput, R as CreateTestModeInvoiceOutput, S as CreateTestModePaymentInput, T as CreateTestModePaymentoutput, U as CreateUmaInvitationInput, V as CreateUmaInvitationOutput, X as CreateUmaInvoiceInput, Y as CurrencyAmount, Z as CurrencyUnit, _ as DailyLiquidityForecast, $ as DeclineToSignMessagesInput, a0 as DeclineToSignMessagesOutput, a1 as DeleteApiTokenInput, a2 as DeleteApiTokenOutput, a3 as Deposit, a5 as Entity, a6 as FailHtlcsInput, a7 as FailHtlcsOutput, a8 as FeeEstimate, a9 as FundNodeInput, aa as FundNodeOutput, ab as GraphNode, ac as Hop, ae as HtlcAttemptFailureCode, af as IdAndSignature, ag as IncentivesIneligibilityReason, ah as IncentivesStatus, ai as IncomingPayment, aj as IncomingPaymentAttempt, al as IncomingPaymentAttemptStatus, aq as IncomingPaymentToAttemptsConnection, am as IncomingPaymentsForInvoiceQueryInput, an as IncomingPaymentsForInvoiceQueryOutput, ao as IncomingPaymentsForPaymentHashQueryInput, ap as IncomingPaymentsForPaymentHashQueryOutput, ar as Invoice, at as InvoiceData, au as InvoiceForPaymentHashInput, av as InvoiceForPaymentHashOutput, aw as InvoiceType, ax as LightningFeeEstimateForInvoiceInput, ay as LightningFeeEstimateForNodeInput, az as LightningFeeEstimateOutput, aA as LightningPaymentDirection, aB as LightningTransaction, aD as LightsparkNode, aF as LightsparkNodeOwner, aH as LightsparkNodeStatus, aI as LightsparkNodeToChannelsConnection, aJ as LightsparkNodeToDailyLiquidityForecastsConnection, aK as LightsparkNodeWithOSK, aL as LightsparkNodeWithRemoteSigning, aM as MultiSigAddressValidationParameters, aN as Node, aP as NodeAddress, aQ as NodeAddressType, aR as NodeToAddressesConnection, aS as OnChainFeeTarget, aT as OnChainTransaction, aV as OutgoingPayment, aW as OutgoingPaymentAttempt, aX as OutgoingPaymentAttemptStatus, aY as OutgoingPaymentAttemptToHopsConnection, aZ as OutgoingPaymentForIdempotencyKeyInput, a_ as OutgoingPaymentForIdempotencyKeyOutput, b3 as OutgoingPaymentToAttemptsConnection, a$ as OutgoingPaymentsForInvoiceQueryInput, b0 as OutgoingPaymentsForInvoiceQueryOutput, b1 as OutgoingPaymentsForPaymentHashQueryInput, b2 as OutgoingPaymentsForPaymentHashQueryOutput, b4 as PageInfo, b5 as PayInvoiceInput, b6 as PayInvoiceOutput, bd as PayUmaInvoiceInput, b7 as PaymentDirection, b8 as PaymentFailureReason, b9 as PaymentRequest, bb as PaymentRequestData, bc as PaymentRequestStatus, be as Permission, bf as PostTransactionData, bg as RegionCode, bh as RegisterPaymentInput, bi as RegisterPaymentOutput, bj as ReleaseChannelPerCommitmentSecretInput, bk as ReleaseChannelPerCommitmentSecretOutput, bl as ReleasePaymentPreimageInput, bm as ReleasePaymentPreimageOutput, bn as RemoteSigningSubEventType, bo as RequestInitiator, bp as RequestWithdrawalInput, bq as RequestWithdrawalOutput, br as RichText, bs as RiskRating, bt as RoutingTransaction, bv as RoutingTransactionFailureReason, bw as ScreenNodeInput, bx as ScreenNodeOutput, by as Secret, bz as SendPaymentInput, bA as SendPaymentOutput, bB as SetInvoicePaymentHashInput, bC as SetInvoicePaymentHashOutput, bI as SignInvoiceInput, bJ as SignInvoiceOutput, bK as SignMessagesInput, bL as SignMessagesOutput, bD as Signable, bF as SignablePayload, bH as SignablePayloadStatus, bM as SingleNodeDashboard, bN as Transaction, bP as TransactionFailures, bQ as TransactionStatus, bR as TransactionType, bS as TransactionUpdate, bT as UmaInvitation, bV as UpdateChannelPerCommitmentPointInput, bW as UpdateChannelPerCommitmentPointOutput, bX as UpdateNodeSharedSecretInput, bY as UpdateNodeSharedSecretOutput, bZ as Wallet, b_ as WalletStatus, b$ as WalletToPaymentRequestsConnection, c0 as WalletToTransactionsConnection, c1 as WalletToWithdrawalRequestsConnection, W as WebhookEventType, c2 as Withdrawal, c4 as WithdrawalFeeEstimateInput, c5 as WithdrawalFeeEstimateOutput, c6 as WithdrawalMode, c7 as WithdrawalRequest, c8 as WithdrawalRequestStatus, c9 as WithdrawalRequestToChannelClosingTransactionsConnection, ca as WithdrawalRequestToChannelOpeningTransactionsConnection, cb as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a4 as getDepositQuery, ad as getHopQuery, ak as getIncomingPaymentAttemptQuery, as as getInvoiceQuery, aC as getLightningTransactionQuery, aG as getLightsparkNodeOwnerQuery, aE as getLightsparkNodeQuery, aO as getNodeQuery, aU as getOnChainTransactionQuery, ba as getPaymentRequestQuery, bu as getRoutingTransactionQuery, bG as getSignablePayloadQuery, bE as getSignableQuery, bO as getTransactionQuery, bU as getUmaInvitationQuery, c3 as getWithdrawalQuery } from '../index-
|
|
1
|
+
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateTestModeInvoiceInput, R as CreateTestModeInvoiceOutput, S as CreateTestModePaymentInput, T as CreateTestModePaymentoutput, U as CreateUmaInvitationInput, V as CreateUmaInvitationOutput, X as CreateUmaInvoiceInput, Y as CurrencyAmount, Z as CurrencyUnit, _ as DailyLiquidityForecast, $ as DeclineToSignMessagesInput, a0 as DeclineToSignMessagesOutput, a1 as DeleteApiTokenInput, a2 as DeleteApiTokenOutput, a3 as Deposit, a5 as Entity, a6 as FailHtlcsInput, a7 as FailHtlcsOutput, a8 as FeeEstimate, a9 as FundNodeInput, aa as FundNodeOutput, ab as GraphNode, ac as Hop, ae as HtlcAttemptFailureCode, af as IdAndSignature, ag as IncentivesIneligibilityReason, ah as IncentivesStatus, ai as IncomingPayment, aj as IncomingPaymentAttempt, al as IncomingPaymentAttemptStatus, aq as IncomingPaymentToAttemptsConnection, am as IncomingPaymentsForInvoiceQueryInput, an as IncomingPaymentsForInvoiceQueryOutput, ao as IncomingPaymentsForPaymentHashQueryInput, ap as IncomingPaymentsForPaymentHashQueryOutput, ar as Invoice, at as InvoiceData, au as InvoiceForPaymentHashInput, av as InvoiceForPaymentHashOutput, aw as InvoiceType, ax as LightningFeeEstimateForInvoiceInput, ay as LightningFeeEstimateForNodeInput, az as LightningFeeEstimateOutput, aA as LightningPaymentDirection, aB as LightningTransaction, aD as LightsparkNode, aF as LightsparkNodeOwner, aH as LightsparkNodeStatus, aI as LightsparkNodeToChannelsConnection, aJ as LightsparkNodeToDailyLiquidityForecastsConnection, aK as LightsparkNodeWithOSK, aL as LightsparkNodeWithRemoteSigning, aM as MultiSigAddressValidationParameters, aN as Node, aP as NodeAddress, aQ as NodeAddressType, aR as NodeToAddressesConnection, aS as OnChainFeeTarget, aT as OnChainTransaction, aV as OutgoingPayment, aW as OutgoingPaymentAttempt, aX as OutgoingPaymentAttemptStatus, aY as OutgoingPaymentAttemptToHopsConnection, aZ as OutgoingPaymentForIdempotencyKeyInput, a_ as OutgoingPaymentForIdempotencyKeyOutput, b3 as OutgoingPaymentToAttemptsConnection, a$ as OutgoingPaymentsForInvoiceQueryInput, b0 as OutgoingPaymentsForInvoiceQueryOutput, b1 as OutgoingPaymentsForPaymentHashQueryInput, b2 as OutgoingPaymentsForPaymentHashQueryOutput, b4 as PageInfo, b5 as PayInvoiceInput, b6 as PayInvoiceOutput, bd as PayUmaInvoiceInput, b7 as PaymentDirection, b8 as PaymentFailureReason, b9 as PaymentRequest, bb as PaymentRequestData, bc as PaymentRequestStatus, be as Permission, bf as PostTransactionData, bg as RegionCode, bh as RegisterPaymentInput, bi as RegisterPaymentOutput, bj as ReleaseChannelPerCommitmentSecretInput, bk as ReleaseChannelPerCommitmentSecretOutput, bl as ReleasePaymentPreimageInput, bm as ReleasePaymentPreimageOutput, bn as RemoteSigningSubEventType, bo as RequestInitiator, bp as RequestWithdrawalInput, bq as RequestWithdrawalOutput, br as RichText, bs as RiskRating, bt as RoutingTransaction, bv as RoutingTransactionFailureReason, bw as ScreenNodeInput, bx as ScreenNodeOutput, by as Secret, bz as SendPaymentInput, bA as SendPaymentOutput, bB as SetInvoicePaymentHashInput, bC as SetInvoicePaymentHashOutput, bI as SignInvoiceInput, bJ as SignInvoiceOutput, bK as SignMessagesInput, bL as SignMessagesOutput, bD as Signable, bF as SignablePayload, bH as SignablePayloadStatus, bM as SingleNodeDashboard, bN as Transaction, bP as TransactionFailures, bQ as TransactionStatus, bR as TransactionType, bS as TransactionUpdate, bT as UmaInvitation, bV as UpdateChannelPerCommitmentPointInput, bW as UpdateChannelPerCommitmentPointOutput, bX as UpdateNodeSharedSecretInput, bY as UpdateNodeSharedSecretOutput, bZ as Wallet, b_ as WalletStatus, b$ as WalletToPaymentRequestsConnection, c0 as WalletToTransactionsConnection, c1 as WalletToWithdrawalRequestsConnection, W as WebhookEventType, c2 as Withdrawal, c4 as WithdrawalFeeEstimateInput, c5 as WithdrawalFeeEstimateOutput, c6 as WithdrawalMode, c7 as WithdrawalRequest, c8 as WithdrawalRequestStatus, c9 as WithdrawalRequestToChannelClosingTransactionsConnection, ca as WithdrawalRequestToChannelOpeningTransactionsConnection, cb as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a4 as getDepositQuery, ad as getHopQuery, ak as getIncomingPaymentAttemptQuery, as as getInvoiceQuery, aC as getLightningTransactionQuery, aG as getLightsparkNodeOwnerQuery, aE as getLightsparkNodeQuery, aO as getNodeQuery, aU as getOnChainTransactionQuery, ba as getPaymentRequestQuery, bu as getRoutingTransactionQuery, bG as getSignablePayloadQuery, bE as getSignableQuery, bO as getTransactionQuery, bU as getUmaInvitationQuery, c3 as getWithdrawalQuery } from '../index-1psIIljd.js';
|
|
2
2
|
export { B as BitcoinNetwork } from '../BitcoinNetwork-CIfB1c0X.js';
|
|
3
3
|
import '@lightsparkdev/core';
|
|
4
4
|
import 'zen-observable';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightsparkdev/lightspark-sdk",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.10",
|
|
4
4
|
"description": "Lightspark JS SDK",
|
|
5
5
|
"author": "Lightspark Inc.",
|
|
6
6
|
"keywords": [
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
},
|
|
83
83
|
"license": "Apache-2.0",
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@lightsparkdev/core": "1.2.
|
|
86
|
-
"@lightsparkdev/crypto-wasm": "0.1.
|
|
85
|
+
"@lightsparkdev/core": "1.2.8",
|
|
86
|
+
"@lightsparkdev/crypto-wasm": "0.1.11",
|
|
87
87
|
"crypto-browserify": "^3.12.0",
|
|
88
88
|
"dayjs": "^1.11.7",
|
|
89
89
|
"dotenv": "^16.3.1",
|
package/src/client.ts
CHANGED
|
@@ -146,11 +146,14 @@ class LightsparkClient {
|
|
|
146
146
|
* @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto.
|
|
147
147
|
* For React Native, you should use the `ReactNativeCrypto`
|
|
148
148
|
* implementation from `@lightsparkdev/react-native`.
|
|
149
|
+
* @param signingKey Passing in a signing key enables you to overload the default signing behavior. You can implement your own SigningKey class to make requests to a secure environment to sign or load a locally persisted key. WARNING: Typically, you won't need to set this parameter unless you want to customize the OSK signing flow. Most users should just use `loadNodeSigningKey` instead of passing this parameter.
|
|
149
150
|
*/
|
|
150
151
|
constructor(
|
|
151
152
|
private authProvider: AuthProvider = new StubAuthProvider(),
|
|
152
153
|
private readonly serverUrl: string = "api.lightspark.com",
|
|
153
154
|
private readonly cryptoImpl: CryptoInterface = DefaultCrypto,
|
|
155
|
+
private readonly signingKey?: SigningKey,
|
|
156
|
+
private readonly fetchImpl: typeof fetch = fetch,
|
|
154
157
|
) {
|
|
155
158
|
this.nodeKeyCache = new NodeKeyCache(this.cryptoImpl);
|
|
156
159
|
this.nodeKeyLoaderCache = new NodeKeyLoaderCache(
|
|
@@ -164,6 +167,8 @@ class LightsparkClient {
|
|
|
164
167
|
authProvider,
|
|
165
168
|
serverUrl,
|
|
166
169
|
this.cryptoImpl,
|
|
170
|
+
this.signingKey,
|
|
171
|
+
this.fetchImpl,
|
|
167
172
|
);
|
|
168
173
|
|
|
169
174
|
autoBind(this);
|
|
@@ -216,6 +221,8 @@ class LightsparkClient {
|
|
|
216
221
|
authProvider,
|
|
217
222
|
this.serverUrl,
|
|
218
223
|
this.cryptoImpl,
|
|
224
|
+
this.signingKey,
|
|
225
|
+
this.fetchImpl,
|
|
219
226
|
);
|
|
220
227
|
this.authProvider = authProvider;
|
|
221
228
|
}
|