@lightsparkdev/lightspark-sdk 1.8.0 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{chunk-J7GJGYME.js → chunk-4KFNQOMH.js} +84 -39
  3. package/dist/{index-9a69ef6a.d.ts → index-27dad75b.d.ts} +22 -1
  4. package/dist/index.cjs +240 -91
  5. package/dist/index.d.cts +2 -2
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +103 -3
  8. package/dist/objects/index.cjs +97 -52
  9. package/dist/objects/index.d.cts +1 -1
  10. package/dist/objects/index.d.ts +1 -1
  11. package/dist/objects/index.js +1 -1
  12. package/package.json +2 -2
  13. package/src/client.ts +89 -8
  14. package/src/graphql/IncomingPaymentsForInvoice.ts +21 -0
  15. package/src/graphql/OutgoingPaymentsForInvoice.ts +21 -0
  16. package/src/objects/Account.ts +4 -2
  17. package/src/objects/ApiToken.ts +2 -2
  18. package/src/objects/AuditLogActor.ts +2 -2
  19. package/src/objects/Channel.ts +2 -2
  20. package/src/objects/ChannelClosingTransaction.ts +2 -2
  21. package/src/objects/ChannelOpeningTransaction.ts +2 -2
  22. package/src/objects/ChannelSnapshot.ts +2 -2
  23. package/src/objects/Deposit.ts +2 -2
  24. package/src/objects/GraphNode.ts +2 -2
  25. package/src/objects/Hop.ts +2 -2
  26. package/src/objects/IncomingPayment.ts +2 -2
  27. package/src/objects/IncomingPaymentAttempt.ts +2 -2
  28. package/src/objects/Invoice.ts +2 -2
  29. package/src/objects/LightningTransaction.ts +2 -2
  30. package/src/objects/LightsparkNode.ts +2 -2
  31. package/src/objects/LightsparkNodeOwner.ts +2 -2
  32. package/src/objects/LightsparkNodeWithOSK.ts +2 -2
  33. package/src/objects/LightsparkNodeWithRemoteSigning.ts +2 -2
  34. package/src/objects/Node.ts +2 -2
  35. package/src/objects/OnChainTransaction.ts +2 -2
  36. package/src/objects/OutgoingPayment.ts +2 -2
  37. package/src/objects/OutgoingPaymentAttempt.ts +2 -2
  38. package/src/objects/PaymentRequest.ts +2 -2
  39. package/src/objects/RoutingTransaction.ts +2 -2
  40. package/src/objects/Signable.ts +2 -2
  41. package/src/objects/SignablePayload.ts +2 -2
  42. package/src/objects/Transaction.ts +2 -2
  43. package/src/objects/UmaInvitation.ts +2 -2
  44. package/src/objects/Wallet.ts +2 -2
  45. package/src/objects/Withdrawal.ts +2 -2
  46. package/src/objects/WithdrawalRequest.ts +2 -2
  47. package/src/tests/generated-objects.test.ts +93 -0
  48. package/src/tests/serialization.test.ts +0 -21
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-9a69ef6a.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, am as IncomingPaymentToAttemptsConnection, an as IncomingPaymentsForInvoiceQueryInput, ao as IncomingPaymentsForInvoiceQueryOutput, ap as Invoice, ar as InvoiceData, as as InvoiceForPaymentHashInput, at as InvoiceForPaymentHashOutput, au as InvoiceType, av as LightningFeeEstimateForInvoiceInput, aw as LightningFeeEstimateForNodeInput, ax as LightningFeeEstimateOutput, ay as LightningPaymentDirection, az as LightningTransaction, aB as LightsparkNode, aD as LightsparkNodeOwner, aF as LightsparkNodeStatus, aG as LightsparkNodeToChannelsConnection, aH as LightsparkNodeToDailyLiquidityForecastsConnection, aI as LightsparkNodeWithOSK, aJ as LightsparkNodeWithRemoteSigning, aK as MultiSigAddressValidationParameters, aL as Node, aN as NodeAddress, aO as NodeAddressType, aP as NodeToAddressesConnection, aQ as OnChainFeeTarget, aR as OnChainTransaction, aT as OutgoingPayment, aU as OutgoingPaymentAttempt, aV as OutgoingPaymentAttemptStatus, aW as OutgoingPaymentAttemptToHopsConnection, aX as OutgoingPaymentForIdempotencyKeyInput, aY as OutgoingPaymentForIdempotencyKeyOutput, aZ as OutgoingPaymentToAttemptsConnection, a_ as OutgoingPaymentsForInvoiceQueryInput, a$ as OutgoingPaymentsForInvoiceQueryOutput, b0 as OutgoingPaymentsForPaymentHashQueryInput, b1 as OutgoingPaymentsForPaymentHashQueryOutput, b2 as PageInfo, b3 as PayInvoiceInput, b4 as PayInvoiceOutput, b5 as PayUmaInvoiceInput, b6 as PaymentDirection, b7 as PaymentFailureReason, b8 as PaymentRequest, ba as PaymentRequestData, bb as PaymentRequestStatus, bc as Permission, bd as PostTransactionData, be as RegionCode, bf as RegisterPaymentInput, bg as RegisterPaymentOutput, bh as ReleaseChannelPerCommitmentSecretInput, bi as ReleaseChannelPerCommitmentSecretOutput, bj as ReleasePaymentPreimageInput, bk as ReleasePaymentPreimageOutput, bl as RemoteSigningSubEventType, bm as RequestInitiator, bn as RequestWithdrawalInput, bo as RequestWithdrawalOutput, bp as RichText, bq as RiskRating, br as RoutingTransaction, bt as RoutingTransactionFailureReason, bu as ScreenNodeInput, bv as ScreenNodeOutput, bw as Secret, bx as SendPaymentInput, by as SendPaymentOutput, bz as SetInvoicePaymentHashInput, bA as SetInvoicePaymentHashOutput, bB as SignInvoiceInput, bC as SignInvoiceOutput, bD as SignMessagesInput, bE as SignMessagesOutput, bF as Signable, bH as SignablePayload, bJ as SignablePayloadStatus, bK as SingleNodeDashboard, bL as Transaction, bN as TransactionFailures, bO as TransactionStatus, bP as TransactionType, bQ as TransactionUpdate, bR as UmaInvitation, bT as UpdateChannelPerCommitmentPointInput, bU as UpdateChannelPerCommitmentPointOutput, bV as UpdateNodeSharedSecretInput, bW as UpdateNodeSharedSecretOutput, bX as Wallet, bY as WalletStatus, bZ as WalletToPaymentRequestsConnection, b_ as WalletToTransactionsConnection, b$ as WalletToWithdrawalRequestsConnection, c0 as Withdrawal, c2 as WithdrawalFeeEstimateInput, c3 as WithdrawalFeeEstimateOutput, c4 as WithdrawalMode, c5 as WithdrawalRequest, c6 as WithdrawalRequestStatus, c7 as WithdrawalRequestToChannelClosingTransactionsConnection, c8 as WithdrawalRequestToChannelOpeningTransactionsConnection, c9 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, aq as getInvoiceQuery, aA as getLightningTransactionQuery, aE as getLightsparkNodeOwnerQuery, aC as getLightsparkNodeQuery, aM as getNodeQuery, aS as getOnChainTransactionQuery, b9 as getPaymentRequestQuery, bs as getRoutingTransactionQuery, bI as getSignablePayloadQuery, bG as getSignableQuery, bM as getTransactionQuery, bS as getUmaInvitationQuery, c1 as getWithdrawalQuery } from './index-9a69ef6a.js';
2
+ import { W as WebhookEventType, L as LightsparkClient } from './index-27dad75b.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, am as IncomingPaymentToAttemptsConnection, an as IncomingPaymentsForInvoiceQueryInput, ao as IncomingPaymentsForInvoiceQueryOutput, ap as Invoice, ar as InvoiceData, as as InvoiceForPaymentHashInput, at as InvoiceForPaymentHashOutput, au as InvoiceType, av as LightningFeeEstimateForInvoiceInput, aw as LightningFeeEstimateForNodeInput, ax as LightningFeeEstimateOutput, ay as LightningPaymentDirection, az as LightningTransaction, aB as LightsparkNode, aD as LightsparkNodeOwner, aF as LightsparkNodeStatus, aG as LightsparkNodeToChannelsConnection, aH as LightsparkNodeToDailyLiquidityForecastsConnection, aI as LightsparkNodeWithOSK, aJ as LightsparkNodeWithRemoteSigning, aK as MultiSigAddressValidationParameters, aL as Node, aN as NodeAddress, aO as NodeAddressType, aP as NodeToAddressesConnection, aQ as OnChainFeeTarget, aR as OnChainTransaction, aT as OutgoingPayment, aU as OutgoingPaymentAttempt, aV as OutgoingPaymentAttemptStatus, aW as OutgoingPaymentAttemptToHopsConnection, aX as OutgoingPaymentForIdempotencyKeyInput, aY as OutgoingPaymentForIdempotencyKeyOutput, aZ as OutgoingPaymentToAttemptsConnection, a_ as OutgoingPaymentsForInvoiceQueryInput, a$ as OutgoingPaymentsForInvoiceQueryOutput, b0 as OutgoingPaymentsForPaymentHashQueryInput, b1 as OutgoingPaymentsForPaymentHashQueryOutput, b2 as PageInfo, b3 as PayInvoiceInput, b4 as PayInvoiceOutput, b5 as PayUmaInvoiceInput, b6 as PaymentDirection, b7 as PaymentFailureReason, b8 as PaymentRequest, ba as PaymentRequestData, bb as PaymentRequestStatus, bc as Permission, bd as PostTransactionData, be as RegionCode, bf as RegisterPaymentInput, bg as RegisterPaymentOutput, bh as ReleaseChannelPerCommitmentSecretInput, bi as ReleaseChannelPerCommitmentSecretOutput, bj as ReleasePaymentPreimageInput, bk as ReleasePaymentPreimageOutput, bl as RemoteSigningSubEventType, bm as RequestInitiator, bn as RequestWithdrawalInput, bo as RequestWithdrawalOutput, bp as RichText, bq as RiskRating, br as RoutingTransaction, bt as RoutingTransactionFailureReason, bu as ScreenNodeInput, bv as ScreenNodeOutput, bw as Secret, bx as SendPaymentInput, by as SendPaymentOutput, bz as SetInvoicePaymentHashInput, bA as SetInvoicePaymentHashOutput, bB as SignInvoiceInput, bC as SignInvoiceOutput, bD as SignMessagesInput, bE as SignMessagesOutput, bF as Signable, bH as SignablePayload, bJ as SignablePayloadStatus, bK as SingleNodeDashboard, bL as Transaction, bN as TransactionFailures, bO as TransactionStatus, bP as TransactionType, bQ as TransactionUpdate, bR as UmaInvitation, bT as UpdateChannelPerCommitmentPointInput, bU as UpdateChannelPerCommitmentPointOutput, bV as UpdateNodeSharedSecretInput, bW as UpdateNodeSharedSecretOutput, bX as Wallet, bY as WalletStatus, bZ as WalletToPaymentRequestsConnection, b_ as WalletToTransactionsConnection, b$ as WalletToWithdrawalRequestsConnection, c0 as Withdrawal, c2 as WithdrawalFeeEstimateInput, c3 as WithdrawalFeeEstimateOutput, c4 as WithdrawalMode, c5 as WithdrawalRequest, c6 as WithdrawalRequestStatus, c7 as WithdrawalRequestToChannelClosingTransactionsConnection, c8 as WithdrawalRequestToChannelOpeningTransactionsConnection, c9 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, aq as getInvoiceQuery, aA as getLightningTransactionQuery, aE as getLightsparkNodeOwnerQuery, aC as getLightsparkNodeQuery, aM as getNodeQuery, aS as getOnChainTransactionQuery, b9 as getPaymentRequestQuery, bs as getRoutingTransactionQuery, bI as getSignablePayloadQuery, bG as getSignableQuery, bM as getTransactionQuery, bS as getUmaInvitationQuery, c1 as getWithdrawalQuery } from './index-27dad75b.js';
4
4
  import { B as BitcoinNetwork } from './BitcoinNetwork-4f6ea015.js';
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-9a69ef6a.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, am as IncomingPaymentToAttemptsConnection, an as IncomingPaymentsForInvoiceQueryInput, ao as IncomingPaymentsForInvoiceQueryOutput, ap as Invoice, ar as InvoiceData, as as InvoiceForPaymentHashInput, at as InvoiceForPaymentHashOutput, au as InvoiceType, av as LightningFeeEstimateForInvoiceInput, aw as LightningFeeEstimateForNodeInput, ax as LightningFeeEstimateOutput, ay as LightningPaymentDirection, az as LightningTransaction, aB as LightsparkNode, aD as LightsparkNodeOwner, aF as LightsparkNodeStatus, aG as LightsparkNodeToChannelsConnection, aH as LightsparkNodeToDailyLiquidityForecastsConnection, aI as LightsparkNodeWithOSK, aJ as LightsparkNodeWithRemoteSigning, aK as MultiSigAddressValidationParameters, aL as Node, aN as NodeAddress, aO as NodeAddressType, aP as NodeToAddressesConnection, aQ as OnChainFeeTarget, aR as OnChainTransaction, aT as OutgoingPayment, aU as OutgoingPaymentAttempt, aV as OutgoingPaymentAttemptStatus, aW as OutgoingPaymentAttemptToHopsConnection, aX as OutgoingPaymentForIdempotencyKeyInput, aY as OutgoingPaymentForIdempotencyKeyOutput, aZ as OutgoingPaymentToAttemptsConnection, a_ as OutgoingPaymentsForInvoiceQueryInput, a$ as OutgoingPaymentsForInvoiceQueryOutput, b0 as OutgoingPaymentsForPaymentHashQueryInput, b1 as OutgoingPaymentsForPaymentHashQueryOutput, b2 as PageInfo, b3 as PayInvoiceInput, b4 as PayInvoiceOutput, b5 as PayUmaInvoiceInput, b6 as PaymentDirection, b7 as PaymentFailureReason, b8 as PaymentRequest, ba as PaymentRequestData, bb as PaymentRequestStatus, bc as Permission, bd as PostTransactionData, be as RegionCode, bf as RegisterPaymentInput, bg as RegisterPaymentOutput, bh as ReleaseChannelPerCommitmentSecretInput, bi as ReleaseChannelPerCommitmentSecretOutput, bj as ReleasePaymentPreimageInput, bk as ReleasePaymentPreimageOutput, bl as RemoteSigningSubEventType, bm as RequestInitiator, bn as RequestWithdrawalInput, bo as RequestWithdrawalOutput, bp as RichText, bq as RiskRating, br as RoutingTransaction, bt as RoutingTransactionFailureReason, bu as ScreenNodeInput, bv as ScreenNodeOutput, bw as Secret, bx as SendPaymentInput, by as SendPaymentOutput, bz as SetInvoicePaymentHashInput, bA as SetInvoicePaymentHashOutput, bB as SignInvoiceInput, bC as SignInvoiceOutput, bD as SignMessagesInput, bE as SignMessagesOutput, bF as Signable, bH as SignablePayload, bJ as SignablePayloadStatus, bK as SingleNodeDashboard, bL as Transaction, bN as TransactionFailures, bO as TransactionStatus, bP as TransactionType, bQ as TransactionUpdate, bR as UmaInvitation, bT as UpdateChannelPerCommitmentPointInput, bU as UpdateChannelPerCommitmentPointOutput, bV as UpdateNodeSharedSecretInput, bW as UpdateNodeSharedSecretOutput, bX as Wallet, bY as WalletStatus, bZ as WalletToPaymentRequestsConnection, b_ as WalletToTransactionsConnection, b$ as WalletToWithdrawalRequestsConnection, c0 as Withdrawal, c2 as WithdrawalFeeEstimateInput, c3 as WithdrawalFeeEstimateOutput, c4 as WithdrawalMode, c5 as WithdrawalRequest, c6 as WithdrawalRequestStatus, c7 as WithdrawalRequestToChannelClosingTransactionsConnection, c8 as WithdrawalRequestToChannelOpeningTransactionsConnection, c9 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, aq as getInvoiceQuery, aA as getLightningTransactionQuery, aE as getLightsparkNodeOwnerQuery, aC as getLightsparkNodeQuery, aM as getNodeQuery, aS as getOnChainTransactionQuery, b9 as getPaymentRequestQuery, bs as getRoutingTransactionQuery, bI as getSignablePayloadQuery, bG as getSignableQuery, bM as getTransactionQuery, bS as getUmaInvitationQuery, c1 as getWithdrawalQuery } from './index-9a69ef6a.js';
2
+ import { W as WebhookEventType, L as LightsparkClient } from './index-27dad75b.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, am as IncomingPaymentToAttemptsConnection, an as IncomingPaymentsForInvoiceQueryInput, ao as IncomingPaymentsForInvoiceQueryOutput, ap as Invoice, ar as InvoiceData, as as InvoiceForPaymentHashInput, at as InvoiceForPaymentHashOutput, au as InvoiceType, av as LightningFeeEstimateForInvoiceInput, aw as LightningFeeEstimateForNodeInput, ax as LightningFeeEstimateOutput, ay as LightningPaymentDirection, az as LightningTransaction, aB as LightsparkNode, aD as LightsparkNodeOwner, aF as LightsparkNodeStatus, aG as LightsparkNodeToChannelsConnection, aH as LightsparkNodeToDailyLiquidityForecastsConnection, aI as LightsparkNodeWithOSK, aJ as LightsparkNodeWithRemoteSigning, aK as MultiSigAddressValidationParameters, aL as Node, aN as NodeAddress, aO as NodeAddressType, aP as NodeToAddressesConnection, aQ as OnChainFeeTarget, aR as OnChainTransaction, aT as OutgoingPayment, aU as OutgoingPaymentAttempt, aV as OutgoingPaymentAttemptStatus, aW as OutgoingPaymentAttemptToHopsConnection, aX as OutgoingPaymentForIdempotencyKeyInput, aY as OutgoingPaymentForIdempotencyKeyOutput, aZ as OutgoingPaymentToAttemptsConnection, a_ as OutgoingPaymentsForInvoiceQueryInput, a$ as OutgoingPaymentsForInvoiceQueryOutput, b0 as OutgoingPaymentsForPaymentHashQueryInput, b1 as OutgoingPaymentsForPaymentHashQueryOutput, b2 as PageInfo, b3 as PayInvoiceInput, b4 as PayInvoiceOutput, b5 as PayUmaInvoiceInput, b6 as PaymentDirection, b7 as PaymentFailureReason, b8 as PaymentRequest, ba as PaymentRequestData, bb as PaymentRequestStatus, bc as Permission, bd as PostTransactionData, be as RegionCode, bf as RegisterPaymentInput, bg as RegisterPaymentOutput, bh as ReleaseChannelPerCommitmentSecretInput, bi as ReleaseChannelPerCommitmentSecretOutput, bj as ReleasePaymentPreimageInput, bk as ReleasePaymentPreimageOutput, bl as RemoteSigningSubEventType, bm as RequestInitiator, bn as RequestWithdrawalInput, bo as RequestWithdrawalOutput, bp as RichText, bq as RiskRating, br as RoutingTransaction, bt as RoutingTransactionFailureReason, bu as ScreenNodeInput, bv as ScreenNodeOutput, bw as Secret, bx as SendPaymentInput, by as SendPaymentOutput, bz as SetInvoicePaymentHashInput, bA as SetInvoicePaymentHashOutput, bB as SignInvoiceInput, bC as SignInvoiceOutput, bD as SignMessagesInput, bE as SignMessagesOutput, bF as Signable, bH as SignablePayload, bJ as SignablePayloadStatus, bK as SingleNodeDashboard, bL as Transaction, bN as TransactionFailures, bO as TransactionStatus, bP as TransactionType, bQ as TransactionUpdate, bR as UmaInvitation, bT as UpdateChannelPerCommitmentPointInput, bU as UpdateChannelPerCommitmentPointOutput, bV as UpdateNodeSharedSecretInput, bW as UpdateNodeSharedSecretOutput, bX as Wallet, bY as WalletStatus, bZ as WalletToPaymentRequestsConnection, b_ as WalletToTransactionsConnection, b$ as WalletToWithdrawalRequestsConnection, c0 as Withdrawal, c2 as WithdrawalFeeEstimateInput, c3 as WithdrawalFeeEstimateOutput, c4 as WithdrawalMode, c5 as WithdrawalRequest, c6 as WithdrawalRequestStatus, c7 as WithdrawalRequestToChannelClosingTransactionsConnection, c8 as WithdrawalRequestToChannelOpeningTransactionsConnection, c9 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, aq as getInvoiceQuery, aA as getLightningTransactionQuery, aE as getLightsparkNodeOwnerQuery, aC as getLightsparkNodeQuery, aM as getNodeQuery, aS as getOnChainTransactionQuery, b9 as getPaymentRequestQuery, bs as getRoutingTransactionQuery, bI as getSignablePayloadQuery, bG as getSignableQuery, bM as getTransactionQuery, bS as getUmaInvitationQuery, c1 as getWithdrawalQuery } from './index-27dad75b.js';
4
4
  import { B as BitcoinNetwork } from './BitcoinNetwork-4f6ea015.js';
