@lightsparkdev/lightspark-sdk 1.3.1 → 1.4.0

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 (88) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{BitcoinNetwork-972b1d01.d.ts → BitcoinNetwork-4f6ea015.d.ts} +2 -2
  3. package/dist/{chunk-Y55D3PD4.js → chunk-LCDROGA5.js} +938 -725
  4. package/dist/env.d.cts +1 -1
  5. package/dist/env.d.ts +1 -1
  6. package/dist/{index-a5028d74.d.ts → index-6f544cad.d.ts} +711 -714
  7. package/dist/index.cjs +309 -2
  8. package/dist/index.d.cts +3 -3
  9. package/dist/index.d.ts +3 -3
  10. package/dist/index.js +96 -2
  11. package/dist/objects/index.cjs +1339 -1126
  12. package/dist/objects/index.d.cts +2 -2
  13. package/dist/objects/index.d.ts +2 -2
  14. package/dist/objects/index.js +1 -1
  15. package/package.json +1 -1
  16. package/src/client.ts +77 -1
  17. package/src/graphql/RegisterPayment.ts +21 -0
  18. package/src/graphql/ScreenNode.ts +15 -0
  19. package/src/objects/Account.ts +98 -5
  20. package/src/objects/AccountToApiTokensConnection.ts +2 -3
  21. package/src/objects/AccountToChannelsConnection.ts +2 -3
  22. package/src/objects/AccountToNodesConnection.ts +2 -3
  23. package/src/objects/AccountToPaymentRequestsConnection.ts +2 -3
  24. package/src/objects/AccountToTransactionsConnection.ts +6 -7
  25. package/src/objects/AccountToWalletsConnection.ts +2 -3
  26. package/src/objects/AccountToWithdrawalRequestsConnection.ts +71 -0
  27. package/src/objects/ApiToken.ts +5 -6
  28. package/src/objects/Balances.ts +9 -12
  29. package/src/objects/BitcoinNetwork.ts +2 -2
  30. package/src/objects/Channel.ts +7 -10
  31. package/src/objects/ChannelClosingTransaction.ts +3 -4
  32. package/src/objects/ChannelOpeningTransaction.ts +3 -4
  33. package/src/objects/ChannelStatus.ts +5 -9
  34. package/src/objects/ChannelToTransactionsConnection.ts +6 -7
  35. package/src/objects/Connection.ts +85 -3
  36. package/src/objects/CreateApiTokenOutput.ts +3 -3
  37. package/src/objects/CreateLnurlInvoiceInput.ts +2 -3
  38. package/src/objects/CreateTestModePaymentInput.ts +2 -2
  39. package/src/objects/CreateTestModePaymentoutput.ts +2 -3
  40. package/src/objects/CurrencyUnit.ts +11 -17
  41. package/src/objects/Deposit.ts +5 -6
  42. package/src/objects/Entity.ts +21 -6
  43. package/src/objects/FeeEstimate.ts +2 -3
  44. package/src/objects/GraphNode.ts +10 -12
  45. package/src/objects/Hop.ts +5 -6
  46. package/src/objects/IncentivesStatus.ts +2 -3
  47. package/src/objects/IncomingPayment.ts +7 -7
  48. package/src/objects/IncomingPaymentAttempt.ts +2 -2
  49. package/src/objects/IncomingPaymentToAttemptsConnection.ts +2 -3
  50. package/src/objects/Invoice.ts +2 -2
  51. package/src/objects/InvoiceData.ts +4 -5
  52. package/src/objects/LightningTransaction.ts +5 -5
  53. package/src/objects/LightsparkNode.ts +8 -10
  54. package/src/objects/LightsparkNodeOwner.ts +2 -2
  55. package/src/objects/LightsparkNodeToChannelsConnection.ts +2 -3
  56. package/src/objects/LightsparkNodeWithOSK.ts +7 -8
  57. package/src/objects/LightsparkNodeWithRemoteSigning.ts +7 -8
  58. package/src/objects/Node.ts +9 -11
  59. package/src/objects/NodeToAddressesConnection.ts +2 -3
  60. package/src/objects/OnChainTransaction.ts +5 -6
  61. package/src/objects/OutgoingPayment.ts +5 -6
  62. package/src/objects/OutgoingPaymentAttempt.ts +12 -14
  63. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +2 -3
  64. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +2 -3
  65. package/src/objects/PageInfo.ts +3 -3
  66. package/src/objects/PaymentRequest.ts +2 -2
  67. package/src/objects/PaymentRequestData.ts +1 -2
  68. package/src/objects/RegisterPaymentInput.ts +7 -8
  69. package/src/objects/RequestWithdrawalInput.ts +2 -2
  70. package/src/objects/RiskRating.ts +1 -2
  71. package/src/objects/RoutingTransaction.ts +6 -8
  72. package/src/objects/ScreenNodeInput.ts +2 -3
  73. package/src/objects/SetInvoicePaymentHashInput.ts +2 -3
  74. package/src/objects/Signable.ts +2 -2
  75. package/src/objects/SignablePayload.ts +2 -2
  76. package/src/objects/Transaction.ts +3 -4
  77. package/src/objects/TransactionStatus.ts +1 -2
  78. package/src/objects/UmaInvitation.ts +2 -2
  79. package/src/objects/Wallet.ts +97 -8
  80. package/src/objects/WalletStatus.ts +5 -7
  81. package/src/objects/WalletToPaymentRequestsConnection.ts +2 -3
  82. package/src/objects/WalletToTransactionsConnection.ts +2 -3
  83. package/src/objects/WalletToWithdrawalRequestsConnection.ts +70 -0
  84. package/src/objects/Withdrawal.ts +5 -5
  85. package/src/objects/WithdrawalRequest.ts +43 -7
  86. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +2 -3
  87. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +2 -3
  88. package/src/objects/index.ts +2 -0
