@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
@@ -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
@@ -5025,6 +5036,7 @@ var WithdrawalMode_default = WithdrawalMode;
5025
5036
  // src/objects/WithdrawalRequestStatus.ts
5026
5037
  var WithdrawalRequestStatus = /* @__PURE__ */ ((WithdrawalRequestStatus2) => {
5027
5038
  WithdrawalRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
5039
+ WithdrawalRequestStatus2["CREATING"] = "CREATING";
5028
5040
  WithdrawalRequestStatus2["CREATED"] = "CREATED";
5029
5041
  WithdrawalRequestStatus2["FAILED"] = "FAILED";
5030
5042
  WithdrawalRequestStatus2["IN_PROGRESS"] = "IN_PROGRESS";
@@ -5107,11 +5119,12 @@ ${FRAGMENT17}
5107
5119
  // src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts
5108
5120
  var WithdrawalRequestToChannelClosingTransactionsConnectionFromJson = (obj) => {
5109
5121
  return {
5122
+ count: obj["withdrawal_request_to_channel_closing_transactions_connection_count"],
5110
5123
  pageInfo: PageInfoFromJson(
5111
5124
  obj["withdrawal_request_to_channel_closing_transactions_connection_page_info"]
5112
5125
  ),
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))
5126
+ entities: obj["withdrawal_request_to_channel_closing_transactions_connection_entities"].map((e) => ChannelClosingTransactionFromJson(e)),
5127
+ typename: "WithdrawalRequestToChannelClosingTransactionsConnection"
5115
5128
  };
5116
5129
  };
5117
5130
 
@@ -5188,17 +5201,98 @@ ${FRAGMENT18}
5188
5201
  // src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts
5189
5202
  var WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson = (obj) => {
5190
5203
  return {
5204
+ count: obj["withdrawal_request_to_channel_opening_transactions_connection_count"],
5191
5205
  pageInfo: PageInfoFromJson(
5192
5206
  obj["withdrawal_request_to_channel_opening_transactions_connection_page_info"]
5193
5207
  ),
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))
5208
+ entities: obj["withdrawal_request_to_channel_opening_transactions_connection_entities"].map((e) => ChannelOpeningTransactionFromJson(e)),
5209
+ typename: "WithdrawalRequestToChannelOpeningTransactionsConnection"
5210
+ };
5211
+ };
5212
+
5213
+ // src/objects/Withdrawal.ts
5214
+ var WithdrawalFromJson = (obj) => {
5215
+ return {
5216
+ id: obj["withdrawal_id"],
5217
+ createdAt: obj["withdrawal_created_at"],
5218
+ updatedAt: obj["withdrawal_updated_at"],
5219
+ status: TransactionStatus_default[obj["withdrawal_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
5220
+ amount: CurrencyAmountFromJson(obj["withdrawal_amount"]),
5221
+ blockHeight: obj["withdrawal_block_height"],
5222
+ destinationAddresses: obj["withdrawal_destination_addresses"],
5223
+ originId: obj["withdrawal_origin"].id,
5224
+ typename: "Withdrawal",
5225
+ resolvedAt: obj["withdrawal_resolved_at"],
5226
+ transactionHash: obj["withdrawal_transaction_hash"],
5227
+ fees: !!obj["withdrawal_fees"] ? CurrencyAmountFromJson(obj["withdrawal_fees"]) : void 0,
5228
+ blockHash: obj["withdrawal_block_hash"],
5229
+ numConfirmations: obj["withdrawal_num_confirmations"]
5230
+ };
5231
+ };
5232
+ var FRAGMENT19 = `
5233
+ fragment WithdrawalFragment on Withdrawal {
5234
+ __typename
5235
+ withdrawal_id: id
5236
+ withdrawal_created_at: created_at
5237
+ withdrawal_updated_at: updated_at
5238
+ withdrawal_status: status
5239
+ withdrawal_resolved_at: resolved_at
5240
+ withdrawal_amount: amount {
5241
+ __typename
5242
+ currency_amount_original_value: original_value
5243
+ currency_amount_original_unit: original_unit
5244
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5245
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5246
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5247
+ }
5248
+ withdrawal_transaction_hash: transaction_hash
5249
+ withdrawal_fees: fees {
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_block_hash: block_hash
5258
+ withdrawal_block_height: block_height
5259
+ withdrawal_destination_addresses: destination_addresses
5260
+ withdrawal_num_confirmations: num_confirmations
5261
+ withdrawal_origin: origin {
5262
+ id
5263
+ }
5264
+ }`;
5265
+ var getWithdrawalQuery = (id) => {
5266
+ return {
5267
+ queryPayload: `
5268
+ query GetWithdrawal($id: ID!) {
5269
+ entity(id: $id) {
5270
+ ... on Withdrawal {
5271
+ ...WithdrawalFragment
5272
+ }
5273
+ }
5274
+ }
5275
+
5276
+ ${FRAGMENT19}
5277
+ `,
5278
+ variables: { id },
5279
+ constructObject: (data) => WithdrawalFromJson(data.entity)
5280
+ };
5281
+ };
5282
+
5283
+ // src/objects/WithdrawalRequestToWithdrawalsConnection.ts
5284
+ var WithdrawalRequestToWithdrawalsConnectionFromJson = (obj) => {
5285
+ return {
5286
+ count: obj["withdrawal_request_to_withdrawals_connection_count"],
5287
+ entities: obj["withdrawal_request_to_withdrawals_connection_entities"].map(
5288
+ (e) => WithdrawalFromJson(e)
5289
+ )
5196
5290
  };
5197
5291
  };
5198
5292
 
5199
5293
  // src/objects/WithdrawalRequest.ts
5200
5294
  var WithdrawalRequest = class {
5201
- constructor(id, createdAt, updatedAt, requestedAmount, amount, bitcoinAddress, withdrawalMode, status, typename, estimatedAmount, amountWithdrawn, completedAt, withdrawalId) {
5295
+ constructor(id, createdAt, updatedAt, requestedAmount, amount, bitcoinAddress, withdrawalMode, status, typename, estimatedAmount, amountWithdrawn, totalFees, completedAt, withdrawalId, idempotencyKey) {
5202
5296
  this.id = id;
5203
5297
  this.createdAt = createdAt;
5204
5298
  this.updatedAt = updatedAt;
@@ -5210,18 +5304,21 @@ var WithdrawalRequest = class {
5210
5304
  this.typename = typename;
5211
5305
  this.estimatedAmount = estimatedAmount;
5212
5306
  this.amountWithdrawn = amountWithdrawn;
5307
+ this.totalFees = totalFees;
5213
5308
  this.completedAt = completedAt;
5214
5309
  this.withdrawalId = withdrawalId;
5310
+ this.idempotencyKey = idempotencyKey;
5215
5311
  autoBind(this);
5216
5312
  }
5217
- async getChannelClosingTransactions(client, first = void 0) {
5313
+ async getChannelClosingTransactions(client, first = void 0, after = void 0) {
5218
5314
  return await client.executeRawQuery({
5219
5315
  queryPayload: `
5220
- query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: ID!, $first: Int) {
5316
+ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: ID!, $first: Int, $after: String) {
5221
5317
  entity(id: $entity_id) {
5222
5318
  ... on WithdrawalRequest {
5223
- channel_closing_transactions(, first: $first) {
5319
+ channel_closing_transactions(, first: $first, after: $after) {
5224
5320
  __typename
5321
+ withdrawal_request_to_channel_closing_transactions_connection_count: count
5225
5322
  withdrawal_request_to_channel_closing_transactions_connection_page_info: page_info {
5226
5323
  __typename
5227
5324
  page_info_has_next_page: has_next_page
@@ -5229,7 +5326,6 @@ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: I
5229
5326
  page_info_start_cursor: start_cursor
5230
5327
  page_info_end_cursor: end_cursor
5231
5328
  }
5232
- withdrawal_request_to_channel_closing_transactions_connection_count: count
5233
5329
  withdrawal_request_to_channel_closing_transactions_connection_entities: entities {
5234
5330
  __typename
5235
5331
  channel_closing_transaction_id: id
@@ -5267,7 +5363,7 @@ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: I
5267
5363
  }
5268
5364
  }
5269
5365
  `,
5270
- variables: { entity_id: this.id, first },
5366
+ variables: { entity_id: this.id, first, after },
5271
5367
  constructObject: (json) => {
5272
5368
  const connection = json["entity"]["channel_closing_transactions"];
5273
5369
  return WithdrawalRequestToChannelClosingTransactionsConnectionFromJson(
@@ -5276,14 +5372,15 @@ query FetchWithdrawalRequestToChannelClosingTransactionsConnection($entity_id: I
5276
5372
  }
5277
5373
  });
5278
5374
  }
5279
- async getChannelOpeningTransactions(client, first = void 0) {
5375
+ async getChannelOpeningTransactions(client, first = void 0, after = void 0) {
5280
5376
  return await client.executeRawQuery({
5281
5377
  queryPayload: `
5282
- query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: ID!, $first: Int) {
5378
+ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: ID!, $first: Int, $after: String) {
5283
5379
  entity(id: $entity_id) {
5284
5380
  ... on WithdrawalRequest {
5285
- channel_opening_transactions(, first: $first) {
5381
+ channel_opening_transactions(, first: $first, after: $after) {
5286
5382
  __typename
5383
+ withdrawal_request_to_channel_opening_transactions_connection_count: count
5287
5384
  withdrawal_request_to_channel_opening_transactions_connection_page_info: page_info {
5288
5385
  __typename
5289
5386
  page_info_has_next_page: has_next_page
@@ -5291,7 +5388,6 @@ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: I
5291
5388
  page_info_start_cursor: start_cursor
5292
5389
  page_info_end_cursor: end_cursor
5293
5390
  }
5294
- withdrawal_request_to_channel_opening_transactions_connection_count: count
5295
5391
  withdrawal_request_to_channel_opening_transactions_connection_entities: entities {
5296
5392
  __typename
5297
5393
  channel_opening_transaction_id: id
@@ -5329,7 +5425,7 @@ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: I
5329
5425
  }
5330
5426
  }
5331
5427
  `,
5332
- variables: { entity_id: this.id, first },
5428
+ variables: { entity_id: this.id, first, after },
5333
5429
  constructObject: (json) => {
5334
5430
  const connection = json["entity"]["channel_opening_transactions"];
5335
5431
  return WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson(
@@ -5338,6 +5434,59 @@ query FetchWithdrawalRequestToChannelOpeningTransactionsConnection($entity_id: I
5338
5434
  }
5339
5435
  });
5340
5436
  }
5437
+ async getWithdrawals(client, first = void 0) {
5438
+ return await client.executeRawQuery({
5439
+ queryPayload: `
5440
+ query FetchWithdrawalRequestToWithdrawalsConnection($entity_id: ID!, $first: Int) {
5441
+ entity(id: $entity_id) {
5442
+ ... on WithdrawalRequest {
5443
+ withdrawals(, first: $first) {
5444
+ __typename
5445
+ withdrawal_request_to_withdrawals_connection_count: count
5446
+ withdrawal_request_to_withdrawals_connection_entities: entities {
5447
+ __typename
5448
+ withdrawal_id: id
5449
+ withdrawal_created_at: created_at
5450
+ withdrawal_updated_at: updated_at
5451
+ withdrawal_status: status
5452
+ withdrawal_resolved_at: resolved_at
5453
+ withdrawal_amount: amount {
5454
+ __typename
5455
+ currency_amount_original_value: original_value
5456
+ currency_amount_original_unit: original_unit
5457
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5458
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5459
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5460
+ }
5461
+ withdrawal_transaction_hash: transaction_hash
5462
+ withdrawal_fees: fees {
5463
+ __typename
5464
+ currency_amount_original_value: original_value
5465
+ currency_amount_original_unit: original_unit
5466
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5467
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5468
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5469
+ }
5470
+ withdrawal_block_hash: block_hash
5471
+ withdrawal_block_height: block_height
5472
+ withdrawal_destination_addresses: destination_addresses
5473
+ withdrawal_num_confirmations: num_confirmations
5474
+ withdrawal_origin: origin {
5475
+ id
5476
+ }
5477
+ }
5478
+ }
5479
+ }
5480
+ }
5481
+ }
5482
+ `,
5483
+ variables: { entity_id: this.id, first },
5484
+ constructObject: (json) => {
5485
+ const connection = json["entity"]["withdrawals"];
5486
+ return WithdrawalRequestToWithdrawalsConnectionFromJson(connection);
5487
+ }
5488
+ });
5489
+ }
5341
5490
  static getWithdrawalRequestQuery(id) {
5342
5491
  return {
5343
5492
  queryPayload: `
@@ -5349,7 +5498,7 @@ query GetWithdrawalRequest($id: ID!) {
5349
5498
  }
5350
5499
  }
5351
5500
 
5352
- ${FRAGMENT19}
5501
+ ${FRAGMENT20}
5353
5502
  `,
5354
5503
  variables: { id },
5355
5504
  constructObject: (data) => WithdrawalRequestFromJson(data.entity)
@@ -5367,11 +5516,13 @@ ${FRAGMENT19}
5367
5516
  withdrawal_request_amount: CurrencyAmountToJson(this.amount),
5368
5517
  withdrawal_request_estimated_amount: this.estimatedAmount ? CurrencyAmountToJson(this.estimatedAmount) : void 0,
5369
5518
  withdrawal_request_amount_withdrawn: this.amountWithdrawn ? CurrencyAmountToJson(this.amountWithdrawn) : void 0,
5519
+ withdrawal_request_total_fees: this.totalFees ? CurrencyAmountToJson(this.totalFees) : void 0,
5370
5520
  withdrawal_request_bitcoin_address: this.bitcoinAddress,
5371
5521
  withdrawal_request_withdrawal_mode: this.withdrawalMode,
5372
5522
  withdrawal_request_status: this.status,
5373
5523
  withdrawal_request_completed_at: this.completedAt,
5374
- withdrawal_request_withdrawal: { id: this.withdrawalId }
5524
+ withdrawal_request_withdrawal: { id: this.withdrawalId },
5525
+ withdrawal_request_idempotency_key: this.idempotencyKey
5375
5526
  };
5376
5527
  }
5377
5528
  };
@@ -5388,11 +5539,13 @@ var WithdrawalRequestFromJson = (obj) => {
5388
5539
  "WithdrawalRequest",
5389
5540
  !!obj["withdrawal_request_estimated_amount"] ? CurrencyAmountFromJson(obj["withdrawal_request_estimated_amount"]) : void 0,
5390
5541
  !!obj["withdrawal_request_amount_withdrawn"] ? CurrencyAmountFromJson(obj["withdrawal_request_amount_withdrawn"]) : void 0,
5542
+ !!obj["withdrawal_request_total_fees"] ? CurrencyAmountFromJson(obj["withdrawal_request_total_fees"]) : void 0,
5391
5543
  obj["withdrawal_request_completed_at"],
5392
- obj["withdrawal_request_withdrawal"]?.id ?? void 0
5544
+ obj["withdrawal_request_withdrawal"]?.id ?? void 0,
5545
+ obj["withdrawal_request_idempotency_key"]
5393
5546
  );
5394
5547
  };
5395
- var FRAGMENT19 = `
5548
+ var FRAGMENT20 = `
5396
5549
  fragment WithdrawalRequestFragment on WithdrawalRequest {
5397
5550
  __typename
5398
5551
  withdrawal_request_id: id
@@ -5430,6 +5583,14 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
5430
5583
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5431
5584
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5432
5585
  }
5586
+ withdrawal_request_total_fees: total_fees {
5587
+ __typename
5588
+ currency_amount_original_value: original_value
5589
+ currency_amount_original_unit: original_unit
5590
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5591
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5592
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5593
+ }
5433
5594
  withdrawal_request_bitcoin_address: bitcoin_address
5434
5595
  withdrawal_request_withdrawal_mode: withdrawal_mode
5435
5596
  withdrawal_request_status: status
@@ -5437,6 +5598,7 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
5437
5598
  withdrawal_request_withdrawal: withdrawal {
5438
5599
  id
5439
5600
  }
5601
+ withdrawal_request_idempotency_key: idempotency_key
5440
5602
  }`;
5441
5603
  var WithdrawalRequest_default = WithdrawalRequest;
5442
5604
 
@@ -5963,6 +6125,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
5963
6125
  }
5964
6126
  outgoing_payment_payment_preimage: payment_preimage
5965
6127
  outgoing_payment_is_internal_payment: is_internal_payment
6128
+ outgoing_payment_idempotency_key: idempotency_key
5966
6129
  }
5967
6130
  ... on RoutingTransaction {
5968
6131
  __typename
@@ -6478,6 +6641,14 @@ query FetchWalletToWithdrawalRequestsConnection($entity_id: ID!, $first: Int, $a
6478
6641
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6479
6642
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6480
6643
  }
6644
+ withdrawal_request_total_fees: total_fees {
6645
+ __typename
6646
+ currency_amount_original_value: original_value
6647
+ currency_amount_original_unit: original_unit
6648
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6649
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6650
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6651
+ }
6481
6652
  withdrawal_request_bitcoin_address: bitcoin_address
6482
6653
  withdrawal_request_withdrawal_mode: withdrawal_mode
6483
6654
  withdrawal_request_status: status
@@ -6485,6 +6656,7 @@ query FetchWalletToWithdrawalRequestsConnection($entity_id: ID!, $first: Int, $a
6485
6656
  withdrawal_request_withdrawal: withdrawal {
6486
6657
  id
6487
6658
  }
6659
+ withdrawal_request_idempotency_key: idempotency_key
6488
6660
  }
6489
6661
  }
6490
6662
  }
@@ -6545,7 +6717,7 @@ query GetWallet($id: ID!) {
6545
6717
  }
6546
6718
  }
6547
6719
 
6548
- ${FRAGMENT20}
6720
+ ${FRAGMENT21}
6549
6721
  `,
6550
6722
  variables: { id },
6551
6723
  constructObject: (data) => WalletFromJson(data.entity)
@@ -6578,7 +6750,7 @@ var WalletFromJson = (obj) => {
6578
6750
  obj["wallet_account"]?.id ?? void 0
6579
6751
  );
6580
6752
  };
6581
- var FRAGMENT20 = `
6753
+ var FRAGMENT21 = `
6582
6754
  fragment WalletFragment on Wallet {
6583
6755
  __typename
6584
6756
  wallet_id: id
@@ -7796,6 +7968,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
7796
7968
  }
7797
7969
  outgoing_payment_payment_preimage: payment_preimage
7798
7970
  outgoing_payment_is_internal_payment: is_internal_payment
7971
+ outgoing_payment_idempotency_key: idempotency_key
7799
7972
  }
7800
7973
  ... on RoutingTransaction {
7801
7974
  __typename
@@ -8232,13 +8405,13 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
8232
8405
  }
8233
8406
  });
8234
8407
  }
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) {
8408
+ 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
8409
  return await client.executeRawQuery({
8237
8410
  queryPayload: `
8238
- query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $bitcoin_networks: [BitcoinNetwork!], $statuses: [WithdrawalRequestStatus!], $node_ids: [ID!], $after_date: DateTime, $before_date: DateTime) {
8411
+ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $bitcoin_networks: [BitcoinNetwork!], $statuses: [WithdrawalRequestStatus!], $node_ids: [ID!], $idempotency_keys: [String!], $after_date: DateTime, $before_date: DateTime) {
8239
8412
  current_account {
8240
8413
  ... 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) {
8414
+ 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
8415
  __typename
8243
8416
  account_to_withdrawal_requests_connection_count: count
8244
8417
  account_to_withdrawal_requests_connection_page_info: page_info {
@@ -8285,6 +8458,14 @@ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $b
8285
8458
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8286
8459
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8287
8460
  }
8461
+ withdrawal_request_total_fees: total_fees {
8462
+ __typename
8463
+ currency_amount_original_value: original_value
8464
+ currency_amount_original_unit: original_unit
8465
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8466
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8467
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8468
+ }
8288
8469
  withdrawal_request_bitcoin_address: bitcoin_address
8289
8470
  withdrawal_request_withdrawal_mode: withdrawal_mode
8290
8471
  withdrawal_request_status: status
@@ -8292,6 +8473,7 @@ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $b
8292
8473
  withdrawal_request_withdrawal: withdrawal {
8293
8474
  id
8294
8475
  }
8476
+ withdrawal_request_idempotency_key: idempotency_key
8295
8477
  }
8296
8478
  }
8297
8479
  }
@@ -8304,6 +8486,7 @@ query FetchAccountToWithdrawalRequestsConnection($first: Int, $after: String, $b
8304
8486
  bitcoin_networks: bitcoinNetworks,
8305
8487
  statuses,
8306
8488
  node_ids: nodeIds,
8489
+ idempotency_keys: idempotencyKeys,
8307
8490
  after_date: afterDate,
8308
8491
  before_date: beforeDate
8309
8492
  },
@@ -8391,7 +8574,7 @@ query GetAccount {
8391
8574
  }
8392
8575
  }
8393
8576
 
8394
- ${FRAGMENT21}
8577
+ ${FRAGMENT22}
8395
8578
  `,
8396
8579
  variables: {},
8397
8580
  constructObject: (data) => AccountFromJson(data.current_account)
@@ -8416,7 +8599,7 @@ var AccountFromJson = (obj) => {
8416
8599
  obj["account_name"]
8417
8600
  );
8418
8601
  };
8419
- var FRAGMENT21 = `
8602
+ var FRAGMENT22 = `
8420
8603
  fragment AccountFragment on Account {
8421
8604
  __typename
8422
8605
  account_id: id
@@ -8446,7 +8629,7 @@ var AuditLogActorFromJson = (obj) => {
8446
8629
  `Couldn't find a concrete type for interface AuditLogActor corresponding to the typename=${obj["__typename"]}`
8447
8630
  );
8448
8631
  };
8449
- var FRAGMENT22 = `
8632
+ var FRAGMENT23 = `
8450
8633
  fragment AuditLogActorFragment on AuditLogActor {
8451
8634
  __typename
8452
8635
  ... on ApiToken {
@@ -8471,7 +8654,7 @@ query GetAuditLogActor($id: ID!) {
8471
8654
  }
8472
8655
  }
8473
8656
 
8474
- ${FRAGMENT22}
8657
+ ${FRAGMENT23}
8475
8658
  `,
8476
8659
  variables: { id },
8477
8660
  constructObject: (data) => AuditLogActorFromJson(data.entity)
@@ -8495,7 +8678,7 @@ var ChannelSnapshotFromJson = (obj) => {
8495
8678
  localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0
8496
8679
  };
8497
8680
  };
8498
- var FRAGMENT23 = `
8681
+ var FRAGMENT24 = `
8499
8682
  fragment ChannelSnapshotFragment on ChannelSnapshot {
8500
8683
  __typename
8501
8684
  channel_snapshot_id: id
@@ -8558,7 +8741,7 @@ query GetChannelSnapshot($id: ID!) {
8558
8741
  }
8559
8742
  }
8560
8743
 
8561
- ${FRAGMENT23}
8744
+ ${FRAGMENT24}
8562
8745
  `,
8563
8746
  variables: { id },
8564
8747
  constructObject: (data) => ChannelSnapshotFromJson(data.entity)
@@ -8867,7 +9050,7 @@ var SignablePayloadFromJson = (obj) => {
8867
9050
  mulTweak: obj["signable_payload_mul_tweak"]
8868
9051
  };
8869
9052
  };
8870
- var FRAGMENT24 = `
9053
+ var FRAGMENT25 = `
8871
9054
  fragment SignablePayloadFragment on SignablePayload {
8872
9055
  __typename
8873
9056
  signable_payload_id: id
@@ -8893,7 +9076,7 @@ query GetSignablePayload($id: ID!) {
8893
9076
  }
8894
9077
  }
8895
9078
 
8896
- ${FRAGMENT24}
9079
+ ${FRAGMENT25}
8897
9080
  `,
8898
9081
  variables: { id },
8899
9082
  constructObject: (data) => SignablePayloadFromJson(data.entity)
@@ -8919,7 +9102,7 @@ var DepositFromJson = (obj) => {
8919
9102
  numConfirmations: obj["deposit_num_confirmations"]
8920
9103
  };
8921
9104
  };
8922
- var FRAGMENT25 = `
9105
+ var FRAGMENT26 = `
8923
9106
  fragment DepositFragment on Deposit {
8924
9107
  __typename
8925
9108
  deposit_id: id
@@ -8963,7 +9146,7 @@ query GetDeposit($id: ID!) {
8963
9146
  }
8964
9147
  }
8965
9148
 
8966
- ${FRAGMENT25}
9149
+ ${FRAGMENT26}
8967
9150
  `,
8968
9151
  variables: { id },
8969
9152
  constructObject: (data) => DepositFromJson(data.entity)
@@ -8977,7 +9160,7 @@ var FeeEstimateFromJson = (obj) => {
8977
9160
  feeMin: CurrencyAmountFromJson(obj["fee_estimate_fee_min"])
8978
9161
  };
8979
9162
  };
8980
- var FRAGMENT26 = `
9163
+ var FRAGMENT27 = `
8981
9164
  fragment FeeEstimateFragment on FeeEstimate {
8982
9165
  __typename
8983
9166
  fee_estimate_fee_fast: fee_fast {
@@ -9033,7 +9216,7 @@ var InvoiceFromJson = (obj) => {
9033
9216
  amountPaid: !!obj["invoice_amount_paid"] ? CurrencyAmountFromJson(obj["invoice_amount_paid"]) : void 0
9034
9217
  };
9035
9218
  };
9036
- var FRAGMENT27 = `
9219
+ var FRAGMENT28 = `
9037
9220
  fragment InvoiceFragment on Invoice {
9038
9221
  __typename
9039
9222
  invoice_id: id
@@ -9351,7 +9534,7 @@ query GetInvoice($id: ID!) {
9351
9534
  }
9352
9535
  }
9353
9536
 
9354
- ${FRAGMENT27}
9537
+ ${FRAGMENT28}
9355
9538
  `,
9356
9539
  variables: { id },
9357
9540
  constructObject: (data) => InvoiceFromJson(data.entity)
@@ -9359,7 +9542,7 @@ ${FRAGMENT27}
9359
9542
  };
9360
9543
 
9361
9544
  // src/objects/LightningFeeEstimateOutput.ts
9362
- var FRAGMENT28 = `
9545
+ var FRAGMENT29 = `
9363
9546
  fragment LightningFeeEstimateOutputFragment on LightningFeeEstimateOutput {
9364
9547
  __typename
9365
9548
  lightning_fee_estimate_output_fee_estimate: fee_estimate {
@@ -9417,7 +9600,8 @@ var LightningTransactionFromJson = (obj) => {
9417
9600
  obj["outgoing_payment_uma_post_transaction_data"]?.map(
9418
9601
  (e) => PostTransactionDataFromJson(e)
9419
9602
  ),
9420
- obj["outgoing_payment_payment_preimage"]
9603
+ obj["outgoing_payment_payment_preimage"],
9604
+ obj["outgoing_payment_idempotency_key"]
9421
9605
  );
9422
9606
  }
9423
9607
  if (obj["__typename"] == "RoutingTransaction") {
@@ -9442,7 +9626,7 @@ var LightningTransactionFromJson = (obj) => {
9442
9626
  `Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
9443
9627
  );
9444
9628
  };
9445
- var FRAGMENT29 = `
9629
+ var FRAGMENT30 = `
9446
9630
  fragment LightningTransactionFragment on LightningTransaction {
9447
9631
  __typename
9448
9632
  ... on IncomingPayment {
@@ -9826,6 +10010,7 @@ fragment LightningTransactionFragment on LightningTransaction {
9826
10010
  }
9827
10011
  outgoing_payment_payment_preimage: payment_preimage
9828
10012
  outgoing_payment_is_internal_payment: is_internal_payment
10013
+ outgoing_payment_idempotency_key: idempotency_key
9829
10014
  }
9830
10015
  ... on RoutingTransaction {
9831
10016
  __typename
@@ -9875,7 +10060,7 @@ query GetLightningTransaction($id: ID!) {
9875
10060
  }
9876
10061
  }
9877
10062
 
9878
- ${FRAGMENT29}
10063
+ ${FRAGMENT30}
9879
10064
  `,
9880
10065
  variables: { id },
9881
10066
  constructObject: (data) => LightningTransactionFromJson(data.entity)
@@ -9912,7 +10097,7 @@ var LightsparkNodeOwnerFromJson = (obj) => {
9912
10097
  `Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
9913
10098
  );
9914
10099
  };
9915
- var FRAGMENT30 = `
10100
+ var FRAGMENT31 = `
9916
10101
  fragment LightsparkNodeOwnerFragment on LightsparkNodeOwner {
9917
10102
  __typename
9918
10103
  ... on Account {
@@ -9973,13 +10158,24 @@ query GetLightsparkNodeOwner($id: ID!) {
9973
10158
  }
9974
10159
  }
9975
10160
 
9976
- ${FRAGMENT30}
10161
+ ${FRAGMENT31}
9977
10162
  `,
9978
10163
  variables: { id },
9979
10164
  constructObject: (data) => LightsparkNodeOwnerFromJson(data.entity)
9980
10165
  };
9981
10166
  };
9982
10167
 
10168
+ // src/objects/OnChainFeeTarget.ts
10169
+ var OnChainFeeTarget = /* @__PURE__ */ ((OnChainFeeTarget2) => {
10170
+ OnChainFeeTarget2["FUTURE_VALUE"] = "FUTURE_VALUE";
10171
+ OnChainFeeTarget2["HIGH"] = "HIGH";
10172
+ OnChainFeeTarget2["MEDIUM"] = "MEDIUM";
10173
+ OnChainFeeTarget2["LOW"] = "LOW";
10174
+ OnChainFeeTarget2["BACKGROUND"] = "BACKGROUND";
10175
+ return OnChainFeeTarget2;
10176
+ })(OnChainFeeTarget || {});
10177
+ var OnChainFeeTarget_default = OnChainFeeTarget;
10178
+
9983
10179
  // src/objects/OnChainTransaction.ts
9984
10180
  import { LightsparkException as LightsparkException10 } from "@lightsparkdev/core";
9985
10181
  var OnChainTransactionFromJson = (obj) => {
@@ -10060,7 +10256,7 @@ var OnChainTransactionFromJson = (obj) => {
10060
10256
  `Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
10061
10257
  );
10062
10258
  };