5
5
  import 'zen-observable';
6
6
 
package/dist/index.js CHANGED
@@ -93,7 +93,7 @@ import {
93
93
  getTransactionQuery,
94
94
  getUmaInvitationQuery,
95
95
  getWithdrawalQuery
96
- } from "./chunk-J7GJGYME.js";
96
+ } from "./chunk-4KFNQOMH.js";
97
97
  import {
98
98
  BitcoinNetwork_default
99
99
  } from "./chunk-K6SAUSAX.js";
@@ -138,11 +138,13 @@ import {
138
138
  LightsparkAuthException,
139
139
  LightsparkException,
140
140
  LightsparkSigningException as LightsparkSigningException3,
141
+ LoggingLevel,
141
142
  NodeKeyCache,
142
143
  Requester,
143
144
  SigningKeyType as SigningKeyType2,
144
145
  StubAuthProvider,
145
146
  bytesToHex,
147
+ logger as coreLogger,
146
148
  createSha256Hash,
147
149
  pollUntil
148
150
  } from "@lightsparkdev/core";
@@ -150,7 +152,7 @@ import {
150
152
  // package.json
151
153
  var package_default = {
152
154
  name: "@lightsparkdev/lightspark-sdk",
153
- version: "1.8.0",
155
+ version: "1.8.2",
154
156
  description: "Lightspark JS SDK",
155
157
  author: "Lightspark Inc.",
156
158
  keywords: [
@@ -235,7 +237,7 @@ var package_default = {
235
237
  },
236
238
  license: "Apache-2.0",
237
239
  dependencies: {
238
- "@lightsparkdev/core": "1.2.0",
240
+ "@lightsparkdev/core": "1.2.1",
239
241
  "@lightsparkdev/crypto-wasm": "0.1.4",
240
242
  "crypto-browserify": "^3.12.0",
241
243
  dayjs: "^1.11.7",
@@ -754,6 +756,25 @@ var FundNode = `
754
756
  ${FRAGMENT}
755
757
  `;
756
758
 
759
+ // src/graphql/IncomingPaymentsForInvoice.ts
760
+ var IncomingPaymentsForInvoice = `
761
+ query IncomingPaymentsForInvoice(
762
+ $invoice_id: Hash32!,
763
+ $statuses: [TransactionStatus!]
764
+ ) {
765
+ incoming_payments_for_invoice(input: {
766
+ invoice_id: $invoice_id
767
+ statuses: $statuses
768
+ }) {
769
+ payments {
770
+ ...IncomingPaymentFragment
771
+ }
772
+ }
773
+ }
774
+
775
+ ${FRAGMENT7}
776
+ `;
777
+
757
778
  // src/graphql/InvoiceForPaymentHash.ts
758
779
  var InvoiceForPaymentHash = `
759
780
  query InvoiceForPaymentHash($payment_hash: Hash32!) {
@@ -882,6 +903,25 @@ var MultiNodeDashboard = `
882
903
  ${FRAGMENT}
883
904
  `;
884
905
 
906
+ // src/graphql/OutgoingPaymentsForInvoice.ts
907
+ var OutgoingPaymentsForInvoice = `
908
+ query OutgoingPaymentsForInvoice(
909
+ $encoded_invoice: Hash32!,
910
+ $statuses: [TransactionStatus!]
911
+ ) {
912
+ outgoing_payments_for_invoice(input: {
913
+ encoded_invoice: $encoded_invoice
914
+ statuses: $statuses
915
+ }) {
916
+ payments {
917
+ ...OutgoingPaymentFragment
918
+ }
919
+ }
920
+ }
921
+
922
+ ${FRAGMENT9}
923
+ `;
924
+
885
925
  // src/graphql/OutgoingPaymentsForPaymentHash.ts
886
926
  var OutgoingPaymentsForPaymentHash = `
887
927
  query OutgoingPaymentsForPaymentHash(
@@ -1258,6 +1298,10 @@ var WithdrawalFeeEstimate = `
1258
1298
  ${FRAGMENT14}
1259
1299
  `;
1260
1300
 
1301
+ // src/logger.ts
1302
+ import { Logger } from "@lightsparkdev/core";
1303
+ var logger = new Logger("@lightsparkdev/lightspark-sdk");
1304
+
1261
1305
  // src/client.ts
1262
1306
  var sdkVersion = package_default.version;
1263
1307
  var LightsparkClient = class {
@@ -2385,6 +2429,52 @@ var LightsparkClient = class {
2385
2429
  }
2386
2430
  });
2387
2431
  }
2432
+ /**
2433
+ * Fetches Outgoing payments for a given invoice if there are any.
2434
+ *
2435
+ * @param encodedInvoice encoded invoice associated with outgoing payment
2436
+ * @param statuses Filter to only include payments with the given statuses. If not provided, all statuses are included.
2437
+ */
2438
+ async outgoingPaymentsForInvoice(encodedInvoice, statuses = void 0) {
2439
+ return await this.executeRawQuery({
2440
+ queryPayload: OutgoingPaymentsForInvoice,
2441
+ variables: {
2442
+ encoded_invoice: encodedInvoice,
2443
+ statuses
2444
+ },
2445
+ constructObject: (responseJson) => {
2446
+ if (!responseJson.outgoing_payments_for_invoice || !responseJson.outgoing_payments_for_invoice.payments) {
2447
+ return [];
2448
+ }
2449
+ return responseJson.outgoing_payments_for_invoice.payments.map(
2450
+ (payment) => OutgoingPaymentFromJson(payment)
2451
+ );
2452
+ }
2453
+ });
2454
+ }
2455
+ /**
2456
+ * Fetches Incoming payments for a given invoice if there are any.
2457
+ *
2458
+ * @param invoiceId id of associated invoice
2459
+ * @param statuses Filter to only include payments with the given statuses. If not provided, all statuses are included.
2460
+ */
2461
+ async incomingPaymentsForInvoice(invoiceId, statuses = void 0) {
2462
+ return await this.executeRawQuery({
2463
+ queryPayload: IncomingPaymentsForInvoice,
2464
+ variables: {
2465
+ invoice_id: invoiceId,
2466
+ statuses
2467
+ },
2468
+ constructObject: (responseJson) => {
2469
+ if (!responseJson.incoming_payments_for_invoice || !responseJson.incoming_payments_for_invoice.payments) {
2470
+ return [];
2471
+ }
2472
+ return responseJson.incoming_payments_for_invoice.payments.map(
2473
+ (payment) => IncomingPaymentFromJson(payment)
2474
+ );
2475
+ }
2476
+ });
2477
+ }
2388
2478
  async hashPhoneNumber(e164PhoneNumber) {
2389
2479
  const e164PhoneRegex = /^\+[1-9]\d{1,14}$/;
2390
2480
  if (!e164PhoneRegex.test(e164PhoneNumber)) {
@@ -2416,6 +2506,16 @@ var LightsparkClient = class {
2416
2506
  executeRawQuery(query) {
2417
2507
  return this.requester.executeQuery(query);
2418
2508
  }
2509
+ /**
2510
+ * Enable logging for debugging purposes
2511
+ *
2512
+ * @param enabled Whether logging should be enabled.
2513
+ * @param level The logging level to use.
2514
+ * */
2515
+ setLoggingEnabled(enabled, level = LoggingLevel.Info) {
2516
+ coreLogger.setEnabled(enabled, level);
2517
+ logger.setEnabled(enabled, level);
2518
+ }
2419
2519
  };
2420
2520
  var client_default = LightsparkClient;
2421
2521