@@ -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 ApiToken, B as Balances, i as BlockchainBalance, C as CancelInvoiceInput, j as CancelInvoiceOutput, k as Channel, l as ChannelClosingTransaction, n as ChannelFees, o as ChannelOpeningTransaction, q as ChannelSnapshot, r as ChannelStatus, s as ChannelToTransactionsConnection, t as ClaimUmaInvitationInput, u as ClaimUmaInvitationOutput, v as ClaimUmaInvitationWithIncentivesInput, w as ClaimUmaInvitationWithIncentivesOutput, x as ComplianceProvider, y as Connection, z as CreateApiTokenInput, D as CreateApiTokenOutput, E as CreateInvitationWithIncentivesInput, F as CreateInvitationWithIncentivesOutput, G as CreateInvoiceInput, H as CreateInvoiceOutput, I as CreateLnurlInvoiceInput, J as CreateNodeWalletAddressInput, K as CreateNodeWalletAddressOutput, M as CreateTestModeInvoiceInput, N as CreateTestModeInvoiceOutput, O as CreateTestModePaymentInput, P as CreateTestModePaymentoutput, Q as CreateUmaInvitationInput, R as CreateUmaInvitationOutput, S as CreateUmaInvoiceInput, T as CurrencyAmount, U as CurrencyUnit, V as DeclineToSignMessagesInput, X as DeclineToSignMessagesOutput, Y as DeleteApiTokenInput, Z as DeleteApiTokenOutput, _ as Deposit, a0 as Entity, a1 as FeeEstimate, a2 as FundNodeInput, a3 as FundNodeOutput, a4 as GraphNode, a5 as Hop, a7 as HtlcAttemptFailureCode, a8 as IdAndSignature, a9 as IncentivesIneligibilityReason, aa as IncentivesStatus, ab as IncomingPayment, ac as IncomingPaymentAttempt, ae as IncomingPaymentAttemptStatus, af as IncomingPaymentToAttemptsConnection, ag as Invoice, ai as InvoiceData, aj as InvoiceType, ak as LightningFeeEstimateForInvoiceInput, al as LightningFeeEstimateForNodeInput, am as LightningFeeEstimateOutput, an as LightningTransaction, ap as LightsparkNode, ar as LightsparkNodeOwner, at as LightsparkNodeStatus, au as LightsparkNodeToChannelsConnection, av as LightsparkNodeWithOSK, aw as LightsparkNodeWithRemoteSigning, ax as Node, az as NodeAddress, aA as NodeAddressType, aB as NodeToAddressesConnection, aC as OnChainTransaction, aE as OutgoingPayment, aF as OutgoingPaymentAttempt, aG as OutgoingPaymentAttemptStatus, aH as OutgoingPaymentAttemptToHopsConnection, aI as OutgoingPaymentToAttemptsConnection, aJ as OutgoingPaymentsForInvoiceQueryInput, aK as OutgoingPaymentsForInvoiceQueryOutput, aL as PageInfo, aM as PayInvoiceInput, aN as PayInvoiceOutput, aO as PayUmaInvoiceInput, aP as PaymentDirection, aQ as PaymentFailureReason, aR as PaymentRequest, aT as PaymentRequestData, aU as PaymentRequestStatus, aV as Permission, aW as PostTransactionData, aX as RegionCode, aY as RegisterPaymentInput, aZ as RegisterPaymentOutput, a_ as ReleaseChannelPerCommitmentSecretInput, a$ as ReleaseChannelPerCommitmentSecretOutput, b0 as ReleasePaymentPreimageInput, b1 as ReleasePaymentPreimageOutput, b2 as RemoteSigningSubEventType, b3 as RequestWithdrawalInput, b4 as RequestWithdrawalOutput, b5 as RichText, b6 as RiskRating, b7 as RoutingTransaction, b9 as RoutingTransactionFailureReason, ba as ScreenNodeInput, bb as ScreenNodeOutput, bc as Secret, bd as SendPaymentInput, be as SendPaymentOutput, bf as SetInvoicePaymentHashInput, bg as SetInvoicePaymentHashOutput, bh as SignInvoiceInput, bi as SignInvoiceOutput, bj as SignMessagesInput, bk as SignMessagesOutput, bl as Signable, bn as SignablePayload, bp as SignablePayloadStatus, bq as SingleNodeDashboard, br as Transaction, bt as TransactionFailures, bu as TransactionStatus, bv as TransactionType, bw as TransactionUpdate, bx as UmaInvitation, bz as UpdateChannelPerCommitmentPointInput, bA as UpdateChannelPerCommitmentPointOutput, bB as UpdateNodeSharedSecretInput, bC as UpdateNodeSharedSecretOutput, bD as Wallet, bE as WalletStatus, bF as WalletToPaymentRequestsConnection, bG as WalletToTransactionsConnection, W as WebhookEventType, bH as Withdrawal, bJ as WithdrawalMode, bK as WithdrawalRequest, bL as WithdrawalRequestStatus, bM as WithdrawalRequestToChannelClosingTransactionsConnection, bN as WithdrawalRequestToChannelOpeningTransactionsConnection, h as getApiTokenQuery, m as getChannelClosingTransactionQuery, p as getChannelOpeningTransactionQuery, $ as getDepositQuery, a6 as getHopQuery, ad as getIncomingPaymentAttemptQuery, ah as getInvoiceQuery, ao as getLightningTransactionQuery, as as getLightsparkNodeOwnerQuery, aq as getLightsparkNodeQuery, ay as getNodeQuery, aD as getOnChainTransactionQuery, aS as getPaymentRequestQuery, b8 as getRoutingTransactionQuery, bo as getSignablePayloadQuery, bm as getSignableQuery, bs as getTransactionQuery, by as getUmaInvitationQuery, bI as getWithdrawalQuery } from '../index-a5028d74.js';
2
- export { B as BitcoinNetwork } from '../BitcoinNetwork-972b1d01.js';
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, B as Balances, j as BlockchainBalance, C as CancelInvoiceInput, k as CancelInvoiceOutput, l as Channel, m as ChannelClosingTransaction, o as ChannelFees, p as ChannelOpeningTransaction, r as ChannelSnapshot, s as ChannelStatus, t as ChannelToTransactionsConnection, u as ClaimUmaInvitationInput, v as ClaimUmaInvitationOutput, w as ClaimUmaInvitationWithIncentivesInput, x as ClaimUmaInvitationWithIncentivesOutput, y as ComplianceProvider, z as Connection, D as CreateApiTokenInput, E as CreateApiTokenOutput, F as CreateInvitationWithIncentivesInput, G as CreateInvitationWithIncentivesOutput, H as CreateInvoiceInput, I as CreateInvoiceOutput, J as CreateLnurlInvoiceInput, K as CreateNodeWalletAddressInput, M as CreateNodeWalletAddressOutput, N as CreateTestModeInvoiceInput, O as CreateTestModeInvoiceOutput, P as CreateTestModePaymentInput, Q as CreateTestModePaymentoutput, R as CreateUmaInvitationInput, S as CreateUmaInvitationOutput, T as CreateUmaInvoiceInput, U as CurrencyAmount, V as CurrencyUnit, X as DeclineToSignMessagesInput, Y as DeclineToSignMessagesOutput, Z as DeleteApiTokenInput, _ as DeleteApiTokenOutput, $ as Deposit, a1 as Entity, a2 as FeeEstimate, a3 as FundNodeInput, a4 as FundNodeOutput, a5 as GraphNode, a6 as Hop, a8 as HtlcAttemptFailureCode, a9 as IdAndSignature, aa as IncentivesIneligibilityReason, ab as IncentivesStatus, ac as IncomingPayment, ad as IncomingPaymentAttempt, af as IncomingPaymentAttemptStatus, ag as IncomingPaymentToAttemptsConnection, ah as Invoice, aj as InvoiceData, ak as InvoiceType, al as LightningFeeEstimateForInvoiceInput, am as LightningFeeEstimateForNodeInput, an as LightningFeeEstimateOutput, ao as LightningTransaction, aq as LightsparkNode, as as LightsparkNodeOwner, au as LightsparkNodeStatus, av as LightsparkNodeToChannelsConnection, aw as LightsparkNodeWithOSK, ax as LightsparkNodeWithRemoteSigning, ay as Node, aA as NodeAddress, aB as NodeAddressType, aC as NodeToAddressesConnection, aD as OnChainTransaction, aF as OutgoingPayment, aG as OutgoingPaymentAttempt, aH as OutgoingPaymentAttemptStatus, aI as OutgoingPaymentAttemptToHopsConnection, aJ as OutgoingPaymentToAttemptsConnection, aK as OutgoingPaymentsForInvoiceQueryInput, aL as OutgoingPaymentsForInvoiceQueryOutput, aM as PageInfo, aN as PayInvoiceInput, aO as PayInvoiceOutput, aP as PayUmaInvoiceInput, aQ as PaymentDirection, aR as PaymentFailureReason, aS as PaymentRequest, aU as PaymentRequestData, aV as PaymentRequestStatus, aW as Permission, aX as PostTransactionData, aY as RegionCode, aZ as RegisterPaymentInput, a_ as RegisterPaymentOutput, a$ as ReleaseChannelPerCommitmentSecretInput, b0 as ReleaseChannelPerCommitmentSecretOutput, b1 as ReleasePaymentPreimageInput, b2 as ReleasePaymentPreimageOutput, b3 as RemoteSigningSubEventType, b4 as RequestWithdrawalInput, b5 as RequestWithdrawalOutput, b6 as RichText, b7 as RiskRating, b8 as RoutingTransaction, ba as RoutingTransactionFailureReason, bb as ScreenNodeInput, bc as ScreenNodeOutput, bd as Secret, be as SendPaymentInput, bf as SendPaymentOutput, bg as SetInvoicePaymentHashInput, bh as SetInvoicePaymentHashOutput, bi as SignInvoiceInput, bj as SignInvoiceOutput, bk as SignMessagesInput, bl as SignMessagesOutput, bm as Signable, bo as SignablePayload, bq as SignablePayloadStatus, br as SingleNodeDashboard, bs as Transaction, bu as TransactionFailures, bv as TransactionStatus, bw as TransactionType, bx as TransactionUpdate, by as UmaInvitation, bA as UpdateChannelPerCommitmentPointInput, bB as UpdateChannelPerCommitmentPointOutput, bC as UpdateNodeSharedSecretInput, bD as UpdateNodeSharedSecretOutput, bE as Wallet, bF as WalletStatus, bG as WalletToPaymentRequestsConnection, bH as WalletToTransactionsConnection, bI as WalletToWithdrawalRequestsConnection, W as WebhookEventType, bJ as Withdrawal, bL as WithdrawalMode, bM as WithdrawalRequest, bN as WithdrawalRequestStatus, bO as WithdrawalRequestToChannelClosingTransactionsConnection, bP as WithdrawalRequestToChannelOpeningTransactionsConnection, i as getApiTokenQuery, n as getChannelClosingTransactionQuery, q as getChannelOpeningTransactionQuery, a0 as getDepositQuery, a7 as getHopQuery, ae as getIncomingPaymentAttemptQuery, ai as getInvoiceQuery, ap as getLightningTransactionQuery, at as getLightsparkNodeOwnerQuery, ar as getLightsparkNodeQuery, az as getNodeQuery, aE as getOnChainTransactionQuery, aT as getPaymentRequestQuery, b9 as getRoutingTransactionQuery, bp as getSignablePayloadQuery, bn as getSignableQuery, bt as getTransactionQuery, bz as getUmaInvitationQuery, bK as getWithdrawalQuery } from '../index-6f544cad.js';
2
+ export { B as BitcoinNetwork } from '../BitcoinNetwork-4f6ea015.js';
3
3
  import '@lightsparkdev/core';