10063
- var FRAGMENT31 = `
10259
+ var FRAGMENT32 = `
10064
10260
  fragment OnChainTransactionFragment on OnChainTransaction {
10065
10261
  __typename
10066
10262
  ... on ChannelClosingTransaction {
@@ -10203,7 +10399,7 @@ query GetOnChainTransaction($id: ID!) {
10203
10399
  }
10204
10400
  }
10205
10401
 
10206
- ${FRAGMENT31}
10402
+ ${FRAGMENT32}
10207
10403
  `,
10208
10404
  variables: { id },
10209
10405
  constructObject: (data) => OnChainTransactionFromJson(data.entity)
@@ -10230,6 +10426,7 @@ var RemoteSigningSubEventType = /* @__PURE__ */ ((RemoteSigningSubEventType2) =>
10230
10426
  RemoteSigningSubEventType2["RELEASE_PAYMENT_PREIMAGE"] = "RELEASE_PAYMENT_PREIMAGE";
10231
10427
  RemoteSigningSubEventType2["REQUEST_INVOICE_PAYMENT_HASH"] = "REQUEST_INVOICE_PAYMENT_HASH";
10232
10428
  RemoteSigningSubEventType2["REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET"] = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET";
10429
+ RemoteSigningSubEventType2["VLS_MESSAGE"] = "VLS_MESSAGE";
10233
10430
  return RemoteSigningSubEventType2;
10234
10431
  })(RemoteSigningSubEventType || {});
10235
10432
  var RemoteSigningSubEventType_default = RemoteSigningSubEventType;
@@ -10262,7 +10459,7 @@ var RoutingTransactionFromJson = (obj) => {
10262
10459
  failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
10263
10460
  };
10264
10461
  };
10265
- var FRAGMENT32 = `
10462
+ var FRAGMENT33 = `
10266
10463
  fragment RoutingTransactionFragment on RoutingTransaction {
10267
10464
  __typename
10268
10465
  routing_transaction_id: id
@@ -10310,7 +10507,7 @@ query GetRoutingTransaction($id: ID!) {
10310
10507
  }
10311
10508
  }
10312
10509
 
10313
- ${FRAGMENT32}
10510
+ ${FRAGMENT33}
10314
10511
  `,
10315
10512
  variables: { id },
10316
10513
  constructObject: (data) => RoutingTransactionFromJson(data.entity)
@@ -10326,7 +10523,7 @@ var SignableFromJson = (obj) => {
10326
10523
  typename: "Signable"
10327
10524
  };
10328
10525
  };
