@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
@@ -91,7 +91,7 @@ __export(objects_exports, {
91
91
  module.exports = __toCommonJS(objects_exports);
92
92
 
93
93
  // src/objects/Account.ts
94
- var import_auto_bind10 = __toESM(require("auto-bind"), 1);
94
+ var import_auto_bind11 = __toESM(require("auto-bind"), 1);
95
95
 
96
96
  // src/objects/Permission.ts
97
97
  var Permission = /* @__PURE__ */ ((Permission2) => {
@@ -4745,7 +4745,7 @@ var AccountToTransactionsConnectionFromJson = (obj) => {
4745
4745
  };
4746
4746
 
4747
4747
  // src/objects/Wallet.ts
4748
- var import_auto_bind9 = __toESM(require("auto-bind"), 1);
4748
+ var import_auto_bind10 = __toESM(require("auto-bind"), 1);
4749
4749
 
4750
4750
  // src/objects/WalletStatus.ts
4751
4751
  var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
@@ -4791,78 +4791,489 @@ var WalletToTransactionsConnectionFromJson = (obj) => {
4791
4791
  };
4792
4792
  };
4793
4793
 
4794
- // src/objects/Wallet.ts
4795
- var Wallet = class {
4796
- constructor(id, createdAt, updatedAt, thirdPartyIdentifier, status, typename, lastLoginAt, balances, accountId) {
4794
+ // src/objects/WithdrawalRequest.ts
4795
+ var import_auto_bind9 = __toESM(require("auto-bind"), 1);
4796
+
4797
+ // src/objects/WithdrawalMode.ts
4798
+ var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
4799
+ WithdrawalMode2["FUTURE_VALUE"] = "FUTURE_VALUE";
4800
+ WithdrawalMode2["WALLET_ONLY"] = "WALLET_ONLY";
4801
+ WithdrawalMode2["WALLET_THEN_CHANNELS"] = "WALLET_THEN_CHANNELS";
4802
+ return WithdrawalMode2;
4803
+ })(WithdrawalMode || {});
4804
+ var WithdrawalMode_default = WithdrawalMode;
4805
+
4806
+ // src/objects/WithdrawalRequestStatus.ts
4807
+ var WithdrawalRequestStatus = /* @__PURE__ */ ((WithdrawalRequestStatus2) => {
4808
+ WithdrawalRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
4809
+ WithdrawalRequestStatus2["CREATED"] = "CREATED";
4810
+ WithdrawalRequestStatus2["FAILED"] = "FAILED";
4811
+ WithdrawalRequestStatus2["IN_PROGRESS"] = "IN_PROGRESS";
4812
+ WithdrawalRequestStatus2["SUCCESSFUL"] = "SUCCESSFUL";
4813
+ return WithdrawalRequestStatus2;
4814
+ })(WithdrawalRequestStatus || {});
4815
+ var WithdrawalRequestStatus_default = WithdrawalRequestStatus;
4816
+
4817
+ // src/objects/ChannelClosingTransaction.ts
4818
+ var ChannelClosingTransactionFromJson = (obj) => {
4819
+ return {
4820
+ id: obj["channel_closing_transaction_id"],
4821
+ createdAt: obj["channel_closing_transaction_created_at"],
4822
+ updatedAt: obj["channel_closing_transaction_updated_at"],
4823
+ status: TransactionStatus_default[obj["channel_closing_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
4824
+ amount: CurrencyAmountFromJson(obj["channel_closing_transaction_amount"]),
4825
+ blockHeight: obj["channel_closing_transaction_block_height"],
4826
+ destinationAddresses: obj["channel_closing_transaction_destination_addresses"],
4827
+ typename: "ChannelClosingTransaction",
4828
+ resolvedAt: obj["channel_closing_transaction_resolved_at"],
4829
+ transactionHash: obj["channel_closing_transaction_transaction_hash"],
4830
+ fees: !!obj["channel_closing_transaction_fees"] ? CurrencyAmountFromJson(obj["channel_closing_transaction_fees"]) : void 0,
4831
+ blockHash: obj["channel_closing_transaction_block_hash"],
4832
+ numConfirmations: obj["channel_closing_transaction_num_confirmations"],
4833
+ channelId: obj["channel_closing_transaction_channel"]?.id ?? void 0
4834
+ };
4835
+ };
4836
+ var FRAGMENT15 = `
4837
+ fragment ChannelClosingTransactionFragment on ChannelClosingTransaction {
4838
+ __typename
4839
+ channel_closing_transaction_id: id
4840
+ channel_closing_transaction_created_at: created_at
4841
+ channel_closing_transaction_updated_at: updated_at
4842
+ channel_closing_transaction_status: status
4843
+ channel_closing_transaction_resolved_at: resolved_at
4844
+ channel_closing_transaction_amount: amount {
4845
+ __typename
4846
+ currency_amount_original_value: original_value
4847
+ currency_amount_original_unit: original_unit
4848
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4849
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4850
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4851
+ }
4852
+ channel_closing_transaction_transaction_hash: transaction_hash
4853
+ channel_closing_transaction_fees: fees {
4854
+ __typename
4855
+ currency_amount_original_value: original_value
4856
+ currency_amount_original_unit: original_unit
4857
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4858
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4859
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4860
+ }
4861
+ channel_closing_transaction_block_hash: block_hash
4862
+ channel_closing_transaction_block_height: block_height
4863
+ channel_closing_transaction_destination_addresses: destination_addresses
4864
+ channel_closing_transaction_num_confirmations: num_confirmations
4865
+ channel_closing_transaction_channel: channel {
4866
+ id
4867
+ }
4868
+ }`;
4869
+ var getChannelClosingTransactionQuery = (id) => {
4870
+ return {
4871
+ queryPayload: `
4872
+ query GetChannelClosingTransaction($id: ID!) {
4873
+ entity(id: $id) {
4874
+ ... on ChannelClosingTransaction {
4875
+ ...ChannelClosingTransactionFragment
4876
+ }
4877
+ }
4878
+ }
4879
+
4880
+ ${FRAGMENT15}
4881
+ `,
4882
+ variables: { id },
4883
+ constructObject: (data) => ChannelClosingTransactionFromJson(data.entity)
4884
+ };
4885
+ };
4886
+
4887
+ // src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts
4888
+ var WithdrawalRequestToChannelClosingTransactionsConnectionFromJson = (obj) => {
4889
+ return {
4890
+ pageInfo: PageInfoFromJson(
4891
+ obj["withdrawal_request_to_channel_closing_transactions_connection_page_info"]
4892
+ ),
4893
+ count: obj["withdrawal_request_to_channel_closing_transactions_connection_count"],
4894
+ entities: obj["withdrawal_request_to_channel_closing_transactions_connection_entities"].map((e) => ChannelClosingTransactionFromJson(e))
4895
+ };
4896
+ };
4897
+
4898
+ // src/objects/ChannelOpeningTransaction.ts
4899
+ var ChannelOpeningTransactionFromJson = (obj) => {
4900
+ return {
4901
+ id: obj["channel_opening_transaction_id"],
4902
+ createdAt: obj["channel_opening_transaction_created_at"],
4903
+ updatedAt: obj["channel_opening_transaction_updated_at"],
4904
+ status: TransactionStatus_default[obj["channel_opening_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
4905
+ amount: CurrencyAmountFromJson(obj["channel_opening_transaction_amount"]),
4906
+ blockHeight: obj["channel_opening_transaction_block_height"],
4907
+ destinationAddresses: obj["channel_opening_transaction_destination_addresses"],
4908
+ typename: "ChannelOpeningTransaction",
4909
+ resolvedAt: obj["channel_opening_transaction_resolved_at"],
4910
+ transactionHash: obj["channel_opening_transaction_transaction_hash"],
4911
+ fees: !!obj["channel_opening_transaction_fees"] ? CurrencyAmountFromJson(obj["channel_opening_transaction_fees"]) : void 0,
4912
+ blockHash: obj["channel_opening_transaction_block_hash"],
4913
+ numConfirmations: obj["channel_opening_transaction_num_confirmations"],
4914
+ channelId: obj["channel_opening_transaction_channel"]?.id ?? void 0
4915
+ };
4916
+ };
4917
+ var FRAGMENT16 = `
4918
+ fragment ChannelOpeningTransactionFragment on ChannelOpeningTransaction {
4919
+ __typename
4920
+ channel_opening_transaction_id: id
4921
+ channel_opening_transaction_created_at: created_at
4922
+ channel_opening_transaction_updated_at: updated_at
4923
+ channel_opening_transaction_status: status
4924
+ channel_opening_transaction_resolved_at: resolved_at
4925
+ channel_opening_transaction_amount: amount {
4926
+ __typename
4927
+ currency_amount_original_value: original_value
4928
+ currency_amount_original_unit: original_unit
4929
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4930
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4931
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4932
+ }
4933
+ channel_opening_transaction_transaction_hash: transaction_hash
4934
+ channel_opening_transaction_fees: fees {
4935
+ __typename
4936
+ currency_amount_original_value: original_value
4937
+ currency_amount_original_unit: original_unit
4938
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4939
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4940
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4941
+ }
4942
+ channel_opening_transaction_block_hash: block_hash
4943
+ channel_opening_transaction_block_height: block_height
4944
+ channel_opening_transaction_destination_addresses: destination_addresses
4945
+ channel_opening_transaction_num_confirmations: num_confirmations
4946
+ channel_opening_transaction_channel: channel {
4947
+ id
4948
+ }
4949
+ }`;
4950
+ var getChannelOpeningTransactionQuery = (id) => {
4951
+ return {
4952
+ queryPayload: `
4953
+ query GetChannelOpeningTransaction($id: ID!) {
4954
+ entity(id: $id) {
4955
+ ... on ChannelOpeningTransaction {
4956
+ ...ChannelOpeningTransactionFragment
4957
+ }
4958
+ }
4959
+ }
4960
+
4961
+ ${FRAGMENT16}
4962
+ `,
4963
+ variables: { id },
4964
+ constructObject: (data) => ChannelOpeningTransactionFromJson(data.entity)
4965
+ };
4966
+ };
4967
+
4968
+ // src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts
4969
+ var WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson = (obj) => {
4970
+ return {
4971
+ pageInfo: PageInfoFromJson(
4972
+ obj["withdrawal_request_to_channel_opening_transactions_connection_page_info"]
4973
+ ),
4974
+ count: obj["withdrawal_request_to_channel_opening_transactions_connection_count"],
4975
+ entities: obj["withdrawal_request_to_channel_opening_transactions_connection_entities"].map((e) => ChannelOpeningTransactionFromJson(e))
4976
+ };
4977
+ };
4978
+
4979
+ // src/objects/WithdrawalRequest.ts
4980
+ var WithdrawalRequest = class {
4981
+ constructor(id, createdAt, updatedAt, requestedAmount, amount, bitcoinAddress, withdrawalMode, status, typename, estimatedAmount, amountWithdrawn, completedAt, withdrawalId) {
4797
4982
  this.id = id;
4798
4983
  this.createdAt = createdAt;
4799
4984
  this.updatedAt = updatedAt;
4800
- this.thirdPartyIdentifier = thirdPartyIdentifier;
4985
+ this.requestedAmount = requestedAmount;
4986
+ this.amount = amount;
4987
+ this.bitcoinAddress = bitcoinAddress;
4988
+ this.withdrawalMode = withdrawalMode;
4801
4989
  this.status = status;
4802
4990
  this.typename = typename;
4803
- this.lastLoginAt = lastLoginAt;
4804
- this.balances = balances;
4805
- this.accountId = accountId;
4991
+ this.estimatedAmount = estimatedAmount;
4992
+ this.amountWithdrawn = amountWithdrawn;
4993
+ this.completedAt = completedAt;
4994
+ this.withdrawalId = withdrawalId;
4806
4995
  (0, import_auto_bind9.default)(this);
4807
4996
  }
4808
- async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
4997
+ async getChannelClosingTransactions(client, first = void 0) {
4809
4998
  return await client.executeRawQuery({
4810
4999
  queryPayload: `
4811
- query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: ID, $created_after_date: DateTime, $created_before_date: DateTime, $statuses: [TransactionStatus!], $types: [TransactionType!]) {
5000
+ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: ID!, $first: Int) {
4812
5001
  entity(id: $entity_id) {
4813
- ... on Wallet {
4814
- transactions(, first: $first, after: $after, created_after_date: $created_after_date, created_before_date: $created_before_date, statuses: $statuses, types: $types) {
5002
+ ... on WithdrawalRequest {
5003
+ channel_closing_transactions(, first: $first) {
4815
5004
  __typename
4816
- wallet_to_transactions_connection_count: count
4817
- wallet_to_transactions_connection_page_info: page_info {
5005
+ withdrawal_request_to_channel_closing_transactions_connection_page_info: page_info {
4818
5006
  __typename
4819
5007
  page_info_has_next_page: has_next_page
4820
5008
  page_info_has_previous_page: has_previous_page
4821
5009
  page_info_start_cursor: start_cursor
4822
5010
  page_info_end_cursor: end_cursor
4823
5011
  }
4824
- wallet_to_transactions_connection_entities: entities {
5012
+ withdrawal_request_to_channel_closing_transactions_connection_count: count
5013
+ withdrawal_request_to_channel_closing_transactions_connection_entities: entities {
4825
5014
  __typename
4826
- ... on ChannelClosingTransaction {
5015
+ channel_closing_transaction_id: id
5016
+ channel_closing_transaction_created_at: created_at
5017
+ channel_closing_transaction_updated_at: updated_at
5018
+ channel_closing_transaction_status: status
5019
+ channel_closing_transaction_resolved_at: resolved_at
5020
+ channel_closing_transaction_amount: amount {
4827
5021
  __typename
4828
- channel_closing_transaction_id: id
4829
- channel_closing_transaction_created_at: created_at
4830
- channel_closing_transaction_updated_at: updated_at
4831
- channel_closing_transaction_status: status
4832
- channel_closing_transaction_resolved_at: resolved_at
4833
- channel_closing_transaction_amount: amount {
4834
- __typename
4835
- currency_amount_original_value: original_value
4836
- currency_amount_original_unit: original_unit
4837
- currency_amount_preferred_currency_unit: preferred_currency_unit
4838
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4839
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4840
- }
4841
- channel_closing_transaction_transaction_hash: transaction_hash
4842
- channel_closing_transaction_fees: fees {
4843
- __typename
4844
- currency_amount_original_value: original_value
4845
- currency_amount_original_unit: original_unit
4846
- currency_amount_preferred_currency_unit: preferred_currency_unit
4847
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4848
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4849
- }
4850
- channel_closing_transaction_block_hash: block_hash
4851
- channel_closing_transaction_block_height: block_height
4852
- channel_closing_transaction_destination_addresses: destination_addresses
4853
- channel_closing_transaction_num_confirmations: num_confirmations
4854
- channel_closing_transaction_channel: channel {
4855
- id
4856
- }
4857
- }
4858
- ... on ChannelOpeningTransaction {
5022
+ currency_amount_original_value: original_value
5023
+ currency_amount_original_unit: original_unit
5024
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5025
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5026
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5027
+ }
5028
+ channel_closing_transaction_transaction_hash: transaction_hash
5029
+ channel_closing_transaction_fees: fees {
4859
5030
  __typename
4860
- channel_opening_transaction_id: id
4861
- channel_opening_transaction_created_at: created_at
4862
- channel_opening_transaction_updated_at: updated_at
4863
- channel_opening_transaction_status: status
4864
- channel_opening_transaction_resolved_at: resolved_at
4865
- channel_opening_transaction_amount: amount {
5031
+ currency_amount_original_value: original_value
5032
+ currency_amount_original_unit: original_unit
5033
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5034
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5035
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5036
+ }
5037
+ channel_closing_transaction_block_hash: block_hash
5038
+ channel_closing_transaction_block_height: block_height
5039
+ channel_closing_transaction_destination_addresses: destination_addresses
5040
+ channel_closing_transaction_num_confirmations: num_confirmations
5041
+ channel_closing_transaction_channel: channel {
5042
+ id
5043
+ }
5044
+ }
5045
+ }
5046
+ }
5047
+ }
5048
+ }
5049
+ `,
5050
+ variables: { entity_id: this.id, first },
5051
+ constructObject: (json) => {
5052
+ const connection = json["entity"]["channel_closing_transactions"];
5053
+ return WithdrawalRequestToChannelClosingTransactionsConnectionFromJson(
5054
+ connection
5055
+ );
5056
+ }
5057
+ });
5058
+ }
5059
+ async getChannelOpeningTransactions(client, first = void 0) {
5060
+ return await client.executeRawQuery({
5061
+ queryPayload: `
5062
+ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: ID!, $first: Int) {
5063
+ entity(id: $entity_id) {
5064
+ ... on WithdrawalRequest {
5065
+ channel_opening_transactions(, first: $first) {
5066
+ __typename
5067
+ withdrawal_request_to_channel_opening_transactions_connection_page_info: page_info {
5068
+ __typename
5069
+ page_info_has_next_page: has_next_page
5070
+ page_info_has_previous_page: has_previous_page
5071
+ page_info_start_cursor: start_cursor
5072
+ page_info_end_cursor: end_cursor
5073
+ }
5074
+ withdrawal_request_to_channel_opening_transactions_connection_count: count
5075
+ withdrawal_request_to_channel_opening_transactions_connection_entities: entities {
5076
+ __typename
5077
+ channel_opening_transaction_id: id
5078
+ channel_opening_transaction_created_at: created_at
5079
+ channel_opening_transaction_updated_at: updated_at
5080
+ channel_opening_transaction_status: status
5081
+ channel_opening_transaction_resolved_at: resolved_at
5082
+ channel_opening_transaction_amount: amount {
5083
+ __typename
5084
+ currency_amount_original_value: original_value
5085
+ currency_amount_original_unit: original_unit
5086
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5087
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5088
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5089
+ }
5090
+ channel_opening_transaction_transaction_hash: transaction_hash
5091
+ channel_opening_transaction_fees: fees {
5092
+ __typename
5093
+ currency_amount_original_value: original_value
5094
+ currency_amount_original_unit: original_unit
5095
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5096
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5097
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5098
+ }
5099
+ channel_opening_transaction_block_hash: block_hash
5100
+ channel_opening_transaction_block_height: block_height
5101
+ channel_opening_transaction_destination_addresses: destination_addresses
5102
+ channel_opening_transaction_num_confirmations: num_confirmations
5103
+ channel_opening_transaction_channel: channel {
5104
+ id
5105
+ }
5106
+ }
5107
+ }
5108
+ }
5109
+ }
5110
+ }
5111
+ `,
5112
+ variables: { entity_id: this.id, first },
5113
+ constructObject: (json) => {
5114
+ const connection = json["entity"]["channel_opening_transactions"];
5115
+ return WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson(
5116
+ connection
5117
+ );
5118
+ }
5119
+ });
5120
+ }
5121
+ static getWithdrawalRequestQuery(id) {
5122
+ return {
5123
+ queryPayload: `
5124
+ query GetWithdrawalRequest($id: ID!) {
5125
+ entity(id: $id) {
5126
+ ... on WithdrawalRequest {
5127
+ ...WithdrawalRequestFragment
5128
+ }
5129
+ }
5130
+ }
5131
+
5132
+ ${FRAGMENT17}
5133
+ `,
5134
+ variables: { id },
5135
+ constructObject: (data) => WithdrawalRequestFromJson(data.entity)
5136
+ };
5137
+ }
5138
+ toJson() {
5139
+ return {
5140
+ __typename: "WithdrawalRequest",
5141
+ withdrawal_request_id: this.id,
5142
+ withdrawal_request_created_at: this.createdAt,
5143
+ withdrawal_request_updated_at: this.updatedAt,
5144
+ withdrawal_request_requested_amount: CurrencyAmountToJson(
5145
+ this.requestedAmount
5146
+ ),
5147
+ withdrawal_request_amount: CurrencyAmountToJson(this.amount),
5148
+ withdrawal_request_estimated_amount: this.estimatedAmount ? CurrencyAmountToJson(this.estimatedAmount) : void 0,
5149
+ withdrawal_request_amount_withdrawn: this.amountWithdrawn ? CurrencyAmountToJson(this.amountWithdrawn) : void 0,
5150
+ withdrawal_request_bitcoin_address: this.bitcoinAddress,
5151
+ withdrawal_request_withdrawal_mode: this.withdrawalMode,
5152
+ withdrawal_request_status: this.status,
5153
+ withdrawal_request_completed_at: this.completedAt,
5154
+ withdrawal_request_withdrawal: { id: this.withdrawalId }
5155
+ };
5156
+ }
5157
+ };
5158
+ var WithdrawalRequestFromJson = (obj) => {
5159
+ return new WithdrawalRequest(
5160
+ obj["withdrawal_request_id"],
5161
+ obj["withdrawal_request_created_at"],
5162
+ obj["withdrawal_request_updated_at"],
5163
+ CurrencyAmountFromJson(obj["withdrawal_request_requested_amount"]),
5164
+ CurrencyAmountFromJson(obj["withdrawal_request_amount"]),
5165
+ obj["withdrawal_request_bitcoin_address"],
5166
+ WithdrawalMode_default[obj["withdrawal_request_withdrawal_mode"]] ?? WithdrawalMode_default.FUTURE_VALUE,
5167
+ WithdrawalRequestStatus_default[obj["withdrawal_request_status"]] ?? WithdrawalRequestStatus_default.FUTURE_VALUE,
5168
+ "WithdrawalRequest",
5169
+ !!obj["withdrawal_request_estimated_amount"] ? CurrencyAmountFromJson(obj["withdrawal_request_estimated_amount"]) : void 0,
5170
+ !!obj["withdrawal_request_amount_withdrawn"] ? CurrencyAmountFromJson(obj["withdrawal_request_amount_withdrawn"]) : void 0,
5171
+ obj["withdrawal_request_completed_at"],
5172
+ obj["withdrawal_request_withdrawal"]?.id ?? void 0
5173
+ );
5174
+ };
5175
+ var FRAGMENT17 = `
5176
+ fragment WithdrawalRequestFragment on WithdrawalRequest {
5177
+ __typename
5178
+ withdrawal_request_id: id
5179
+ withdrawal_request_created_at: created_at
5180
+ withdrawal_request_updated_at: updated_at
5181
+ withdrawal_request_requested_amount: requested_amount {
5182
+ __typename
5183
+ currency_amount_original_value: original_value
5184
+ currency_amount_original_unit: original_unit
5185
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5186
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5187
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5188
+ }
5189
+ withdrawal_request_amount: amount {
5190
+ __typename
5191
+ currency_amount_original_value: original_value
5192
+ currency_amount_original_unit: original_unit
5193
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5194
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5195
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5196
+ }
5197
+ withdrawal_request_estimated_amount: estimated_amount {
5198
+ __typename
5199
+ currency_amount_original_value: original_value
5200
+ currency_amount_original_unit: original_unit
5201
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5202
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5203
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5204
+ }
5205
+ withdrawal_request_amount_withdrawn: amount_withdrawn {
5206
+ __typename
5207
+ currency_amount_original_value: original_value
5208
+ currency_amount_original_unit: original_unit
5209
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5210
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5211
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5212
+ }
5213
+ withdrawal_request_bitcoin_address: bitcoin_address
5214
+ withdrawal_request_withdrawal_mode: withdrawal_mode
5215
+ withdrawal_request_status: status
5216
+ withdrawal_request_completed_at: completed_at
5217
+ withdrawal_request_withdrawal: withdrawal {
5218
+ id
5219
+ }
5220
+ }`;
5221
+ var WithdrawalRequest_default = WithdrawalRequest;
5222
+
5223
+ // src/objects/WalletToWithdrawalRequestsConnection.ts
5224
+ var WalletToWithdrawalRequestsConnectionFromJson = (obj) => {
5225
+ return {
5226
+ count: obj["wallet_to_withdrawal_requests_connection_count"],
5227
+ pageInfo: PageInfoFromJson(
5228
+ obj["wallet_to_withdrawal_requests_connection_page_info"]
5229
+ ),
5230
+ entities: obj["wallet_to_withdrawal_requests_connection_entities"].map(
5231
+ (e) => WithdrawalRequestFromJson(e)
5232
+ ),
5233
+ typename: "WalletToWithdrawalRequestsConnection"
5234
+ };
5235
+ };
5236
+
5237
+ // src/objects/Wallet.ts
5238
+ var Wallet = class {
5239
+ constructor(id, createdAt, updatedAt, thirdPartyIdentifier, status, typename, lastLoginAt, balances, accountId) {
5240
+ this.id = id;
5241
+ this.createdAt = createdAt;
5242
+ this.updatedAt = updatedAt;
5243
+ this.thirdPartyIdentifier = thirdPartyIdentifier;
5244
+ this.status = status;
5245
+ this.typename = typename;
5246
+ this.lastLoginAt = lastLoginAt;
5247
+ this.balances = balances;
5248
+ this.accountId = accountId;
5249
+ (0, import_auto_bind10.default)(this);
5250
+ }
5251
+ async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
5252
+ return await client.executeRawQuery({
5253
+ queryPayload: `
5254
+ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: ID, $created_after_date: DateTime, $created_before_date: DateTime, $statuses: [TransactionStatus!], $types: [TransactionType!]) {
5255
+ entity(id: $entity_id) {
5256
+ ... on Wallet {
5257
+ transactions(, first: $first, after: $after, created_after_date: $created_after_date, created_before_date: $created_before_date, statuses: $statuses, types: $types) {
5258
+ __typename
5259
+ wallet_to_transactions_connection_count: count
5260
+ wallet_to_transactions_connection_page_info: page_info {
5261
+ __typename
5262
+ page_info_has_next_page: has_next_page
5263
+ page_info_has_previous_page: has_previous_page
5264
+ page_info_start_cursor: start_cursor
5265
+ page_info_end_cursor: end_cursor
5266
+ }
5267
+ wallet_to_transactions_connection_entities: entities {
5268
+ __typename
5269
+ ... on ChannelClosingTransaction {
5270
+ __typename
5271
+ channel_closing_transaction_id: id
5272
+ channel_closing_transaction_created_at: created_at
5273
+ channel_closing_transaction_updated_at: updated_at
5274
+ channel_closing_transaction_status: status
5275
+ channel_closing_transaction_resolved_at: resolved_at
5276
+ channel_closing_transaction_amount: amount {
4866
5277
  __typename
4867
5278
  currency_amount_original_value: original_value
4868
5279
  currency_amount_original_unit: original_unit
@@ -4870,8 +5281,8 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
4870
5281
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4871
5282
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4872
5283
  }
4873
- channel_opening_transaction_transaction_hash: transaction_hash
4874
- channel_opening_transaction_fees: fees {
5284
+ channel_closing_transaction_transaction_hash: transaction_hash
5285
+ channel_closing_transaction_fees: fees {
4875
5286
  __typename
4876
5287
  currency_amount_original_value: original_value
4877
5288
  currency_amount_original_unit: original_unit
@@ -4879,12 +5290,44 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
4879
5290
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4880
5291
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4881
5292
  }
4882
- channel_opening_transaction_block_hash: block_hash
4883
- channel_opening_transaction_block_height: block_height
4884
- channel_opening_transaction_destination_addresses: destination_addresses
4885
- channel_opening_transaction_num_confirmations: num_confirmations
4886
- channel_opening_transaction_channel: channel {
4887
- id
5293
+ channel_closing_transaction_block_hash: block_hash
5294
+ channel_closing_transaction_block_height: block_height
5295
+ channel_closing_transaction_destination_addresses: destination_addresses
5296
+ channel_closing_transaction_num_confirmations: num_confirmations
5297
+ channel_closing_transaction_channel: channel {
5298
+ id
5299
+ }
5300
+ }
5301
+ ... on ChannelOpeningTransaction {
5302
+ __typename
5303
+ channel_opening_transaction_id: id
5304
+ channel_opening_transaction_created_at: created_at
5305
+ channel_opening_transaction_updated_at: updated_at
5306
+ channel_opening_transaction_status: status
5307
+ channel_opening_transaction_resolved_at: resolved_at
5308
+ channel_opening_transaction_amount: amount {
5309
+ __typename
5310
+ currency_amount_original_value: original_value
5311
+ currency_amount_original_unit: original_unit
5312
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5313
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5314
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5315
+ }
5316
+ channel_opening_transaction_transaction_hash: transaction_hash
5317
+ channel_opening_transaction_fees: fees {
5318
+ __typename
5319
+ currency_amount_original_value: original_value
5320
+ currency_amount_original_unit: original_unit
5321
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5322
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5323
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5324
+ }
5325
+ channel_opening_transaction_block_hash: block_hash
5326
+ channel_opening_transaction_block_height: block_height
5327
+ channel_opening_transaction_destination_addresses: destination_addresses
5328
+ channel_opening_transaction_num_confirmations: num_confirmations
5329
+ channel_opening_transaction_channel: channel {
5330
+ id
4888
5331
  }
4889
5332
  }
4890
5333
  ... on Deposit {
@@ -5758,6 +6201,86 @@ query FetchWalletTotalAmountReceived($entity_id: ID!, $created_after_date: DateT
5758
6201
  }
5759
6202
  });
5760
6203
  }
6204
+ async getWithdrawalRequests(client, first = void 0, after = void 0, statuses = void 0, createdAfterDate = void 0, createdBeforeDate = void 0) {
6205
+ return await client.executeRawQuery({
6206
+ queryPayload: `
6207
+ query FetchWalletToWithdrawalRequestsConnection($entity_id: ID!, $first: Int, $after: ID, $statuses: [WithdrawalRequestStatus!], $created_after_date: DateTime, $created_before_date: DateTime) {
6208
+ entity(id: $entity_id) {
6209
+ ... on Wallet {
6210
+ withdrawal_requests(, first: $first, after: $after, statuses: $statuses, created_after_date: $created_after_date, created_before_date: $created_before_date) {
6211
+ __typename
6212
+ wallet_to_withdrawal_requests_connection_count: count
6213
+ wallet_to_withdrawal_requests_connection_page_info: page_info {
6214
+ __typename
6215
+ page_info_has_next_page: has_next_page
6216
+ page_info_has_previous_page: has_previous_page
6217
+ page_info_start_cursor: start_cursor
6218
+ page_info_end_cursor: end_cursor
6219
+ }
6220
+ wallet_to_withdrawal_requests_connection_entities: entities {
6221
+ __typename
6222
+ withdrawal_request_id: id
6223
+ withdrawal_request_created_at: created_at
6224
+ withdrawal_request_updated_at: updated_at
6225
+ withdrawal_request_requested_amount: requested_amount {
6226
+ __typename
6227
+ currency_amount_original_value: original_value
6228
+ currency_amount_original_unit: original_unit
6229
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6230
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6231
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6232
+ }
6233
+ withdrawal_request_amount: amount {
6234
+ __typename
6235
+ currency_amount_original_value: original_value
6236
+ currency_amount_original_unit: original_unit
6237
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6238
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6239
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6240
+ }
6241
+ withdrawal_request_estimated_amount: estimated_amount {
6242
+ __typename
6243
+ currency_amount_original_value: original_value
6244
+ currency_amount_original_unit: original_unit
6245
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6246
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6247
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6248
+ }
6249
+ withdrawal_request_amount_withdrawn: amount_withdrawn {
6250
+ __typename
6251
+ currency_amount_original_value: original_value
6252
+ currency_amount_original_unit: original_unit
6253
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6254
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6255
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6256
+ }
6257
+ withdrawal_request_bitcoin_address: bitcoin_address
6258
+ withdrawal_request_withdrawal_mode: withdrawal_mode
6259
+ withdrawal_request_status: status
6260
+ withdrawal_request_completed_at: completed_at
6261
+ withdrawal_request_withdrawal: withdrawal {
6262
+ id
6263
+ }
6264
+ }
6265
+ }
6266
+ }
6267
+ }
6268
+ }
6269
+ `,
6270
+ variables: {
6271
+ entity_id: this.id,
6272
+ first,
6273
+ after,
6274
+ statuses,
6275
+ created_after_date: createdAfterDate,
6276
+ created_before_date: createdBeforeDate
6277
+ },
6278
+ constructObject: (json) => {
6279
+ const connection = json["entity"]["withdrawal_requests"];
6280
+ return WalletToWithdrawalRequestsConnectionFromJson(connection);
6281
+ }
6282
+ });
6283
+ }
5761
6284
  async getTotalAmountSent(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
5762
6285
  return await client.executeRawQuery({
5763
6286
  queryPayload: `
@@ -5798,7 +6321,7 @@ query GetWallet($id: ID!) {
5798
6321
  }
5799
6322
  }
5800
6323
 
5801
- ${FRAGMENT15}
6324
+ ${FRAGMENT18}
5802
6325
  `,
5803
6326
  variables: { id },
5804
6327
  constructObject: (data) => WalletFromJson(data.entity)
@@ -5831,7 +6354,7 @@ var WalletFromJson = (obj) => {
5831
6354
  obj["wallet_account"]?.id ?? void 0
5832
6355
  );
5833
6356
  };
5834
- var FRAGMENT15 = `
6357
+ var FRAGMENT18 = `
5835
6358
  fragment WalletFragment on Wallet {
5836
6359
  __typename
5837
6360
  wallet_id: id
@@ -5885,6 +6408,20 @@ var AccountToWalletsConnectionFromJson = (obj) => {
5885
6408
  };
5886
6409
  };
5887
6410
 
6411
+ // src/objects/AccountToWithdrawalRequestsConnection.ts
6412
+ var AccountToWithdrawalRequestsConnectionFromJson = (obj) => {
6413
+ return {
6414
+ count: obj["account_to_withdrawal_requests_connection_count"],
6415
+ pageInfo: PageInfoFromJson(
6416
+ obj["account_to_withdrawal_requests_connection_page_info"]
6417
+ ),
6418
+ entities: obj["account_to_withdrawal_requests_connection_entities"].map(
6419
+ (e) => WithdrawalRequestFromJson(e)
6420
+ ),
6421
+ typename: "AccountToWithdrawalRequestsConnection"
6422
+ };
6423
+ };
6424
+
5888
6425
  // src/objects/Account.ts
5889
6426
  var Account = class {
5890
6427
  constructor(id, createdAt, updatedAt, typename, name) {
@@ -5893,7 +6430,7 @@ var Account = class {
5893
6430
  this.updatedAt = updatedAt;
5894
6431
  this.typename = typename;
5895
6432
  this.name = name;
5896
- (0, import_auto_bind10.default)(this);
6433
+ (0, import_auto_bind11.default)(this);
5897
6434
  }
5898
6435
  async getApiTokens(client, first = void 0, after = void 0) {
5899
6436
  return await client.executeRawQuery({
@@ -7458,6 +7995,87 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
7458
7995
  }
7459
7996
  });
7460
7997
  }
7998
+ async getWithdrawalRequests(client, first = void 0, after = void 0, bitcoinNetworks = void 0, statuses = void 0, nodeIds = void 0, afterDate = void 0, beforeDate = void 0) {
7999
+ return await client.executeRawQuery({
8000
+ queryPayload: `
8001
+ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $bitcoin_networks: [BitcoinNetwork!], $statuses: [WithdrawalRequestStatus!], $node_ids: [ID!], $after_date: DateTime, $before_date: DateTime) {
8002
+ current_account {
8003
+ ... on Account {
8004
+ withdrawal_requests(, first: $first, after: $after, bitcoin_networks: $bitcoin_networks, statuses: $statuses, node_ids: $node_ids, after_date: $after_date, before_date: $before_date) {
8005
+ __typename
8006
+ account_to_withdrawal_requests_connection_count: count
8007
+ account_to_withdrawal_requests_connection_page_info: page_info {
8008
+ __typename
8009
+ page_info_has_next_page: has_next_page
8010
+ page_info_has_previous_page: has_previous_page
8011
+ page_info_start_cursor: start_cursor
8012
+ page_info_end_cursor: end_cursor
8013
+ }
8014
+ account_to_withdrawal_requests_connection_entities: entities {
8015
+ __typename
8016
+ withdrawal_request_id: id
8017
+ withdrawal_request_created_at: created_at
8018
+ withdrawal_request_updated_at: updated_at
8019
+ withdrawal_request_requested_amount: requested_amount {
8020
+ __typename
8021
+ currency_amount_original_value: original_value
8022
+ currency_amount_original_unit: original_unit
8023
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8024
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8025
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8026
+ }
8027
+ withdrawal_request_amount: amount {
8028
+ __typename
8029
+ currency_amount_original_value: original_value
8030
+ currency_amount_original_unit: original_unit
8031
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8032
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8033
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8034
+ }
8035
+ withdrawal_request_estimated_amount: estimated_amount {
8036
+ __typename
8037
+ currency_amount_original_value: original_value
8038
+ currency_amount_original_unit: original_unit
8039
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8040
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8041
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8042
+ }
8043
+ withdrawal_request_amount_withdrawn: amount_withdrawn {
8044
+ __typename
8045
+ currency_amount_original_value: original_value
8046
+ currency_amount_original_unit: original_unit
8047
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8048
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8049
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8050
+ }
8051
+ withdrawal_request_bitcoin_address: bitcoin_address
8052
+ withdrawal_request_withdrawal_mode: withdrawal_mode
8053
+ withdrawal_request_status: status
8054
+ withdrawal_request_completed_at: completed_at
8055
+ withdrawal_request_withdrawal: withdrawal {
8056
+ id
8057
+ }
8058
+ }
8059
+ }
8060
+ }
8061
+ }
8062
+ }
8063
+ `,
8064
+ variables: {
8065
+ first,
8066
+ after,
8067
+ bitcoin_networks: bitcoinNetworks,
8068
+ statuses,
8069
+ node_ids: nodeIds,
8070
+ after_date: afterDate,
8071
+ before_date: beforeDate
8072
+ },
8073
+ constructObject: (json) => {
8074
+ const connection = json["current_account"]["withdrawal_requests"];
8075
+ return AccountToWithdrawalRequestsConnectionFromJson(connection);
8076
+ }
8077
+ });
8078
+ }
7461
8079
  async getWallets(client, first = void 0, after = void 0, thirdPartyIds = void 0) {
7462
8080
  return await client.executeRawQuery({
7463
8081
  queryPayload: `
@@ -7536,7 +8154,7 @@ query GetAccount {
7536
8154
  }
7537
8155
  }
7538
8156
 
7539
- ${FRAGMENT16}
8157
+ ${FRAGMENT19}
7540
8158
  `,
7541
8159
  variables: {},
7542
8160
  constructObject: (data) => AccountFromJson(data.current_account)
@@ -7561,7 +8179,7 @@ var AccountFromJson = (obj) => {
7561
8179
  obj["account_name"]
7562
8180
  );
7563
8181
  };
7564
- var FRAGMENT16 = `
8182
+ var FRAGMENT19 = `
7565
8183
  fragment AccountFragment on Account {
7566
8184
  __typename
7567
8185
  account_id: id
@@ -7571,146 +8189,6 @@ fragment AccountFragment on Account {
7571
8189
  }`;
7572
8190
  var Account_default = Account;
7573
8191
 
7574
- // src/objects/ChannelClosingTransaction.ts
7575
- var ChannelClosingTransactionFromJson = (obj) => {
7576
- return {
7577
- id: obj["channel_closing_transaction_id"],
7578
- createdAt: obj["channel_closing_transaction_created_at"],
7579
- updatedAt: obj["channel_closing_transaction_updated_at"],
7580
- status: TransactionStatus_default[obj["channel_closing_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
7581
- amount: CurrencyAmountFromJson(obj["channel_closing_transaction_amount"]),
7582
- blockHeight: obj["channel_closing_transaction_block_height"],
7583
- destinationAddresses: obj["channel_closing_transaction_destination_addresses"],
7584
- typename: "ChannelClosingTransaction",
7585
- resolvedAt: obj["channel_closing_transaction_resolved_at"],
7586
- transactionHash: obj["channel_closing_transaction_transaction_hash"],
7587
- fees: !!obj["channel_closing_transaction_fees"] ? CurrencyAmountFromJson(obj["channel_closing_transaction_fees"]) : void 0,
7588
- blockHash: obj["channel_closing_transaction_block_hash"],
7589
- numConfirmations: obj["channel_closing_transaction_num_confirmations"],
7590
- channelId: obj["channel_closing_transaction_channel"]?.id ?? void 0
7591
- };
7592
- };
7593
- var FRAGMENT17 = `
7594
- fragment ChannelClosingTransactionFragment on ChannelClosingTransaction {
7595
- __typename
7596
- channel_closing_transaction_id: id
7597
- channel_closing_transaction_created_at: created_at
7598
- channel_closing_transaction_updated_at: updated_at
7599
- channel_closing_transaction_status: status
7600
- channel_closing_transaction_resolved_at: resolved_at
7601
- channel_closing_transaction_amount: amount {
7602
- __typename
7603
- currency_amount_original_value: original_value
7604
- currency_amount_original_unit: original_unit
7605
- currency_amount_preferred_currency_unit: preferred_currency_unit
7606
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7607
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7608
- }
7609
- channel_closing_transaction_transaction_hash: transaction_hash
7610
- channel_closing_transaction_fees: fees {
7611
- __typename
7612
- currency_amount_original_value: original_value
7613
- currency_amount_original_unit: original_unit
7614
- currency_amount_preferred_currency_unit: preferred_currency_unit
7615
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7616
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7617
- }
7618
- channel_closing_transaction_block_hash: block_hash
7619
- channel_closing_transaction_block_height: block_height
7620
- channel_closing_transaction_destination_addresses: destination_addresses
7621
- channel_closing_transaction_num_confirmations: num_confirmations
7622
- channel_closing_transaction_channel: channel {
7623
- id
7624
- }
7625
- }`;
7626
- var getChannelClosingTransactionQuery = (id) => {
7627
- return {
7628
- queryPayload: `
7629
- query GetChannelClosingTransaction($id: ID!) {
7630
- entity(id: $id) {
7631
- ... on ChannelClosingTransaction {
7632
- ...ChannelClosingTransactionFragment
7633
- }
7634
- }
7635
- }
7636
-
7637
- ${FRAGMENT17}
7638
- `,
7639
- variables: { id },
7640
- constructObject: (data) => ChannelClosingTransactionFromJson(data.entity)
7641
- };
7642
- };
7643
-
7644
- // src/objects/ChannelOpeningTransaction.ts
7645
- var ChannelOpeningTransactionFromJson = (obj) => {
7646
- return {
7647
- id: obj["channel_opening_transaction_id"],
7648
- createdAt: obj["channel_opening_transaction_created_at"],
7649
- updatedAt: obj["channel_opening_transaction_updated_at"],
7650
- status: TransactionStatus_default[obj["channel_opening_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
7651
- amount: CurrencyAmountFromJson(obj["channel_opening_transaction_amount"]),
7652
- blockHeight: obj["channel_opening_transaction_block_height"],
7653
- destinationAddresses: obj["channel_opening_transaction_destination_addresses"],
7654
- typename: "ChannelOpeningTransaction",
7655
- resolvedAt: obj["channel_opening_transaction_resolved_at"],
7656
- transactionHash: obj["channel_opening_transaction_transaction_hash"],
7657
- fees: !!obj["channel_opening_transaction_fees"] ? CurrencyAmountFromJson(obj["channel_opening_transaction_fees"]) : void 0,
7658
- blockHash: obj["channel_opening_transaction_block_hash"],
7659
- numConfirmations: obj["channel_opening_transaction_num_confirmations"],
7660
- channelId: obj["channel_opening_transaction_channel"]?.id ?? void 0
7661
- };
7662
- };
7663
- var FRAGMENT18 = `
7664
- fragment ChannelOpeningTransactionFragment on ChannelOpeningTransaction {
7665
- __typename
7666
- channel_opening_transaction_id: id
7667
- channel_opening_transaction_created_at: created_at
7668
- channel_opening_transaction_updated_at: updated_at
7669
- channel_opening_transaction_status: status
7670
- channel_opening_transaction_resolved_at: resolved_at
7671
- channel_opening_transaction_amount: amount {
7672
- __typename
7673
- currency_amount_original_value: original_value
7674
- currency_amount_original_unit: original_unit
7675
- currency_amount_preferred_currency_unit: preferred_currency_unit
7676
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7677
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7678
- }
7679
- channel_opening_transaction_transaction_hash: transaction_hash
7680
- channel_opening_transaction_fees: fees {
7681
- __typename
7682
- currency_amount_original_value: original_value
7683
- currency_amount_original_unit: original_unit
7684
- currency_amount_preferred_currency_unit: preferred_currency_unit
7685
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7686
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7687
- }
7688
- channel_opening_transaction_block_hash: block_hash
7689
- channel_opening_transaction_block_height: block_height
7690
- channel_opening_transaction_destination_addresses: destination_addresses
7691
- channel_opening_transaction_num_confirmations: num_confirmations
7692
- channel_opening_transaction_channel: channel {
7693
- id
7694
- }
7695
- }`;
7696
- var getChannelOpeningTransactionQuery = (id) => {
7697
- return {
7698
- queryPayload: `
7699
- query GetChannelOpeningTransaction($id: ID!) {
7700
- entity(id: $id) {
7701
- ... on ChannelOpeningTransaction {
7702
- ...ChannelOpeningTransactionFragment
7703
- }
7704
- }
7705
- }
7706
-
7707
- ${FRAGMENT18}
7708
- `,
7709
- variables: { id },
7710
- constructObject: (data) => ChannelOpeningTransactionFromJson(data.entity)
7711
- };
7712
- };
7713
-
7714
8192
  // src/objects/RegionCode.ts
7715
8193
  var RegionCode = /* @__PURE__ */ ((RegionCode2) => {
7716
8194
  RegionCode2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -8013,7 +8491,7 @@ var SignablePayloadFromJson = (obj) => {
8013
8491
  mulTweak: obj["signable_payload_mul_tweak"]
8014
8492
  };
8015
8493
  };
8016
- var FRAGMENT19 = `
8494
+ var FRAGMENT20 = `
8017
8495
  fragment SignablePayloadFragment on SignablePayload {
8018
8496
  __typename
8019
8497
  signable_payload_id: id
@@ -8039,7 +8517,7 @@ query GetSignablePayload($id: ID!) {
8039
8517
  }
8040
8518
  }
8041
8519
 
8042
- ${FRAGMENT19}
8520
+ ${FRAGMENT20}
8043
8521
  `,
8044
8522
  variables: { id },
8045
8523
  constructObject: (data) => SignablePayloadFromJson(data.entity)
@@ -8065,7 +8543,7 @@ var DepositFromJson = (obj) => {
8065
8543
  numConfirmations: obj["deposit_num_confirmations"]
8066
8544
  };
8067
8545
  };
8068
- var FRAGMENT20 = `
8546
+ var FRAGMENT21 = `
8069
8547
  fragment DepositFragment on Deposit {
8070
8548
  __typename
8071
8549
  deposit_id: id
@@ -8109,7 +8587,7 @@ query GetDeposit($id: ID!) {
8109
8587
  }
8110
8588
  }
8111
8589
 
8112
- ${FRAGMENT20}
8590
+ ${FRAGMENT21}
8113
8591
  `,
8114
8592
  variables: { id },
8115
8593
  constructObject: (data) => DepositFromJson(data.entity)
@@ -8151,7 +8629,7 @@ var InvoiceFromJson = (obj) => {
8151
8629
  amountPaid: !!obj["invoice_amount_paid"] ? CurrencyAmountFromJson(obj["invoice_amount_paid"]) : void 0
8152
8630
  };
8153
8631
  };
8154
- var FRAGMENT21 = `
8632
+ var FRAGMENT22 = `
8155
8633
  fragment InvoiceFragment on Invoice {
8156
8634
  __typename
8157
8635
  invoice_id: id
@@ -8469,7 +8947,7 @@ query GetInvoice($id: ID!) {
8469
8947
  }
8470
8948
  }
8471
8949
 
8472
- ${FRAGMENT21}
8950
+ ${FRAGMENT22}
8473
8951
  `,
8474
8952
  variables: { id },
8475
8953
  constructObject: (data) => InvoiceFromJson(data.entity)
@@ -8542,7 +9020,7 @@ var LightningTransactionFromJson = (obj) => {
8542
9020
  `Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
8543
9021
  );
8544
9022
  };
8545
- var FRAGMENT22 = `
9023
+ var FRAGMENT23 = `
8546
9024
  fragment LightningTransactionFragment on LightningTransaction {
8547
9025
  __typename
8548
9026
  ... on IncomingPayment {
@@ -8863,983 +9341,701 @@ fragment LightningTransactionFragment on LightningTransaction {
8863
9341
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8864
9342
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8865
9343
  }
8866
- blockchain_balance_available_balance: available_balance {
8867
- __typename
8868
- currency_amount_original_value: original_value
8869
- currency_amount_original_unit: original_unit
8870
- currency_amount_preferred_currency_unit: preferred_currency_unit
8871
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8872
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8873
- }
8874
- }
8875
- lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
8876
- lightspark_node_with_remote_signing_balances: balances {
8877
- __typename
8878
- balances_owned_balance: owned_balance {
8879
- __typename
8880
- currency_amount_original_value: original_value
8881
- currency_amount_original_unit: original_unit
8882
- currency_amount_preferred_currency_unit: preferred_currency_unit
8883
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8884
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8885
- }
8886
- balances_available_to_send_balance: available_to_send_balance {
8887
- __typename
8888
- currency_amount_original_value: original_value
8889
- currency_amount_original_unit: original_unit
8890
- currency_amount_preferred_currency_unit: preferred_currency_unit
8891
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8892
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8893
- }
8894
- balances_available_to_withdraw_balance: available_to_withdraw_balance {
8895
- __typename
8896
- currency_amount_original_value: original_value
8897
- currency_amount_original_unit: original_unit
8898
- currency_amount_preferred_currency_unit: preferred_currency_unit
8899
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8900
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8901
- }
8902
- }
8903
- }
8904
- }
8905
- }
8906
- }
8907
- outgoing_payment_failure_reason: failure_reason
8908
- outgoing_payment_failure_message: failure_message {
8909
- __typename
8910
- rich_text_text: text
8911
- }
8912
- outgoing_payment_uma_post_transaction_data: uma_post_transaction_data {
8913
- __typename
8914
- post_transaction_data_utxo: utxo
8915
- post_transaction_data_amount: amount {
8916
- __typename
8917
- currency_amount_original_value: original_value
8918
- currency_amount_original_unit: original_unit
8919
- currency_amount_preferred_currency_unit: preferred_currency_unit
8920
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8921
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8922
- }
8923
- }
8924
- outgoing_payment_payment_preimage: payment_preimage
8925
- }
8926
- ... on RoutingTransaction {
8927
- __typename
8928
- routing_transaction_id: id
8929
- routing_transaction_created_at: created_at
8930
- routing_transaction_updated_at: updated_at
8931
- routing_transaction_status: status
8932
- routing_transaction_resolved_at: resolved_at
8933
- routing_transaction_amount: amount {
8934
- __typename
8935
- currency_amount_original_value: original_value
8936
- currency_amount_original_unit: original_unit
8937
- currency_amount_preferred_currency_unit: preferred_currency_unit
8938
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8939
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8940
- }
8941
- routing_transaction_transaction_hash: transaction_hash
8942
- routing_transaction_incoming_channel: incoming_channel {
8943
- id
8944
- }
8945
- routing_transaction_outgoing_channel: outgoing_channel {
8946
- id
8947
- }
8948
- routing_transaction_fees: fees {
8949
- __typename
8950
- currency_amount_original_value: original_value
8951
- currency_amount_original_unit: original_unit
8952
- currency_amount_preferred_currency_unit: preferred_currency_unit
8953
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8954
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8955
- }
8956
- routing_transaction_failure_message: failure_message {
8957
- __typename
8958
- rich_text_text: text
8959
- }
8960
- routing_transaction_failure_reason: failure_reason
8961
- }
8962
- }`;
8963
- var getLightningTransactionQuery = (id) => {
8964
- return {
8965
- queryPayload: `
8966
- query GetLightningTransaction($id: ID!) {
8967
- entity(id: $id) {
8968
- ... on LightningTransaction {
8969
- ...LightningTransactionFragment
8970
- }
8971
- }
8972
- }
8973
-
8974
- ${FRAGMENT22}
8975
- `,
8976
- variables: { id },
8977
- constructObject: (data) => LightningTransactionFromJson(data.entity)
8978
- };
8979
- };
8980
-
8981
- // src/objects/LightsparkNodeOwner.ts
8982
- var import_core8 = require("@lightsparkdev/core");
8983
- var LightsparkNodeOwnerFromJson = (obj) => {
8984
- if (obj["__typename"] == "Account") {
8985
- return new Account_default(
8986
- obj["account_id"],
8987
- obj["account_created_at"],
8988
- obj["account_updated_at"],
8989
- "Account",
8990
- obj["account_name"]
8991
- );
8992
- }
8993
- if (obj["__typename"] == "Wallet") {
8994
- return new Wallet_default(
8995
- obj["wallet_id"],
8996
- obj["wallet_created_at"],
8997
- obj["wallet_updated_at"],
8998
- obj["wallet_third_party_identifier"],
8999
- WalletStatus_default[obj["wallet_status"]] ?? WalletStatus_default.FUTURE_VALUE,
9000
- "Wallet",
9001
- obj["wallet_last_login_at"],
9002
- !!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0,
9003
- obj["wallet_account"]?.id ?? void 0
9004
- );
9005
- }
9006
- throw new import_core8.LightsparkException(
9007
- "DeserializationError",
9008
- `Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
9009
- );
9010
- };
9011
- var FRAGMENT23 = `
9012
- fragment LightsparkNodeOwnerFragment on LightsparkNodeOwner {
9013
- __typename
9014
- ... on Account {
9015
- __typename
9016
- account_id: id
9017
- account_created_at: created_at
9018
- account_updated_at: updated_at
9019
- account_name: name
9020
- }
9021
- ... on Wallet {
9022
- __typename
9023
- wallet_id: id
9024
- wallet_created_at: created_at
9025
- wallet_updated_at: updated_at
9026
- wallet_last_login_at: last_login_at
9027
- wallet_balances: balances {
9028
- __typename
9029
- balances_owned_balance: owned_balance {
9030
- __typename
9031
- currency_amount_original_value: original_value
9032
- currency_amount_original_unit: original_unit
9033
- currency_amount_preferred_currency_unit: preferred_currency_unit
9034
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9035
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9036
- }
9037
- balances_available_to_send_balance: available_to_send_balance {
9038
- __typename
9039
- currency_amount_original_value: original_value
9040
- currency_amount_original_unit: original_unit
9041
- currency_amount_preferred_currency_unit: preferred_currency_unit
9042
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9043
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9044
- }
9045
- balances_available_to_withdraw_balance: available_to_withdraw_balance {
9046
- __typename
9047
- currency_amount_original_value: original_value
9048
- currency_amount_original_unit: original_unit
9049
- currency_amount_preferred_currency_unit: preferred_currency_unit
9050
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9051
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9052
- }
9053
- }
9054
- wallet_third_party_identifier: third_party_identifier
9055
- wallet_account: account {
9056
- id
9057
- }
9058
- wallet_status: status
9059
- }
9060
- }`;
9061
- var getLightsparkNodeOwnerQuery = (id) => {
9062
- return {
9063
- queryPayload: `
9064
- query GetLightsparkNodeOwner($id: ID!) {
9065
- entity(id: $id) {
9066
- ... on LightsparkNodeOwner {
9067
- ...LightsparkNodeOwnerFragment
9068
- }
9069
- }
9070
- }
9071
-
9072
- ${FRAGMENT23}
9073
- `,
9074
- variables: { id },
9075
- constructObject: (data) => LightsparkNodeOwnerFromJson(data.entity)
9076
- };
9077
- };
9078
-
9079
- // src/objects/OnChainTransaction.ts
9080
- var import_core9 = require("@lightsparkdev/core");
9081
- var OnChainTransactionFromJson = (obj) => {
9082
- if (obj["__typename"] == "ChannelClosingTransaction") {
9083
- return {
9084
- id: obj["channel_closing_transaction_id"],
9085
- createdAt: obj["channel_closing_transaction_created_at"],
9086
- updatedAt: obj["channel_closing_transaction_updated_at"],
9087
- status: TransactionStatus_default[obj["channel_closing_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9088
- amount: CurrencyAmountFromJson(obj["channel_closing_transaction_amount"]),
9089
- blockHeight: obj["channel_closing_transaction_block_height"],
9090
- destinationAddresses: obj["channel_closing_transaction_destination_addresses"],
9091
- typename: "ChannelClosingTransaction",
9092
- resolvedAt: obj["channel_closing_transaction_resolved_at"],
9093
- transactionHash: obj["channel_closing_transaction_transaction_hash"],
9094
- fees: !!obj["channel_closing_transaction_fees"] ? CurrencyAmountFromJson(obj["channel_closing_transaction_fees"]) : void 0,
9095
- blockHash: obj["channel_closing_transaction_block_hash"],
9096
- numConfirmations: obj["channel_closing_transaction_num_confirmations"],
9097
- channelId: obj["channel_closing_transaction_channel"]?.id ?? void 0
9098
- };
9099
- }
9100
- if (obj["__typename"] == "ChannelOpeningTransaction") {
9101
- return {
9102
- id: obj["channel_opening_transaction_id"],
9103
- createdAt: obj["channel_opening_transaction_created_at"],
9104
- updatedAt: obj["channel_opening_transaction_updated_at"],
9105
- status: TransactionStatus_default[obj["channel_opening_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9106
- amount: CurrencyAmountFromJson(obj["channel_opening_transaction_amount"]),
9107
- blockHeight: obj["channel_opening_transaction_block_height"],
9108
- destinationAddresses: obj["channel_opening_transaction_destination_addresses"],
9109
- typename: "ChannelOpeningTransaction",
9110
- resolvedAt: obj["channel_opening_transaction_resolved_at"],
9111
- transactionHash: obj["channel_opening_transaction_transaction_hash"],
9112
- fees: !!obj["channel_opening_transaction_fees"] ? CurrencyAmountFromJson(obj["channel_opening_transaction_fees"]) : void 0,
9113
- blockHash: obj["channel_opening_transaction_block_hash"],
9114
- numConfirmations: obj["channel_opening_transaction_num_confirmations"],
9115
- channelId: obj["channel_opening_transaction_channel"]?.id ?? void 0
9116
- };
9117
- }
9118
- if (obj["__typename"] == "Deposit") {
9119
- return {
9120
- id: obj["deposit_id"],
9121
- createdAt: obj["deposit_created_at"],
9122
- updatedAt: obj["deposit_updated_at"],
9123
- status: TransactionStatus_default[obj["deposit_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9124
- amount: CurrencyAmountFromJson(obj["deposit_amount"]),
9125
- blockHeight: obj["deposit_block_height"],
9126
- destinationAddresses: obj["deposit_destination_addresses"],
9127
- destinationId: obj["deposit_destination"].id,
9128
- typename: "Deposit",
9129
- resolvedAt: obj["deposit_resolved_at"],
9130
- transactionHash: obj["deposit_transaction_hash"],
9131
- fees: !!obj["deposit_fees"] ? CurrencyAmountFromJson(obj["deposit_fees"]) : void 0,
9132
- blockHash: obj["deposit_block_hash"],
9133
- numConfirmations: obj["deposit_num_confirmations"]
9134
- };
9135
- }
9136
- if (obj["__typename"] == "Withdrawal") {
9137
- return {
9138
- id: obj["withdrawal_id"],
9139
- createdAt: obj["withdrawal_created_at"],
9140
- updatedAt: obj["withdrawal_updated_at"],
9141
- status: TransactionStatus_default[obj["withdrawal_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9142
- amount: CurrencyAmountFromJson(obj["withdrawal_amount"]),
9143
- blockHeight: obj["withdrawal_block_height"],
9144
- destinationAddresses: obj["withdrawal_destination_addresses"],
9145
- originId: obj["withdrawal_origin"].id,
9146
- typename: "Withdrawal",
9147
- resolvedAt: obj["withdrawal_resolved_at"],
9148
- transactionHash: obj["withdrawal_transaction_hash"],
9149
- fees: !!obj["withdrawal_fees"] ? CurrencyAmountFromJson(obj["withdrawal_fees"]) : void 0,
9150
- blockHash: obj["withdrawal_block_hash"],
9151
- numConfirmations: obj["withdrawal_num_confirmations"]
9152
- };
9153
- }
9154
- throw new import_core9.LightsparkException(
9155
- "DeserializationError",
9156
- `Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
9157
- );
9158
- };
9159
- var FRAGMENT24 = `
9160
- fragment OnChainTransactionFragment on OnChainTransaction {
9161
- __typename
9162
- ... on ChannelClosingTransaction {
9163
- __typename
9164
- channel_closing_transaction_id: id
9165
- channel_closing_transaction_created_at: created_at
9166
- channel_closing_transaction_updated_at: updated_at
9167
- channel_closing_transaction_status: status
9168
- channel_closing_transaction_resolved_at: resolved_at
9169
- channel_closing_transaction_amount: amount {
9170
- __typename
9171
- currency_amount_original_value: original_value
9172
- currency_amount_original_unit: original_unit
9173
- currency_amount_preferred_currency_unit: preferred_currency_unit
9174
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9175
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9176
- }
9177
- channel_closing_transaction_transaction_hash: transaction_hash
9178
- channel_closing_transaction_fees: fees {
9179
- __typename
9180
- currency_amount_original_value: original_value
9181
- currency_amount_original_unit: original_unit
9182
- currency_amount_preferred_currency_unit: preferred_currency_unit
9183
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9184
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9185
- }
9186
- channel_closing_transaction_block_hash: block_hash
9187
- channel_closing_transaction_block_height: block_height
9188
- channel_closing_transaction_destination_addresses: destination_addresses
9189
- channel_closing_transaction_num_confirmations: num_confirmations
9190
- channel_closing_transaction_channel: channel {
9191
- id
9192
- }
9193
- }
9194
- ... on ChannelOpeningTransaction {
9195
- __typename
9196
- channel_opening_transaction_id: id
9197
- channel_opening_transaction_created_at: created_at
9198
- channel_opening_transaction_updated_at: updated_at
9199
- channel_opening_transaction_status: status
9200
- channel_opening_transaction_resolved_at: resolved_at
9201
- channel_opening_transaction_amount: amount {
9202
- __typename
9203
- currency_amount_original_value: original_value
9204
- currency_amount_original_unit: original_unit
9205
- currency_amount_preferred_currency_unit: preferred_currency_unit
9206
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9207
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9208
- }
9209
- channel_opening_transaction_transaction_hash: transaction_hash
9210
- channel_opening_transaction_fees: fees {
9211
- __typename
9212
- currency_amount_original_value: original_value
9213
- currency_amount_original_unit: original_unit
9214
- currency_amount_preferred_currency_unit: preferred_currency_unit
9215
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9216
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9217
- }
9218
- channel_opening_transaction_block_hash: block_hash
9219
- channel_opening_transaction_block_height: block_height
9220
- channel_opening_transaction_destination_addresses: destination_addresses
9221
- channel_opening_transaction_num_confirmations: num_confirmations
9222
- channel_opening_transaction_channel: channel {
9223
- id
9224
- }
9225
- }
9226
- ... on Deposit {
9227
- __typename
9228
- deposit_id: id
9229
- deposit_created_at: created_at
9230
- deposit_updated_at: updated_at
9231
- deposit_status: status
9232
- deposit_resolved_at: resolved_at
9233
- deposit_amount: amount {
9234
- __typename
9235
- currency_amount_original_value: original_value
9236
- currency_amount_original_unit: original_unit
9237
- currency_amount_preferred_currency_unit: preferred_currency_unit
9238
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9239
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9240
- }
9241
- deposit_transaction_hash: transaction_hash
9242
- deposit_fees: fees {
9243
- __typename
9244
- currency_amount_original_value: original_value
9245
- currency_amount_original_unit: original_unit
9246
- currency_amount_preferred_currency_unit: preferred_currency_unit
9247
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9248
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9249
- }
9250
- deposit_block_hash: block_hash
9251
- deposit_block_height: block_height
9252
- deposit_destination_addresses: destination_addresses
9253
- deposit_num_confirmations: num_confirmations
9254
- deposit_destination: destination {
9255
- id
9256
- }
9257
- }
9258
- ... on Withdrawal {
9259
- __typename
9260
- withdrawal_id: id
9261
- withdrawal_created_at: created_at
9262
- withdrawal_updated_at: updated_at
9263
- withdrawal_status: status
9264
- withdrawal_resolved_at: resolved_at
9265
- withdrawal_amount: amount {
9266
- __typename
9267
- currency_amount_original_value: original_value
9268
- currency_amount_original_unit: original_unit
9269
- currency_amount_preferred_currency_unit: preferred_currency_unit
9270
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9271
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9272
- }
9273
- withdrawal_transaction_hash: transaction_hash
9274
- withdrawal_fees: fees {
9275
- __typename
9276
- currency_amount_original_value: original_value
9277
- currency_amount_original_unit: original_unit
9278
- currency_amount_preferred_currency_unit: preferred_currency_unit
9279
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9280
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9281
- }
9282
- withdrawal_block_hash: block_hash
9283
- withdrawal_block_height: block_height
9284
- withdrawal_destination_addresses: destination_addresses
9285
- withdrawal_num_confirmations: num_confirmations
9286
- withdrawal_origin: origin {
9287
- id
9288
- }
9289
- }
9290
- }`;
9291
- var getOnChainTransactionQuery = (id) => {
9292
- return {
9293
- queryPayload: `
9294
- query GetOnChainTransaction($id: ID!) {
9295
- entity(id: $id) {
9296
- ... on OnChainTransaction {
9297
- ...OnChainTransactionFragment
9298
- }
9299
- }
9300
- }
9301
-
9302
- ${FRAGMENT24}
9303
- `,
9304
- variables: { id },
9305
- constructObject: (data) => OnChainTransactionFromJson(data.entity)
9306
- };
9307
- };
9308
-
9309
- // src/objects/PaymentDirection.ts
9310
- var PaymentDirection = /* @__PURE__ */ ((PaymentDirection2) => {
9311
- PaymentDirection2["FUTURE_VALUE"] = "FUTURE_VALUE";
9312
- PaymentDirection2["SENT"] = "SENT";
9313
- PaymentDirection2["RECEIVED"] = "RECEIVED";
9314
- return PaymentDirection2;
9315
- })(PaymentDirection || {});
9316
- var PaymentDirection_default = PaymentDirection;
9317
-
9318
- // src/objects/RemoteSigningSubEventType.ts
9319
- var RemoteSigningSubEventType = /* @__PURE__ */ ((RemoteSigningSubEventType2) => {
9320
- RemoteSigningSubEventType2["FUTURE_VALUE"] = "FUTURE_VALUE";
9321
- RemoteSigningSubEventType2["ECDH"] = "ECDH";
9322
- RemoteSigningSubEventType2["GET_PER_COMMITMENT_POINT"] = "GET_PER_COMMITMENT_POINT";
9323
- RemoteSigningSubEventType2["RELEASE_PER_COMMITMENT_SECRET"] = "RELEASE_PER_COMMITMENT_SECRET";
9324
- RemoteSigningSubEventType2["SIGN_INVOICE"] = "SIGN_INVOICE";
9325
- RemoteSigningSubEventType2["DERIVE_KEY_AND_SIGN"] = "DERIVE_KEY_AND_SIGN";
9326
- RemoteSigningSubEventType2["RELEASE_PAYMENT_PREIMAGE"] = "RELEASE_PAYMENT_PREIMAGE";
9327
- RemoteSigningSubEventType2["REQUEST_INVOICE_PAYMENT_HASH"] = "REQUEST_INVOICE_PAYMENT_HASH";
9328
- RemoteSigningSubEventType2["REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET"] = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET";
9329
- return RemoteSigningSubEventType2;
9330
- })(RemoteSigningSubEventType || {});
9331
- var RemoteSigningSubEventType_default = RemoteSigningSubEventType;
9332
-
9333
- // src/objects/WithdrawalMode.ts
9334
- var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
9335
- WithdrawalMode2["FUTURE_VALUE"] = "FUTURE_VALUE";
9336
- WithdrawalMode2["WALLET_ONLY"] = "WALLET_ONLY";
9337
- WithdrawalMode2["WALLET_THEN_CHANNELS"] = "WALLET_THEN_CHANNELS";
9338
- return WithdrawalMode2;
9339
- })(WithdrawalMode || {});
9340
- var WithdrawalMode_default = WithdrawalMode;
9341
-
9342
- // src/objects/RiskRating.ts
9343
- var RiskRating = /* @__PURE__ */ ((RiskRating2) => {
9344
- RiskRating2["FUTURE_VALUE"] = "FUTURE_VALUE";
9345
- RiskRating2["HIGH_RISK"] = "HIGH_RISK";
9346
- RiskRating2["LOW_RISK"] = "LOW_RISK";
9347
- RiskRating2["UNKNOWN"] = "UNKNOWN";
9348
- return RiskRating2;
9349
- })(RiskRating || {});
9350
- var RiskRating_default = RiskRating;
9351
-
9352
- // src/objects/RoutingTransaction.ts
9353
- var RoutingTransactionFromJson = (obj) => {
9354
- return {
9355
- id: obj["routing_transaction_id"],
9356
- createdAt: obj["routing_transaction_created_at"],
9357
- updatedAt: obj["routing_transaction_updated_at"],
9358
- status: TransactionStatus_default[obj["routing_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9359
- amount: CurrencyAmountFromJson(obj["routing_transaction_amount"]),
9360
- typename: "RoutingTransaction",
9361
- resolvedAt: obj["routing_transaction_resolved_at"],
9362
- transactionHash: obj["routing_transaction_transaction_hash"],
9363
- incomingChannelId: obj["routing_transaction_incoming_channel"]?.id ?? void 0,
9364
- outgoingChannelId: obj["routing_transaction_outgoing_channel"]?.id ?? void 0,
9365
- fees: !!obj["routing_transaction_fees"] ? CurrencyAmountFromJson(obj["routing_transaction_fees"]) : void 0,
9366
- failureMessage: !!obj["routing_transaction_failure_message"] ? RichTextFromJson(obj["routing_transaction_failure_message"]) : void 0,
9367
- failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
9368
- };
9369
- };
9370
- var FRAGMENT25 = `
9371
- fragment RoutingTransactionFragment on RoutingTransaction {
9372
- __typename
9373
- routing_transaction_id: id
9374
- routing_transaction_created_at: created_at
9375
- routing_transaction_updated_at: updated_at
9376
- routing_transaction_status: status
9377
- routing_transaction_resolved_at: resolved_at
9378
- routing_transaction_amount: amount {
9379
- __typename
9380
- currency_amount_original_value: original_value
9381
- currency_amount_original_unit: original_unit
9382
- currency_amount_preferred_currency_unit: preferred_currency_unit
9383
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9384
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9385
- }
9386
- routing_transaction_transaction_hash: transaction_hash
9387
- routing_transaction_incoming_channel: incoming_channel {
9388
- id
9389
- }
9390
- routing_transaction_outgoing_channel: outgoing_channel {
9391
- id
9392
- }
9393
- routing_transaction_fees: fees {
9394
- __typename
9395
- currency_amount_original_value: original_value
9396
- currency_amount_original_unit: original_unit
9397
- currency_amount_preferred_currency_unit: preferred_currency_unit
9398
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9399
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9344
+ blockchain_balance_available_balance: available_balance {
9345
+ __typename
9346
+ currency_amount_original_value: original_value
9347
+ currency_amount_original_unit: original_unit
9348
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9349
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9350
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9351
+ }
9352
+ }
9353
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
9354
+ lightspark_node_with_remote_signing_balances: balances {
9355
+ __typename
9356
+ balances_owned_balance: owned_balance {
9357
+ __typename
9358
+ currency_amount_original_value: original_value
9359
+ currency_amount_original_unit: original_unit
9360
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9361
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9362
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9363
+ }
9364
+ balances_available_to_send_balance: available_to_send_balance {
9365
+ __typename
9366
+ currency_amount_original_value: original_value
9367
+ currency_amount_original_unit: original_unit
9368
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9369
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9370
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9371
+ }
9372
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
9373
+ __typename
9374
+ currency_amount_original_value: original_value
9375
+ currency_amount_original_unit: original_unit
9376
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9377
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9378
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9379
+ }
9380
+ }
9381
+ }
9382
+ }
9383
+ }
9384
+ }
9385
+ outgoing_payment_failure_reason: failure_reason
9386
+ outgoing_payment_failure_message: failure_message {
9387
+ __typename
9388
+ rich_text_text: text
9389
+ }
9390
+ outgoing_payment_uma_post_transaction_data: uma_post_transaction_data {
9391
+ __typename
9392
+ post_transaction_data_utxo: utxo
9393
+ post_transaction_data_amount: amount {
9394
+ __typename
9395
+ currency_amount_original_value: original_value
9396
+ currency_amount_original_unit: original_unit
9397
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9398
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9399
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9400
+ }
9401
+ }
9402
+ outgoing_payment_payment_preimage: payment_preimage
9400
9403
  }
9401
- routing_transaction_failure_message: failure_message {
9404
+ ... on RoutingTransaction {
9402
9405
  __typename
9403
- rich_text_text: text
9404
- }
9405
- routing_transaction_failure_reason: failure_reason
9406
- }`;
9407
- var getRoutingTransactionQuery = (id) => {
9408
- return {
9409
- queryPayload: `
9410
- query GetRoutingTransaction($id: ID!) {
9411
- entity(id: $id) {
9412
- ... on RoutingTransaction {
9413
- ...RoutingTransactionFragment
9406
+ routing_transaction_id: id
9407
+ routing_transaction_created_at: created_at
9408
+ routing_transaction_updated_at: updated_at
9409
+ routing_transaction_status: status
9410
+ routing_transaction_resolved_at: resolved_at
9411
+ routing_transaction_amount: amount {
9412
+ __typename
9413
+ currency_amount_original_value: original_value
9414
+ currency_amount_original_unit: original_unit
9415
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9416
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9417
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9418
+ }
9419
+ routing_transaction_transaction_hash: transaction_hash
9420
+ routing_transaction_incoming_channel: incoming_channel {
9421
+ id
9422
+ }
9423
+ routing_transaction_outgoing_channel: outgoing_channel {
9424
+ id
9425
+ }
9426
+ routing_transaction_fees: fees {
9427
+ __typename
9428
+ currency_amount_original_value: original_value
9429
+ currency_amount_original_unit: original_unit
9430
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9431
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9432
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9433
+ }
9434
+ routing_transaction_failure_message: failure_message {
9435
+ __typename
9436
+ rich_text_text: text
9414
9437
  }
9438
+ routing_transaction_failure_reason: failure_reason
9415
9439
  }
9416
- }
9417
-
9418
- ${FRAGMENT25}
9419
- `,
9420
- variables: { id },
9421
- constructObject: (data) => RoutingTransactionFromJson(data.entity)
9422
- };
9423
- };
9424
-
9425
- // src/objects/Signable.ts
9426
- var SignableFromJson = (obj) => {
9427
- return {
9428
- id: obj["signable_id"],
9429
- createdAt: obj["signable_created_at"],
9430
- updatedAt: obj["signable_updated_at"],
9431
- typename: "Signable"
9432
- };
9433
- };
9434
- var FRAGMENT26 = `
9435
- fragment SignableFragment on Signable {
9436
- __typename
9437
- signable_id: id
9438
- signable_created_at: created_at
9439
- signable_updated_at: updated_at
9440
9440
  }`;
9441
- var getSignableQuery = (id) => {
9441
+ var getLightningTransactionQuery = (id) => {
9442
9442
  return {
9443
9443
  queryPayload: `
9444
- query GetSignable($id: ID!) {
9444
+ query GetLightningTransaction($id: ID!) {
9445
9445
  entity(id: $id) {
9446
- ... on Signable {
9447
- ...SignableFragment
9446
+ ... on LightningTransaction {
9447
+ ...LightningTransactionFragment
9448
9448
  }
9449
9449
  }
9450
9450
  }
9451
9451
 
9452
- ${FRAGMENT26}
9452
+ ${FRAGMENT23}
9453
9453
  `,
9454
9454
  variables: { id },
9455
- constructObject: (data) => SignableFromJson(data.entity)
9455
+ constructObject: (data) => LightningTransactionFromJson(data.entity)
9456
9456
  };
9457
9457
  };
9458
9458
 
9459
- // src/objects/TransactionType.ts
9460
- var TransactionType = /* @__PURE__ */ ((TransactionType2) => {
9461
- TransactionType2["FUTURE_VALUE"] = "FUTURE_VALUE";
9462
- TransactionType2["OUTGOING_PAYMENT"] = "OUTGOING_PAYMENT";
9463
- TransactionType2["INCOMING_PAYMENT"] = "INCOMING_PAYMENT";
9464
- TransactionType2["ROUTED"] = "ROUTED";
9465
- TransactionType2["L1_WITHDRAW"] = "L1_WITHDRAW";
9466
- TransactionType2["L1_DEPOSIT"] = "L1_DEPOSIT";
9467
- TransactionType2["CHANNEL_OPEN"] = "CHANNEL_OPEN";
9468
- TransactionType2["CHANNEL_CLOSE"] = "CHANNEL_CLOSE";
9469
- TransactionType2["PAYMENT"] = "PAYMENT";
9470
- TransactionType2["PAYMENT_REQUEST"] = "PAYMENT_REQUEST";
9471
- TransactionType2["ROUTE"] = "ROUTE";
9472
- return TransactionType2;
9473
- })(TransactionType || {});
9474
- var TransactionType_default = TransactionType;
9475
-
9476
- // src/objects/UmaInvitation.ts
9477
- var UmaInvitationFromJson = (obj) => {
9478
- return {
9479
- id: obj["uma_invitation_id"],
9480
- createdAt: obj["uma_invitation_created_at"],
9481
- updatedAt: obj["uma_invitation_updated_at"],
9482
- code: obj["uma_invitation_code"],
9483
- url: obj["uma_invitation_url"],
9484
- inviterUma: obj["uma_invitation_inviter_uma"],
9485
- incentivesStatus: IncentivesStatus_default[obj["uma_invitation_incentives_status"]] ?? IncentivesStatus_default.FUTURE_VALUE,
9486
- typename: "UmaInvitation",
9487
- inviteeUma: obj["uma_invitation_invitee_uma"],
9488
- incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ? IncentivesIneligibilityReason_default[obj["uma_invitation_incentives_ineligibility_reason"]] ?? IncentivesIneligibilityReason_default.FUTURE_VALUE : null
9489
- };
9459
+ // src/objects/LightsparkNodeOwner.ts
9460
+ var import_core8 = require("@lightsparkdev/core");
9461
+ var LightsparkNodeOwnerFromJson = (obj) => {
9462
+ if (obj["__typename"] == "Account") {
9463
+ return new Account_default(
9464
+ obj["account_id"],
9465
+ obj["account_created_at"],
9466
+ obj["account_updated_at"],
9467
+ "Account",
9468
+ obj["account_name"]
9469
+ );
9470
+ }
9471
+ if (obj["__typename"] == "Wallet") {
9472
+ return new Wallet_default(
9473
+ obj["wallet_id"],
9474
+ obj["wallet_created_at"],
9475
+ obj["wallet_updated_at"],
9476
+ obj["wallet_third_party_identifier"],
9477
+ WalletStatus_default[obj["wallet_status"]] ?? WalletStatus_default.FUTURE_VALUE,
9478
+ "Wallet",
9479
+ obj["wallet_last_login_at"],
9480
+ !!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0,
9481
+ obj["wallet_account"]?.id ?? void 0
9482
+ );
9483
+ }
9484
+ throw new import_core8.LightsparkException(
9485
+ "DeserializationError",
9486
+ `Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
9487
+ );
9490
9488
  };
9491
- var FRAGMENT27 = `
9492
- fragment UmaInvitationFragment on UmaInvitation {
9489
+ var FRAGMENT24 = `
9490
+ fragment LightsparkNodeOwnerFragment on LightsparkNodeOwner {
9493
9491
  __typename
9494
- uma_invitation_id: id
9495
- uma_invitation_created_at: created_at
9496
- uma_invitation_updated_at: updated_at
9497
- uma_invitation_code: code
9498
- uma_invitation_url: url
9499
- uma_invitation_inviter_uma: inviter_uma
9500
- uma_invitation_invitee_uma: invitee_uma
9501
- uma_invitation_incentives_status: incentives_status
9502
- uma_invitation_incentives_ineligibility_reason: incentives_ineligibility_reason
9492
+ ... on Account {
9493
+ __typename
9494
+ account_id: id
9495
+ account_created_at: created_at
9496
+ account_updated_at: updated_at
9497
+ account_name: name
9498
+ }
9499
+ ... on Wallet {
9500
+ __typename
9501
+ wallet_id: id
9502
+ wallet_created_at: created_at
9503
+ wallet_updated_at: updated_at
9504
+ wallet_last_login_at: last_login_at
9505
+ wallet_balances: balances {
9506
+ __typename
9507
+ balances_owned_balance: owned_balance {
9508
+ __typename
9509
+ currency_amount_original_value: original_value
9510
+ currency_amount_original_unit: original_unit
9511
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9512
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9513
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9514
+ }
9515
+ balances_available_to_send_balance: available_to_send_balance {
9516
+ __typename
9517
+ currency_amount_original_value: original_value
9518
+ currency_amount_original_unit: original_unit
9519
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9520
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9521
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9522
+ }
9523
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
9524
+ __typename
9525
+ currency_amount_original_value: original_value
9526
+ currency_amount_original_unit: original_unit
9527
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9528
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9529
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9530
+ }
9531
+ }
9532
+ wallet_third_party_identifier: third_party_identifier
9533
+ wallet_account: account {
9534
+ id
9535
+ }
9536
+ wallet_status: status
9537
+ }
9503
9538
  }`;
9504
- var getUmaInvitationQuery = (id) => {
9539
+ var getLightsparkNodeOwnerQuery = (id) => {
9505
9540
  return {
9506
9541
  queryPayload: `
9507
- query GetUmaInvitation($id: ID!) {
9542
+ query GetLightsparkNodeOwner($id: ID!) {
9508
9543
  entity(id: $id) {
9509
- ... on UmaInvitation {
9510
- ...UmaInvitationFragment
9544
+ ... on LightsparkNodeOwner {
9545
+ ...LightsparkNodeOwnerFragment
9511
9546
  }
9512
9547
  }
9513
9548
  }
9514
9549
 
9515
- ${FRAGMENT27}
9550
+ ${FRAGMENT24}
9516
9551
  `,
9517
9552
  variables: { id },
9518
- constructObject: (data) => UmaInvitationFromJson(data.entity)
9553
+ constructObject: (data) => LightsparkNodeOwnerFromJson(data.entity)
9519
9554
  };
9520
9555
  };
9521
9556
 
9522
- // src/objects/WebhookEventType.ts
9523
- var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
9524
- WebhookEventType2["FUTURE_VALUE"] = "FUTURE_VALUE";
9525
- WebhookEventType2["PAYMENT_FINISHED"] = "PAYMENT_FINISHED";
9526
- WebhookEventType2["FORCE_CLOSURE"] = "FORCE_CLOSURE";
9527
- WebhookEventType2["WITHDRAWAL_FINISHED"] = "WITHDRAWAL_FINISHED";
9528
- WebhookEventType2["FUNDS_RECEIVED"] = "FUNDS_RECEIVED";
9529
- WebhookEventType2["NODE_STATUS"] = "NODE_STATUS";
9530
- WebhookEventType2["UMA_INVITATION_CLAIMED"] = "UMA_INVITATION_CLAIMED";
9531
- WebhookEventType2["WALLET_STATUS"] = "WALLET_STATUS";
9532
- WebhookEventType2["WALLET_OUTGOING_PAYMENT_FINISHED"] = "WALLET_OUTGOING_PAYMENT_FINISHED";
9533
- WebhookEventType2["WALLET_INCOMING_PAYMENT_FINISHED"] = "WALLET_INCOMING_PAYMENT_FINISHED";
9534
- WebhookEventType2["WALLET_WITHDRAWAL_FINISHED"] = "WALLET_WITHDRAWAL_FINISHED";
9535
- WebhookEventType2["WALLET_FUNDS_RECEIVED"] = "WALLET_FUNDS_RECEIVED";
9536
- WebhookEventType2["REMOTE_SIGNING"] = "REMOTE_SIGNING";
9537
- WebhookEventType2["LOW_BALANCE"] = "LOW_BALANCE";
9538
- return WebhookEventType2;
9539
- })(WebhookEventType || {});
9540
- var WebhookEventType_default = WebhookEventType;
9541
-
9542
- // src/objects/Withdrawal.ts
9543
- var WithdrawalFromJson = (obj) => {
9544
- return {
9545
- id: obj["withdrawal_id"],
9546
- createdAt: obj["withdrawal_created_at"],
9547
- updatedAt: obj["withdrawal_updated_at"],
9548
- status: TransactionStatus_default[obj["withdrawal_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9549
- amount: CurrencyAmountFromJson(obj["withdrawal_amount"]),
9550
- blockHeight: obj["withdrawal_block_height"],
9551
- destinationAddresses: obj["withdrawal_destination_addresses"],
9552
- originId: obj["withdrawal_origin"].id,
9553
- typename: "Withdrawal",
9554
- resolvedAt: obj["withdrawal_resolved_at"],
9555
- transactionHash: obj["withdrawal_transaction_hash"],
9556
- fees: !!obj["withdrawal_fees"] ? CurrencyAmountFromJson(obj["withdrawal_fees"]) : void 0,
9557
- blockHash: obj["withdrawal_block_hash"],
9558
- numConfirmations: obj["withdrawal_num_confirmations"]
9559
- };
9557
+ // src/objects/OnChainTransaction.ts
9558
+ var import_core9 = require("@lightsparkdev/core");
9559
+ var OnChainTransactionFromJson = (obj) => {
9560
+ if (obj["__typename"] == "ChannelClosingTransaction") {
9561
+ return {
9562
+ id: obj["channel_closing_transaction_id"],
9563
+ createdAt: obj["channel_closing_transaction_created_at"],
9564
+ updatedAt: obj["channel_closing_transaction_updated_at"],
9565
+ status: TransactionStatus_default[obj["channel_closing_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9566
+ amount: CurrencyAmountFromJson(obj["channel_closing_transaction_amount"]),
9567
+ blockHeight: obj["channel_closing_transaction_block_height"],
9568
+ destinationAddresses: obj["channel_closing_transaction_destination_addresses"],
9569
+ typename: "ChannelClosingTransaction",
9570
+ resolvedAt: obj["channel_closing_transaction_resolved_at"],
9571
+ transactionHash: obj["channel_closing_transaction_transaction_hash"],
9572
+ fees: !!obj["channel_closing_transaction_fees"] ? CurrencyAmountFromJson(obj["channel_closing_transaction_fees"]) : void 0,
9573
+ blockHash: obj["channel_closing_transaction_block_hash"],
9574
+ numConfirmations: obj["channel_closing_transaction_num_confirmations"],
9575
+ channelId: obj["channel_closing_transaction_channel"]?.id ?? void 0
9576
+ };
9577
+ }
9578
+ if (obj["__typename"] == "ChannelOpeningTransaction") {
9579
+ return {
9580
+ id: obj["channel_opening_transaction_id"],
9581
+ createdAt: obj["channel_opening_transaction_created_at"],
9582
+ updatedAt: obj["channel_opening_transaction_updated_at"],
9583
+ status: TransactionStatus_default[obj["channel_opening_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9584
+ amount: CurrencyAmountFromJson(obj["channel_opening_transaction_amount"]),
9585
+ blockHeight: obj["channel_opening_transaction_block_height"],
9586
+ destinationAddresses: obj["channel_opening_transaction_destination_addresses"],
9587
+ typename: "ChannelOpeningTransaction",
9588
+ resolvedAt: obj["channel_opening_transaction_resolved_at"],
9589
+ transactionHash: obj["channel_opening_transaction_transaction_hash"],
9590
+ fees: !!obj["channel_opening_transaction_fees"] ? CurrencyAmountFromJson(obj["channel_opening_transaction_fees"]) : void 0,
9591
+ blockHash: obj["channel_opening_transaction_block_hash"],
9592
+ numConfirmations: obj["channel_opening_transaction_num_confirmations"],
9593
+ channelId: obj["channel_opening_transaction_channel"]?.id ?? void 0
9594
+ };
9595
+ }
9596
+ if (obj["__typename"] == "Deposit") {
9597
+ return {
9598
+ id: obj["deposit_id"],
9599
+ createdAt: obj["deposit_created_at"],
9600
+ updatedAt: obj["deposit_updated_at"],
9601
+ status: TransactionStatus_default[obj["deposit_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9602
+ amount: CurrencyAmountFromJson(obj["deposit_amount"]),
9603
+ blockHeight: obj["deposit_block_height"],
9604
+ destinationAddresses: obj["deposit_destination_addresses"],
9605
+ destinationId: obj["deposit_destination"].id,
9606
+ typename: "Deposit",
9607
+ resolvedAt: obj["deposit_resolved_at"],
9608
+ transactionHash: obj["deposit_transaction_hash"],
9609
+ fees: !!obj["deposit_fees"] ? CurrencyAmountFromJson(obj["deposit_fees"]) : void 0,
9610
+ blockHash: obj["deposit_block_hash"],
9611
+ numConfirmations: obj["deposit_num_confirmations"]
9612
+ };
9613
+ }
9614
+ if (obj["__typename"] == "Withdrawal") {
9615
+ return {
9616
+ id: obj["withdrawal_id"],
9617
+ createdAt: obj["withdrawal_created_at"],
9618
+ updatedAt: obj["withdrawal_updated_at"],
9619
+ status: TransactionStatus_default[obj["withdrawal_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9620
+ amount: CurrencyAmountFromJson(obj["withdrawal_amount"]),
9621
+ blockHeight: obj["withdrawal_block_height"],
9622
+ destinationAddresses: obj["withdrawal_destination_addresses"],
9623
+ originId: obj["withdrawal_origin"].id,
9624
+ typename: "Withdrawal",
9625
+ resolvedAt: obj["withdrawal_resolved_at"],
9626
+ transactionHash: obj["withdrawal_transaction_hash"],
9627
+ fees: !!obj["withdrawal_fees"] ? CurrencyAmountFromJson(obj["withdrawal_fees"]) : void 0,
9628
+ blockHash: obj["withdrawal_block_hash"],
9629
+ numConfirmations: obj["withdrawal_num_confirmations"]
9630
+ };
9631
+ }
9632
+ throw new import_core9.LightsparkException(
9633
+ "DeserializationError",
9634
+ `Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
9635
+ );
9560
9636
  };
9561
- var FRAGMENT28 = `
9562
- fragment WithdrawalFragment on Withdrawal {
9637
+ var FRAGMENT25 = `
9638
+ fragment OnChainTransactionFragment on OnChainTransaction {
9563
9639
  __typename
9564
- withdrawal_id: id
9565
- withdrawal_created_at: created_at
9566
- withdrawal_updated_at: updated_at
9567
- withdrawal_status: status
9568
- withdrawal_resolved_at: resolved_at
9569
- withdrawal_amount: amount {
9640
+ ... on ChannelClosingTransaction {
9570
9641
  __typename
9571
- currency_amount_original_value: original_value
9572
- currency_amount_original_unit: original_unit
9573
- currency_amount_preferred_currency_unit: preferred_currency_unit
9574
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9575
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9642
+ channel_closing_transaction_id: id
9643
+ channel_closing_transaction_created_at: created_at
9644
+ channel_closing_transaction_updated_at: updated_at
9645
+ channel_closing_transaction_status: status
9646
+ channel_closing_transaction_resolved_at: resolved_at
9647
+ channel_closing_transaction_amount: amount {
9648
+ __typename
9649
+ currency_amount_original_value: original_value
9650
+ currency_amount_original_unit: original_unit
9651
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9652
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9653
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9654
+ }
9655
+ channel_closing_transaction_transaction_hash: transaction_hash
9656
+ channel_closing_transaction_fees: fees {
9657
+ __typename
9658
+ currency_amount_original_value: original_value
9659
+ currency_amount_original_unit: original_unit
9660
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9661
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9662
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9663
+ }
9664
+ channel_closing_transaction_block_hash: block_hash
9665
+ channel_closing_transaction_block_height: block_height
9666
+ channel_closing_transaction_destination_addresses: destination_addresses
9667
+ channel_closing_transaction_num_confirmations: num_confirmations
9668
+ channel_closing_transaction_channel: channel {
9669
+ id
9670
+ }
9576
9671
  }
9577
- withdrawal_transaction_hash: transaction_hash
9578
- withdrawal_fees: fees {
9672
+ ... on ChannelOpeningTransaction {
9579
9673
  __typename
9580
- currency_amount_original_value: original_value
9581
- currency_amount_original_unit: original_unit
9582
- currency_amount_preferred_currency_unit: preferred_currency_unit
9583
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9584
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9674
+ channel_opening_transaction_id: id
9675
+ channel_opening_transaction_created_at: created_at
9676
+ channel_opening_transaction_updated_at: updated_at
9677
+ channel_opening_transaction_status: status
9678
+ channel_opening_transaction_resolved_at: resolved_at
9679
+ channel_opening_transaction_amount: amount {
9680
+ __typename
9681
+ currency_amount_original_value: original_value
9682
+ currency_amount_original_unit: original_unit
9683
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9684
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9685
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9686
+ }
9687
+ channel_opening_transaction_transaction_hash: transaction_hash
9688
+ channel_opening_transaction_fees: fees {
9689
+ __typename
9690
+ currency_amount_original_value: original_value
9691
+ currency_amount_original_unit: original_unit
9692
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9693
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9694
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9695
+ }
9696
+ channel_opening_transaction_block_hash: block_hash
9697
+ channel_opening_transaction_block_height: block_height
9698
+ channel_opening_transaction_destination_addresses: destination_addresses
9699
+ channel_opening_transaction_num_confirmations: num_confirmations
9700
+ channel_opening_transaction_channel: channel {
9701
+ id
9702
+ }
9585
9703
  }
9586
- withdrawal_block_hash: block_hash
9587
- withdrawal_block_height: block_height
9588
- withdrawal_destination_addresses: destination_addresses
9589
- withdrawal_num_confirmations: num_confirmations
9590
- withdrawal_origin: origin {
9591
- id
9704
+ ... on Deposit {
9705
+ __typename
9706
+ deposit_id: id
9707
+ deposit_created_at: created_at
9708
+ deposit_updated_at: updated_at
9709
+ deposit_status: status
9710
+ deposit_resolved_at: resolved_at
9711
+ deposit_amount: amount {
9712
+ __typename
9713
+ currency_amount_original_value: original_value
9714
+ currency_amount_original_unit: original_unit
9715
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9716
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9717
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9718
+ }
9719
+ deposit_transaction_hash: transaction_hash
9720
+ deposit_fees: fees {
9721
+ __typename
9722
+ currency_amount_original_value: original_value
9723
+ currency_amount_original_unit: original_unit
9724
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9725
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9726
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9727
+ }
9728
+ deposit_block_hash: block_hash
9729
+ deposit_block_height: block_height
9730
+ deposit_destination_addresses: destination_addresses
9731
+ deposit_num_confirmations: num_confirmations
9732
+ deposit_destination: destination {
9733
+ id
9734
+ }
9735
+ }
9736
+ ... on Withdrawal {
9737
+ __typename
9738
+ withdrawal_id: id
9739
+ withdrawal_created_at: created_at
9740
+ withdrawal_updated_at: updated_at
9741
+ withdrawal_status: status
9742
+ withdrawal_resolved_at: resolved_at
9743
+ withdrawal_amount: amount {
9744
+ __typename
9745
+ currency_amount_original_value: original_value
9746
+ currency_amount_original_unit: original_unit
9747
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9748
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9749
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9750
+ }
9751
+ withdrawal_transaction_hash: transaction_hash
9752
+ withdrawal_fees: fees {
9753
+ __typename
9754
+ currency_amount_original_value: original_value
9755
+ currency_amount_original_unit: original_unit
9756
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9757
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9758
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9759
+ }
9760
+ withdrawal_block_hash: block_hash
9761
+ withdrawal_block_height: block_height
9762
+ withdrawal_destination_addresses: destination_addresses
9763
+ withdrawal_num_confirmations: num_confirmations
9764
+ withdrawal_origin: origin {
9765
+ id
9766
+ }
9592
9767
  }
9593
9768
  }`;
9594
- var getWithdrawalQuery = (id) => {
9769
+ var getOnChainTransactionQuery = (id) => {
9595
9770
  return {
9596
9771
  queryPayload: `
9597
- query GetWithdrawal($id: ID!) {
9772
+ query GetOnChainTransaction($id: ID!) {
9598
9773
  entity(id: $id) {
9599
- ... on Withdrawal {
9600
- ...WithdrawalFragment
9774
+ ... on OnChainTransaction {
9775
+ ...OnChainTransactionFragment
9601
9776
  }
9602
9777
  }
9603
9778
  }
9604
9779
 
9605
- ${FRAGMENT28}
9780
+ ${FRAGMENT25}
9606
9781
  `,
9607
9782
  variables: { id },
9608
- constructObject: (data) => WithdrawalFromJson(data.entity)
9783
+ constructObject: (data) => OnChainTransactionFromJson(data.entity)
9609
9784
  };
9610
9785
  };
9611
9786
 
9612
- // src/objects/WithdrawalRequest.ts
9613
- var import_auto_bind11 = __toESM(require("auto-bind"), 1);
9787
+ // src/objects/PaymentDirection.ts
9788
+ var PaymentDirection = /* @__PURE__ */ ((PaymentDirection2) => {
9789
+ PaymentDirection2["FUTURE_VALUE"] = "FUTURE_VALUE";
9790
+ PaymentDirection2["SENT"] = "SENT";
9791
+ PaymentDirection2["RECEIVED"] = "RECEIVED";
9792
+ return PaymentDirection2;
9793
+ })(PaymentDirection || {});
9794
+ var PaymentDirection_default = PaymentDirection;
9614
9795
 
9615
- // src/objects/WithdrawalRequestStatus.ts
9616
- var WithdrawalRequestStatus = /* @__PURE__ */ ((WithdrawalRequestStatus2) => {
9617
- WithdrawalRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
9618
- WithdrawalRequestStatus2["CREATED"] = "CREATED";
9619
- WithdrawalRequestStatus2["FAILED"] = "FAILED";
9620
- WithdrawalRequestStatus2["IN_PROGRESS"] = "IN_PROGRESS";
9621
- WithdrawalRequestStatus2["SUCCESSFUL"] = "SUCCESSFUL";
9622
- return WithdrawalRequestStatus2;
9623
- })(WithdrawalRequestStatus || {});
9624
- var WithdrawalRequestStatus_default = WithdrawalRequestStatus;
9796
+ // src/objects/RemoteSigningSubEventType.ts
9797
+ var RemoteSigningSubEventType = /* @__PURE__ */ ((RemoteSigningSubEventType2) => {
9798
+ RemoteSigningSubEventType2["FUTURE_VALUE"] = "FUTURE_VALUE";
9799
+ RemoteSigningSubEventType2["ECDH"] = "ECDH";
9800
+ RemoteSigningSubEventType2["GET_PER_COMMITMENT_POINT"] = "GET_PER_COMMITMENT_POINT";
9801
+ RemoteSigningSubEventType2["RELEASE_PER_COMMITMENT_SECRET"] = "RELEASE_PER_COMMITMENT_SECRET";
9802
+ RemoteSigningSubEventType2["SIGN_INVOICE"] = "SIGN_INVOICE";
9803
+ RemoteSigningSubEventType2["DERIVE_KEY_AND_SIGN"] = "DERIVE_KEY_AND_SIGN";
9804
+ RemoteSigningSubEventType2["RELEASE_PAYMENT_PREIMAGE"] = "RELEASE_PAYMENT_PREIMAGE";
9805
+ RemoteSigningSubEventType2["REQUEST_INVOICE_PAYMENT_HASH"] = "REQUEST_INVOICE_PAYMENT_HASH";
9806
+ RemoteSigningSubEventType2["REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET"] = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET";
9807
+ return RemoteSigningSubEventType2;
9808
+ })(RemoteSigningSubEventType || {});
9809
+ var RemoteSigningSubEventType_default = RemoteSigningSubEventType;
9625
9810
 
9626
- // src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts
9627
- var WithdrawalRequestToChannelClosingTransactionsConnectionFromJson = (obj) => {
9628
- return {
9629
- pageInfo: PageInfoFromJson(
9630
- obj["withdrawal_request_to_channel_closing_transactions_connection_page_info"]
9631
- ),
9632
- count: obj["withdrawal_request_to_channel_closing_transactions_connection_count"],
9633
- entities: obj["withdrawal_request_to_channel_closing_transactions_connection_entities"].map((e) => ChannelClosingTransactionFromJson(e))
9634
- };
9635
- };
9811
+ // src/objects/RiskRating.ts
9812
+ var RiskRating = /* @__PURE__ */ ((RiskRating2) => {
9813
+ RiskRating2["FUTURE_VALUE"] = "FUTURE_VALUE";
9814
+ RiskRating2["HIGH_RISK"] = "HIGH_RISK";
9815
+ RiskRating2["LOW_RISK"] = "LOW_RISK";
9816
+ RiskRating2["UNKNOWN"] = "UNKNOWN";
9817
+ return RiskRating2;
9818
+ })(RiskRating || {});
9819
+ var RiskRating_default = RiskRating;
9636
9820
 
9637
- // src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts
9638
- var WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson = (obj) => {
9821
+ // src/objects/RoutingTransaction.ts
9822
+ var RoutingTransactionFromJson = (obj) => {
9639
9823
  return {
9640
- pageInfo: PageInfoFromJson(
9641
- obj["withdrawal_request_to_channel_opening_transactions_connection_page_info"]
9642
- ),
9643
- count: obj["withdrawal_request_to_channel_opening_transactions_connection_count"],
9644
- entities: obj["withdrawal_request_to_channel_opening_transactions_connection_entities"].map((e) => ChannelOpeningTransactionFromJson(e))
9824
+ id: obj["routing_transaction_id"],
9825
+ createdAt: obj["routing_transaction_created_at"],
9826
+ updatedAt: obj["routing_transaction_updated_at"],
9827
+ status: TransactionStatus_default[obj["routing_transaction_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
9828
+ amount: CurrencyAmountFromJson(obj["routing_transaction_amount"]),
9829
+ typename: "RoutingTransaction",
9830
+ resolvedAt: obj["routing_transaction_resolved_at"],
9831
+ transactionHash: obj["routing_transaction_transaction_hash"],
9832
+ incomingChannelId: obj["routing_transaction_incoming_channel"]?.id ?? void 0,
9833
+ outgoingChannelId: obj["routing_transaction_outgoing_channel"]?.id ?? void 0,
9834
+ fees: !!obj["routing_transaction_fees"] ? CurrencyAmountFromJson(obj["routing_transaction_fees"]) : void 0,
9835
+ failureMessage: !!obj["routing_transaction_failure_message"] ? RichTextFromJson(obj["routing_transaction_failure_message"]) : void 0,
9836
+ failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
9645
9837
  };
9646
9838
  };
9647
-
9648
- // src/objects/WithdrawalRequest.ts
9649
- var WithdrawalRequest = class {
9650
- constructor(id, createdAt, updatedAt, amount, bitcoinAddress, withdrawalMode, status, typename, estimatedAmount, completedAt, withdrawalId) {
9651
- this.id = id;
9652
- this.createdAt = createdAt;
9653
- this.updatedAt = updatedAt;
9654
- this.amount = amount;
9655
- this.bitcoinAddress = bitcoinAddress;
9656
- this.withdrawalMode = withdrawalMode;
9657
- this.status = status;
9658
- this.typename = typename;
9659
- this.estimatedAmount = estimatedAmount;
9660
- this.completedAt = completedAt;
9661
- this.withdrawalId = withdrawalId;
9662
- (0, import_auto_bind11.default)(this);
9663
- }
9664
- async getChannelClosingTransactions(client, first = void 0) {
9665
- return await client.executeRawQuery({
9666
- queryPayload: `
9667
- query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: ID!, $first: Int) {
9668
- entity(id: $entity_id) {
9669
- ... on WithdrawalRequest {
9670
- channel_closing_transactions(, first: $first) {
9671
- __typename
9672
- withdrawal_request_to_channel_closing_transactions_connection_page_info: page_info {
9673
- __typename
9674
- page_info_has_next_page: has_next_page
9675
- page_info_has_previous_page: has_previous_page
9676
- page_info_start_cursor: start_cursor
9677
- page_info_end_cursor: end_cursor
9678
- }
9679
- withdrawal_request_to_channel_closing_transactions_connection_count: count
9680
- withdrawal_request_to_channel_closing_transactions_connection_entities: entities {
9681
- __typename
9682
- channel_closing_transaction_id: id
9683
- channel_closing_transaction_created_at: created_at
9684
- channel_closing_transaction_updated_at: updated_at
9685
- channel_closing_transaction_status: status
9686
- channel_closing_transaction_resolved_at: resolved_at
9687
- channel_closing_transaction_amount: amount {
9688
- __typename
9689
- currency_amount_original_value: original_value
9690
- currency_amount_original_unit: original_unit
9691
- currency_amount_preferred_currency_unit: preferred_currency_unit
9692
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9693
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9694
- }
9695
- channel_closing_transaction_transaction_hash: transaction_hash
9696
- channel_closing_transaction_fees: fees {
9697
- __typename
9698
- currency_amount_original_value: original_value
9699
- currency_amount_original_unit: original_unit
9700
- currency_amount_preferred_currency_unit: preferred_currency_unit
9701
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9702
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9703
- }
9704
- channel_closing_transaction_block_hash: block_hash
9705
- channel_closing_transaction_block_height: block_height
9706
- channel_closing_transaction_destination_addresses: destination_addresses
9707
- channel_closing_transaction_num_confirmations: num_confirmations
9708
- channel_closing_transaction_channel: channel {
9709
- id
9710
- }
9711
- }
9712
- }
9713
- }
9714
- }
9715
- }
9716
- `,
9717
- variables: { entity_id: this.id, first },
9718
- constructObject: (json) => {
9719
- const connection = json["entity"]["channel_closing_transactions"];
9720
- return WithdrawalRequestToChannelClosingTransactionsConnectionFromJson(
9721
- connection
9722
- );
9723
- }
9724
- });
9725
- }
9726
- async getChannelOpeningTransactions(client, first = void 0) {
9727
- return await client.executeRawQuery({
9728
- queryPayload: `
9729
- query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: ID!, $first: Int) {
9730
- entity(id: $entity_id) {
9731
- ... on WithdrawalRequest {
9732
- channel_opening_transactions(, first: $first) {
9733
- __typename
9734
- withdrawal_request_to_channel_opening_transactions_connection_page_info: page_info {
9735
- __typename
9736
- page_info_has_next_page: has_next_page
9737
- page_info_has_previous_page: has_previous_page
9738
- page_info_start_cursor: start_cursor
9739
- page_info_end_cursor: end_cursor
9740
- }
9741
- withdrawal_request_to_channel_opening_transactions_connection_count: count
9742
- withdrawal_request_to_channel_opening_transactions_connection_entities: entities {
9743
- __typename
9744
- channel_opening_transaction_id: id
9745
- channel_opening_transaction_created_at: created_at
9746
- channel_opening_transaction_updated_at: updated_at
9747
- channel_opening_transaction_status: status
9748
- channel_opening_transaction_resolved_at: resolved_at
9749
- channel_opening_transaction_amount: amount {
9750
- __typename
9751
- currency_amount_original_value: original_value
9752
- currency_amount_original_unit: original_unit
9753
- currency_amount_preferred_currency_unit: preferred_currency_unit
9754
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9755
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9756
- }
9757
- channel_opening_transaction_transaction_hash: transaction_hash
9758
- channel_opening_transaction_fees: fees {
9759
- __typename
9760
- currency_amount_original_value: original_value
9761
- currency_amount_original_unit: original_unit
9762
- currency_amount_preferred_currency_unit: preferred_currency_unit
9763
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9764
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9765
- }
9766
- channel_opening_transaction_block_hash: block_hash
9767
- channel_opening_transaction_block_height: block_height
9768
- channel_opening_transaction_destination_addresses: destination_addresses
9769
- channel_opening_transaction_num_confirmations: num_confirmations
9770
- channel_opening_transaction_channel: channel {
9771
- id
9772
- }
9773
- }
9774
- }
9839
+ var FRAGMENT26 = `
9840
+ fragment RoutingTransactionFragment on RoutingTransaction {
9841
+ __typename
9842
+ routing_transaction_id: id
9843
+ routing_transaction_created_at: created_at
9844
+ routing_transaction_updated_at: updated_at
9845
+ routing_transaction_status: status
9846
+ routing_transaction_resolved_at: resolved_at
9847
+ routing_transaction_amount: amount {
9848
+ __typename
9849
+ currency_amount_original_value: original_value
9850
+ currency_amount_original_unit: original_unit
9851
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9852
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9853
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9854
+ }
9855
+ routing_transaction_transaction_hash: transaction_hash
9856
+ routing_transaction_incoming_channel: incoming_channel {
9857
+ id
9858
+ }
9859
+ routing_transaction_outgoing_channel: outgoing_channel {
9860
+ id
9861
+ }
9862
+ routing_transaction_fees: fees {
9863
+ __typename
9864
+ currency_amount_original_value: original_value
9865
+ currency_amount_original_unit: original_unit
9866
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9867
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9868
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9869
+ }
9870
+ routing_transaction_failure_message: failure_message {
9871
+ __typename
9872
+ rich_text_text: text
9873
+ }
9874
+ routing_transaction_failure_reason: failure_reason
9875
+ }`;
9876
+ var getRoutingTransactionQuery = (id) => {
9877
+ return {
9878
+ queryPayload: `
9879
+ query GetRoutingTransaction($id: ID!) {
9880
+ entity(id: $id) {
9881
+ ... on RoutingTransaction {
9882
+ ...RoutingTransactionFragment
9775
9883
  }
9776
9884
  }
9777
9885
  }
9886
+
9887
+ ${FRAGMENT26}
9778
9888
  `,
9779
- variables: { entity_id: this.id, first },
9780
- constructObject: (json) => {
9781
- const connection = json["entity"]["channel_opening_transactions"];
9782
- return WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson(
9783
- connection
9784
- );
9785
- }
9786
- });
9787
- }
9788
- static getWithdrawalRequestQuery(id) {
9789
- return {
9790
- queryPayload: `
9791
- query GetWithdrawalRequest($id: ID!) {
9889
+ variables: { id },
9890
+ constructObject: (data) => RoutingTransactionFromJson(data.entity)
9891
+ };
9892
+ };
9893
+
9894
+ // src/objects/Signable.ts
9895
+ var SignableFromJson = (obj) => {
9896
+ return {
9897
+ id: obj["signable_id"],
9898
+ createdAt: obj["signable_created_at"],
9899
+ updatedAt: obj["signable_updated_at"],
9900
+ typename: "Signable"
9901
+ };
9902
+ };
9903
+ var FRAGMENT27 = `
9904
+ fragment SignableFragment on Signable {
9905
+ __typename
9906
+ signable_id: id
9907
+ signable_created_at: created_at
9908
+ signable_updated_at: updated_at
9909
+ }`;
9910
+ var getSignableQuery = (id) => {
9911
+ return {
9912
+ queryPayload: `
9913
+ query GetSignable($id: ID!) {
9792
9914
  entity(id: $id) {
9793
- ... on WithdrawalRequest {
9794
- ...WithdrawalRequestFragment
9915
+ ... on Signable {
9916
+ ...SignableFragment
9795
9917
  }
9796
9918
  }
9797
9919
  }
9798
9920
 
9799
- ${FRAGMENT29}
9921
+ ${FRAGMENT27}
9800
9922
  `,
9801
- variables: { id },
9802
- constructObject: (data) => WithdrawalRequestFromJson(data.entity)
9803
- };
9804
- }
9805
- toJson() {
9806
- return {
9807
- __typename: "WithdrawalRequest",
9808
- withdrawal_request_id: this.id,
9809
- withdrawal_request_created_at: this.createdAt,
9810
- withdrawal_request_updated_at: this.updatedAt,
9811
- withdrawal_request_amount: CurrencyAmountToJson(this.amount),
9812
- withdrawal_request_estimated_amount: this.estimatedAmount ? CurrencyAmountToJson(this.estimatedAmount) : void 0,
9813
- withdrawal_request_bitcoin_address: this.bitcoinAddress,
9814
- withdrawal_request_withdrawal_mode: this.withdrawalMode,
9815
- withdrawal_request_status: this.status,
9816
- withdrawal_request_completed_at: this.completedAt,
9817
- withdrawal_request_withdrawal: { id: this.withdrawalId }
9818
- };
9819
- }
9923
+ variables: { id },
9924
+ constructObject: (data) => SignableFromJson(data.entity)
9925
+ };
9820
9926
  };
9821
- var WithdrawalRequestFromJson = (obj) => {
9822
- return new WithdrawalRequest(
9823
- obj["withdrawal_request_id"],
9824
- obj["withdrawal_request_created_at"],
9825
- obj["withdrawal_request_updated_at"],
9826
- CurrencyAmountFromJson(obj["withdrawal_request_amount"]),
9827
- obj["withdrawal_request_bitcoin_address"],
9828
- WithdrawalMode_default[obj["withdrawal_request_withdrawal_mode"]] ?? WithdrawalMode_default.FUTURE_VALUE,
9829
- WithdrawalRequestStatus_default[obj["withdrawal_request_status"]] ?? WithdrawalRequestStatus_default.FUTURE_VALUE,
9830
- "WithdrawalRequest",
9831
- !!obj["withdrawal_request_estimated_amount"] ? CurrencyAmountFromJson(obj["withdrawal_request_estimated_amount"]) : void 0,
9832
- obj["withdrawal_request_completed_at"],
9833
- obj["withdrawal_request_withdrawal"]?.id ?? void 0
9834
- );
9927
+
9928
+ // src/objects/TransactionType.ts
9929
+ var TransactionType = /* @__PURE__ */ ((TransactionType2) => {
9930
+ TransactionType2["FUTURE_VALUE"] = "FUTURE_VALUE";
9931
+ TransactionType2["OUTGOING_PAYMENT"] = "OUTGOING_PAYMENT";
9932
+ TransactionType2["INCOMING_PAYMENT"] = "INCOMING_PAYMENT";
9933
+ TransactionType2["ROUTED"] = "ROUTED";
9934
+ TransactionType2["L1_WITHDRAW"] = "L1_WITHDRAW";
9935
+ TransactionType2["L1_DEPOSIT"] = "L1_DEPOSIT";
9936
+ TransactionType2["CHANNEL_OPEN"] = "CHANNEL_OPEN";
9937
+ TransactionType2["CHANNEL_CLOSE"] = "CHANNEL_CLOSE";
9938
+ TransactionType2["PAYMENT"] = "PAYMENT";
9939
+ TransactionType2["PAYMENT_REQUEST"] = "PAYMENT_REQUEST";
9940
+ TransactionType2["ROUTE"] = "ROUTE";
9941
+ return TransactionType2;
9942
+ })(TransactionType || {});
9943
+ var TransactionType_default = TransactionType;
9944
+
9945
+ // src/objects/UmaInvitation.ts
9946
+ var UmaInvitationFromJson = (obj) => {
9947
+ return {
9948
+ id: obj["uma_invitation_id"],
9949
+ createdAt: obj["uma_invitation_created_at"],
9950
+ updatedAt: obj["uma_invitation_updated_at"],
9951
+ code: obj["uma_invitation_code"],
9952
+ url: obj["uma_invitation_url"],
9953
+ inviterUma: obj["uma_invitation_inviter_uma"],
9954
+ incentivesStatus: IncentivesStatus_default[obj["uma_invitation_incentives_status"]] ?? IncentivesStatus_default.FUTURE_VALUE,
9955
+ typename: "UmaInvitation",
9956
+ inviteeUma: obj["uma_invitation_invitee_uma"],
9957
+ incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ? IncentivesIneligibilityReason_default[obj["uma_invitation_incentives_ineligibility_reason"]] ?? IncentivesIneligibilityReason_default.FUTURE_VALUE : null
9958
+ };
9959
+ };
9960
+ var FRAGMENT28 = `
9961
+ fragment UmaInvitationFragment on UmaInvitation {
9962
+ __typename
9963
+ uma_invitation_id: id
9964
+ uma_invitation_created_at: created_at
9965
+ uma_invitation_updated_at: updated_at
9966
+ uma_invitation_code: code
9967
+ uma_invitation_url: url
9968
+ uma_invitation_inviter_uma: inviter_uma
9969
+ uma_invitation_invitee_uma: invitee_uma
9970
+ uma_invitation_incentives_status: incentives_status
9971
+ uma_invitation_incentives_ineligibility_reason: incentives_ineligibility_reason
9972
+ }`;
9973
+ var getUmaInvitationQuery = (id) => {
9974
+ return {
9975
+ queryPayload: `
9976
+ query GetUmaInvitation($id: ID!) {
9977
+ entity(id: $id) {
9978
+ ... on UmaInvitation {
9979
+ ...UmaInvitationFragment
9980
+ }
9981
+ }
9982
+ }
9983
+
9984
+ ${FRAGMENT28}
9985
+ `,
9986
+ variables: { id },
9987
+ constructObject: (data) => UmaInvitationFromJson(data.entity)
9988
+ };
9989
+ };
9990
+
9991
+ // src/objects/WebhookEventType.ts
9992
+ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
9993
+ WebhookEventType2["FUTURE_VALUE"] = "FUTURE_VALUE";
9994
+ WebhookEventType2["PAYMENT_FINISHED"] = "PAYMENT_FINISHED";
9995
+ WebhookEventType2["FORCE_CLOSURE"] = "FORCE_CLOSURE";
9996
+ WebhookEventType2["WITHDRAWAL_FINISHED"] = "WITHDRAWAL_FINISHED";
9997
+ WebhookEventType2["FUNDS_RECEIVED"] = "FUNDS_RECEIVED";
9998
+ WebhookEventType2["NODE_STATUS"] = "NODE_STATUS";
9999
+ WebhookEventType2["UMA_INVITATION_CLAIMED"] = "UMA_INVITATION_CLAIMED";
10000
+ WebhookEventType2["WALLET_STATUS"] = "WALLET_STATUS";
10001
+ WebhookEventType2["WALLET_OUTGOING_PAYMENT_FINISHED"] = "WALLET_OUTGOING_PAYMENT_FINISHED";
10002
+ WebhookEventType2["WALLET_INCOMING_PAYMENT_FINISHED"] = "WALLET_INCOMING_PAYMENT_FINISHED";
10003
+ WebhookEventType2["WALLET_WITHDRAWAL_FINISHED"] = "WALLET_WITHDRAWAL_FINISHED";
10004
+ WebhookEventType2["WALLET_FUNDS_RECEIVED"] = "WALLET_FUNDS_RECEIVED";
10005
+ WebhookEventType2["REMOTE_SIGNING"] = "REMOTE_SIGNING";
10006
+ WebhookEventType2["LOW_BALANCE"] = "LOW_BALANCE";
10007
+ return WebhookEventType2;
10008
+ })(WebhookEventType || {});
10009
+ var WebhookEventType_default = WebhookEventType;
10010
+
10011
+ // src/objects/Withdrawal.ts
10012
+ var WithdrawalFromJson = (obj) => {
10013
+ return {
10014
+ id: obj["withdrawal_id"],
10015
+ createdAt: obj["withdrawal_created_at"],
10016
+ updatedAt: obj["withdrawal_updated_at"],
10017
+ status: TransactionStatus_default[obj["withdrawal_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
10018
+ amount: CurrencyAmountFromJson(obj["withdrawal_amount"]),
10019
+ blockHeight: obj["withdrawal_block_height"],
10020
+ destinationAddresses: obj["withdrawal_destination_addresses"],
10021
+ originId: obj["withdrawal_origin"].id,
10022
+ typename: "Withdrawal",
10023
+ resolvedAt: obj["withdrawal_resolved_at"],
10024
+ transactionHash: obj["withdrawal_transaction_hash"],
10025
+ fees: !!obj["withdrawal_fees"] ? CurrencyAmountFromJson(obj["withdrawal_fees"]) : void 0,
10026
+ blockHash: obj["withdrawal_block_hash"],
10027
+ numConfirmations: obj["withdrawal_num_confirmations"]
10028
+ };
9835
10029
  };
9836
10030
  var FRAGMENT29 = `
9837
- fragment WithdrawalRequestFragment on WithdrawalRequest {
10031
+ fragment WithdrawalFragment on Withdrawal {
9838
10032
  __typename
9839
- withdrawal_request_id: id
9840
- withdrawal_request_created_at: created_at
9841
- withdrawal_request_updated_at: updated_at
9842
- withdrawal_request_amount: amount {
10033
+ withdrawal_id: id
10034
+ withdrawal_created_at: created_at
10035
+ withdrawal_updated_at: updated_at
10036
+ withdrawal_status: status
10037
+ withdrawal_resolved_at: resolved_at
10038
+ withdrawal_amount: amount {
9843
10039
  __typename
9844
10040
  currency_amount_original_value: original_value
9845
10041
  currency_amount_original_unit: original_unit
@@ -9847,7 +10043,8 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
9847
10043
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9848
10044
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9849
10045
  }
9850
- withdrawal_request_estimated_amount: estimated_amount {
10046
+ withdrawal_transaction_hash: transaction_hash
10047
+ withdrawal_fees: fees {
9851
10048
  __typename
9852
10049
  currency_amount_original_value: original_value
9853
10050
  currency_amount_original_unit: original_unit
@@ -9855,15 +10052,31 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
9855
10052
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9856
10053
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9857
10054
  }
9858
- withdrawal_request_bitcoin_address: bitcoin_address
9859
- withdrawal_request_withdrawal_mode: withdrawal_mode
9860
- withdrawal_request_status: status
9861
- withdrawal_request_completed_at: completed_at
9862
- withdrawal_request_withdrawal: withdrawal {
10055
+ withdrawal_block_hash: block_hash
10056
+ withdrawal_block_height: block_height
10057
+ withdrawal_destination_addresses: destination_addresses
10058
+ withdrawal_num_confirmations: num_confirmations
10059
+ withdrawal_origin: origin {
9863
10060
  id
9864
10061
  }
9865
10062
  }`;
9866
- var WithdrawalRequest_default = WithdrawalRequest;
10063
+ var getWithdrawalQuery = (id) => {
10064
+ return {
10065
+ queryPayload: `
10066
+ query GetWithdrawal($id: ID!) {
10067
+ entity(id: $id) {
10068
+ ... on Withdrawal {
10069
+ ...WithdrawalFragment
10070
+ }
10071
+ }
10072
+ }
10073
+
10074
+ ${FRAGMENT29}
10075
+ `,
10076
+ variables: { id },
10077
+ constructObject: (data) => WithdrawalFromJson(data.entity)
10078
+ };
10079
+ };
9867
10080
  // Annotate the CommonJS export names for ESM import in node:
9868
10081
  0 && (module.exports = {
9869
10082
  Account,