4
4
  import 'zen-observable';
@@ -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 ApiToken, B as Balances, i as BlockchainBalance, C as CancelInvoiceInput, j as CancelInvoiceOutput, k as Channel, l as ChannelClosingTransaction, n as ChannelFees, o as ChannelOpeningTransaction, q as ChannelSnapshot, r as ChannelStatus, s as ChannelToTransactionsConnection, t as ClaimUmaInvitationInput, u as ClaimUmaInvitationOutput, v as ClaimUmaInvitationWithIncentivesInput, w as ClaimUmaInvitationWithIncentivesOutput, x as ComplianceProvider, y as Connection, z as CreateApiTokenInput, D as CreateApiTokenOutput, E as CreateInvitationWithIncentivesInput, F as CreateInvitationWithIncentivesOutput, G as CreateInvoiceInput, H as CreateInvoiceOutput, I as CreateLnurlInvoiceInput, J as CreateNodeWalletAddressInput, K as CreateNodeWalletAddressOutput, M as CreateTestModeInvoiceInput, N as CreateTestModeInvoiceOutput, O as CreateTestModePaymentInput, P as CreateTestModePaymentoutput, Q as CreateUmaInvitationInput, R as CreateUmaInvitationOutput, S as CreateUmaInvoiceInput, T as CurrencyAmount, U as CurrencyUnit, V as DeclineToSignMessagesInput, X as DeclineToSignMessagesOutput, Y as DeleteApiTokenInput, Z as DeleteApiTokenOutput, _ as Deposit, a0 as Entity, a1 as FeeEstimate, a2 as FundNodeInput, a3 as FundNodeOutput, a4 as GraphNode, a5 as Hop, a7 as HtlcAttemptFailureCode, a8 as IdAndSignature, a9 as IncentivesIneligibilityReason, aa as IncentivesStatus, ab as IncomingPayment, ac as IncomingPaymentAttempt, ae as IncomingPaymentAttemptStatus, af as IncomingPaymentToAttemptsConnection, ag as Invoice, ai as InvoiceData, aj as InvoiceType, ak as LightningFeeEstimateForInvoiceInput, al as LightningFeeEstimateForNodeInput, am as LightningFeeEstimateOutput, an as LightningTransaction, ap as LightsparkNode, ar as LightsparkNodeOwner, at as LightsparkNodeStatus, au as LightsparkNodeToChannelsConnection, av as LightsparkNodeWithOSK, aw as LightsparkNodeWithRemoteSigning, ax as Node, az as NodeAddress, aA as NodeAddressType, aB as NodeToAddressesConnection, aC as OnChainTransaction, aE as OutgoingPayment, aF as OutgoingPaymentAttempt, aG as OutgoingPaymentAttemptStatus, aH as OutgoingPaymentAttemptToHopsConnection, aI as OutgoingPaymentToAttemptsConnection, aJ as OutgoingPaymentsForInvoiceQueryInput, aK as OutgoingPaymentsForInvoiceQueryOutput, aL as PageInfo, aM as PayInvoiceInput, aN as PayInvoiceOutput, aO as PayUmaInvoiceInput, aP as PaymentDirection, aQ as PaymentFailureReason, aR as PaymentRequest, aT as PaymentRequestData, aU as PaymentRequestStatus, aV as Permission, aW as PostTransactionData, aX as RegionCode, aY as RegisterPaymentInput, aZ as RegisterPaymentOutput, a_ as ReleaseChannelPerCommitmentSecretInput, a$ as ReleaseChannelPerCommitmentSecretOutput, b0 as ReleasePaymentPreimageInput, b1 as ReleasePaymentPreimageOutput, b2 as RemoteSigningSubEventType, b3 as RequestWithdrawalInput, b4 as RequestWithdrawalOutput, b5 as RichText, b6 as RiskRating, b7 as RoutingTransaction, b9 as RoutingTransactionFailureReason, ba as ScreenNodeInput, bb as ScreenNodeOutput, bc as Secret, bd as SendPaymentInput, be as SendPaymentOutput, bf as SetInvoicePaymentHashInput, bg as SetInvoicePaymentHashOutput, bh as SignInvoiceInput, bi as SignInvoiceOutput, bj as SignMessagesInput, bk as SignMessagesOutput, bl as Signable, bn as SignablePayload, bp as SignablePayloadStatus, bq as SingleNodeDashboard, br as Transaction, bt as TransactionFailures, bu as TransactionStatus, bv as TransactionType, bw as TransactionUpdate, bx as UmaInvitation, bz as UpdateChannelPerCommitmentPointInput, bA as UpdateChannelPerCommitmentPointOutput, bB as UpdateNodeSharedSecretInput, bC as UpdateNodeSharedSecretOutput, bD as Wallet, bE as WalletStatus, bF as WalletToPaymentRequestsConnection, bG as WalletToTransactionsConnection, W as WebhookEventType, bH as Withdrawal, bJ as WithdrawalMode, bK as WithdrawalRequest, bL as WithdrawalRequestStatus, bM as WithdrawalRequestToChannelClosingTransactionsConnection, bN as WithdrawalRequestToChannelOpeningTransactionsConnection, h as getApiTokenQuery, m as getChannelClosingTransactionQuery, p as getChannelOpeningTransactionQuery, $ as getDepositQuery, a6 as getHopQuery, ad as getIncomingPaymentAttemptQuery, ah as getInvoiceQuery, ao as getLightningTransactionQuery, as as getLightsparkNodeOwnerQuery, aq as getLightsparkNodeQuery, ay as getNodeQuery, aD as getOnChainTransactionQuery, aS as getPaymentRequestQuery, b8 as getRoutingTransactionQuery, bo as getSignablePayloadQuery, bm as getSignableQuery, bs as getTransactionQuery, by as getUmaInvitationQuery, bI as getWithdrawalQuery } from '../index-a5028d74.js';
2
- export { B as BitcoinNetwork } from '../BitcoinNetwork-972b1d01.js';
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, B as Balances, j as BlockchainBalance, C as CancelInvoiceInput, k as CancelInvoiceOutput, l as Channel, m as ChannelClosingTransaction, o as ChannelFees, p as ChannelOpeningTransaction, r as ChannelSnapshot, s as ChannelStatus, t as ChannelToTransactionsConnection, u as ClaimUmaInvitationInput, v as ClaimUmaInvitationOutput, w as ClaimUmaInvitationWithIncentivesInput, x as ClaimUmaInvitationWithIncentivesOutput, y as ComplianceProvider, z as Connection, D as CreateApiTokenInput, E as CreateApiTokenOutput, F as CreateInvitationWithIncentivesInput, G as CreateInvitationWithIncentivesOutput, H as CreateInvoiceInput, I as CreateInvoiceOutput, J as CreateLnurlInvoiceInput, K as CreateNodeWalletAddressInput, M as CreateNodeWalletAddressOutput, N as CreateTestModeInvoiceInput, O as CreateTestModeInvoiceOutput, P as CreateTestModePaymentInput, Q as CreateTestModePaymentoutput, R as CreateUmaInvitationInput, S as CreateUmaInvitationOutput, T as CreateUmaInvoiceInput, U as CurrencyAmount, V as CurrencyUnit, X as DeclineToSignMessagesInput, Y as DeclineToSignMessagesOutput, Z as DeleteApiTokenInput, _ as DeleteApiTokenOutput, $ as Deposit, a1 as Entity, a2 as FeeEstimate, a3 as FundNodeInput, a4 as FundNodeOutput, a5 as GraphNode, a6 as Hop, a8 as HtlcAttemptFailureCode, a9 as IdAndSignature, aa as IncentivesIneligibilityReason, ab as IncentivesStatus, ac as IncomingPayment, ad as IncomingPaymentAttempt, af as IncomingPaymentAttemptStatus, ag as IncomingPaymentToAttemptsConnection, ah as Invoice, aj as InvoiceData, ak as InvoiceType, al as LightningFeeEstimateForInvoiceInput, am as LightningFeeEstimateForNodeInput, an as LightningFeeEstimateOutput, ao as LightningTransaction, aq as LightsparkNode, as as LightsparkNodeOwner, au as LightsparkNodeStatus, av as LightsparkNodeToChannelsConnection, aw as LightsparkNodeWithOSK, ax as LightsparkNodeWithRemoteSigning, ay as Node, aA as NodeAddress, aB as NodeAddressType, aC as NodeToAddressesConnection, aD as OnChainTransaction, aF as OutgoingPayment, aG as OutgoingPaymentAttempt, aH as OutgoingPaymentAttemptStatus, aI as OutgoingPaymentAttemptToHopsConnection, aJ as OutgoingPaymentToAttemptsConnection, aK as OutgoingPaymentsForInvoiceQueryInput, aL as OutgoingPaymentsForInvoiceQueryOutput, aM as PageInfo, aN as PayInvoiceInput, aO as PayInvoiceOutput, aP as PayUmaInvoiceInput, aQ as PaymentDirection, aR as PaymentFailureReason, aS as PaymentRequest, aU as PaymentRequestData, aV as PaymentRequestStatus, aW as Permission, aX as PostTransactionData, aY as RegionCode, aZ as RegisterPaymentInput, a_ as RegisterPaymentOutput, a$ as ReleaseChannelPerCommitmentSecretInput, b0 as ReleaseChannelPerCommitmentSecretOutput, b1 as ReleasePaymentPreimageInput, b2 as ReleasePaymentPreimageOutput, b3 as RemoteSigningSubEventType, b4 as RequestWithdrawalInput, b5 as RequestWithdrawalOutput, b6 as RichText, b7 as RiskRating, b8 as RoutingTransaction, ba as RoutingTransactionFailureReason, bb as ScreenNodeInput, bc as ScreenNodeOutput, bd as Secret, be as SendPaymentInput, bf as SendPaymentOutput, bg as SetInvoicePaymentHashInput, bh as SetInvoicePaymentHashOutput, bi as SignInvoiceInput, bj as SignInvoiceOutput, bk as SignMessagesInput, bl as SignMessagesOutput, bm as Signable, bo as SignablePayload, bq as SignablePayloadStatus, br as SingleNodeDashboard, bs as Transaction, bu as TransactionFailures, bv as TransactionStatus, bw as TransactionType, bx as TransactionUpdate, by as UmaInvitation, bA as UpdateChannelPerCommitmentPointInput, bB as UpdateChannelPerCommitmentPointOutput, bC as UpdateNodeSharedSecretInput, bD as UpdateNodeSharedSecretOutput, bE as Wallet, bF as WalletStatus, bG as WalletToPaymentRequestsConnection, bH as WalletToTransactionsConnection, bI as WalletToWithdrawalRequestsConnection, W as WebhookEventType, bJ as Withdrawal, bL as WithdrawalMode, bM as WithdrawalRequest, bN as WithdrawalRequestStatus, bO as WithdrawalRequestToChannelClosingTransactionsConnection, bP as WithdrawalRequestToChannelOpeningTransactionsConnection, i as getApiTokenQuery, n as getChannelClosingTransactionQuery, q as getChannelOpeningTransactionQuery, a0 as getDepositQuery, a7 as getHopQuery, ae as getIncomingPaymentAttemptQuery, ai as getInvoiceQuery, ap as getLightningTransactionQuery, at as getLightsparkNodeOwnerQuery, ar as getLightsparkNodeQuery, az as getNodeQuery, aE as getOnChainTransactionQuery, aT as getPaymentRequestQuery, b9 as getRoutingTransactionQuery, bp as getSignablePayloadQuery, bn as getSignableQuery, bt as getTransactionQuery, bz as getUmaInvitationQuery, bK as getWithdrawalQuery } from '../index-6f544cad.js';
2
+ export { B as BitcoinNetwork } from '../BitcoinNetwork-4f6ea015.js';
3
3
  import '@lightsparkdev/core';
