@lightsparkdev/lightspark-sdk 1.5.13 → 1.6.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 (54) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{chunk-FGFVWCTL.js → chunk-UHTZSOPX.js} +272 -144
  3. package/dist/{index-2b493387.d.ts → index-145ff316.d.ts} +232 -87
  4. package/dist/index.cjs +351 -142
  5. package/dist/index.d.cts +2 -2
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +85 -3
  8. package/dist/objects/index.cjs +262 -133
  9. package/dist/objects/index.d.cts +1 -1
  10. package/dist/objects/index.d.ts +1 -1
  11. package/dist/objects/index.js +3 -1
  12. package/package.json +2 -2
  13. package/src/client.ts +62 -0
  14. package/src/graphql/InvoiceForPaymentHash.ts +17 -0
  15. package/src/graphql/OutgoingPaymentsForPaymentHash.ts +21 -0
  16. package/src/objects/Account.ts +14 -2
  17. package/src/objects/ChannelClosingTransaction.ts +1 -4
  18. package/src/objects/ChannelOpeningTransaction.ts +1 -4
  19. package/src/objects/Connection.ts +116 -0
  20. package/src/objects/Deposit.ts +1 -4
  21. package/src/objects/Entity.ts +10 -0
  22. package/src/objects/FailHtlcsInput.ts +27 -0
  23. package/src/objects/FailHtlcsOutput.ts +26 -0
  24. package/src/objects/InvoiceForPaymentHashInput.ts +23 -0
  25. package/src/objects/InvoiceForPaymentHashOutput.ts +30 -0
  26. package/src/objects/LightningTransaction.ts +3 -0
  27. package/src/objects/LightsparkNode.ts +3 -1
  28. package/src/objects/LightsparkNodeWithOSK.ts +8 -4
  29. package/src/objects/LightsparkNodeWithRemoteSigning.ts +8 -4
  30. package/src/objects/OnChainFeeTarget.ts +19 -0
  31. package/src/objects/OnChainTransaction.ts +1 -4
  32. package/src/objects/OutgoingPayment.ts +5 -0
  33. package/src/objects/OutgoingPaymentForIdempotencyKeyInput.ts +24 -0
  34. package/src/objects/OutgoingPaymentForIdempotencyKeyOutput.ts +33 -0
  35. package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +1 -0
  36. package/src/objects/OutgoingPaymentsForPaymentHashQueryInput.ts +34 -0
  37. package/src/objects/OutgoingPaymentsForPaymentHashQueryOutput.ts +37 -0
  38. package/src/objects/PayInvoiceInput.ts +8 -0
  39. package/src/objects/PayUmaInvoiceInput.ts +4 -0
  40. package/src/objects/PaymentFailureReason.ts +2 -0
  41. package/src/objects/RemoteSigningSubEventType.ts +2 -0
  42. package/src/objects/RequestWithdrawalInput.ts +29 -0
  43. package/src/objects/SendPaymentInput.ts +8 -0
  44. package/src/objects/Transaction.ts +3 -0
  45. package/src/objects/TransactionStatus.ts +1 -1
  46. package/src/objects/Wallet.ts +10 -0
  47. package/src/objects/Withdrawal.ts +1 -4
  48. package/src/objects/WithdrawalRequest.ts +107 -11
  49. package/src/objects/WithdrawalRequestStatus.ts +2 -0
  50. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +15 -10
  51. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +15 -10
  52. package/src/objects/WithdrawalRequestToWithdrawalsConnection.ts +47 -0
  53. package/src/objects/index.ts +10 -0
  54. package/src/webhooks.ts +3 -0
@@ -38,6 +38,7 @@ __export(objects_exports, {
38
38
  LightsparkNodeWithOSK: () => LightsparkNodeWithOSK_default,
39
39
  LightsparkNodeWithRemoteSigning: () => LightsparkNodeWithRemoteSigning_default,
40
40
  NodeAddressType: () => NodeAddressType_default,
41
+ OnChainFeeTarget: () => OnChainFeeTarget_default,
41
42
  OutgoingPayment: () => OutgoingPayment_default,
42
43
  OutgoingPaymentAttempt: () => OutgoingPaymentAttempt_default,
43
44
  OutgoingPaymentAttemptStatus: () => OutgoingPaymentAttemptStatus_default,
@@ -761,13 +762,13 @@ query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [Node
761
762
  }
762
763
  });
763
764
  }