10329
- var FRAGMENT33 = `
10526
+ var FRAGMENT34 = `
10330
10527
  fragment SignableFragment on Signable {
10331
10528
  __typename
10332
10529
  signable_id: id
@@ -10344,7 +10541,7 @@ query GetSignable($id: ID!) {
10344
10541
  }
10345
10542
  }
10346
10543
 
10347
- ${FRAGMENT33}
10544
+ ${FRAGMENT34}
10348
10545
  `,
10349
10546
  variables: { id },
10350
10547
  constructObject: (data) => SignableFromJson(data.entity)
@@ -10381,7 +10578,7 @@ var TransactionUpdateFromJson = (obj) => {
10381
10578
  transactionHash: obj["transaction_hash"]
10382
10579
  };
10383
10580
  };
10384
- var FRAGMENT34 = `
10581
+ var FRAGMENT35 = `
10385
10582
  fragment TransactionUpdateFragment on Transaction {
10386
10583
  __typename
10387
10584
  id
@@ -10415,7 +10612,7 @@ var UmaInvitationFromJson = (obj) => {
10415
10612
  incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ? IncentivesIneligibilityReason_default[obj["uma_invitation_incentives_ineligibility_reason"]] ?? IncentivesIneligibilityReason_default.FUTURE_VALUE : null
10416
10613
  };
10417
10614
  };
10418
- var FRAGMENT35 = `
10615
+ var FRAGMENT36 = `
10419
10616
  fragment UmaInvitationFragment on UmaInvitation {
10420
10617
  __typename
10421
10618
  uma_invitation_id: id
@@ -10439,7 +10636,7 @@ query GetUmaInvitation($id: ID!) {
10439
10636
  }
10440
10637
  }
10441
10638
 
10442
- ${FRAGMENT35}
10639
+ ${FRAGMENT36}
10443
10640
  `,