4
4
  import 'zen-observable';
@@ -55,7 +55,7 @@ import {
55
55
  getTransactionQuery,
56
56
  getUmaInvitationQuery,
57
57
  getWithdrawalQuery
58
- } from "../chunk-Y55D3PD4.js";
58
+ } from "../chunk-LCDROGA5.js";
59
59
  import {
60
60
  BitcoinNetwork_default
61
61
  } from "../chunk-K6SAUSAX.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/lightspark-sdk",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
package/src/client.ts CHANGED
@@ -50,15 +50,18 @@ import { MultiNodeDashboard } from "./graphql/MultiNodeDashboard.js";
50
50
  import { PayInvoice } from "./graphql/PayInvoice.js";
51
51
  import { PayUmaInvoice } from "./graphql/PayUmaInvoice.js";
52
52
  import { PaymentRequestsForNode } from "./graphql/PaymentRequestsForNode.js";
53
+ import { RegisterPayment } from "./graphql/RegisterPayment.js";
53
54
  import { RequestWithdrawal } from "./graphql/RequestWithdrawal.js";
55
+ import { ScreenNode } from "./graphql/ScreenNode.js";
54
56
  import { SendPayment } from "./graphql/SendPayment.js";
55
57
  import { SingleNodeDashboard as SingleNodeDashboardQuery } from "./graphql/SingleNodeDashboard.js";
