@lightsparkdev/lightspark-sdk 1.5.14 → 1.7.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 (62) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{chunk-FGFVWCTL.js → chunk-DSWMAFFH.js} +288 -144
  3. package/dist/{index-2b493387.d.ts → index-2f0cac65.d.ts} +270 -93
  4. package/dist/index.cjs +416 -143
  5. package/dist/index.d.cts +2 -2
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +136 -4
  8. package/dist/objects/index.cjs +279 -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 +5 -1
  12. package/package.json +1 -1
  13. package/src/client.ts +125 -1
  14. package/src/graphql/CreateUmaInvoice.ts +2 -0
  15. package/src/graphql/InvoiceForPaymentHash.ts +17 -0
  16. package/src/graphql/OutgoingPaymentsForPaymentHash.ts +21 -0
  17. package/src/graphql/PayUmaInvoice.ts +2 -0
  18. package/src/objects/Account.ts +15 -2
  19. package/src/objects/ChannelClosingTransaction.ts +1 -4
  20. package/src/objects/ChannelOpeningTransaction.ts +1 -4
  21. package/src/objects/Connection.ts +116 -0
  22. package/src/objects/CreateLnurlInvoiceInput.ts +6 -0
  23. package/src/objects/CreateUmaInvoiceInput.ts +4 -0
  24. package/src/objects/CurrencyUnit.ts +1 -1
  25. package/src/objects/Deposit.ts +1 -4
  26. package/src/objects/Entity.ts +11 -0
  27. package/src/objects/FailHtlcsInput.ts +27 -0
  28. package/src/objects/FailHtlcsOutput.ts +26 -0
  29. package/src/objects/InvoiceForPaymentHashInput.ts +23 -0
  30. package/src/objects/InvoiceForPaymentHashOutput.ts +30 -0
  31. package/src/objects/LightningTransaction.ts +3 -0
  32. package/src/objects/LightsparkNode.ts +3 -1
  33. package/src/objects/LightsparkNodeWithOSK.ts +8 -4
  34. package/src/objects/LightsparkNodeWithRemoteSigning.ts +8 -4
  35. package/src/objects/OnChainFeeTarget.ts +19 -0
  36. package/src/objects/OnChainTransaction.ts +1 -4
  37. package/src/objects/OutgoingPayment.ts +5 -0
  38. package/src/objects/OutgoingPaymentForIdempotencyKeyInput.ts +24 -0
  39. package/src/objects/OutgoingPaymentForIdempotencyKeyOutput.ts +33 -0
  40. package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +1 -0
  41. package/src/objects/OutgoingPaymentsForPaymentHashQueryInput.ts +34 -0
  42. package/src/objects/OutgoingPaymentsForPaymentHashQueryOutput.ts +37 -0
  43. package/src/objects/PayInvoiceInput.ts +8 -0
  44. package/src/objects/PayUmaInvoiceInput.ts +12 -0
  45. package/src/objects/PaymentFailureReason.ts +2 -0
  46. package/src/objects/RemoteSigningSubEventType.ts +2 -0
  47. package/src/objects/RequestInitiator.ts +15 -0
  48. package/src/objects/RequestWithdrawalInput.ts +29 -0
  49. package/src/objects/SendPaymentInput.ts +8 -0
  50. package/src/objects/Transaction.ts +3 -0
  51. package/src/objects/TransactionStatus.ts +2 -2
  52. package/src/objects/Wallet.ts +11 -0
  53. package/src/objects/WalletStatus.ts +2 -2
  54. package/src/objects/Withdrawal.ts +1 -4
  55. package/src/objects/WithdrawalRequest.ts +114 -11
  56. package/src/objects/WithdrawalRequestStatus.ts +2 -0
  57. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +15 -10
  58. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +15 -10
  59. package/src/objects/WithdrawalRequestToWithdrawalsConnection.ts +47 -0
  60. package/src/objects/index.ts +11 -0
  61. package/src/tests/integration/general-regtest.test.ts +3 -0
  62. package/src/tests/uma-utils.test.ts +70 -0
@@ -679,13 +679,13 @@ query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [Node
679
679
  }
680
680
  });
681
681
  }