764
- async getChannels(client, first = void 0, statuses = void 0, after = void 0) {
765
+ async getChannels(client, first = void 0, after = void 0, beforeDate = void 0, afterDate = void 0, statuses = void 0) {
765
766
  return await client.executeRawQuery({
766
767
  queryPayload: `
767
- query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) {
768
+ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $after: String, $before_date: DateTime, $after_date: DateTime, $statuses: [ChannelStatus!]) {
768
769
  entity(id: $entity_id) {
769
770
  ... on LightsparkNodeWithOSK {
770
- channels(, first: $first, statuses: $statuses, after: $after) {
771
+ channels(, first: $first, after: $after, before_date: $before_date, after_date: $after_date, statuses: $statuses) {
771
772
  __typename
772
773
  lightspark_node_to_channels_connection_count: count
773
774
  lightspark_node_to_channels_connection_page_info: page_info {
@@ -879,8 +880,10 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
879
880
  variables: {
880
881
  entity_id: this.id,
881
882
  first,
882
- statuses,
883
- after
883
+ after,
884
+ before_date: beforeDate,
885
+ after_date: afterDate,
886
+ statuses
884
887
  },
885
888
  constructObject: (json) => {
886
889
  const connection = json["entity"]["channels"];
@@ -1188,13 +1191,13 @@ query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [Node
1188
1191
  }
1189
1192
  });
1190
1193
  }
1191
- async getChannels(client, first = void 0, statuses = void 0, after = void 0) {
1194
+ async getChannels(client, first = void 0, after = void 0, beforeDate = void 0, afterDate = void 0, statuses = void 0) {
1192
1195
  return await client.executeRawQuery({
1193
1196
  queryPayload: `
1194
- query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) {
1197
+ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $after: String, $before_date: DateTime, $after_date: DateTime, $statuses: [ChannelStatus!]) {
1195
1198
  entity(id: $entity_id) {
1196
1199
  ... on LightsparkNodeWithRemoteSigning {
1197
- channels(, first: $first, statuses: $statuses, after: $after) {
1200
+ channels(, first: $first, after: $after, before_date: $before_date, after_date: $after_date, statuses: $statuses) {
1198
1201
  __typename
1199
1202
  lightspark_node_to_channels_connection_count: count
1200
1203
  lightspark_node_to_channels_connection_page_info: page_info {
@@ -1306,8 +1309,10 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
1306
1309
  variables: {
1307
1310
  entity_id: this.id,
1308
1311
  first,
1309
- statuses,
1310
- after
1312
+ after,
1313
+ before_date: beforeDate,
1314
+ after_date: afterDate,
1315
+ statuses
1311
1316
  },
1312
1317
  constructObject: (json) => {
1313
1318
  const connection = json["entity"]["channels"];
@@ -3463,6 +3468,7 @@ var PaymentFailureReason = /* @__PURE__ */ ((PaymentFailureReason2) => {
3463
3468
  PaymentFailureReason2["INVOICE_EXPIRED"] = "INVOICE_EXPIRED";
3464
3469
  PaymentFailureReason2["INVOICE_CANCELLED"] = "INVOICE_CANCELLED";
3465
3470
  PaymentFailureReason2["RISK_SCREENING_FAILED"] = "RISK_SCREENING_FAILED";
3471
+ PaymentFailureReason2["INSUFFICIENT_BALANCE_ON_SINGLE_PATH_INVOICE"] = "INSUFFICIENT_BALANCE_ON_SINGLE_PATH_INVOICE";
3466
3472
  return PaymentFailureReason2;
3467
3473
  })(PaymentFailureReason || {});
3468
3474
  var PaymentFailureReason_default = PaymentFailureReason;
@@ -3523,7 +3529,7 @@ var RichTextToJson = (obj) => {
3523
3529
 
3524
3530
  // src/objects/OutgoingPayment.ts
3525
3531
  var OutgoingPayment = class {
3526
- constructor(id, createdAt, updatedAt, status, amount, isUma, originId, isInternalPayment, typename, resolvedAt, transactionHash, destinationId, fees, paymentRequestData, failureReason, failureMessage, umaPostTransactionData, paymentPreimage) {
3532
+ constructor(id, createdAt, updatedAt, status, amount, isUma, originId, isInternalPayment, typename, resolvedAt, transactionHash, destinationId, fees, paymentRequestData, failureReason, failureMessage, umaPostTransactionData, paymentPreimage, idempotencyKey) {
3527
3533
  this.id = id;
3528
3534
  this.createdAt = createdAt;
3529
3535
  this.updatedAt = updatedAt;
@@ -3542,6 +3548,7 @@ var OutgoingPayment = class {
3542
3548
  this.failureMessage = failureMessage;
3543
3549
  this.umaPostTransactionData = umaPostTransactionData;
3544
3550
  this.paymentPreimage = paymentPreimage;
3551
+ this.idempotencyKey = idempotencyKey;
3545
3552
  autoBind(this);
3546
3553
  }
3547
3554
  async getAttempts(client, first = void 0, after = void 0) {
@@ -3641,7 +3648,8 @@ ${FRAGMENT13}
3641
3648
  outgoing_payment_failure_message: this.failureMessage ? RichTextToJson(this.failureMessage) : void 0,
3642
3649
  outgoing_payment_uma_post_transaction_data: this.umaPostTransactionData?.map((e) => PostTransactionDataToJson(e)),
3643
3650
  outgoing_payment_payment_preimage: this.paymentPreimage,
3644
- outgoing_payment_is_internal_payment: this.isInternalPayment
3651
+ outgoing_payment_is_internal_payment: this.isInternalPayment,
3652
+ outgoing_payment_idempotency_key: this.idempotencyKey
3645
3653
  };
3646
3654
  }
3647
3655
  };
@@ -3666,7 +3674,8 @@ var OutgoingPaymentFromJson = (obj) => {
3666
3674
  obj["outgoing_payment_uma_post_transaction_data"]?.map(
3667
3675
  (e) => PostTransactionDataFromJson(e)
3668
3676
  ),
3669
- obj["outgoing_payment_payment_preimage"]
3677
+ obj["outgoing_payment_payment_preimage"],
3678
+ obj["outgoing_payment_idempotency_key"]
3670
3679
  );
3671
3680
  };
3672
3681
  var FRAGMENT13 = `
@@ -4014,6 +4023,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
4014
4023
  }
4015
4024
  outgoing_payment_payment_preimage: payment_preimage
4016
4025
  outgoing_payment_is_internal_payment: is_internal_payment
4026
+ outgoing_payment_idempotency_key: idempotency_key
4017
4027
  }`;
4018
4028
  var OutgoingPayment_default = OutgoingPayment;
4019
4029
 
@@ -4125,7 +4135,8 @@ var TransactionFromJson = (obj) => {
4125
4135
  obj["outgoing_payment_uma_post_transaction_data"]?.map(
4126
4136
  (e) => PostTransactionDataFromJson(e)
4127
4137
  ),
4128
- obj["outgoing_payment_payment_preimage"]
4138
+ obj["outgoing_payment_payment_preimage"],
4139
+ obj["outgoing_payment_idempotency_key"]
4129
4140
  );
4130
4141
  }
4131
4142
  if (obj["__typename"] == "RoutingTransaction") {
@@ -4648,6 +4659,7 @@ fragment TransactionFragment on Transaction {
4648
4659
  }
4649
4660
  outgoing_payment_payment_preimage: payment_preimage
4650
4661
  outgoing_payment_is_internal_payment: is_internal_payment
4662
+ outgoing_payment_idempotency_key: idempotency_key
4651
4663
  }
4652
4664
  ... on RoutingTransaction {
4653
4665
  __typename
@@ -4815,6 +4827,7 @@ var WithdrawalMode_default = WithdrawalMode;
4815
4827
  // src/objects/WithdrawalRequestStatus.ts
4816
4828
  var WithdrawalRequestStatus = /* @__PURE__ */ ((WithdrawalRequestStatus2) => {
4817
4829
  WithdrawalRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
4830
+ WithdrawalRequestStatus2["CREATING"] = "CREATING";
4818
4831
  WithdrawalRequestStatus2["CREATED"] = "CREATED";
4819
4832
  WithdrawalRequestStatus2["FAILED"] = "FAILED";
4820
4833
  WithdrawalRequestStatus2["IN_PROGRESS"] = "IN_PROGRESS";
@@ -4897,11 +4910,12 @@ ${FRAGMENT15}
4897
4910
  // src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts
4898
4911
  var WithdrawalRequestToChannelClosingTransactionsConnectionFromJson = (obj) => {
4899
4912
  return {
4913
+ count: obj["withdrawal_request_to_channel_closing_transactions_connection_count"],
4900
4914
  pageInfo: PageInfoFromJson(
4901
4915
  obj["withdrawal_request_to_channel_closing_transactions_connection_page_info"]
4902
4916
  ),
4903
- count: obj["withdrawal_request_to_channel_closing_transactions_connection_count"],
4904
- entities: obj["withdrawal_request_to_channel_closing_transactions_connection_entities"].map((e) => ChannelClosingTransactionFromJson(e))
4917
+ entities: obj["withdrawal_request_to_channel_closing_transactions_connection_entities"].map((e) => ChannelClosingTransactionFromJson(e)),
4918
+ typename: "WithdrawalRequestToChannelClosingTransactionsConnection"
4905
4919
  };
4906
4920
  };
4907
4921
 
@@ -4978,17 +4992,98 @@ ${FRAGMENT16}
4978
4992
  // src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts
4979
4993
  var WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson = (obj) => {
4980
4994
  return {
4995
+ count: obj["withdrawal_request_to_channel_opening_transactions_connection_count"],
4981
4996
  pageInfo: PageInfoFromJson(
4982
4997
  obj["withdrawal_request_to_channel_opening_transactions_connection_page_info"]
4983
4998
  ),
4984
- count: obj["withdrawal_request_to_channel_opening_transactions_connection_count"],
4985
- entities: obj["withdrawal_request_to_channel_opening_transactions_connection_entities"].map((e) => ChannelOpeningTransactionFromJson(e))
4999
+ entities: obj["withdrawal_request_to_channel_opening_transactions_connection_entities"].map((e) => ChannelOpeningTransactionFromJson(e)),
5000
+ typename: "WithdrawalRequestToChannelOpeningTransactionsConnection"
5001
+ };
5002
+ };
5003
+
5004
+ // src/objects/Withdrawal.ts
5005
+ var WithdrawalFromJson = (obj) => {
5006
+ return {
5007
+ id: obj["withdrawal_id"],
5008
+ createdAt: obj["withdrawal_created_at"],
5009
+ updatedAt: obj["withdrawal_updated_at"],
5010
+ status: TransactionStatus_default[obj["withdrawal_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
5011
+ amount: CurrencyAmountFromJson(obj["withdrawal_amount"]),
5012
+ blockHeight: obj["withdrawal_block_height"],
5013
+ destinationAddresses: obj["withdrawal_destination_addresses"],
5014
+ originId: obj["withdrawal_origin"].id,
5015
+ typename: "Withdrawal",
5016
+ resolvedAt: obj["withdrawal_resolved_at"],
5017
+ transactionHash: obj["withdrawal_transaction_hash"],
5018
+ fees: !!obj["withdrawal_fees"] ? CurrencyAmountFromJson(obj["withdrawal_fees"]) : void 0,
5019
+ blockHash: obj["withdrawal_block_hash"],
5020
+ numConfirmations: obj["withdrawal_num_confirmations"]
5021
+ };
5022
+ };
5023
+ var FRAGMENT17 = `
5024
+ fragment WithdrawalFragment on Withdrawal {
5025
+ __typename
5026
+ withdrawal_id: id
5027
+ withdrawal_created_at: created_at
5028
+ withdrawal_updated_at: updated_at
5029
+ withdrawal_status: status
5030
+ withdrawal_resolved_at: resolved_at
5031
+ withdrawal_amount: amount {
5032
+ __typename
5033
+ currency_amount_original_value: original_value
5034
+ currency_amount_original_unit: original_unit
5035
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5036
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5037
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5038
+ }
5039
+ withdrawal_transaction_hash: transaction_hash
5040
+ withdrawal_fees: fees {
5041
+ __typename
5042
+ currency_amount_original_value: original_value
5043
+ currency_amount_original_unit: original_unit
5044
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5045
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5046
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5047
+ }
5048
+ withdrawal_block_hash: block_hash
5049
+ withdrawal_block_height: block_height
5050
+ withdrawal_destination_addresses: destination_addresses
5051
+ withdrawal_num_confirmations: num_confirmations
5052
+ withdrawal_origin: origin {
5053
+ id
5054
+ }
5055
+ }`;
5056
+ var getWithdrawalQuery = (id) => {
5057
+ return {
5058
+ queryPayload: `
5059
+ query GetWithdrawal($id: ID!) {
5060
+ entity(id: $id) {
5061
+ ... on Withdrawal {
5062
+ ...WithdrawalFragment
5063
+ }
5064
+ }
5065
+ }
5066
+
5067
+ ${FRAGMENT17}
5068
+ `,
5069
+ variables: { id },
5070
+ constructObject: (data) => WithdrawalFromJson(data.entity)
5071
+ };
5072
+ };
5073
+
5074
+ // src/objects/WithdrawalRequestToWithdrawalsConnection.ts
5075
+ var WithdrawalRequestToWithdrawalsConnectionFromJson = (obj) => {
5076
+ return {
5077
+ count: obj["withdrawal_request_to_withdrawals_connection_count"],
5078
+ entities: obj["withdrawal_request_to_withdrawals_connection_entities"].map(
5079
+ (e) => WithdrawalFromJson(e)
5080
+ )
4986
5081
  };
4987
5082
  };
4988
5083
 
4989
5084
  // src/objects/WithdrawalRequest.ts
4990
5085
  var WithdrawalRequest = class {
4991
- constructor(id, createdAt, updatedAt, requestedAmount, amount, bitcoinAddress, withdrawalMode, status, typename, estimatedAmount, amountWithdrawn, completedAt, withdrawalId) {
5086
+ constructor(id, createdAt, updatedAt, requestedAmount, amount, bitcoinAddress, withdrawalMode, status, typename, estimatedAmount, amountWithdrawn, totalFees, completedAt, withdrawalId, idempotencyKey) {
4992
5087
  this.id = id;
4993
5088
  this.createdAt = createdAt;
4994
5089
  this.updatedAt = updatedAt;
@@ -5000,18 +5095,21 @@ var WithdrawalRequest = class {
5000
5095
  this.typename = typename;
5001
5096
  this.estimatedAmount = estimatedAmount;
5002
5097
  this.amountWithdrawn = amountWithdrawn;
5098
+ this.totalFees = totalFees;
5003
5099
  this.completedAt = completedAt;
5004
5100
  this.withdrawalId = withdrawalId;
5101
+ this.idempotencyKey = idempotencyKey;
5005
5102
  autoBind(this);
5006
5103
  }
5007
- async getChannelClosingTransactions(client, first = void 0) {
5104
+ async getChannelClosingTransactions(client, first = void 0, after = void 0) {
5008
5105
  return await client.executeRawQuery({
5009
5106
  queryPayload: `
5010
- query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: ID!, $first: Int) {
5107
+ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: ID!, $first: Int, $after: String) {
5011
5108
  entity(id: $entity_id) {
5012
5109
  ... on WithdrawalRequest {
5013
- channel_closing_transactions(, first: $first) {
5110
+ channel_closing_transactions(, first: $first, after: $after) {
5014
5111
  __typename
5112
+ withdrawal_request_to_channel_closing_transactions_connection_count: count
5015
5113
  withdrawal_request_to_channel_closing_transactions_connection_page_info: page_info {
5016
5114
  __typename
5017
5115
  page_info_has_next_page: has_next_page
@@ -5019,7 +5117,6 @@ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: I
5019
5117
  page_info_start_cursor: start_cursor
5020
5118
  page_info_end_cursor: end_cursor
5021
5119
  }
5022
- withdrawal_request_to_channel_closing_transactions_connection_count: count
5023
5120
  withdrawal_request_to_channel_closing_transactions_connection_entities: entities {
5024
5121
  __typename
5025
5122
  channel_closing_transaction_id: id
@@ -5057,7 +5154,7 @@ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: I
5057
5154
  }
5058
5155
  }
5059
5156
  `,
5060
- variables: { entity_id: this.id, first },
5157
+ variables: { entity_id: this.id, first, after },
5061
5158
  constructObject: (json) => {
5062
5159
  const connection = json["entity"]["channel_closing_transactions"];
5063
5160
  return WithdrawalRequestToChannelClosingTransactionsConnectionFromJson(
@@ -5066,14 +5163,15 @@ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: I
5066
5163
  }
5067
5164
  });
5068
5165
  }
5069
- async getChannelOpeningTransactions(client, first = void 0) {
5166
+ async getChannelOpeningTransactions(client, first = void 0, after = void 0) {
5070
5167
  return await client.executeRawQuery({
5071
5168
  queryPayload: `
5072
- query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: ID!, $first: Int) {
5169
+ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: ID!, $first: Int, $after: String) {
5073
5170
  entity(id: $entity_id) {
5074
5171
  ... on WithdrawalRequest {
5075
- channel_opening_transactions(, first: $first) {
5172
+ channel_opening_transactions(, first: $first, after: $after) {
5076
5173
  __typename
5174
+ withdrawal_request_to_channel_opening_transactions_connection_count: count
5077
5175
  withdrawal_request_to_channel_opening_transactions_connection_page_info: page_info {
5078
5176
  __typename
5079
5177
  page_info_has_next_page: has_next_page
@@ -5081,7 +5179,6 @@ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: I
5081
5179
  page_info_start_cursor: start_cursor
5082
5180
  page_info_end_cursor: end_cursor
5083
5181
  }
5084
- withdrawal_request_to_channel_opening_transactions_connection_count: count
5085
5182
  withdrawal_request_to_channel_opening_transactions_connection_entities: entities {
5086
5183
  __typename
5087
5184
  channel_opening_transaction_id: id
@@ -5119,7 +5216,7 @@ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: I
5119
5216
  }
5120
5217
  }
5121
5218
  `,
5122
- variables: { entity_id: this.id, first },
5219
+ variables: { entity_id: this.id, first, after },
5123
5220
  constructObject: (json) => {
5124
5221
  const connection = json["entity"]["channel_opening_transactions"];
5125
5222
  return WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson(
@@ -5128,6 +5225,59 @@ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: I
5128
5225
  }
5129
5226
  });
5130
5227
  }
5228
+ async getWithdrawals(client, first = void 0) {
5229
+ return await client.executeRawQuery({
5230
+ queryPayload: `
5231
+ query FetchWithdrawalRequestToWithdrawalsConnection($entity_id: ID!, $first: Int) {
5232
+ entity(id: $entity_id) {
5233
+ ... on WithdrawalRequest {
5234
+ withdrawals(, first: $first) {
5235
+ __typename
5236
+ withdrawal_request_to_withdrawals_connection_count: count
5237
+ withdrawal_request_to_withdrawals_connection_entities: entities {
5238
+ __typename
5239
+ withdrawal_id: id
5240
+ withdrawal_created_at: created_at
5241
+ withdrawal_updated_at: updated_at
5242
+ withdrawal_status: status
5243
+ withdrawal_resolved_at: resolved_at
5244
+ withdrawal_amount: amount {
5245
+ __typename
5246
+ currency_amount_original_value: original_value
5247
+ currency_amount_original_unit: original_unit
5248
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5249
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5250
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5251
+ }
5252
+ withdrawal_transaction_hash: transaction_hash
5253
+ withdrawal_fees: fees {
5254
+ __typename
5255
+ currency_amount_original_value: original_value
5256
+ currency_amount_original_unit: original_unit
5257
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5258
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5259
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5260
+ }
5261
+ withdrawal_block_hash: block_hash
5262
+ withdrawal_block_height: block_height
5263
+ withdrawal_destination_addresses: destination_addresses
5264
+ withdrawal_num_confirmations: num_confirmations
5265
+ withdrawal_origin: origin {
5266
+ id
5267
+ }
5268
+ }
5269
+ }
5270
+ }
5271
+ }
5272
+ }
5273
+ `,
5274
+ variables: { entity_id: this.id, first },
5275
+ constructObject: (json) => {
5276
+ const connection = json["entity"]["withdrawals"];
5277
+ return WithdrawalRequestToWithdrawalsConnectionFromJson(connection);
5278
+ }
5279
+ });
5280
+ }
5131
5281
  static getWithdrawalRequestQuery(id) {
5132
5282
  return {
5133
5283
  queryPayload: `
@@ -5139,7 +5289,7 @@ query GetWithdrawalRequest($id: ID!) {
5139
5289
  }
5140
5290
  }
5141
5291
 
5142
- ${FRAGMENT17}
5292
+ ${FRAGMENT18}
5143
5293
  `,
5144
5294
  variables: { id },
5145
5295
  constructObject: (data) => WithdrawalRequestFromJson(data.entity)
@@ -5157,11 +5307,13 @@ ${FRAGMENT17}
5157
5307
  withdrawal_request_amount: CurrencyAmountToJson(this.amount),
5158
5308
  withdrawal_request_estimated_amount: this.estimatedAmount ? CurrencyAmountToJson(this.estimatedAmount) : void 0,
5159
5309
  withdrawal_request_amount_withdrawn: this.amountWithdrawn ? CurrencyAmountToJson(this.amountWithdrawn) : void 0,
5310
+ withdrawal_request_total_fees: this.totalFees ? CurrencyAmountToJson(this.totalFees) : void 0,
5160
5311
  withdrawal_request_bitcoin_address: this.bitcoinAddress,
5161
5312
  withdrawal_request_withdrawal_mode: this.withdrawalMode,
5162
5313
  withdrawal_request_status: this.status,
5163
5314
  withdrawal_request_completed_at: this.completedAt,
5164
- withdrawal_request_withdrawal: { id: this.withdrawalId }
5315
+ withdrawal_request_withdrawal: { id: this.withdrawalId },
5316
+ withdrawal_request_idempotency_key: this.idempotencyKey
5165
5317
  };
5166
5318
  }
5167
5319
  };
@@ -5178,11 +5330,13 @@ var WithdrawalRequestFromJson = (obj) => {
5178
5330
  "WithdrawalRequest",
5179
5331
  !!obj["withdrawal_request_estimated_amount"] ? CurrencyAmountFromJson(obj["withdrawal_request_estimated_amount"]) : void 0,
5180
5332
  !!obj["withdrawal_request_amount_withdrawn"] ? CurrencyAmountFromJson(obj["withdrawal_request_amount_withdrawn"]) : void 0,
5333
+ !!obj["withdrawal_request_total_fees"] ? CurrencyAmountFromJson(obj["withdrawal_request_total_fees"]) : void 0,
5181
5334
  obj["withdrawal_request_completed_at"],
5182
- obj["withdrawal_request_withdrawal"]?.id ?? void 0
5335
+ obj["withdrawal_request_withdrawal"]?.id ?? void 0,
5336
+ obj["withdrawal_request_idempotency_key"]
5183
5337
  );
5184
5338
  };
5185
- var FRAGMENT17 = `
5339
+ var FRAGMENT18 = `
5186
5340
  fragment WithdrawalRequestFragment on WithdrawalRequest {
5187
5341
  __typename
5188
5342
  withdrawal_request_id: id
@@ -5220,6 +5374,14 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
5220
5374
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5221
5375
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5222
5376
  }
5377
+ withdrawal_request_total_fees: total_fees {
5378
+ __typename
5379
+ currency_amount_original_value: original_value
5380
+ currency_amount_original_unit: original_unit
5381
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5382
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5383
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5384
+ }
5223
5385
  withdrawal_request_bitcoin_address: bitcoin_address
5224
5386
  withdrawal_request_withdrawal_mode: withdrawal_mode
5225
5387
  withdrawal_request_status: status
@@ -5227,6 +5389,7 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
5227
5389
  withdrawal_request_withdrawal: withdrawal {
5228
5390
  id
5229
5391
  }
5392
+ withdrawal_request_idempotency_key: idempotency_key
5230
5393
  }`;
5231
5394
  var WithdrawalRequest_default = WithdrawalRequest;
5232
5395
 
@@ -5753,6 +5916,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
5753
5916
  }
5754
5917
  outgoing_payment_payment_preimage: payment_preimage
5755
5918
  outgoing_payment_is_internal_payment: is_internal_payment
5919
+ outgoing_payment_idempotency_key: idempotency_key
5756
5920
  }
5757
5921
  ... on RoutingTransaction {
5758
5922
  __typename
@@ -6268,6 +6432,14 @@ query FetchWalletToWithdrawalRequestsConnection($entity_id: ID!, $first: Int, $a
6268
6432
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6269
6433
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6270
6434
  }
6435
+ withdrawal_request_total_fees: total_fees {
6436
+ __typename
6437
+ currency_amount_original_value: original_value
6438
+ currency_amount_original_unit: original_unit
6439
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6440
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6441
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6442
+ }
6271
6443
  withdrawal_request_bitcoin_address: bitcoin_address
6272
6444
  withdrawal_request_withdrawal_mode: withdrawal_mode
6273
6445
  withdrawal_request_status: status
@@ -6275,6 +6447,7 @@ query FetchWalletToWithdrawalRequestsConnection($entity_id: ID!, $first: Int, $a
6275
6447
  withdrawal_request_withdrawal: withdrawal {
6276
6448
  id
6277
6449
  }
6450
+ withdrawal_request_idempotency_key: idempotency_key
6278
6451
  }
6279
6452
  }
6280
6453
  }
@@ -6335,7 +6508,7 @@ query GetWallet($id: ID!) {
6335
6508
  }
6336
6509
  }
6337
6510
 
6338
- ${FRAGMENT18}
6511
+ ${FRAGMENT19}
6339
6512
  `,
6340
6513
  variables: { id },
6341
6514
  constructObject: (data) => WalletFromJson(data.entity)
@@ -6368,7 +6541,7 @@ var WalletFromJson = (obj) => {
6368
6541
  obj["wallet_account"]?.id ?? void 0
6369
6542
  );
6370
6543
  };
6371
- var FRAGMENT18 = `
6544
+ var FRAGMENT19 = `
6372
6545
  fragment WalletFragment on Wallet {
6373
6546
  __typename
6374
6547
  wallet_id: id
@@ -7586,6 +7759,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
7586
7759
  }
7587
7760
  outgoing_payment_payment_preimage: payment_preimage
7588
7761
  outgoing_payment_is_internal_payment: is_internal_payment
7762
+ outgoing_payment_idempotency_key: idempotency_key
7589
7763
  }
7590
7764
  ... on RoutingTransaction {
7591
7765
  __typename
@@ -8022,13 +8196,13 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
8022
8196
  }
8023
8197
  });
8024
8198
  }
8025
- async getWithdrawalRequests(client, first = void 0, after = void 0, bitcoinNetworks = void 0, statuses = void 0, nodeIds = void 0, afterDate = void 0, beforeDate = void 0) {
8199
+ async getWithdrawalRequests(client, first = void 0, after = void 0, bitcoinNetworks = void 0, statuses = void 0, nodeIds = void 0, idempotencyKeys = void 0, afterDate = void 0, beforeDate = void 0) {
8026
8200
  return await client.executeRawQuery({
8027
8201
  queryPayload: `
8028
- query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $bitcoin_networks: [BitcoinNetwork!], $statuses: [WithdrawalRequestStatus!], $node_ids: [ID!], $after_date: DateTime, $before_date: DateTime) {
8202
+ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $bitcoin_networks: [BitcoinNetwork!], $statuses: [WithdrawalRequestStatus!], $node_ids: [ID!], $idempotency_keys: [String!], $after_date: DateTime, $before_date: DateTime) {
8029
8203
  current_account {
8030
8204
  ... on Account {
8031
- withdrawal_requests(, first: $first, after: $after, bitcoin_networks: $bitcoin_networks, statuses: $statuses, node_ids: $node_ids, after_date: $after_date, before_date: $before_date) {
8205
+ withdrawal_requests(, first: $first, after: $after, bitcoin_networks: $bitcoin_networks, statuses: $statuses, node_ids: $node_ids, idempotency_keys: $idempotency_keys, after_date: $after_date, before_date: $before_date) {
8032
8206
  __typename
8033
8207
  account_to_withdrawal_requests_connection_count: count
8034
8208
  account_to_withdrawal_requests_connection_page_info: page_info {
@@ -8075,6 +8249,14 @@ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $b
8075
8249
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8076
8250
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8077
8251
  }
8252
+ withdrawal_request_total_fees: total_fees {
8253
+ __typename
8254
+ currency_amount_original_value: original_value
8255
+ currency_amount_original_unit: original_unit
8256
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8257
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8258
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8259
+ }
8078
8260
  withdrawal_request_bitcoin_address: bitcoin_address
8079
8261
  withdrawal_request_withdrawal_mode: withdrawal_mode
8080
8262
  withdrawal_request_status: status
@@ -8082,6 +8264,7 @@ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $b
8082
8264
  withdrawal_request_withdrawal: withdrawal {
8083
8265
  id
8084
8266
  }
8267
+ withdrawal_request_idempotency_key: idempotency_key
8085
8268
  }
8086
8269
  }
8087
8270
  }
@@ -8094,6 +8277,7 @@ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $b
8094
8277
  bitcoin_networks: bitcoinNetworks,
8095
8278
  statuses,
8096
8279
  node_ids: nodeIds,
8280
+ idempotency_keys: idempotencyKeys,
8097
8281
  after_date: afterDate,
8098
8282
  before_date: beforeDate
8099
8283
  },
@@ -8181,7 +8365,7 @@ query GetAccount {
8181
8365
  }
8182
8366
  }
8183
8367
 
8184
- ${FRAGMENT19}
8368
+ ${FRAGMENT20}
8185
8369
  `,
8186
8370
  variables: {},
8187
8371
  constructObject: (data) => AccountFromJson(data.current_account)
@@ -8206,7 +8390,7 @@ var AccountFromJson = (obj) => {
8206
8390
  obj["account_name"]
8207
8391
  );
8208
8392
  };
8209
- var FRAGMENT19 = `
8393
+ var FRAGMENT20 = `
8210
8394
  fragment AccountFragment on Account {
8211
8395
  __typename
8212
8396
  account_id: id
@@ -8236,7 +8420,7 @@ var AuditLogActorFromJson = (obj) => {
8236
8420
  `Couldn't find a concrete type for interface AuditLogActor corresponding to the typename=${obj["__typename"]}`
8237
8421
  );
8238
8422
  };
8239
- var FRAGMENT20 = `
8423
+ var FRAGMENT21 = `
8240
8424
  fragment AuditLogActorFragment on AuditLogActor {
8241
8425
  __typename
8242
8426
  ... on ApiToken {
@@ -8261,7 +8445,7 @@ query GetAuditLogActor($id: ID!) {
8261
8445
  }
8262
8446
  }
8263
8447
 
8264
- ${FRAGMENT20}
8448
+ ${FRAGMENT21}
8265
8449
  `,
8266
8450
  variables: { id },
8267
8451
  constructObject: (data) => AuditLogActorFromJson(data.entity)
@@ -8285,7 +8469,7 @@ var ChannelSnapshotFromJson = (obj) => {
8285
8469
  localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0
8286
8470
  };
8287
8471
  };
8288
- var FRAGMENT21 = `
8472
+ var FRAGMENT22 = `
8289
8473
  fragment ChannelSnapshotFragment on ChannelSnapshot {
8290
8474
  __typename
8291
8475
  channel_snapshot_id: id
@@ -8348,7 +8532,7 @@ query GetChannelSnapshot($id: ID!) {
8348
8532
  }
8349
8533
  }
8350
8534
 
8351
- ${FRAGMENT21}
8535
+ ${FRAGMENT22}
8352
8536
  `,
8353
8537
  variables: { id },
8354
8538
  constructObject: (data) => ChannelSnapshotFromJson(data.entity)
@@ -8657,7 +8841,7 @@ var SignablePayloadFromJson = (obj) => {
8657
8841
  mulTweak: obj["signable_payload_mul_tweak"]
8658
8842
  };
8659
8843
  };
8660
- var FRAGMENT22 = `
8844
+ var FRAGMENT23 = `
8661
8845
  fragment SignablePayloadFragment on SignablePayload {
8662
8846
  __typename
8663
8847
  signable_payload_id: id
@@ -8683,7 +8867,7 @@ query GetSignablePayload($id: ID!) {
8683
8867
  }
8684
8868
  }
8685
8869
 
8686
- ${FRAGMENT22}
8870
+ ${FRAGMENT23}
8687
8871
  `,
8688
8872
  variables: { id },
8689
8873
  constructObject: (data) => SignablePayloadFromJson(data.entity)
@@ -8709,7 +8893,7 @@ var DepositFromJson = (obj) => {
8709
8893
  numConfirmations: obj["deposit_num_confirmations"]
8710
8894
  };
8711
8895
  };
8712
- var FRAGMENT23 = `
8896
+ var FRAGMENT24 = `
8713
8897
  fragment DepositFragment on Deposit {
8714
8898
  __typename
8715
8899
  deposit_id: id
@@ -8753,7 +8937,7 @@ query GetDeposit($id: ID!) {
8753
8937
  }
8754
8938
  }
8755
8939
 
8756
- ${FRAGMENT23}
8940
+ ${FRAGMENT24}
8757
8941
  `,
8758
8942
  variables: { id },
8759
8943
  constructObject: (data) => DepositFromJson(data.entity)
@@ -8795,7 +8979,7 @@ var InvoiceFromJson = (obj) => {
8795
8979
  amountPaid: !!obj["invoice_amount_paid"] ? CurrencyAmountFromJson(obj["invoice_amount_paid"]) : void 0
8796
8980
  };
8797
8981
  };
8798
- var FRAGMENT24 = `
8982
+ var FRAGMENT25 = `
8799
8983
  fragment InvoiceFragment on Invoice {
8800
8984
  __typename
8801
8985
  invoice_id: id
@@ -9113,7 +9297,7 @@ query GetInvoice($id: ID!) {
9113
9297
  }
9114
9298
  }
9115
9299
 
9116
- ${FRAGMENT24}
9300
+ ${FRAGMENT25}
9117
9301
  `,
9118
9302
  variables: { id },
9119
9303
  constructObject: (data) => InvoiceFromJson(data.entity)
@@ -9165,7 +9349,8 @@ var LightningTransactionFromJson = (obj) => {
9165
9349
  obj["outgoing_payment_uma_post_transaction_data"]?.map(
9166
9350
  (e) => PostTransactionDataFromJson(e)
9167
9351
  ),
9168
- obj["outgoing_payment_payment_preimage"]
9352
+ obj["outgoing_payment_payment_preimage"],
9353
+ obj["outgoing_payment_idempotency_key"]
9169
9354
  );
9170
9355
  }
9171
9356
  if (obj["__typename"] == "RoutingTransaction") {
@@ -9190,7 +9375,7 @@ var LightningTransactionFromJson = (obj) => {
9190
9375
  `Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
9191
9376
  );
9192
9377
  };
9193
- var FRAGMENT25 = `
9378
+ var FRAGMENT26 = `
9194
9379
  fragment LightningTransactionFragment on LightningTransaction {
9195
9380
  __typename
9196
9381
  ... on IncomingPayment {
@@ -9574,6 +9759,7 @@ fragment LightningTransactionFragment on LightningTransaction {
9574
9759
  }
9575
9760
  outgoing_payment_payment_preimage: payment_preimage
9576
9761
  outgoing_payment_is_internal_payment: is_internal_payment
9762
+ outgoing_payment_idempotency_key: idempotency_key
9577
9763
  }
9578
9764
  ... on RoutingTransaction {
9579
9765
  __typename
@@ -9623,7 +9809,7 @@ query GetLightningTransaction($id: ID!) {
9623
9809
  }
9624
9810
  }
9625
9811
 
9626
- ${FRAGMENT25}
9812
+ ${FRAGMENT26}
9627
9813
  `,
9628
9814
  variables: { id },
9629
9815
  constructObject: (data) => LightningTransactionFromJson(data.entity)
@@ -9660,7 +9846,7 @@ var LightsparkNodeOwnerFromJson = (obj) => {
9660
9846
  `Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
9661
9847
  );
9662
9848
  };
9663
- var FRAGMENT26 = `
9849
+ var FRAGMENT27 = `
9664
9850
  fragment LightsparkNodeOwnerFragment on LightsparkNodeOwner {
9665
9851
  __typename
9666
9852
  ... on Account {
@@ -9721,13 +9907,24 @@ query GetLightsparkNodeOwner($id: ID!) {
9721
9907
  }
9722
9908
  }
9723
9909
 
9724
- ${FRAGMENT26}
9910
+ ${FRAGMENT27}
9725
9911
  `,
9726
9912
  variables: { id },
9727
9913
  constructObject: (data) => LightsparkNodeOwnerFromJson(data.entity)
9728
9914
  };
9729
9915
  };
9730
9916
 
9917
+ // src/objects/OnChainFeeTarget.ts
9918
+ var OnChainFeeTarget = /* @__PURE__ */ ((OnChainFeeTarget2) => {
9919
+ OnChainFeeTarget2["FUTURE_VALUE"] = "FUTURE_VALUE";
9920
+ OnChainFeeTarget2["HIGH"] = "HIGH";
9921
+ OnChainFeeTarget2["MEDIUM"] = "MEDIUM";
9922
+ OnChainFeeTarget2["LOW"] = "LOW";
9923
+ OnChainFeeTarget2["BACKGROUND"] = "BACKGROUND";
9924
+ return OnChainFeeTarget2;
9925
+ })(OnChainFeeTarget || {});
9926
+ var OnChainFeeTarget_default = OnChainFeeTarget;
9927
+
9731
9928
  // src/objects/OnChainTransaction.ts
9732
9929
  var import_core10 = require("@lightsparkdev/core");
9733
9930
  var OnChainTransactionFromJson = (obj) => {
@@ -9808,7 +10005,7 @@ var OnChainTransactionFromJson = (obj) => {
9808
10005
  `Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
9809
10006
  );
9810
10007
  };
9811
- var FRAGMENT27 = `
10008
+ var FRAGMENT28 = `
9812
10009
  fragment OnChainTransactionFragment on OnChainTransaction {
9813
10010
  __typename
9814
10011
  ... on ChannelClosingTransaction {
@@ -9951,7 +10148,7 @@ query GetOnChainTransaction($id: ID!) {
9951
10148
  }
9952
10149
  }
9953
10150
 
9954
- ${FRAGMENT27}
10151
+ ${FRAGMENT28}
9955
10152
  `,
9956
10153
  variables: { id },
9957
10154
  constructObject: (data) => OnChainTransactionFromJson(data.entity)
@@ -9978,6 +10175,7 @@ var RemoteSigningSubEventType = /* @__PURE__ */ ((RemoteSigningSubEventType2) =>
9978
10175
  RemoteSigningSubEventType2["RELEASE_PAYMENT_PREIMAGE"] = "RELEASE_PAYMENT_PREIMAGE";
9979
10176
  RemoteSigningSubEventType2["REQUEST_INVOICE_PAYMENT_HASH"] = "REQUEST_INVOICE_PAYMENT_HASH";
9980
10177
  RemoteSigningSubEventType2["REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET"] = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET";
10178
+ RemoteSigningSubEventType2["VLS_MESSAGE"] = "VLS_MESSAGE";
9981
10179
  return RemoteSigningSubEventType2;
9982
10180
  })(RemoteSigningSubEventType || {});
9983
10181
  var RemoteSigningSubEventType_default = RemoteSigningSubEventType;
@@ -10010,7 +10208,7 @@ var RoutingTransactionFromJson = (obj) => {
10010
10208
  failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
10011
10209
  };
10012
10210
  };
10013
- var FRAGMENT28 = `
10211
+ var FRAGMENT29 = `
10014
10212
  fragment RoutingTransactionFragment on RoutingTransaction {
10015
10213
  __typename
10016
10214
  routing_transaction_id: id
@@ -10058,7 +10256,7 @@ query GetRoutingTransaction($id: ID!) {
10058
10256
  }
10059
10257
  }
10060
10258
 
10061
- ${FRAGMENT28}
10259
+ ${FRAGMENT29}
10062
10260
  `,
10063
10261
  variables: { id },
10064
10262
  constructObject: (data) => RoutingTransactionFromJson(data.entity)
@@ -10074,7 +10272,7 @@ var SignableFromJson = (obj) => {
10074
10272
  typename: "Signable"
10075
10273
  };
10076
10274
  };
10077
- var FRAGMENT29 = `
10275
+ var FRAGMENT30 = `
10078
10276
  fragment SignableFragment on Signable {
10079
10277
  __typename
10080
10278
  signable_id: id
@@ -10092,7 +10290,7 @@ query GetSignable($id: ID!) {
10092
10290
  }
10093
10291
  }
10094
10292
 
10095
- ${FRAGMENT29}
10293
+ ${FRAGMENT30}
10096
10294
  `,
10097
10295
  variables: { id },
10098
10296
  constructObject: (data) => SignableFromJson(data.entity)
@@ -10131,7 +10329,7 @@ var UmaInvitationFromJson = (obj) => {
10131
10329
  incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ? IncentivesIneligibilityReason_default[obj["uma_invitation_incentives_ineligibility_reason"]] ?? IncentivesIneligibilityReason_default.FUTURE_VALUE : null
10132
10330
  };
10133
10331
  };
10134
- var FRAGMENT30 = `
10332
+ var FRAGMENT31 = `
10135
10333
  fragment UmaInvitationFragment on UmaInvitation {
10136
10334
  __typename
10137
10335
  uma_invitation_id: id
@@ -10155,7 +10353,7 @@ query GetUmaInvitation($id: ID!) {
10155
10353
  }
10156
10354
  }
10157
10355
 
10158
- ${FRAGMENT30}
10356
+ ${FRAGMENT31}
10159
10357
  `,
10160
10358
  variables: { id },
10161
10359
  constructObject: (data) => UmaInvitationFromJson(data.entity)
@@ -10182,76 +10380,6 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
10182
10380
  return WebhookEventType2;
10183
10381
  })(WebhookEventType || {});
10184
10382
  var WebhookEventType_default = WebhookEventType;
10185
-
10186
- // src/objects/Withdrawal.ts
10187
- var WithdrawalFromJson = (obj) => {
10188
- return {
10189
- id: obj["withdrawal_id"],
10190
- createdAt: obj["withdrawal_created_at"],
10191
- updatedAt: obj["withdrawal_updated_at"],
10192
- status: TransactionStatus_default[obj["withdrawal_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
10193
- amount: CurrencyAmountFromJson(obj["withdrawal_amount"]),
10194
- blockHeight: obj["withdrawal_block_height"],
10195
- destinationAddresses: obj["withdrawal_destination_addresses"],
10196
- originId: obj["withdrawal_origin"].id,
10197
- typename: "Withdrawal",
10198
- resolvedAt: obj["withdrawal_resolved_at"],
10199
- transactionHash: obj["withdrawal_transaction_hash"],
10200
- fees: !!obj["withdrawal_fees"] ? CurrencyAmountFromJson(obj["withdrawal_fees"]) : void 0,
10201
- blockHash: obj["withdrawal_block_hash"],
10202
- numConfirmations: obj["withdrawal_num_confirmations"]
10203
- };
10204
- };
10205
- var FRAGMENT31 = `
10206
- fragment WithdrawalFragment on Withdrawal {
10207
- __typename
10208
- withdrawal_id: id
10209
- withdrawal_created_at: created_at
10210
- withdrawal_updated_at: updated_at
10211
- withdrawal_status: status
10212
- withdrawal_resolved_at: resolved_at
10213
- withdrawal_amount: amount {
10214
- __typename
10215
- currency_amount_original_value: original_value
10216
- currency_amount_original_unit: original_unit
10217
- currency_amount_preferred_currency_unit: preferred_currency_unit
10218
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10219
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10220
- }
10221
- withdrawal_transaction_hash: transaction_hash
10222
- withdrawal_fees: fees {
10223
- __typename
10224
- currency_amount_original_value: original_value
10225
- currency_amount_original_unit: original_unit
10226
- currency_amount_preferred_currency_unit: preferred_currency_unit
10227
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10228
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10229
- }
10230
- withdrawal_block_hash: block_hash
10231
- withdrawal_block_height: block_height
10232
- withdrawal_destination_addresses: destination_addresses
10233
- withdrawal_num_confirmations: num_confirmations
10234
- withdrawal_origin: origin {
10235
- id
10236
- }
10237
- }`;
10238
- var getWithdrawalQuery = (id) => {
10239
- return {
10240
- queryPayload: `
10241
- query GetWithdrawal($id: ID!) {
10242
- entity(id: $id) {
10243
- ... on Withdrawal {
10244
- ...WithdrawalFragment
10245
- }
10246
- }
10247
- }
10248
-
10249
- ${FRAGMENT31}
10250
- `,
10251
- variables: { id },
10252
- constructObject: (data) => WithdrawalFromJson(data.entity)
10253
- };
10254
- };
10255
10383
  // Annotate the CommonJS export names for ESM import in node:
10256
10384
  0 && (module.exports = {
10257
10385
  Account,
@@ -10272,6 +10400,7 @@ ${FRAGMENT31}
10272
10400
  LightsparkNodeWithOSK,
10273
10401
  LightsparkNodeWithRemoteSigning,
10274
10402
  NodeAddressType,
10403
+ OnChainFeeTarget,
10275
10404
  OutgoingPayment,
10276
10405
  OutgoingPaymentAttempt,
10277
10406
  OutgoingPaymentAttemptStatus,