56
58
  import { TransactionSubscription } from "./graphql/TransactionSubscription.js";
57
59
  import { TransactionsForNode } from "./graphql/TransactionsForNode.js";
58
- import { TransactionStatus } from "./index.js";
60
+ import { RiskRating, TransactionStatus } from "./index.js";
59
61
  import Account from "./objects/Account.js";
60
62
  import { ApiTokenFromJson } from "./objects/ApiToken.js";
61
63
  import BitcoinNetwork from "./objects/BitcoinNetwork.js";
64
+ import type ComplianceProvider from "./objects/ComplianceProvider.js";
62
65
  import type CreateApiTokenOutput from "./objects/CreateApiTokenOutput.js";
63
66
  import type CurrencyAmount from "./objects/CurrencyAmount.js";
64
67
  import { CurrencyAmountFromJson } from "./objects/CurrencyAmount.js";
@@ -73,6 +76,7 @@ import { InvoiceDataFromJson } from "./objects/InvoiceData.js";
73
76
  import InvoiceType from "./objects/InvoiceType.js";
74
77
  import type OutgoingPayment from "./objects/OutgoingPayment.js";
75
78
  import { OutgoingPaymentFromJson } from "./objects/OutgoingPayment.js";
79
+ import type PaymentDirection from "./objects/PaymentDirection.js";
76
80
  import { PaymentRequestFromJson } from "./objects/PaymentRequest.js";
77
81
  import Permission from "./objects/Permission.js";
78
82
  import type RegionCode from "./objects/RegionCode.js";
@@ -1129,6 +1133,78 @@ class LightsparkClient {
1129
1133
  });
1130
1134
  }
1131
1135
 