682
- async getChannels(client, first = void 0, statuses = void 0, after = void 0) {
682
+ async getChannels(client, first = void 0, after = void 0, beforeDate = void 0, afterDate = void 0, statuses = void 0) {
683
683
  return await client.executeRawQuery({
684
684
  queryPayload: `
685
- query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) {
685
+ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $after: String, $before_date: DateTime, $after_date: DateTime, $statuses: [ChannelStatus!]) {
686
686
  entity(id: $entity_id) {
687
687
  ... on LightsparkNodeWithOSK {
688
- channels(, first: $first, statuses: $statuses, after: $after) {
688
+ channels(, first: $first, after: $after, before_date: $before_date, after_date: $after_date, statuses: $statuses) {
689
689
  __typename
690
690
  lightspark_node_to_channels_connection_count: count
691
691
  lightspark_node_to_channels_connection_page_info: page_info {
@@ -797,8 +797,10 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
797
797
  variables: {
798
798
  entity_id: this.id,
799
799
  first,
800
- statuses,
801
- after
800
+ after,
801
+ before_date: beforeDate,
802
+ after_date: afterDate,
803
+ statuses
802
804
  },
803
805
  constructObject: (json) => {
804
806
  const connection = json["entity"]["channels"];
@@ -1106,13 +1108,13 @@ query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [Node
1106
1108
  }
1107
1109
  });
1108
1110
  }
1109
- async getChannels(client, first = void 0, statuses = void 0, after = void 0) {
1111
+ async getChannels(client, first = void 0, after = void 0, beforeDate = void 0, afterDate = void 0, statuses = void 0) {
1110
1112
  return await client.executeRawQuery({
1111
1113
  queryPayload: `
1112
- query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) {
1114
+ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $after: String, $before_date: DateTime, $after_date: DateTime, $statuses: [ChannelStatus!]) {
1113
1115
  entity(id: $entity_id) {
1114
1116
  ... on LightsparkNodeWithRemoteSigning {
1115
- channels(, first: $first, statuses: $statuses, after: $after) {
1117
+ channels(, first: $first, after: $after, before_date: $before_date, after_date: $after_date, statuses: $statuses) {
1116
1118
  __typename
1117
1119
  lightspark_node_to_channels_connection_count: count
1118
1120
  lightspark_node_to_channels_connection_page_info: page_info {
@@ -1224,8 +1226,10 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
1224
1226
  variables: {
1225
1227
  entity_id: this.id,
1226
1228
  first,
1227
- statuses,
1228
- after
1229
+ after,
1230
+ before_date: beforeDate,
1231
+ after_date: afterDate,
1232
+ statuses
1229
1233
  },
1230
1234
  constructObject: (json) => {
1231
1235
  const connection = json["entity"]["channels"];
@@ -3673,6 +3677,7 @@ var PaymentFailureReason = /* @__PURE__ */ ((PaymentFailureReason2) => {
3673
3677
  PaymentFailureReason2["INVOICE_EXPIRED"] = "INVOICE_EXPIRED";
3674
3678
  PaymentFailureReason2["INVOICE_CANCELLED"] = "INVOICE_CANCELLED";
3675
3679
  PaymentFailureReason2["RISK_SCREENING_FAILED"] = "RISK_SCREENING_FAILED";
3680
+ PaymentFailureReason2["INSUFFICIENT_BALANCE_ON_SINGLE_PATH_INVOICE"] = "INSUFFICIENT_BALANCE_ON_SINGLE_PATH_INVOICE";
3676
3681
  return PaymentFailureReason2;
3677
3682
  })(PaymentFailureReason || {});
3678
3683
  var PaymentFailureReason_default = PaymentFailureReason;
@@ -3733,7 +3738,7 @@ var RichTextToJson = (obj) => {
3733
3738
 
3734
3739
  // src/objects/OutgoingPayment.ts
3735
3740
  var OutgoingPayment = class {
3736
- constructor(id, createdAt, updatedAt, status, amount, isUma, originId, isInternalPayment, typename, resolvedAt, transactionHash, destinationId, fees, paymentRequestData, failureReason, failureMessage, umaPostTransactionData, paymentPreimage) {
3741
+ constructor(id, createdAt, updatedAt, status, amount, isUma, originId, isInternalPayment, typename, resolvedAt, transactionHash, destinationId, fees, paymentRequestData, failureReason, failureMessage, umaPostTransactionData, paymentPreimage, idempotencyKey) {
3737
3742
  this.id = id;
3738
3743
  this.createdAt = createdAt;
3739
3744
  this.updatedAt = updatedAt;
@@ -3752,6 +3757,7 @@ var OutgoingPayment = class {
3752
3757
  this.failureMessage = failureMessage;
3753
3758
  this.umaPostTransactionData = umaPostTransactionData;
3754
3759
  this.paymentPreimage = paymentPreimage;
3760
+ this.idempotencyKey = idempotencyKey;
3755
3761
  autoBind(this);
3756
3762
  }
3757
3763
  async getAttempts(client, first = void 0, after = void 0) {
@@ -3851,7 +3857,8 @@ ${FRAGMENT15}
3851
3857
  outgoing_payment_failure_message: this.failureMessage ? RichTextToJson(this.failureMessage) : void 0,
3852
3858
  outgoing_payment_uma_post_transaction_data: this.umaPostTransactionData?.map((e) => PostTransactionDataToJson(e)),
3853
3859
  outgoing_payment_payment_preimage: this.paymentPreimage,
3854
- outgoing_payment_is_internal_payment: this.isInternalPayment
3860
+ outgoing_payment_is_internal_payment: this.isInternalPayment,
3861
+ outgoing_payment_idempotency_key: this.idempotencyKey
3855
3862
  };
3856
3863
  }
3857
3864
  };
@@ -3876,7 +3883,8 @@ var OutgoingPaymentFromJson = (obj) => {
3876
3883
  obj["outgoing_payment_uma_post_transaction_data"]?.map(
3877
3884
  (e) => PostTransactionDataFromJson(e)
3878
3885
  ),
3879
- obj["outgoing_payment_payment_preimage"]
3886
+ obj["outgoing_payment_payment_preimage"],
3887
+ obj["outgoing_payment_idempotency_key"]
3880
3888
  );
3881
3889
  };
3882
3890
  var FRAGMENT15 = `
@@ -4224,6 +4232,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
4224
4232
  }
4225
4233
  outgoing_payment_payment_preimage: payment_preimage
4226
4234
  outgoing_payment_is_internal_payment: is_internal_payment
4235
+ outgoing_payment_idempotency_key: idempotency_key
4227
4236
  }`;
4228
4237
  var OutgoingPayment_default = OutgoingPayment;
4229
4238
 
@@ -4335,7 +4344,8 @@ var TransactionFromJson = (obj) => {
4335
4344
  obj["outgoing_payment_uma_post_transaction_data"]?.map(
4336
4345
  (e) => PostTransactionDataFromJson(e)
4337
4346
  ),
4338
- obj["outgoing_payment_payment_preimage"]
4347
+ obj["outgoing_payment_payment_preimage"],
4348
+ obj["outgoing_payment_idempotency_key"]
4339
4349
  );
4340
4350
  }
4341
4351
  if (obj["__typename"] == "RoutingTransaction") {
@@ -4858,6 +4868,7 @@ fragment TransactionFragment on Transaction {
4858
4868
  }
4859
4869
  outgoing_payment_payment_preimage: payment_preimage
4860
4870
  outgoing_payment_is_internal_payment: is_internal_payment
4871
+ outgoing_payment_idempotency_key: idempotency_key
4861
4872
  }
4862
4873
  ... on RoutingTransaction {
4863
4874
  __typename
@@ -5013,6 +5024,15 @@ var WalletToTransactionsConnectionFromJson = (obj) => {
5013
5024
  };
5014
5025
  };
5015
5026
 
5027
+ // src/objects/RequestInitiator.ts
5028
+ var RequestInitiator = /* @__PURE__ */ ((RequestInitiator2) => {
5029
+ RequestInitiator2["FUTURE_VALUE"] = "FUTURE_VALUE";
5030
+ RequestInitiator2["CUSTOMER"] = "CUSTOMER";
5031
+ RequestInitiator2["LIGHTSPARK"] = "LIGHTSPARK";
5032
+ return RequestInitiator2;
5033
+ })(RequestInitiator || {});
5034
+ var RequestInitiator_default = RequestInitiator;
5035
+
5016
5036
  // src/objects/WithdrawalMode.ts
5017
5037
  var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
5018
5038
  WithdrawalMode2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -5025,6 +5045,7 @@ var WithdrawalMode_default = WithdrawalMode;
5025
5045
  // src/objects/WithdrawalRequestStatus.ts
5026
5046
  var WithdrawalRequestStatus = /* @__PURE__ */ ((WithdrawalRequestStatus2) => {
5027
5047
  WithdrawalRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
5048
+ WithdrawalRequestStatus2["CREATING"] = "CREATING";
5028
5049
  WithdrawalRequestStatus2["CREATED"] = "CREATED";
5029
5050
  WithdrawalRequestStatus2["FAILED"] = "FAILED";
5030
5051
  WithdrawalRequestStatus2["IN_PROGRESS"] = "IN_PROGRESS";
@@ -5107,11 +5128,12 @@ ${FRAGMENT17}
5107
5128
  // src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts
5108
5129
  var WithdrawalRequestToChannelClosingTransactionsConnectionFromJson = (obj) => {
5109
5130
  return {
5131
+ count: obj["withdrawal_request_to_channel_closing_transactions_connection_count"],
5110
5132
  pageInfo: PageInfoFromJson(
5111
5133
  obj["withdrawal_request_to_channel_closing_transactions_connection_page_info"]
5112
5134
  ),
5113
- count: obj["withdrawal_request_to_channel_closing_transactions_connection_count"],
5114
- entities: obj["withdrawal_request_to_channel_closing_transactions_connection_entities"].map((e) => ChannelClosingTransactionFromJson(e))
5135
+ entities: obj["withdrawal_request_to_channel_closing_transactions_connection_entities"].map((e) => ChannelClosingTransactionFromJson(e)),
5136
+ typename: "WithdrawalRequestToChannelClosingTransactionsConnection"
5115
5137
  };
5116
5138
  };
5117
5139
 
@@ -5188,17 +5210,98 @@ ${FRAGMENT18}
5188
5210
  // src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts
5189
5211
  var WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson = (obj) => {
5190
5212
  return {
5213
+ count: obj["withdrawal_request_to_channel_opening_transactions_connection_count"],
5191
5214
  pageInfo: PageInfoFromJson(
5192
5215
  obj["withdrawal_request_to_channel_opening_transactions_connection_page_info"]
5193
5216
  ),
5194
- count: obj["withdrawal_request_to_channel_opening_transactions_connection_count"],
5195
- entities: obj["withdrawal_request_to_channel_opening_transactions_connection_entities"].map((e) => ChannelOpeningTransactionFromJson(e))
5217
+ entities: obj["withdrawal_request_to_channel_opening_transactions_connection_entities"].map((e) => ChannelOpeningTransactionFromJson(e)),
5218
+ typename: "WithdrawalRequestToChannelOpeningTransactionsConnection"
5219
+ };
5220
+ };
5221
+
5222
+ // src/objects/Withdrawal.ts
5223
+ var WithdrawalFromJson = (obj) => {
5224
+ return {
5225
+ id: obj["withdrawal_id"],
5226
+ createdAt: obj["withdrawal_created_at"],
5227
+ updatedAt: obj["withdrawal_updated_at"],
5228
+ status: TransactionStatus_default[obj["withdrawal_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
5229
+ amount: CurrencyAmountFromJson(obj["withdrawal_amount"]),
5230
+ blockHeight: obj["withdrawal_block_height"],
5231
+ destinationAddresses: obj["withdrawal_destination_addresses"],
5232
+ originId: obj["withdrawal_origin"].id,
5233
+ typename: "Withdrawal",
5234
+ resolvedAt: obj["withdrawal_resolved_at"],
5235
+ transactionHash: obj["withdrawal_transaction_hash"],
5236
+ fees: !!obj["withdrawal_fees"] ? CurrencyAmountFromJson(obj["withdrawal_fees"]) : void 0,
5237
+ blockHash: obj["withdrawal_block_hash"],
5238
+ numConfirmations: obj["withdrawal_num_confirmations"]
5239
+ };
5240
+ };
5241
+ var FRAGMENT19 = `
5242
+ fragment WithdrawalFragment on Withdrawal {
5243
+ __typename
5244
+ withdrawal_id: id
5245
+ withdrawal_created_at: created_at
5246
+ withdrawal_updated_at: updated_at
5247
+ withdrawal_status: status
5248
+ withdrawal_resolved_at: resolved_at
5249
+ withdrawal_amount: amount {
5250
+ __typename
5251
+ currency_amount_original_value: original_value
5252
+ currency_amount_original_unit: original_unit
5253
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5254
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5255
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5256
+ }
5257
+ withdrawal_transaction_hash: transaction_hash
5258
+ withdrawal_fees: fees {
5259
+ __typename
5260
+ currency_amount_original_value: original_value
5261
+ currency_amount_original_unit: original_unit
5262
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5263
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5264
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5265
+ }
5266
+ withdrawal_block_hash: block_hash
5267
+ withdrawal_block_height: block_height
5268
+ withdrawal_destination_addresses: destination_addresses
5269
+ withdrawal_num_confirmations: num_confirmations
5270
+ withdrawal_origin: origin {
5271
+ id
5272
+ }
5273
+ }`;
5274
+ var getWithdrawalQuery = (id) => {
5275
+ return {
5276
+ queryPayload: `
5277
+ query GetWithdrawal($id: ID!) {
5278
+ entity(id: $id) {
5279
+ ... on Withdrawal {
5280
+ ...WithdrawalFragment
5281
+ }
5282
+ }
5283
+ }
5284
+
5285
+ ${FRAGMENT19}
5286
+ `,
5287
+ variables: { id },
5288
+ constructObject: (data) => WithdrawalFromJson(data.entity)
5289
+ };
5290
+ };
5291
+
5292
+ // src/objects/WithdrawalRequestToWithdrawalsConnection.ts
5293
+ var WithdrawalRequestToWithdrawalsConnectionFromJson = (obj) => {
5294
+ return {
5295
+ count: obj["withdrawal_request_to_withdrawals_connection_count"],
5296
+ entities: obj["withdrawal_request_to_withdrawals_connection_entities"].map(
5297
+ (e) => WithdrawalFromJson(e)
5298
+ )
5196
5299
  };
5197
5300
  };
5198
5301
 
5199
5302
  // src/objects/WithdrawalRequest.ts
5200
5303
  var WithdrawalRequest = class {
5201
- constructor(id, createdAt, updatedAt, requestedAmount, amount, bitcoinAddress, withdrawalMode, status, typename, estimatedAmount, amountWithdrawn, completedAt, withdrawalId) {
5304
+ constructor(id, createdAt, updatedAt, requestedAmount, amount, bitcoinAddress, withdrawalMode, status, initiator, typename, estimatedAmount, amountWithdrawn, totalFees, completedAt, withdrawalId, idempotencyKey) {
5202
5305
  this.id = id;
5203
5306
  this.createdAt = createdAt;
5204
5307
  this.updatedAt = updatedAt;
@@ -5207,21 +5310,25 @@ var WithdrawalRequest = class {
5207
5310
  this.bitcoinAddress = bitcoinAddress;
5208
5311
  this.withdrawalMode = withdrawalMode;
5209
5312
  this.status = status;
5313
+ this.initiator = initiator;
5210
5314
  this.typename = typename;
5211
5315
  this.estimatedAmount = estimatedAmount;
5212
5316
  this.amountWithdrawn = amountWithdrawn;
5317
+ this.totalFees = totalFees;
5213
5318
  this.completedAt = completedAt;
5214
5319
  this.withdrawalId = withdrawalId;
5320
+ this.idempotencyKey = idempotencyKey;
5215
5321
  autoBind(this);
5216
5322
  }
5217
- async getChannelClosingTransactions(client, first = void 0) {
5323
+ async getChannelClosingTransactions(client, first = void 0, after = void 0) {
5218
5324
  return await client.executeRawQuery({
5219
5325
  queryPayload: `
5220
- query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: ID!, $first: Int) {
5326
+ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: ID!, $first: Int, $after: String) {
5221
5327
  entity(id: $entity_id) {
5222
5328
  ... on WithdrawalRequest {
5223
- channel_closing_transactions(, first: $first) {
5329
+ channel_closing_transactions(, first: $first, after: $after) {
5224
5330
  __typename
5331
+ withdrawal_request_to_channel_closing_transactions_connection_count: count
5225
5332
  withdrawal_request_to_channel_closing_transactions_connection_page_info: page_info {
5226
5333
  __typename
5227
5334
  page_info_has_next_page: has_next_page
@@ -5229,7 +5336,6 @@ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: I
5229
5336
  page_info_start_cursor: start_cursor
5230
5337
  page_info_end_cursor: end_cursor
5231
5338
  }
5232
- withdrawal_request_to_channel_closing_transactions_connection_count: count
5233
5339
  withdrawal_request_to_channel_closing_transactions_connection_entities: entities {
5234
5340
  __typename
5235
5341
  channel_closing_transaction_id: id
@@ -5267,7 +5373,7 @@ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: I
5267
5373
  }
5268
5374
  }
5269
5375
  `,
5270
- variables: { entity_id: this.id, first },
5376
+ variables: { entity_id: this.id, first, after },
5271
5377
  constructObject: (json) => {
5272
5378
  const connection = json["entity"]["channel_closing_transactions"];
5273
5379
  return WithdrawalRequestToChannelClosingTransactionsConnectionFromJson(
@@ -5276,14 +5382,15 @@ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: I
5276
5382
  }
5277
5383
  });
5278
5384
  }
5279
- async getChannelOpeningTransactions(client, first = void 0) {
5385
+ async getChannelOpeningTransactions(client, first = void 0, after = void 0) {
5280
5386
  return await client.executeRawQuery({
5281
5387
  queryPayload: `
5282
- query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: ID!, $first: Int) {
5388
+ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: ID!, $first: Int, $after: String) {
5283
5389
  entity(id: $entity_id) {
5284
5390
  ... on WithdrawalRequest {
5285
- channel_opening_transactions(, first: $first) {
5391
+ channel_opening_transactions(, first: $first, after: $after) {
5286
5392
  __typename
5393
+ withdrawal_request_to_channel_opening_transactions_connection_count: count
5287
5394
  withdrawal_request_to_channel_opening_transactions_connection_page_info: page_info {
5288
5395
  __typename
5289
5396
  page_info_has_next_page: has_next_page
@@ -5291,7 +5398,6 @@ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: I
5291
5398
  page_info_start_cursor: start_cursor
5292
5399
  page_info_end_cursor: end_cursor
5293
5400
  }
5294
- withdrawal_request_to_channel_opening_transactions_connection_count: count
5295
5401
  withdrawal_request_to_channel_opening_transactions_connection_entities: entities {
5296
5402
  __typename
5297
5403
  channel_opening_transaction_id: id
@@ -5329,7 +5435,7 @@ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: I
5329
5435
  }
5330
5436
  }
5331
5437
  `,
5332
- variables: { entity_id: this.id, first },
5438
+ variables: { entity_id: this.id, first, after },
5333
5439
  constructObject: (json) => {
5334
5440
  const connection = json["entity"]["channel_opening_transactions"];
5335
5441
  return WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson(
@@ -5338,6 +5444,59 @@ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: I
5338
5444
  }
5339
5445
  });
5340
5446
  }
5447
+ async getWithdrawals(client, first = void 0) {
5448
+ return await client.executeRawQuery({
5449
+ queryPayload: `
5450
+ query FetchWithdrawalRequestToWithdrawalsConnection($entity_id: ID!, $first: Int) {
5451
+ entity(id: $entity_id) {
5452
+ ... on WithdrawalRequest {
5453
+ withdrawals(, first: $first) {
5454
+ __typename
5455
+ withdrawal_request_to_withdrawals_connection_count: count
5456
+ withdrawal_request_to_withdrawals_connection_entities: entities {
5457
+ __typename
5458
+ withdrawal_id: id
5459
+ withdrawal_created_at: created_at
5460
+ withdrawal_updated_at: updated_at
5461
+ withdrawal_status: status
5462
+ withdrawal_resolved_at: resolved_at
5463
+ withdrawal_amount: amount {
5464
+ __typename
5465
+ currency_amount_original_value: original_value
5466
+ currency_amount_original_unit: original_unit
5467
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5468
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5469
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5470
+ }
5471
+ withdrawal_transaction_hash: transaction_hash
5472
+ withdrawal_fees: fees {
5473
+ __typename
5474
+ currency_amount_original_value: original_value
5475
+ currency_amount_original_unit: original_unit
5476
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5477
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5478
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5479
+ }
5480
+ withdrawal_block_hash: block_hash
5481
+ withdrawal_block_height: block_height
5482
+ withdrawal_destination_addresses: destination_addresses
5483
+ withdrawal_num_confirmations: num_confirmations
5484
+ withdrawal_origin: origin {
5485
+ id
5486
+ }
5487
+ }
5488
+ }
5489
+ }
5490
+ }
5491
+ }
5492
+ `,
5493
+ variables: { entity_id: this.id, first },
5494
+ constructObject: (json) => {
5495
+ const connection = json["entity"]["withdrawals"];
5496
+ return WithdrawalRequestToWithdrawalsConnectionFromJson(connection);
5497
+ }
5498
+ });
5499
+ }
5341
5500
  static getWithdrawalRequestQuery(id) {
5342
5501
  return {
5343
5502
  queryPayload: `
@@ -5349,7 +5508,7 @@ query GetWithdrawalRequest($id: ID!) {
5349
5508
  }
5350
5509
  }
5351
5510
 
5352
- ${FRAGMENT19}
5511
+ ${FRAGMENT20}
5353
5512
  `,
5354
5513
  variables: { id },
5355
5514
  constructObject: (data) => WithdrawalRequestFromJson(data.entity)
@@ -5367,11 +5526,14 @@ ${FRAGMENT19}
5367
5526
  withdrawal_request_amount: CurrencyAmountToJson(this.amount),
5368
5527
  withdrawal_request_estimated_amount: this.estimatedAmount ? CurrencyAmountToJson(this.estimatedAmount) : void 0,
5369
5528
  withdrawal_request_amount_withdrawn: this.amountWithdrawn ? CurrencyAmountToJson(this.amountWithdrawn) : void 0,
5529
+ withdrawal_request_total_fees: this.totalFees ? CurrencyAmountToJson(this.totalFees) : void 0,
5370
5530
  withdrawal_request_bitcoin_address: this.bitcoinAddress,
5371
5531
  withdrawal_request_withdrawal_mode: this.withdrawalMode,
5372
5532
  withdrawal_request_status: this.status,
5373
5533
  withdrawal_request_completed_at: this.completedAt,
5374
- withdrawal_request_withdrawal: { id: this.withdrawalId }
5534
+ withdrawal_request_withdrawal: { id: this.withdrawalId },
5535
+ withdrawal_request_idempotency_key: this.idempotencyKey,
5536
+ withdrawal_request_initiator: this.initiator
5375
5537
  };
5376
5538
  }
5377
5539
  };
@@ -5385,14 +5547,17 @@ var WithdrawalRequestFromJson = (obj) => {
5385
5547
  obj["withdrawal_request_bitcoin_address"],
5386
5548
  WithdrawalMode_default[obj["withdrawal_request_withdrawal_mode"]] ?? WithdrawalMode_default.FUTURE_VALUE,
5387
5549
  WithdrawalRequestStatus_default[obj["withdrawal_request_status"]] ?? WithdrawalRequestStatus_default.FUTURE_VALUE,
5550
+ RequestInitiator_default[obj["withdrawal_request_initiator"]] ?? RequestInitiator_default.FUTURE_VALUE,
5388
5551
  "WithdrawalRequest",
5389
5552
  !!obj["withdrawal_request_estimated_amount"] ? CurrencyAmountFromJson(obj["withdrawal_request_estimated_amount"]) : void 0,
5390
5553
  !!obj["withdrawal_request_amount_withdrawn"] ? CurrencyAmountFromJson(obj["withdrawal_request_amount_withdrawn"]) : void 0,
5554
+ !!obj["withdrawal_request_total_fees"] ? CurrencyAmountFromJson(obj["withdrawal_request_total_fees"]) : void 0,
5391
5555
  obj["withdrawal_request_completed_at"],
5392
- obj["withdrawal_request_withdrawal"]?.id ?? void 0
5556
+ obj["withdrawal_request_withdrawal"]?.id ?? void 0,
5557
+ obj["withdrawal_request_idempotency_key"]
5393
5558
  );
5394
5559
  };
5395
- var FRAGMENT19 = `
5560
+ var FRAGMENT20 = `
5396
5561
  fragment WithdrawalRequestFragment on WithdrawalRequest {
5397
5562
  __typename
5398
5563
  withdrawal_request_id: id
@@ -5430,6 +5595,14 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
5430
5595
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5431
5596
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5432
5597
  }
5598
+ withdrawal_request_total_fees: total_fees {
5599
+ __typename
5600
+ currency_amount_original_value: original_value
5601
+ currency_amount_original_unit: original_unit
5602
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5603
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5604
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5605
+ }
5433
5606
  withdrawal_request_bitcoin_address: bitcoin_address
5434
5607
  withdrawal_request_withdrawal_mode: withdrawal_mode
5435
5608
  withdrawal_request_status: status
@@ -5437,6 +5610,8 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
5437
5610
  withdrawal_request_withdrawal: withdrawal {
5438
5611
  id
5439
5612
  }
5613
+ withdrawal_request_idempotency_key: idempotency_key
5614
+ withdrawal_request_initiator: initiator
5440
5615
  }`;
5441
5616
  var WithdrawalRequest_default = WithdrawalRequest;
5442
5617
 
@@ -5963,6 +6138,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
5963
6138
  }
5964
6139
  outgoing_payment_payment_preimage: payment_preimage
5965
6140
  outgoing_payment_is_internal_payment: is_internal_payment
6141
+ outgoing_payment_idempotency_key: idempotency_key
5966
6142
  }
5967
6143
  ... on RoutingTransaction {
5968
6144
  __typename
@@ -6478,6 +6654,14 @@ query FetchWalletToWithdrawalRequestsConnection($entity_id: ID!, $first: Int, $a
6478
6654
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6479
6655
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6480
6656
  }
6657
+ withdrawal_request_total_fees: total_fees {
6658
+ __typename
6659
+ currency_amount_original_value: original_value
6660
+ currency_amount_original_unit: original_unit
6661
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6662
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6663
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6664
+ }
6481
6665
  withdrawal_request_bitcoin_address: bitcoin_address
6482
6666
  withdrawal_request_withdrawal_mode: withdrawal_mode
6483
6667
  withdrawal_request_status: status
@@ -6485,6 +6669,8 @@ query FetchWalletToWithdrawalRequestsConnection($entity_id: ID!, $first: Int, $a
6485
6669
  withdrawal_request_withdrawal: withdrawal {
6486
6670
  id
6487
6671
  }
6672
+ withdrawal_request_idempotency_key: idempotency_key
6673
+ withdrawal_request_initiator: initiator
6488
6674
  }
6489
6675
  }
6490
6676
  }
@@ -6545,7 +6731,7 @@ query GetWallet($id: ID!) {
6545
6731
  }
6546
6732
  }
6547
6733
 
6548
- ${FRAGMENT20}
6734
+ ${FRAGMENT21}
6549
6735
  `,
6550
6736
  variables: { id },
6551
6737
  constructObject: (data) => WalletFromJson(data.entity)
@@ -6578,7 +6764,7 @@ var WalletFromJson = (obj) => {
6578
6764
  obj["wallet_account"]?.id ?? void 0
6579
6765
  );
6580
6766
  };
6581
- var FRAGMENT20 = `
6767
+ var FRAGMENT21 = `
6582
6768
  fragment WalletFragment on Wallet {
6583
6769
  __typename
6584
6770
  wallet_id: id
@@ -7796,6 +7982,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
7796
7982
  }
7797
7983
  outgoing_payment_payment_preimage: payment_preimage
7798
7984
  outgoing_payment_is_internal_payment: is_internal_payment
7985
+ outgoing_payment_idempotency_key: idempotency_key
7799
7986
  }
7800
7987
  ... on RoutingTransaction {
7801
7988
  __typename
@@ -8232,13 +8419,13 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
8232
8419
  }
8233
8420
  });
8234
8421
  }
8235
- async getWithdrawalRequests(client, first = void 0, after = void 0, bitcoinNetworks = void 0, statuses = void 0, nodeIds = void 0, afterDate = void 0, beforeDate = void 0) {
8422
+ 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) {
8236
8423
  return await client.executeRawQuery({
8237
8424
  queryPayload: `
8238
- query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $bitcoin_networks: [BitcoinNetwork!], $statuses: [WithdrawalRequestStatus!], $node_ids: [ID!], $after_date: DateTime, $before_date: DateTime) {
8425
+ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $bitcoin_networks: [BitcoinNetwork!], $statuses: [WithdrawalRequestStatus!], $node_ids: [ID!], $idempotency_keys: [String!], $after_date: DateTime, $before_date: DateTime) {
8239
8426
  current_account {
8240
8427
  ... on Account {
8241
- withdrawal_requests(, first: $first, after: $after, bitcoin_networks: $bitcoin_networks, statuses: $statuses, node_ids: $node_ids, after_date: $after_date, before_date: $before_date) {
8428
+ 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) {
8242
8429
  __typename
8243
8430
  account_to_withdrawal_requests_connection_count: count
8244
8431
  account_to_withdrawal_requests_connection_page_info: page_info {
@@ -8285,6 +8472,14 @@ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $b
8285
8472
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8286
8473
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8287
8474
  }
8475
+ withdrawal_request_total_fees: total_fees {
8476
+ __typename
8477
+ currency_amount_original_value: original_value
8478
+ currency_amount_original_unit: original_unit
8479
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8480
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8481
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8482
+ }
8288
8483
  withdrawal_request_bitcoin_address: bitcoin_address
8289
8484
  withdrawal_request_withdrawal_mode: withdrawal_mode
8290
8485
  withdrawal_request_status: status
@@ -8292,6 +8487,8 @@ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $b
8292
8487
  withdrawal_request_withdrawal: withdrawal {
8293
8488
  id
8294
8489
  }
8490
+ withdrawal_request_idempotency_key: idempotency_key
8491
+ withdrawal_request_initiator: initiator
8295
8492
  }
8296
8493
  }
8297
8494
  }
@@ -8304,6 +8501,7 @@ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $b
8304
8501
  bitcoin_networks: bitcoinNetworks,
8305
8502
  statuses,
8306
8503
  node_ids: nodeIds,
8504
+ idempotency_keys: idempotencyKeys,
8307
8505
  after_date: afterDate,
8308
8506
  before_date: beforeDate
8309
8507
  },
@@ -8391,7 +8589,7 @@ query GetAccount {
8391
8589
  }
8392
8590
  }
8393
8591
 
8394
- ${FRAGMENT21}
8592
+ ${FRAGMENT22}
8395
8593
  `,
8396
8594
  variables: {},
8397
8595
  constructObject: (data) => AccountFromJson(data.current_account)
@@ -8416,7 +8614,7 @@ var AccountFromJson = (obj) => {
8416
8614
  obj["account_name"]
8417
8615
  );
8418
8616
  };
8419
- var FRAGMENT21 = `
8617
+ var FRAGMENT22 = `
8420
8618
  fragment AccountFragment on Account {
8421
8619
  __typename
8422
8620
  account_id: id
@@ -8446,7 +8644,7 @@ var AuditLogActorFromJson = (obj) => {
8446
8644
  `Couldn't find a concrete type for interface AuditLogActor corresponding to the typename=${obj["__typename"]}`
8447
8645
  );
8448
8646
  };
8449
- var FRAGMENT22 = `
8647
+ var FRAGMENT23 = `
8450
8648
  fragment AuditLogActorFragment on AuditLogActor {
8451
8649
  __typename
8452
8650
  ... on ApiToken {
@@ -8471,7 +8669,7 @@ query GetAuditLogActor($id: ID!) {
8471
8669
  }
8472
8670
  }
8473
8671
 
8474
- ${FRAGMENT22}
8672
+ ${FRAGMENT23}
8475
8673
  `,
8476
8674
  variables: { id },
8477
8675
  constructObject: (data) => AuditLogActorFromJson(data.entity)
@@ -8495,7 +8693,7 @@ var ChannelSnapshotFromJson = (obj) => {
8495
8693
  localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0
8496
8694
  };
8497
8695
  };
8498
- var FRAGMENT23 = `
8696
+ var FRAGMENT24 = `
8499
8697
  fragment ChannelSnapshotFragment on ChannelSnapshot {
8500
8698
  __typename
8501
8699
  channel_snapshot_id: id
@@ -8558,7 +8756,7 @@ query GetChannelSnapshot($id: ID!) {
8558
8756
  }
8559
8757
  }
8560
8758
 
8561
- ${FRAGMENT23}
8759
+ ${FRAGMENT24}
8562
8760
  `,
8563
8761
  variables: { id },
8564
8762
  constructObject: (data) => ChannelSnapshotFromJson(data.entity)
@@ -8867,7 +9065,7 @@ var SignablePayloadFromJson = (obj) => {
8867
9065
  mulTweak: obj["signable_payload_mul_tweak"]
8868
9066
  };
8869
9067
  };
8870
- var FRAGMENT24 = `
9068
+ var FRAGMENT25 = `
8871
9069
  fragment SignablePayloadFragment on SignablePayload {
8872
9070
  __typename
8873
9071
  signable_payload_id: id
@@ -8893,7 +9091,7 @@ query GetSignablePayload($id: ID!) {
8893
9091
  }
8894
9092
  }
8895
9093
 
8896
- ${FRAGMENT24}
9094
+ ${FRAGMENT25}
8897
9095
  `,
8898
9096
  variables: { id },
8899
9097
  constructObject: (data) => SignablePayloadFromJson(data.entity)
@@ -8919,7 +9117,7 @@ var DepositFromJson = (obj) => {
8919
9117
  numConfirmations: obj["deposit_num_confirmations"]
8920
9118
  };
8921
9119
  };
8922
- var FRAGMENT25 = `
9120
+ var FRAGMENT26 = `
8923
9121
  fragment DepositFragment on Deposit {
8924
9122
  __typename
8925
9123
  deposit_id: id
@@ -8963,7 +9161,7 @@ query GetDeposit($id: ID!) {
8963
9161
  }
8964
9162
  }
8965
9163
 
8966
- ${FRAGMENT25}
9164
+ ${FRAGMENT26}
8967
9165
  `,
8968
9166
  variables: { id },
8969
9167
  constructObject: (data) => DepositFromJson(data.entity)
@@ -8977,7 +9175,7 @@ var FeeEstimateFromJson = (obj) => {
8977
9175
  feeMin: CurrencyAmountFromJson(obj["fee_estimate_fee_min"])
8978
9176
  };
8979
9177
  };
8980
- var FRAGMENT26 = `
9178
+ var FRAGMENT27 = `
8981
9179
  fragment FeeEstimateFragment on FeeEstimate {
8982
9180
  __typename
8983
9181
  fee_estimate_fee_fast: fee_fast {
@@ -9033,7 +9231,7 @@ var InvoiceFromJson = (obj) => {
9033
9231
  amountPaid: !!obj["invoice_amount_paid"] ? CurrencyAmountFromJson(obj["invoice_amount_paid"]) : void 0
9034
9232
  };
9035
9233
  };
9036
- var FRAGMENT27 = `
9234
+ var FRAGMENT28 = `
9037
9235
  fragment InvoiceFragment on Invoice {
9038
9236
  __typename
9039
9237
  invoice_id: id
@@ -9351,7 +9549,7 @@ query GetInvoice($id: ID!) {
9351
9549
  }
9352
9550
  }
9353
9551
 
9354
- ${FRAGMENT27}
9552
+ ${FRAGMENT28}
9355
9553
  `,
9356
9554
  variables: { id },
9357
9555
  constructObject: (data) => InvoiceFromJson(data.entity)
@@ -9359,7 +9557,7 @@ ${FRAGMENT27}
9359
9557
  };
9360
9558
 
9361
9559
  // src/objects/LightningFeeEstimateOutput.ts
9362
- var FRAGMENT28 = `
9560
+ var FRAGMENT29 = `
9363
9561
  fragment LightningFeeEstimateOutputFragment on LightningFeeEstimateOutput {
9364
9562
  __typename
9365
9563
  lightning_fee_estimate_output_fee_estimate: fee_estimate {
@@ -9417,7 +9615,8 @@ var LightningTransactionFromJson = (obj) => {
9417
9615
  obj["outgoing_payment_uma_post_transaction_data"]?.map(
9418
9616
  (e) => PostTransactionDataFromJson(e)
9419
9617
  ),
9420
- obj["outgoing_payment_payment_preimage"]
9618
+ obj["outgoing_payment_payment_preimage"],
9619
+ obj["outgoing_payment_idempotency_key"]
9421
9620
  );
9422
9621
  }
9423
9622
  if (obj["__typename"] == "RoutingTransaction") {
@@ -9442,7 +9641,7 @@ var LightningTransactionFromJson = (obj) => {
9442
9641
  `Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
9443
9642
  );
9444
9643
  };
9445
- var FRAGMENT29 = `
9644
+ var FRAGMENT30 = `
9446
9645
  fragment LightningTransactionFragment on LightningTransaction {
9447
9646
  __typename
9448
9647
  ... on IncomingPayment {
@@ -9826,6 +10025,7 @@ fragment LightningTransactionFragment on LightningTransaction {
9826
10025
  }
9827
10026
  outgoing_payment_payment_preimage: payment_preimage
9828
10027
  outgoing_payment_is_internal_payment: is_internal_payment
10028
+ outgoing_payment_idempotency_key: idempotency_key
9829
10029
  }
9830
10030
  ... on RoutingTransaction {
9831
10031
  __typename
@@ -9875,7 +10075,7 @@ query GetLightningTransaction($id: ID!) {
9875
10075
  }
9876
10076
  }
9877
10077
 
9878
- ${FRAGMENT29}
10078
+ ${FRAGMENT30}
9879
10079
  `,
9880
10080
  variables: { id },
9881
10081
  constructObject: (data) => LightningTransactionFromJson(data.entity)
@@ -9912,7 +10112,7 @@ var LightsparkNodeOwnerFromJson = (obj) => {
9912
10112
  `Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
9913
10113
  );
9914
10114
  };
9915
- var FRAGMENT30 = `
10115
+ var FRAGMENT31 = `
9916
10116
  fragment LightsparkNodeOwnerFragment on LightsparkNodeOwner {
9917
10117
  __typename
9918
10118
  ... on Account {
@@ -9973,13 +10173,24 @@ query GetLightsparkNodeOwner($id: ID!) {
9973
10173
  }
9974
10174
  }
9975
10175
 
9976
- ${FRAGMENT30}
10176
+ ${FRAGMENT31}
9977
10177
  `,
9978
10178
  variables: { id },
9979
10179
  constructObject: (data) => LightsparkNodeOwnerFromJson(data.entity)
9980
10180
  };
9981
10181
  };
9982
10182
 
10183
+ // src/objects/OnChainFeeTarget.ts
10184
+ var OnChainFeeTarget = /* @__PURE__ */ ((OnChainFeeTarget2) => {
10185
+ OnChainFeeTarget2["FUTURE_VALUE"] = "FUTURE_VALUE";
10186
+ OnChainFeeTarget2["HIGH"] = "HIGH";
10187
+ OnChainFeeTarget2["MEDIUM"] = "MEDIUM";
10188
+ OnChainFeeTarget2["LOW"] = "LOW";
10189
+ OnChainFeeTarget2["BACKGROUND"] = "BACKGROUND";
10190
+ return OnChainFeeTarget2;
10191
+ })(OnChainFeeTarget || {});
10192
+ var OnChainFeeTarget_default = OnChainFeeTarget;
10193
+
9983
10194
  // src/objects/OnChainTransaction.ts
9984
10195
  import { LightsparkException as LightsparkException10 } from "@lightsparkdev/core";
9985
10196
  var OnChainTransactionFromJson = (obj) => {
@@ -10060,7 +10271,7 @@ var OnChainTransactionFromJson = (obj) => {
10060
10271
  `Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
10061
10272
  );
10062
10273
  };
10063
- var FRAGMENT31 = `
10274
+ var FRAGMENT32 = `
10064
10275
  fragment OnChainTransactionFragment on OnChainTransaction {
10065
10276
  __typename
10066
10277
  ... on ChannelClosingTransaction {
@@ -10203,7 +10414,7 @@ query GetOnChainTransaction($id: ID!) {
10203
10414
  }
10204
10415
  }
10205
10416
 
10206
- ${FRAGMENT31}
10417
+ ${FRAGMENT32}
10207
10418
  `,
10208
10419
  variables: { id },
10209
10420
  constructObject: (data) => OnChainTransactionFromJson(data.entity)
@@ -10230,6 +10441,7 @@ var RemoteSigningSubEventType = /* @__PURE__ */ ((RemoteSigningSubEventType2) =>
10230
10441
  RemoteSigningSubEventType2["RELEASE_PAYMENT_PREIMAGE"] = "RELEASE_PAYMENT_PREIMAGE";
10231
10442
  RemoteSigningSubEventType2["REQUEST_INVOICE_PAYMENT_HASH"] = "REQUEST_INVOICE_PAYMENT_HASH";
10232
10443
  RemoteSigningSubEventType2["REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET"] = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET";
10444
+ RemoteSigningSubEventType2["VLS_MESSAGE"] = "VLS_MESSAGE";
10233
10445
  return RemoteSigningSubEventType2;
10234
10446
  })(RemoteSigningSubEventType || {});
10235
10447
  var RemoteSigningSubEventType_default = RemoteSigningSubEventType;
@@ -10262,7 +10474,7 @@ var RoutingTransactionFromJson = (obj) => {
10262
10474
  failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
10263
10475
  };
10264
10476
  };
10265
- var FRAGMENT32 = `
10477
+ var FRAGMENT33 = `
10266
10478
  fragment RoutingTransactionFragment on RoutingTransaction {
10267
10479
  __typename
10268
10480
  routing_transaction_id: id
@@ -10310,7 +10522,7 @@ query GetRoutingTransaction($id: ID!) {
10310
10522
  }
10311
10523
  }
10312
10524
 
10313
- ${FRAGMENT32}
10525
+ ${FRAGMENT33}
10314
10526
  `,
10315
10527
  variables: { id },
10316
10528
  constructObject: (data) => RoutingTransactionFromJson(data.entity)
@@ -10326,7 +10538,7 @@ var SignableFromJson = (obj) => {
10326
10538
  typename: "Signable"
10327
10539
  };
10328
10540
  };
10329
- var FRAGMENT33 = `
10541
+ var FRAGMENT34 = `
10330
10542
  fragment SignableFragment on Signable {
10331
10543
  __typename
10332
10544
  signable_id: id
@@ -10344,7 +10556,7 @@ query GetSignable($id: ID!) {
10344
10556
  }
10345
10557
  }
10346
10558
 
10347
- ${FRAGMENT33}
10559
+ ${FRAGMENT34}
10348
10560
  `,
10349
10561
  variables: { id },
10350
10562
  constructObject: (data) => SignableFromJson(data.entity)
@@ -10381,7 +10593,7 @@ var TransactionUpdateFromJson = (obj) => {
10381
10593
  transactionHash: obj["transaction_hash"]
10382
10594
  };
10383
10595
  };
10384
- var FRAGMENT34 = `
10596
+ var FRAGMENT35 = `
10385
10597
  fragment TransactionUpdateFragment on Transaction {
10386
10598
  __typename
10387
10599
  id
@@ -10415,7 +10627,7 @@ var UmaInvitationFromJson = (obj) => {
10415
10627
  incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ? IncentivesIneligibilityReason_default[obj["uma_invitation_incentives_ineligibility_reason"]] ?? IncentivesIneligibilityReason_default.FUTURE_VALUE : null
10416
10628
  };
10417
10629
  };
10418
- var FRAGMENT35 = `
10630
+ var FRAGMENT36 = `
10419
10631
  fragment UmaInvitationFragment on UmaInvitation {
10420
10632
  __typename
10421
10633
  uma_invitation_id: id
@@ -10439,7 +10651,7 @@ query GetUmaInvitation($id: ID!) {
10439
10651
  }
10440
10652
  }
10441
10653
 
10442
- ${FRAGMENT35}
10654
+ ${FRAGMENT36}
10443
10655
  `,
10444
10656
  variables: { id },
10445
10657
  constructObject: (data) => UmaInvitationFromJson(data.entity)
@@ -10467,76 +10679,6 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
10467
10679
  })(WebhookEventType || {});
10468
10680
  var WebhookEventType_default = WebhookEventType;
10469
10681
 
10470
- // src/objects/Withdrawal.ts
10471
- var WithdrawalFromJson = (obj) => {
10472
- return {
10473
- id: obj["withdrawal_id"],
10474
- createdAt: obj["withdrawal_created_at"],
10475
- updatedAt: obj["withdrawal_updated_at"],
10476
- status: TransactionStatus_default[obj["withdrawal_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
10477
- amount: CurrencyAmountFromJson(obj["withdrawal_amount"]),
10478
- blockHeight: obj["withdrawal_block_height"],
10479
- destinationAddresses: obj["withdrawal_destination_addresses"],
10480
- originId: obj["withdrawal_origin"].id,
10481
- typename: "Withdrawal",
10482
- resolvedAt: obj["withdrawal_resolved_at"],
10483
- transactionHash: obj["withdrawal_transaction_hash"],
10484
- fees: !!obj["withdrawal_fees"] ? CurrencyAmountFromJson(obj["withdrawal_fees"]) : void 0,
10485
- blockHash: obj["withdrawal_block_hash"],
10486
- numConfirmations: obj["withdrawal_num_confirmations"]
10487
- };
10488
- };
10489
- var FRAGMENT36 = `
10490
- fragment WithdrawalFragment on Withdrawal {
10491
- __typename
10492
- withdrawal_id: id
10493
- withdrawal_created_at: created_at
10494
- withdrawal_updated_at: updated_at
10495
- withdrawal_status: status
10496
- withdrawal_resolved_at: resolved_at
10497
- withdrawal_amount: amount {
10498
- __typename
10499
- currency_amount_original_value: original_value
10500
- currency_amount_original_unit: original_unit
10501
- currency_amount_preferred_currency_unit: preferred_currency_unit
10502
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10503
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10504
- }
10505
- withdrawal_transaction_hash: transaction_hash
10506
- withdrawal_fees: fees {
10507
- __typename
10508
- currency_amount_original_value: original_value
10509
- currency_amount_original_unit: original_unit
10510
- currency_amount_preferred_currency_unit: preferred_currency_unit
10511
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10512
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10513
- }
10514
- withdrawal_block_hash: block_hash
10515
- withdrawal_block_height: block_height
10516
- withdrawal_destination_addresses: destination_addresses
10517
- withdrawal_num_confirmations: num_confirmations
10518
- withdrawal_origin: origin {
10519
- id
10520
- }
10521
- }`;
10522
- var getWithdrawalQuery = (id) => {
10523
- return {
10524
- queryPayload: `
10525
- query GetWithdrawal($id: ID!) {
10526
- entity(id: $id) {
10527
- ... on Withdrawal {
10528
- ...WithdrawalFragment
10529
- }
10530
- }
10531
- }
10532
-
10533
- ${FRAGMENT36}
10534
- `,
10535
- variables: { id },
10536
- constructObject: (data) => WithdrawalFromJson(data.entity)
10537
- };
10538
- };
10539
-
10540
10682
  // src/objects/WithdrawalFeeEstimateOutput.ts
10541
10683
  var WithdrawalFeeEstimateOutputFromJson = (obj) => {
10542
10684
  return {
@@ -10564,7 +10706,7 @@ export {
10564
10706
  CurrencyAmountFromJson,
10565
10707
  FRAGMENT2 as FRAGMENT,
10566
10708
  FeeEstimateFromJson,
10567
- FRAGMENT26 as FRAGMENT2,
10709
+ FRAGMENT27 as FRAGMENT2,
10568
10710
  NodeAddressType_default,
10569
10711
  GraphNode_default,
10570
10712
  LightsparkNodeStatus_default,
@@ -10578,12 +10720,12 @@ export {
10578
10720
  FRAGMENT9 as FRAGMENT3,
10579
10721
  PaymentRequestStatus_default,
10580
10722
  InvoiceFromJson,
10581
- FRAGMENT27 as FRAGMENT4,
10723
+ FRAGMENT28 as FRAGMENT4,
10582
10724
  getInvoiceQuery,
10583
10725
  IncentivesIneligibilityReason_default,
10584
10726
  IncentivesStatus_default,
10585
10727
  UmaInvitationFromJson,
10586
- FRAGMENT35 as FRAGMENT5,
10728
+ FRAGMENT36 as FRAGMENT5,
10587
10729
  getUmaInvitationQuery,
10588
10730
  Permission_default,
10589
10731
  ApiTokenFromJson,
@@ -10595,7 +10737,7 @@ export {
10595
10737
  IncomingPaymentFromJson,
10596
10738
  FRAGMENT12 as FRAGMENT7,
10597
10739
  IncomingPayment_default,
10598
- FRAGMENT28 as FRAGMENT8,
10740
+ FRAGMENT29 as FRAGMENT8,
10599
10741
  HtlcAttemptFailureCode_default,
10600
10742
  OutgoingPaymentAttemptStatus_default,
10601
10743
  getHopQuery,
@@ -10607,19 +10749,21 @@ export {
10607
10749
  PaymentRequestFromJson,
10608
10750
  FRAGMENT10,
10609
10751
  getPaymentRequestQuery,
10752
+ RequestInitiator_default,
10610
10753
  WithdrawalMode_default,
10611
10754
  WithdrawalRequestStatus_default,
10612
10755
  getChannelClosingTransactionQuery,
10613
10756
  getChannelOpeningTransactionQuery,
10757
+ getWithdrawalQuery,
10614
10758
  WithdrawalRequestFromJson,
10615
- FRAGMENT19 as FRAGMENT11,
10759
+ FRAGMENT20 as FRAGMENT11,
10616
10760
  WithdrawalRequest_default,
10617
10761
  RoutingTransactionFailureReason_default,
10618
10762
  TransactionFromJson,
10619
10763
  FRAGMENT16 as FRAGMENT12,
10620
10764
  getTransactionQuery,
10621
10765
  TransactionUpdateFromJson,
10622
- FRAGMENT34 as FRAGMENT13,
10766
+ FRAGMENT35 as FRAGMENT13,
10623
10767
  WithdrawalFeeEstimateOutputFromJson,
10624
10768
  FRAGMENT37 as FRAGMENT14,
10625
10769
  getLightsparkNodeQuery,
@@ -10636,6 +10780,7 @@ export {
10636
10780
  getDepositQuery,
10637
10781
  getLightningTransactionQuery,
10638
10782
  getLightsparkNodeOwnerQuery,
10783
+ OnChainFeeTarget_default,
10639
10784
  getOnChainTransactionQuery,
10640
10785
  PaymentDirection_default,
10641
10786
  RemoteSigningSubEventType_default,
@@ -10644,6 +10789,5 @@ export {
10644
10789
  getSignableQuery,
10645
10790
  TransactionType_default,
10646
10791
  WebhookEventType,
10647
- WebhookEventType_default,
10648
- getWithdrawalQuery
10792
+ WebhookEventType_default
10649
10793
  };