10444
10641
  variables: { id },
10445
10642
  constructObject: (data) => UmaInvitationFromJson(data.entity)
@@ -10467,76 +10664,6 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
10467
10664
  })(WebhookEventType || {});
10468
10665
  var WebhookEventType_default = WebhookEventType;
10469
10666
 
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
10667
  // src/objects/WithdrawalFeeEstimateOutput.ts
10541
10668
  var WithdrawalFeeEstimateOutputFromJson = (obj) => {
10542
10669
  return {
@@ -10564,7 +10691,7 @@ export {
10564
10691
  CurrencyAmountFromJson,
10565
10692
  FRAGMENT2 as FRAGMENT,
10566
10693
  FeeEstimateFromJson,
10567
- FRAGMENT26 as FRAGMENT2,
10694
+ FRAGMENT27 as FRAGMENT2,
10568
10695
  NodeAddressType_default,
10569
10696
  GraphNode_default,
10570
10697
  LightsparkNodeStatus_default,
@@ -10578,12 +10705,12 @@ export {
10578
10705
  FRAGMENT9 as FRAGMENT3,
10579
10706
  PaymentRequestStatus_default,
10580
10707
  InvoiceFromJson,
10581
- FRAGMENT27 as FRAGMENT4,
10708
+ FRAGMENT28 as FRAGMENT4,
10582
10709
  getInvoiceQuery,
10583
10710
  IncentivesIneligibilityReason_default,
10584
10711
  IncentivesStatus_default,
10585
10712
  UmaInvitationFromJson,
10586
- FRAGMENT35 as FRAGMENT5,
10713
+ FRAGMENT36 as FRAGMENT5,
10587
10714
  getUmaInvitationQuery,
10588
10715
  Permission_default,
10589
10716
  ApiTokenFromJson,
@@ -10595,7 +10722,7 @@ export {
10595
10722
  IncomingPaymentFromJson,
10596
10723
  FRAGMENT12 as FRAGMENT7,
10597
10724
  IncomingPayment_default,
10598
- FRAGMENT28 as FRAGMENT8,
10725
+ FRAGMENT29 as FRAGMENT8,
10599
10726
  HtlcAttemptFailureCode_default,
10600
10727
  OutgoingPaymentAttemptStatus_default,
10601
10728
  getHopQuery,
@@ -10611,15 +10738,16 @@ export {
10611
10738
  WithdrawalRequestStatus_default,
10612
10739
  getChannelClosingTransactionQuery,
10613
10740
  getChannelOpeningTransactionQuery,
10741
+ getWithdrawalQuery,
10614
10742
  WithdrawalRequestFromJson,
10615
- FRAGMENT19 as FRAGMENT11,
10743
+ FRAGMENT20 as FRAGMENT11,
10616
10744
  WithdrawalRequest_default,
10617
10745
  RoutingTransactionFailureReason_default,
10618
10746
  TransactionFromJson,
10619
10747
  FRAGMENT16 as FRAGMENT12,
10620
10748
  getTransactionQuery,
10621
10749
  TransactionUpdateFromJson,
10622
- FRAGMENT34 as FRAGMENT13,
10750
+ FRAGMENT35 as FRAGMENT13,
10623
10751
  WithdrawalFeeEstimateOutputFromJson,
10624
10752
  FRAGMENT37 as FRAGMENT14,
10625
10753
  getLightsparkNodeQuery,
@@ -10636,6 +10764,7 @@ export {
10636
10764
  getDepositQuery,
10637
10765
  getLightningTransactionQuery,
10638
10766
  getLightsparkNodeOwnerQuery,
10767
+ OnChainFeeTarget_default,
10639
10768
  getOnChainTransactionQuery,
10640
10769
  PaymentDirection_default,
10641
10770
  RemoteSigningSubEventType_default,
@@ -10644,6 +10773,5 @@ export {
10644
10773
  getSignableQuery,
10645
10774
  TransactionType_default,
10646
10775
  WebhookEventType,
10647
- WebhookEventType_default,
10648
- getWithdrawalQuery
10776
+ WebhookEventType_default
10649
10777
  };