1136
+ /**
1137
+ * Performs sanction screening on a lightning node against a given compliance provider.
1138
+ *
1139
+ * @param complianceProvider The provider that you want to use to perform the screening. You must have a valid
1140
+ * API token for the provider set in your Lightspark account settings.
1141
+ * @param nodePubKey The public key of the node that needs to be screened.
1142
+ * @returns A RiskRating for the node.
1143
+ */
1144
+ public async screenNode(
1145
+ complianceProvider: ComplianceProvider,
1146
+ nodePubKey: string,
1147
+ ): Promise<RiskRating | null> {
1148
+ return await this.requester.executeQuery({
1149
+ queryPayload: ScreenNode,
1150
+ variables: {
1151
+ node_pubkey: nodePubKey,
1152
+ provider: complianceProvider,
1153
+ },
1154
+ constructObject: (responseJson: {
1155
+ screen_node: any; // eslint-disable-line @typescript-eslint/no-explicit-any
1156
+ }) => {
1157
+ if (responseJson.screen_node?.rating === undefined) {
1158
+ throw new LightsparkException(
1159
+ "ScreenNodeError",
1160
+ "Unable to screen node",
1161
+ );
1162
+ }
1163
+ const rating = responseJson.screen_node.rating;
1164
+ return RiskRating[rating] ?? RiskRating.FUTURE_VALUE;
1165
+ },
1166
+ });
1167
+ }
1168
+
1169
+ /**
1170
+ * Registers a succeeded payment with a compliance provider for monitoring.
1171
+ *
1172
+ * @param complianceProvider The provider that you want to use to register the payment. You must have
1173
+ * a valid API token for the provider set in your Lightspark account settings.
1174
+ * @param paymentId The unique ID of the payment
1175
+ * @param nodePubKey The public key of the counterparty node which is the recipient node if the
1176
+ * payment is an outgoing payment and the sender node if the payment is an incoming payment.
1177
+ * @param paymentDirection Indicates whether the payment is an incoming or outgoing payment.
1178
+ * @returns The ID of the payment that was registered.
1179
+ */
1180
+ public async registerPayment(
1181
+ complianceProvider: ComplianceProvider,
1182
+ paymentId: string,
1183
+ nodePubKey: string,
1184
+ paymentDirection: PaymentDirection,
1185
+ ): Promise<string | null> {
1186
+ return await this.requester.executeQuery({
1187
+ queryPayload: RegisterPayment,
1188
+ variables: {
1189
+ payment_id: paymentId,
1190
+ node_pubkey: nodePubKey,
1191
+ direction: paymentDirection,
1192
+ provider: complianceProvider,
1193
+ },
1194
+ constructObject: (responseJson: {
1195
+ register_payment: any; // eslint-disable-line @typescript-eslint/no-explicit-any
1196
+ }) => {
1197
+ if (!responseJson.register_payment?.payment?.id) {
1198
+ throw new LightsparkException(
1199
+ "RegisterPaymentError",
1200
+ "Unable to register payment",
1201
+ );
1202
+ }
1203
+ return responseJson.register_payment.payment.id as string;
1204
+ },
1205
+ });
1206
+ }
1207
+
1132
1208
  /**
1133
1209
  * Creates an UMA invitation. If you are part of the incentive program,
1134
1210
  * you should use [createUmaInvitationWithIncentives].
@@ -0,0 +1,21 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ export const RegisterPayment = `
4
+ mutation RegisterPayment(
5
+ $provider: ComplianceProvider!
6
+ $payment_id: ID!
7
+ $node_pubkey: String!
8
+ $direction: PaymentDirection!
9
+ ) {
10
+ register_payment(input: {
11
+ provider: $provider
12
+ payment_id: $payment_id
13
+ node_pubkey: $node_pubkey
14
+ direction: $direction
15
+ }) {
16
+ payment {
17
+ id
18
+ }
19
+ }
20
+ }
21
+ `;
@@ -0,0 +1,15 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ export const ScreenNode = `
4
+ mutation ScreenNode(
5
+ $provider: ComplianceProvider!
6
+ $node_pubkey: String!
7
+ ) {
8
+ screen_node(input: {
9
+ provider: $provider
10
+ node_pubkey: $node_pubkey
11
+ }) {
12
+ rating
13
+ }
14
+ }
15
+ `;
@@ -15,6 +15,8 @@ import type AccountToTransactionsConnection from "./AccountToTransactionsConnect
15
15
  import { AccountToTransactionsConnectionFromJson } from "./AccountToTransactionsConnection.js";
16
16
  import type AccountToWalletsConnection from "./AccountToWalletsConnection.js";
17
17
  import { AccountToWalletsConnectionFromJson } from "./AccountToWalletsConnection.js";
18
+ import type AccountToWithdrawalRequestsConnection from "./AccountToWithdrawalRequestsConnection.js";
19
+ import { AccountToWithdrawalRequestsConnectionFromJson } from "./AccountToWithdrawalRequestsConnection.js";
18
20
  import type BitcoinNetwork from "./BitcoinNetwork.js";
19
21
  import type BlockchainBalance from "./BlockchainBalance.js";
20
22
  import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
@@ -25,17 +27,17 @@ import type LightsparkNodeOwner from "./LightsparkNodeOwner.js";
25
27
  import type TransactionFailures from "./TransactionFailures.js";
26
28
  import type TransactionStatus from "./TransactionStatus.js";
27
29
  import type TransactionType from "./TransactionType.js";
30
+ import type WithdrawalRequestStatus from "./WithdrawalRequestStatus.js";
28
31
 
29
32
  /**
30
- * This is an object representing the connected Lightspark account.
31
- * You can retrieve this object to see your account information and objects tied to your account.
32
- * *
33
+ * This is an object representing the connected Lightspark account. You can retrieve this object to
34
+ * see your account information and objects tied to your account. *
33
35
  */
34
36
  class Account implements LightsparkNodeOwner, Entity {
35
37
  constructor(
36
38
  /**
37
- * The unique identifier of this entity across all Lightspark systems.
38
- * Should be treated as an opaque string.
39
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an
40
+ * opaque string.
39
41
  **/
40
42
  public readonly id: string,
41
43
  /** The date and time when the entity was first created. **/
@@ -1681,6 +1683,97 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
1681
1683
  }))!;
1682
1684
  }
1683
1685
 
1686
+ public async getWithdrawalRequests(
1687
+ client: LightsparkClient,
1688
+ first: number | undefined = undefined,
1689
+ after: string | undefined = undefined,
1690
+ bitcoinNetworks: BitcoinNetwork[] | undefined = undefined,
1691
+ statuses: WithdrawalRequestStatus[] | undefined = undefined,
1692
+ nodeIds: string[] | undefined = undefined,
1693
+ afterDate: string | undefined = undefined,
1694
+ beforeDate: string | undefined = undefined,
1695
+ ): Promise<AccountToWithdrawalRequestsConnection> {
1696
+ return (await client.executeRawQuery({
1697
+ queryPayload: `
1698
+ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $bitcoin_networks: [BitcoinNetwork!], $statuses: [WithdrawalRequestStatus!], $node_ids: [ID!], $after_date: DateTime, $before_date: DateTime) {
1699
+ current_account {
1700
+ ... on Account {
1701
+ withdrawal_requests(, first: $first, after: $after, bitcoin_networks: $bitcoin_networks, statuses: $statuses, node_ids: $node_ids, after_date: $after_date, before_date: $before_date) {
1702
+ __typename
1703
+ account_to_withdrawal_requests_connection_count: count
1704
+ account_to_withdrawal_requests_connection_page_info: page_info {
1705
+ __typename
1706
+ page_info_has_next_page: has_next_page
1707
+ page_info_has_previous_page: has_previous_page
1708
+ page_info_start_cursor: start_cursor
1709
+ page_info_end_cursor: end_cursor
1710
+ }
1711
+ account_to_withdrawal_requests_connection_entities: entities {
1712
+ __typename
1713
+ withdrawal_request_id: id
1714
+ withdrawal_request_created_at: created_at
1715
+ withdrawal_request_updated_at: updated_at
1716
+ withdrawal_request_requested_amount: requested_amount {
1717
+ __typename
1718
+ currency_amount_original_value: original_value
1719
+ currency_amount_original_unit: original_unit
1720
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1721
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1722
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1723
+ }
1724
+ withdrawal_request_amount: amount {
1725
+ __typename
1726
+ currency_amount_original_value: original_value
1727
+ currency_amount_original_unit: original_unit
1728
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1729
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1730
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1731
+ }
1732
+ withdrawal_request_estimated_amount: estimated_amount {
1733
+ __typename
1734
+ currency_amount_original_value: original_value
1735
+ currency_amount_original_unit: original_unit
1736
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1737
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1738
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1739
+ }
1740
+ withdrawal_request_amount_withdrawn: amount_withdrawn {
1741
+ __typename
1742
+ currency_amount_original_value: original_value
1743
+ currency_amount_original_unit: original_unit
1744
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1745
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1746
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1747
+ }
1748
+ withdrawal_request_bitcoin_address: bitcoin_address
1749
+ withdrawal_request_withdrawal_mode: withdrawal_mode
1750
+ withdrawal_request_status: status
1751
+ withdrawal_request_completed_at: completed_at
1752
+ withdrawal_request_withdrawal: withdrawal {
1753
+ id
1754
+ }
1755
+ }
1756
+ }
1757
+ }
1758
+ }
1759
+ }
1760
+ `,
1761
+ variables: {
1762
+ first: first,
1763
+ after: after,
1764
+ bitcoin_networks: bitcoinNetworks,
1765
+ statuses: statuses,
1766
+ node_ids: nodeIds,
1767
+ after_date: afterDate,
1768
+ before_date: beforeDate,
1769
+ },
1770
+ constructObject: (json) => {
1771
+ const connection = json["current_account"]["withdrawal_requests"];
1772
+ return AccountToWithdrawalRequestsConnectionFromJson(connection);
1773
+ },
1774
+ }))!;
1775
+ }
1776
+
1684
1777
  public async getWallets(
1685
1778
  client: LightsparkClient,
1686
1779
  first: number | undefined = undefined,
@@ -7,9 +7,8 @@ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
7
7
 
8
8
  interface AccountToApiTokensConnection {
9
9
  /**
10
- * The total count of objects in this connection, using the current filters.
11
- * It is different from the number of objects returned in the current page (in the `entities`
12
- * field).
10
+ * The total count of objects in this connection, using the current filters. It is different
11
+ * from the number of objects returned in the current page (in the `entities` field).
13
12
  **/
14
13
  count: number;
15
14
 
@@ -7,9 +7,8 @@ import { ChannelFromJson } from "./Channel.js";
7
7
  class AccountToChannelsConnection {
8
8
  constructor(
9
9
  /**
10
- * The total count of objects in this connection, using the current filters.
11
- * It is different from the number of objects returned in the current page (in the `entities`
12
- * field).
10
+ * The total count of objects in this connection, using the current filters. It is different
11
+ * from the number of objects returned in the current page (in the `entities` field).
13
12
  **/
14
13
  public readonly count: number,
15
14
  /** The channels for the current page of this connection. **/
@@ -11,9 +11,8 @@ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
11
11
  /** A connection between an account and the nodes it manages. **/
12
12
  interface AccountToNodesConnection {
13
13
  /**
14
- * The total count of objects in this connection, using the current filters.
15
- * It is different from the number of objects returned in the current page (in the `entities`
16
- * field).
14
+ * The total count of objects in this connection, using the current filters. It is different
15
+ * from the number of objects returned in the current page (in the `entities` field).
17
16
  **/
18
17
  count: number;
19
18
 
@@ -10,9 +10,8 @@ import {
10
10
 
11
11
  interface AccountToPaymentRequestsConnection {
12
12
  /**
13
- * The total count of objects in this connection, using the current filters.
14
- * It is different from the number of objects returned in the current page (in the `entities`
15
- * field).
13
+ * The total count of objects in this connection, using the current filters. It is different
14
+ * from the number of objects returned in the current page (in the `entities` field).
16
15
  **/
17
16
  count: number;
18
17
 
@@ -12,9 +12,8 @@ import { TransactionFromJson, TransactionToJson } from "./Transaction.js";
12
12
 
13
13
  interface AccountToTransactionsConnection {
14
14
  /**
15
- * The total count of objects in this connection, using the current filters.
16
- * It is different from the number of objects returned in the current page (in the `entities`
17
- * field).
15
+ * The total count of objects in this connection, using the current filters. It is different
16
+ * from the number of objects returned in the current page (in the `entities` field).
18
17
  **/
19
18
  count: number;
20
19
 
@@ -28,14 +27,14 @@ interface AccountToTransactionsConnection {
28
27
  typename: string;
29
28
 
30
29
  /**
31
- * Profit (or loss) generated by the transactions in this connection,
32
- * with the set of filters and constraints provided.
30
+ * Profit (or loss) generated by the transactions in this connection, with the set of filters
31
+ * and constraints provided.
33
32
  **/
34
33
  profitLoss?: CurrencyAmount | undefined;
35
34
 
36
35
  /**
37
- * Average fee earned for the transactions in this connection,
38
- * with the set of filters and constraints provided.
36
+ * Average fee earned for the transactions in this connection, with the set of filters and
37
+ * constraints provided.
39
38
  **/
40
39
  averageFeeEarned?: CurrencyAmount | undefined;
41
40
 
@@ -7,9 +7,8 @@ import { WalletFromJson } from "./Wallet.js";
7
7
 
8
8
  interface AccountToWalletsConnection {
9
9
  /**
10
- * The total count of objects in this connection, using the current filters.
11
- * It is different from the number of objects returned in the current page (in the `entities`
12
- * field).
10
+ * The total count of objects in this connection, using the current filters. It is different
11
+ * from the number of objects returned in the current page (in the `entities` field).
13
12
  **/
14
13
  count: number;
15
14
 
@@ -0,0 +1,71 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import type PageInfo from "./PageInfo.js";
4
+ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
5
+ import type WithdrawalRequest from "./WithdrawalRequest.js";
6
+ import { WithdrawalRequestFromJson } from "./WithdrawalRequest.js";
7
+
8
+ /** A connection between an account and its past and present withdrawal requests. **/
9
+ interface AccountToWithdrawalRequestsConnection {
10
+ /**
11
+ * The total count of objects in this connection, using the current filters. It is different
12
+ * from the number of objects returned in the current page (in the `entities` field).
13
+ **/
14
+ count: number;
15
+
16
+ /** An object that holds pagination information about the objects in this connection. **/
17
+ pageInfo: PageInfo;
18
+
19
+ /** The withdrawal requests for the current page of this connection. **/
20
+ entities: WithdrawalRequest[];
21
+
22
+ /** The typename of the object **/
23
+ typename: string;
24
+ }
25
+
26
+ export const AccountToWithdrawalRequestsConnectionFromJson = (
27
+ obj: any,
28
+ ): AccountToWithdrawalRequestsConnection => {
29
+ return {
30
+ count: obj["account_to_withdrawal_requests_connection_count"],
31
+ pageInfo: PageInfoFromJson(
32
+ obj["account_to_withdrawal_requests_connection_page_info"],
33
+ ),
34
+ entities: obj["account_to_withdrawal_requests_connection_entities"].map(
35
+ (e) => WithdrawalRequestFromJson(e),
36
+ ),
37
+ typename: "AccountToWithdrawalRequestsConnection",
38
+ } as AccountToWithdrawalRequestsConnection;
39
+ };
40
+ export const AccountToWithdrawalRequestsConnectionToJson = (
41
+ obj: AccountToWithdrawalRequestsConnection,
42
+ ): any => {
43
+ return {
44
+ __typename: "AccountToWithdrawalRequestsConnection",
45
+ account_to_withdrawal_requests_connection_count: obj.count,
46
+ account_to_withdrawal_requests_connection_page_info: PageInfoToJson(
47
+ obj.pageInfo,
48
+ ),
49
+ account_to_withdrawal_requests_connection_entities: obj.entities.map((e) =>
50
+ e.toJson(),
51
+ ),
52
+ };
53
+ };
54
+
55
+ export const FRAGMENT = `
56
+ fragment AccountToWithdrawalRequestsConnectionFragment on AccountToWithdrawalRequestsConnection {
57
+ __typename
58
+ account_to_withdrawal_requests_connection_count: count
59
+ account_to_withdrawal_requests_connection_page_info: page_info {
60
+ __typename
61
+ page_info_has_next_page: has_next_page
62
+ page_info_has_previous_page: has_previous_page
63
+ page_info_start_cursor: start_cursor
64
+ page_info_end_cursor: end_cursor
65
+ }
66
+ account_to_withdrawal_requests_connection_entities: entities {
67
+ id
68
+ }
69
+ }`;
70
+
71
+ export default AccountToWithdrawalRequestsConnection;
@@ -4,15 +4,14 @@ import { type Query } from "@lightsparkdev/core";
4
4
  import Permission from "./Permission.js";
5
5
 
6
6
  /**
7
- * This is an object representing a Lightspark API token,
8
- * that can be used to authenticate this account when making API calls or using our SDKs.
9
- * See the “Authentication” section of our API docs for more details on its usage.
10
- * *
7
+ * This is an object representing a Lightspark API token, that can be used to authenticate this
8
+ * account when making API calls or using our SDKs. See the “Authentication” section of our API
9
+ * docs for more details on its usage. *
11
10
  */
12
11
  interface ApiToken {
13
12
  /**
14
- * The unique identifier of this entity across all Lightspark systems.
15
- * Should be treated as an opaque string.
13
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an
14
+ * opaque string.
16
15
  **/
17
16
  id: string;
18
17
 
@@ -7,18 +7,16 @@ import {
7
7
  } from "./CurrencyAmount.js";
8
8
 
9
9
  /**
10
- * This is an object representing the balance associated with your Lightspark account.
11
- * You can retrieve this object to see your balance,
12
- * which can be broken down into several different categorizations.
13
- * *
10
+ * This is an object representing the balance associated with your Lightspark account. You can
11
+ * retrieve this object to see your balance, which can be broken down into several different
12
+ * categorizations. *
14
13
  */
15
14
  interface Balances {
16
15
  /**
17
16
  * This represents the balance that should be displayed when asked "how much do I own right
18
- * now?". It represents the amount currently owned,
19
- * including things that may not be owned soon (e.g. in-flight outgoing payments, in-flight
20
- * withdrawals, commit fees, etc.). It really is a snapshot of what is officially owned at this
21
- * instant.
17
+ * now?". It represents the amount currently owned, including things that may not be owned soon
18
+ * (e.g. in-flight outgoing payments, in-flight withdrawals, commit fees, etc.). It really is a
19
+ * snapshot of what is officially owned at this instant.
22
20
  **/
23
21
  ownedBalance: CurrencyAmount;
24
22
 
@@ -32,10 +30,9 @@ interface Balances {
32
30
 
33
31
  /**
34
32
  * This represents the balance that should be displayed when asked "how much money can I
35
- * withdraw on the Bitcoin network right now?".
36
- * It represents the amount currently available to withdraw and is usually equal to the
37
- * `owned_balance` but it does not include in-flight operations (which would likely succeed and
38
- * therefore likely make your withdrawal fail).
33
+ * withdraw on the Bitcoin network right now?". It represents the amount currently available to
34
+ * withdraw and is usually equal to the `owned_balance` but it does not include in-flight
35
+ * operations (which would likely succeed and therefore likely make your withdrawal fail).
39
36
  **/
40
37
  availableToWithdrawBalance: CurrencyAmount;
41
38
  }
@@ -12,8 +12,8 @@ export enum BitcoinNetwork {
12
12
  /** A test version of the Bitcoin Blockchain, maintained by Lightspark. **/
13
13
  REGTEST = "REGTEST",
14
14
  /**
15
- * A test version of the Bitcoin Blockchain, maintained by a centralized organization.
16
- * Not in use at Lightspark. *
15
+ * A test version of the Bitcoin Blockchain, maintained by a centralized organization. Not in use
16
+ * at Lightspark. *
17
17
  */
18
18
  SIGNET = "SIGNET",
19
19
  /** A test version of the Bitcoin Blockchain, publicly available. **/