@lightsparkdev/lightspark-sdk 1.1.6 → 1.2.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 (123) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{chunk-7UNNCH5S.js → chunk-VTPDR6P4.js} +1270 -342
  3. package/dist/{index-5235e43b.d.ts → index-f040db9f.d.ts} +707 -407
  4. package/dist/index.cjs +1247 -319
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +7 -7
  7. package/dist/objects/index.cjs +1180 -306
  8. package/dist/objects/index.d.ts +1 -1
  9. package/dist/objects/index.js +5 -5
  10. package/package.json +2 -2
  11. package/src/objects/Account.ts +175 -2
  12. package/src/objects/AccountToApiTokensConnection.ts +16 -5
  13. package/src/objects/AccountToChannelsConnection.ts +9 -0
  14. package/src/objects/AccountToNodesConnection.ts +19 -5
  15. package/src/objects/AccountToPaymentRequestsConnection.ts +21 -5
  16. package/src/objects/AccountToTransactionsConnection.ts +33 -9
  17. package/src/objects/AccountToWalletsConnection.ts +13 -4
  18. package/src/objects/ApiToken.ts +13 -3
  19. package/src/objects/Balances.ts +17 -3
  20. package/src/objects/BlockchainBalance.ts +34 -9
  21. package/src/objects/Channel.ts +61 -16
  22. package/src/objects/ChannelClosingTransaction.ts +81 -61
  23. package/src/objects/ChannelFees.ts +16 -5
  24. package/src/objects/ChannelOpeningTransaction.ts +81 -61
  25. package/src/objects/ChannelSnapshot.ts +66 -6
  26. package/src/objects/ChannelToTransactionsConnection.ts +26 -6
  27. package/src/objects/Connection.ts +205 -10
  28. package/src/objects/CreateApiTokenInput.ts +8 -2
  29. package/src/objects/CreateApiTokenOutput.ts +9 -3
  30. package/src/objects/CreateInvoiceInput.ts +14 -5
  31. package/src/objects/CreateInvoiceOutput.ts +7 -2
  32. package/src/objects/CreateLnurlInvoiceInput.ts +13 -3
  33. package/src/objects/CreateNodeWalletAddressInput.ts +9 -2
  34. package/src/objects/CreateNodeWalletAddressOutput.ts +10 -2
  35. package/src/objects/CreateTestModeInvoiceInput.ts +14 -4
  36. package/src/objects/CreateTestModeInvoiceOutput.ts +10 -2
  37. package/src/objects/CreateTestModePaymentInput.ts +12 -3
  38. package/src/objects/CreateTestModePaymentoutput.ts +12 -2
  39. package/src/objects/CreateUmaInvoiceInput.ts +13 -3
  40. package/src/objects/CurrencyAmount.ts +13 -2
  41. package/src/objects/DeclineToSignMessagesInput.ts +9 -2
  42. package/src/objects/DeclineToSignMessagesOutput.ts +15 -3
  43. package/src/objects/DeleteApiTokenInput.ts +7 -2
  44. package/src/objects/DeleteApiTokenOutput.ts +7 -2
  45. package/src/objects/Deposit.ts +77 -61
  46. package/src/objects/Entity.ts +184 -2
  47. package/src/objects/FeeEstimate.ts +12 -3
  48. package/src/objects/FundNodeInput.ts +9 -3
  49. package/src/objects/FundNodeOutput.ts +11 -3
  50. package/src/objects/GraphNode.ts +21 -5
  51. package/src/objects/Hop.ts +27 -9
  52. package/src/objects/HtlcAttemptFailureCode.ts +2 -0
  53. package/src/objects/IdAndSignature.ts +8 -2
  54. package/src/objects/IncomingPayment.ts +33 -7
  55. package/src/objects/IncomingPaymentAttempt.ts +21 -5
  56. package/src/objects/IncomingPaymentToAttemptsConnection.ts +21 -5
  57. package/src/objects/Invoice.ts +91 -24
  58. package/src/objects/InvoiceData.ts +75 -6
  59. package/src/objects/LightningFeeEstimateForInvoiceInput.ts +13 -3
  60. package/src/objects/LightningFeeEstimateForNodeInput.ts +12 -2
  61. package/src/objects/LightningFeeEstimateOutput.ts +15 -3
  62. package/src/objects/LightningTransaction.ts +171 -28
  63. package/src/objects/LightsparkNode.ts +311 -208
  64. package/src/objects/LightsparkNodeOwner.ts +35 -4
  65. package/src/objects/LightsparkNodeToChannelsConnection.ts +17 -4
  66. package/src/objects/LightsparkNodeWithOSK.ts +97 -15
  67. package/src/objects/LightsparkNodeWithRemoteSigning.ts +93 -13
  68. package/src/objects/Node.ts +269 -67
  69. package/src/objects/NodeAddress.ts +8 -2
  70. package/src/objects/NodeToAddressesConnection.ts +13 -3
  71. package/src/objects/OnChainTransaction.ts +156 -44
  72. package/src/objects/OutgoingPayment.ts +127 -14
  73. package/src/objects/OutgoingPaymentAttempt.ts +57 -8
  74. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +18 -5
  75. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +17 -4
  76. package/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts +12 -3
  77. package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +11 -2
  78. package/src/objects/PageInfo.ts +14 -6
  79. package/src/objects/PayInvoiceInput.ts +12 -3
  80. package/src/objects/PayInvoiceOutput.ts +7 -2
  81. package/src/objects/PayUmaInvoiceInput.ts +12 -3
  82. package/src/objects/PaymentRequest.ts +81 -5
  83. package/src/objects/PaymentRequestData.ts +81 -4
  84. package/src/objects/PostTransactionData.ts +12 -3
  85. package/src/objects/RegisterPaymentInput.ts +10 -2
  86. package/src/objects/RegisterPaymentOutput.ts +9 -2
  87. package/src/objects/ReleaseChannelPerCommitmentSecretInput.ts +13 -2
  88. package/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts +9 -2
  89. package/src/objects/ReleasePaymentPreimageInput.ts +10 -2
  90. package/src/objects/ReleasePaymentPreimageOutput.ts +9 -2
  91. package/src/objects/RequestWithdrawalInput.ts +12 -2
  92. package/src/objects/RequestWithdrawalOutput.ts +9 -2
  93. package/src/objects/RichText.ts +7 -2
  94. package/src/objects/RoutingTransaction.ts +62 -41
  95. package/src/objects/ScreenNodeInput.ts +8 -2
  96. package/src/objects/ScreenNodeOutput.ts +7 -2
  97. package/src/objects/Secret.ts +8 -2
  98. package/src/objects/SendPaymentInput.ts +11 -2
  99. package/src/objects/SendPaymentOutput.ts +7 -2
  100. package/src/objects/SetInvoicePaymentHashInput.ts +12 -3
  101. package/src/objects/SetInvoicePaymentHashOutput.ts +9 -2
  102. package/src/objects/SignInvoiceInput.ts +9 -2
  103. package/src/objects/SignInvoiceOutput.ts +7 -2
  104. package/src/objects/SignMessagesInput.ts +13 -3
  105. package/src/objects/SignMessagesOutput.ts +13 -3
  106. package/src/objects/Signable.ts +10 -3
  107. package/src/objects/SignablePayload.ts +18 -5
  108. package/src/objects/Transaction.ts +260 -9
  109. package/src/objects/TransactionFailures.ts +11 -4
  110. package/src/objects/UpdateChannelPerCommitmentPointInput.ts +13 -2
  111. package/src/objects/UpdateChannelPerCommitmentPointOutput.ts +9 -2
  112. package/src/objects/UpdateNodeSharedSecretInput.ts +10 -2
  113. package/src/objects/UpdateNodeSharedSecretOutput.ts +9 -2
  114. package/src/objects/Wallet.ts +130 -5
  115. package/src/objects/WalletToPaymentRequestsConnection.ts +21 -5
  116. package/src/objects/WalletToTransactionsConnection.ts +16 -5
  117. package/src/objects/Withdrawal.ts +77 -61
  118. package/src/objects/WithdrawalRequest.ts +25 -4
  119. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +19 -4
  120. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +19 -4
  121. package/src/objects/index.ts +5 -2
  122. package/src/tests/integration/client.test.ts +46 -7
  123. package/src/tests/serialization.test.ts +18 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-K6SAUSAX.js";
4
4
 
5
5
  // src/objects/Account.ts
6
- import autoBind12 from "auto-bind";
6
+ import autoBind10 from "auto-bind";
7
7
 
8
8
  // src/objects/Permission.ts
9
9
  var Permission = /* @__PURE__ */ ((Permission2) => {
@@ -120,6 +120,15 @@ var CurrencyAmountFromJson = (obj) => {
120
120
  preferredCurrencyValueApprox: obj["currency_amount_preferred_currency_value_approx"]
121
121
  };
122
122
  };
123
+ var CurrencyAmountToJson = (obj) => {
124
+ return {
125
+ currency_amount_original_value: obj.originalValue,
126
+ currency_amount_original_unit: obj.originalUnit,
127
+ currency_amount_preferred_currency_unit: obj.preferredCurrencyUnit,
128
+ currency_amount_preferred_currency_value_rounded: obj.preferredCurrencyValueRounded,
129
+ currency_amount_preferred_currency_value_approx: obj.preferredCurrencyValueApprox
130
+ };
131
+ };
123
132
  var FRAGMENT2 = `
124
133
  fragment CurrencyAmountFragment on CurrencyAmount {
125
134
  __typename
@@ -137,6 +146,12 @@ var ChannelFeesFromJson = (obj) => {
137
146
  feeRatePerMil: obj["channel_fees_fee_rate_per_mil"]
138
147
  };
139
148
  };
149
+ var ChannelFeesToJson = (obj) => {
150
+ return {
151
+ channel_fees_base_fee: obj.baseFee ? CurrencyAmountToJson(obj.baseFee) : void 0,
152
+ channel_fees_fee_rate_per_mil: obj.feeRatePerMil
153
+ };
154
+ };
140
155
 
141
156
  // src/objects/ChannelStatus.ts
142
157
  var ChannelStatus = /* @__PURE__ */ ((ChannelStatus2) => {
@@ -281,6 +296,29 @@ ${FRAGMENT3}
281
296
  constructObject: (data) => ChannelFromJson(data.entity)
282
297
  };
283
298
  }
299
+ toJson() {
300
+ return {
301
+ __typename: "Channel",
302
+ channel_id: this.id,
303
+ channel_created_at: this.createdAt,
304
+ channel_updated_at: this.updatedAt,
305
+ channel_funding_transaction: { id: this.fundingTransactionId },
306
+ channel_capacity: this.capacity ? CurrencyAmountToJson(this.capacity) : void 0,
307
+ channel_local_balance: this.localBalance ? CurrencyAmountToJson(this.localBalance) : void 0,
308
+ channel_local_unsettled_balance: this.localUnsettledBalance ? CurrencyAmountToJson(this.localUnsettledBalance) : void 0,
309
+ channel_remote_balance: this.remoteBalance ? CurrencyAmountToJson(this.remoteBalance) : void 0,
310
+ channel_remote_unsettled_balance: this.remoteUnsettledBalance ? CurrencyAmountToJson(this.remoteUnsettledBalance) : void 0,
311
+ channel_unsettled_balance: this.unsettledBalance ? CurrencyAmountToJson(this.unsettledBalance) : void 0,
312
+ channel_total_balance: this.totalBalance ? CurrencyAmountToJson(this.totalBalance) : void 0,
313
+ channel_status: this.status,
314
+ channel_estimated_force_closure_wait_minutes: this.estimatedForceClosureWaitMinutes,
315
+ channel_commit_fee: this.commitFee ? CurrencyAmountToJson(this.commitFee) : void 0,
316
+ channel_fees: this.fees ? ChannelFeesToJson(this.fees) : void 0,
317
+ channel_remote_node: { id: this.remoteNodeId },
318
+ channel_local_node: { id: this.localNodeId },
319
+ channel_short_channel_id: this.shortChannelId
320
+ };
321
+ }
284
322
  };
285
323
  var ChannelFromJson = (obj) => {
286
324
  return new Channel(
@@ -409,6 +447,14 @@ var AccountToChannelsConnection = class {
409
447
  this.entities = entities;
410
448
  autoBind2(this);
411
449
  }
450
+ toJson() {
451
+ return {
452
+ account_to_channels_connection_count: this.count,
453
+ account_to_channels_connection_entities: this.entities.map(
454
+ (e) => e.toJson()
455
+ )
456
+ };
457
+ }
412
458
  };
413
459
  var AccountToChannelsConnectionFromJson = (obj) => {
414
460
  return new AccountToChannelsConnection(
@@ -422,7 +468,30 @@ var AccountToChannelsConnection_default = AccountToChannelsConnection;
422
468
 
423
469
  // src/objects/LightsparkNode.ts
424
470
  import { LightsparkException } from "@lightsparkdev/core";
425
- import autoBind5 from "auto-bind";
471
+
472
+ // src/objects/Balances.ts
473
+ var BalancesFromJson = (obj) => {
474
+ return {
475
+ ownedBalance: CurrencyAmountFromJson(obj["balances_owned_balance"]),
476
+ availableToSendBalance: CurrencyAmountFromJson(
477
+ obj["balances_available_to_send_balance"]
478
+ ),
479
+ availableToWithdrawBalance: CurrencyAmountFromJson(
480
+ obj["balances_available_to_withdraw_balance"]
481
+ )
482
+ };
483
+ };
484
+ var BalancesToJson = (obj) => {
485
+ return {
486
+ balances_owned_balance: CurrencyAmountToJson(obj.ownedBalance),
487
+ balances_available_to_send_balance: CurrencyAmountToJson(
488
+ obj.availableToSendBalance
489
+ ),
490
+ balances_available_to_withdraw_balance: CurrencyAmountToJson(
491
+ obj.availableToWithdrawBalance
492
+ )
493
+ };
494
+ };
426
495
 
427
496
  // src/objects/BlockchainBalance.ts
428
497
  var BlockchainBalanceFromJson = (obj) => {
@@ -435,6 +504,16 @@ var BlockchainBalanceFromJson = (obj) => {
435
504
  availableBalance: !!obj["blockchain_balance_available_balance"] ? CurrencyAmountFromJson(obj["blockchain_balance_available_balance"]) : void 0
436
505
  };
437
506
  };
507
+ var BlockchainBalanceToJson = (obj) => {
508
+ return {
509
+ blockchain_balance_total_balance: obj.totalBalance ? CurrencyAmountToJson(obj.totalBalance) : void 0,
510
+ blockchain_balance_confirmed_balance: obj.confirmedBalance ? CurrencyAmountToJson(obj.confirmedBalance) : void 0,
511
+ blockchain_balance_unconfirmed_balance: obj.unconfirmedBalance ? CurrencyAmountToJson(obj.unconfirmedBalance) : void 0,
512
+ blockchain_balance_locked_balance: obj.lockedBalance ? CurrencyAmountToJson(obj.lockedBalance) : void 0,
513
+ blockchain_balance_required_reserve: obj.requiredReserve ? CurrencyAmountToJson(obj.requiredReserve) : void 0,
514
+ blockchain_balance_available_balance: obj.availableBalance ? CurrencyAmountToJson(obj.availableBalance) : void 0
515
+ };
516
+ };
438
517
 
439
518
  // src/objects/LightsparkNodeStatus.ts
440
519
  var LightsparkNodeStatus = /* @__PURE__ */ ((LightsparkNodeStatus2) => {
@@ -453,6 +532,9 @@ var LightsparkNodeStatus = /* @__PURE__ */ ((LightsparkNodeStatus2) => {
453
532
  })(LightsparkNodeStatus || {});
454
533
  var LightsparkNodeStatus_default = LightsparkNodeStatus;
455
534
 
535
+ // src/objects/LightsparkNodeWithOSK.ts
536
+ import autoBind3 from "auto-bind";
537
+
456
538
  // src/objects/LightsparkNodeToChannelsConnection.ts
457
539
  var LightsparkNodeToChannelsConnectionFromJson = (obj) => {
458
540
  return {
@@ -467,9 +549,6 @@ var LightsparkNodeToChannelsConnectionFromJson = (obj) => {
467
549
  };
468
550
  };
469
551
 
470
- // src/objects/LightsparkNodeWithOSK.ts
471
- import autoBind3 from "auto-bind";
472
-
473
552
  // src/objects/NodeAddressType.ts
474
553
  var NodeAddressType = /* @__PURE__ */ ((NodeAddressType2) => {
475
554
  NodeAddressType2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -505,10 +584,16 @@ var SecretFromJson = (obj) => {
505
584
  cipher: obj["secret_cipher"]
506
585
  };
507
586
  };
587
+ var SecretToJson = (obj) => {
588
+ return {
589
+ secret_encrypted_value: obj.encryptedValue,
590
+ secret_cipher: obj.cipher
591
+ };
592
+ };
508
593
 
509
594
  // src/objects/LightsparkNodeWithOSK.ts
510
595
  var LightsparkNodeWithOSK = class {
511
- constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, encryptedSigningPrivateKey) {
596
+ constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, balances, encryptedSigningPrivateKey) {
512
597
  this.id = id;
513
598
  this.createdAt = createdAt;
514
599
  this.updatedAt = updatedAt;
@@ -527,6 +612,7 @@ var LightsparkNodeWithOSK = class {
527
612
  this.localBalance = localBalance;
528
613
  this.remoteBalance = remoteBalance;
529
614
  this.blockchainBalance = blockchainBalance;
615
+ this.balances = balances;
530
616
  this.encryptedSigningPrivateKey = encryptedSigningPrivateKey;
531
617
  autoBind3(this);
532
618
  }
@@ -700,6 +786,30 @@ ${FRAGMENT4}
700
786
  constructObject: (data) => LightsparkNodeWithOSKFromJson(data.entity)
701
787
  };
702
788
  }
789
+ toJson() {
790
+ return {
791
+ __typename: "LightsparkNodeWithOSK",
792
+ lightspark_node_with_o_s_k_id: this.id,
793
+ lightspark_node_with_o_s_k_created_at: this.createdAt,
794
+ lightspark_node_with_o_s_k_updated_at: this.updatedAt,
795
+ lightspark_node_with_o_s_k_alias: this.alias,
796
+ lightspark_node_with_o_s_k_bitcoin_network: this.bitcoinNetwork,
797
+ lightspark_node_with_o_s_k_color: this.color,
798
+ lightspark_node_with_o_s_k_conductivity: this.conductivity,
799
+ lightspark_node_with_o_s_k_display_name: this.displayName,
800
+ lightspark_node_with_o_s_k_public_key: this.publicKey,
801
+ lightspark_node_with_o_s_k_owner: { id: this.ownerId },
802
+ lightspark_node_with_o_s_k_status: this.status,
803
+ lightspark_node_with_o_s_k_total_balance: this.totalBalance ? CurrencyAmountToJson(this.totalBalance) : void 0,
804
+ lightspark_node_with_o_s_k_total_local_balance: this.totalLocalBalance ? CurrencyAmountToJson(this.totalLocalBalance) : void 0,
805
+ lightspark_node_with_o_s_k_local_balance: this.localBalance ? CurrencyAmountToJson(this.localBalance) : void 0,
806
+ lightspark_node_with_o_s_k_remote_balance: this.remoteBalance ? CurrencyAmountToJson(this.remoteBalance) : void 0,
807
+ lightspark_node_with_o_s_k_blockchain_balance: this.blockchainBalance ? BlockchainBalanceToJson(this.blockchainBalance) : void 0,
808
+ lightspark_node_with_o_s_k_uma_prescreening_utxos: this.umaPrescreeningUtxos,
809
+ lightspark_node_with_o_s_k_balances: this.balances ? BalancesToJson(this.balances) : void 0,
810
+ lightspark_node_with_o_s_k_encrypted_signing_private_key: this.encryptedSigningPrivateKey ? SecretToJson(this.encryptedSigningPrivateKey) : void 0
811
+ };
812
+ }
703
813
  };
704
814
  var LightsparkNodeWithOSKFromJson = (obj) => {
705
815
  return new LightsparkNodeWithOSK(
@@ -725,6 +835,7 @@ var LightsparkNodeWithOSKFromJson = (obj) => {
725
835
  !!obj["lightspark_node_with_o_s_k_blockchain_balance"] ? BlockchainBalanceFromJson(
726
836
  obj["lightspark_node_with_o_s_k_blockchain_balance"]
727
837
  ) : void 0,
838
+ !!obj["lightspark_node_with_o_s_k_balances"] ? BalancesFromJson(obj["lightspark_node_with_o_s_k_balances"]) : void 0,
728
839
  !!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"] ? SecretFromJson(
729
840
  obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
730
841
  ) : void 0
@@ -830,6 +941,33 @@ fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK {
830
941
  }
831
942
  }
832
943
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
944
+ lightspark_node_with_o_s_k_balances: balances {
945
+ __typename
946
+ balances_owned_balance: owned_balance {
947
+ __typename
948
+ currency_amount_original_value: original_value
949
+ currency_amount_original_unit: original_unit
950
+ currency_amount_preferred_currency_unit: preferred_currency_unit
951
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
952
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
953
+ }
954
+ balances_available_to_send_balance: available_to_send_balance {
955
+ __typename
956
+ currency_amount_original_value: original_value
957
+ currency_amount_original_unit: original_unit
958
+ currency_amount_preferred_currency_unit: preferred_currency_unit
959
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
960
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
961
+ }
962
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
963
+ __typename
964
+ currency_amount_original_value: original_value
965
+ currency_amount_original_unit: original_unit
966
+ currency_amount_preferred_currency_unit: preferred_currency_unit
967
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
968
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
969
+ }
970
+ }
833
971
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
834
972
  __typename
835
973
  secret_encrypted_value: encrypted_value
@@ -841,7 +979,7 @@ var LightsparkNodeWithOSK_default = LightsparkNodeWithOSK;
841
979
  // src/objects/LightsparkNodeWithRemoteSigning.ts
842
980
  import autoBind4 from "auto-bind";
843
981
  var LightsparkNodeWithRemoteSigning = class {
844
- constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance) {
982
+ constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, balances) {
845
983
  this.id = id;
846
984
  this.createdAt = createdAt;
847
985
  this.updatedAt = updatedAt;
@@ -860,6 +998,7 @@ var LightsparkNodeWithRemoteSigning = class {
860
998
  this.localBalance = localBalance;
861
999
  this.remoteBalance = remoteBalance;
862
1000
  this.blockchainBalance = blockchainBalance;
1001
+ this.balances = balances;
863
1002
  autoBind4(this);
864
1003
  }
865
1004
  async getAddresses(client, first = void 0, types = void 0) {
@@ -1032,6 +1171,29 @@ ${FRAGMENT5}
1032
1171
  constructObject: (data) => LightsparkNodeWithRemoteSigningFromJson(data.entity)
1033
1172
  };
1034
1173
  }
1174
+ toJson() {
1175
+ return {
1176
+ __typename: "LightsparkNodeWithRemoteSigning",
1177
+ lightspark_node_with_remote_signing_id: this.id,
1178
+ lightspark_node_with_remote_signing_created_at: this.createdAt,
1179
+ lightspark_node_with_remote_signing_updated_at: this.updatedAt,
1180
+ lightspark_node_with_remote_signing_alias: this.alias,
1181
+ lightspark_node_with_remote_signing_bitcoin_network: this.bitcoinNetwork,
1182
+ lightspark_node_with_remote_signing_color: this.color,
1183
+ lightspark_node_with_remote_signing_conductivity: this.conductivity,
1184
+ lightspark_node_with_remote_signing_display_name: this.displayName,
1185
+ lightspark_node_with_remote_signing_public_key: this.publicKey,
1186
+ lightspark_node_with_remote_signing_owner: { id: this.ownerId },
1187
+ lightspark_node_with_remote_signing_status: this.status,
1188
+ lightspark_node_with_remote_signing_total_balance: this.totalBalance ? CurrencyAmountToJson(this.totalBalance) : void 0,
1189
+ lightspark_node_with_remote_signing_total_local_balance: this.totalLocalBalance ? CurrencyAmountToJson(this.totalLocalBalance) : void 0,
1190
+ lightspark_node_with_remote_signing_local_balance: this.localBalance ? CurrencyAmountToJson(this.localBalance) : void 0,
1191
+ lightspark_node_with_remote_signing_remote_balance: this.remoteBalance ? CurrencyAmountToJson(this.remoteBalance) : void 0,
1192
+ lightspark_node_with_remote_signing_blockchain_balance: this.blockchainBalance ? BlockchainBalanceToJson(this.blockchainBalance) : void 0,
1193
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: this.umaPrescreeningUtxos,
1194
+ lightspark_node_with_remote_signing_balances: this.balances ? BalancesToJson(this.balances) : void 0
1195
+ };
1196
+ }
1035
1197
  };
1036
1198
  var LightsparkNodeWithRemoteSigningFromJson = (obj) => {
1037
1199
  return new LightsparkNodeWithRemoteSigning(
@@ -1062,7 +1224,8 @@ var LightsparkNodeWithRemoteSigningFromJson = (obj) => {
1062
1224
  ) : void 0,
1063
1225
  !!obj["lightspark_node_with_remote_signing_blockchain_balance"] ? BlockchainBalanceFromJson(
1064
1226
  obj["lightspark_node_with_remote_signing_blockchain_balance"]
1065
- ) : void 0
1227
+ ) : void 0,
1228
+ !!obj["lightspark_node_with_remote_signing_balances"] ? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"]) : void 0
1066
1229
  );
1067
1230
  };
1068
1231
  var FRAGMENT5 = `
@@ -1165,203 +1328,37 @@ fragment LightsparkNodeWithRemoteSigningFragment on LightsparkNodeWithRemoteSign
1165
1328
  }
1166
1329
  }
1167
1330
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
1168
- }`;
1169
- var LightsparkNodeWithRemoteSigning_default = LightsparkNodeWithRemoteSigning;
1170
-
1171
- // src/objects/LightsparkNode.ts
1172
- var LightsparkNode = class {
1173
- constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance) {
1174
- this.id = id;
1175
- this.createdAt = createdAt;
1176
- this.updatedAt = updatedAt;
1177
- this.bitcoinNetwork = bitcoinNetwork;
1178
- this.displayName = displayName;
1179
- this.ownerId = ownerId;
1180
- this.umaPrescreeningUtxos = umaPrescreeningUtxos;
1181
- this.typename = typename;
1182
- this.alias = alias;
1183
- this.color = color;
1184
- this.conductivity = conductivity;
1185
- this.publicKey = publicKey;
1186
- this.status = status;
1187
- this.totalBalance = totalBalance;
1188
- this.totalLocalBalance = totalLocalBalance;
1189
- this.localBalance = localBalance;
1190
- this.remoteBalance = remoteBalance;
1191
- this.blockchainBalance = blockchainBalance;
1192
- autoBind5(this);
1193
- }
1194
- async getAddresses(client, first = void 0, types = void 0) {
1195
- return await client.executeRawQuery({
1196
- queryPayload: `
1197
- query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [NodeAddressType!]) {
1198
- entity(id: $entity_id) {
1199
- ... on LightsparkNode {
1200
- addresses(, first: $first, types: $types) {
1201
- __typename
1202
- node_to_addresses_connection_count: count
1203
- node_to_addresses_connection_entities: entities {
1204
- __typename
1205
- node_address_address: address
1206
- node_address_type: type
1207
- }
1208
- }
1331
+ lightspark_node_with_remote_signing_balances: balances {
1332
+ __typename
1333
+ balances_owned_balance: owned_balance {
1334
+ __typename
1335
+ currency_amount_original_value: original_value
1336
+ currency_amount_original_unit: original_unit
1337
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1338
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1339
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1209
1340
  }
1210
- }
1211
- }
1212
- `,
1213
- variables: { entity_id: this.id, first, types },
1214
- constructObject: (json) => {
1215
- const connection = json["entity"]["addresses"];
1216
- return NodeToAddressesConnectionFromJson(connection);
1217
- }
1218
- });
1219
- }
1220
- async getChannels(client, first = void 0, statuses = void 0, after = void 0) {
1221
- return await client.executeRawQuery({
1222
- queryPayload: `
1223
- query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) {
1224
- entity(id: $entity_id) {
1225
- ... on LightsparkNode {
1226
- channels(, first: $first, statuses: $statuses, after: $after) {
1227
- __typename
1228
- lightspark_node_to_channels_connection_count: count
1229
- lightspark_node_to_channels_connection_page_info: page_info {
1230
- __typename
1231
- page_info_has_next_page: has_next_page
1232
- page_info_has_previous_page: has_previous_page
1233
- page_info_start_cursor: start_cursor
1234
- page_info_end_cursor: end_cursor
1235
- }
1236
- lightspark_node_to_channels_connection_entities: entities {
1237
- __typename
1238
- channel_id: id
1239
- channel_created_at: created_at
1240
- channel_updated_at: updated_at
1241
- channel_funding_transaction: funding_transaction {
1242
- id
1243
- }
1244
- channel_capacity: capacity {
1245
- __typename
1246
- currency_amount_original_value: original_value
1247
- currency_amount_original_unit: original_unit
1248
- currency_amount_preferred_currency_unit: preferred_currency_unit
1249
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1250
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1251
- }
1252
- channel_local_balance: local_balance {
1253
- __typename
1254
- currency_amount_original_value: original_value
1255
- currency_amount_original_unit: original_unit
1256
- currency_amount_preferred_currency_unit: preferred_currency_unit
1257
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1258
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1259
- }
1260
- channel_local_unsettled_balance: local_unsettled_balance {
1261
- __typename
1262
- currency_amount_original_value: original_value
1263
- currency_amount_original_unit: original_unit
1264
- currency_amount_preferred_currency_unit: preferred_currency_unit
1265
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1266
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1267
- }
1268
- channel_remote_balance: remote_balance {
1269
- __typename
1270
- currency_amount_original_value: original_value
1271
- currency_amount_original_unit: original_unit
1272
- currency_amount_preferred_currency_unit: preferred_currency_unit
1273
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1274
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1275
- }
1276
- channel_remote_unsettled_balance: remote_unsettled_balance {
1277
- __typename
1278
- currency_amount_original_value: original_value
1279
- currency_amount_original_unit: original_unit
1280
- currency_amount_preferred_currency_unit: preferred_currency_unit
1281
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1282
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1283
- }
1284
- channel_unsettled_balance: unsettled_balance {
1285
- __typename
1286
- currency_amount_original_value: original_value
1287
- currency_amount_original_unit: original_unit
1288
- currency_amount_preferred_currency_unit: preferred_currency_unit
1289
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1290
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1291
- }
1292
- channel_total_balance: total_balance {
1293
- __typename
1294
- currency_amount_original_value: original_value
1295
- currency_amount_original_unit: original_unit
1296
- currency_amount_preferred_currency_unit: preferred_currency_unit
1297
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1298
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1299
- }
1300
- channel_status: status
1301
- channel_estimated_force_closure_wait_minutes: estimated_force_closure_wait_minutes
1302
- channel_commit_fee: commit_fee {
1303
- __typename
1304
- currency_amount_original_value: original_value
1305
- currency_amount_original_unit: original_unit
1306
- currency_amount_preferred_currency_unit: preferred_currency_unit
1307
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1308
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1309
- }
1310
- channel_fees: fees {
1311
- __typename
1312
- channel_fees_base_fee: base_fee {
1313
- __typename
1314
- currency_amount_original_value: original_value
1315
- currency_amount_original_unit: original_unit
1316
- currency_amount_preferred_currency_unit: preferred_currency_unit
1317
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1318
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1319
- }
1320
- channel_fees_fee_rate_per_mil: fee_rate_per_mil
1321
- }
1322
- channel_remote_node: remote_node {
1323
- id
1324
- }
1325
- channel_local_node: local_node {
1326
- id
1327
- }
1328
- channel_short_channel_id: short_channel_id
1329
- }
1330
- }
1341
+ balances_available_to_send_balance: available_to_send_balance {
1342
+ __typename
1343
+ currency_amount_original_value: original_value
1344
+ currency_amount_original_unit: original_unit
1345
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1346
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1347
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1331
1348
  }
1332
- }
1333
- }
1334
- `,
1335
- variables: {
1336
- entity_id: this.id,
1337
- first,
1338
- statuses,
1339
- after
1340
- },
1341
- constructObject: (json) => {
1342
- const connection = json["entity"]["channels"];
1343
- return LightsparkNodeToChannelsConnectionFromJson(connection);
1344
- }
1345
- });
1346
- }
1347
- static getLightsparkNodeQuery(id) {
1348
- return {
1349
- queryPayload: `
1350
- query GetLightsparkNode($id: ID!) {
1351
- entity(id: $id) {
1352
- ... on LightsparkNode {
1353
- ...LightsparkNodeFragment
1349
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
1350
+ __typename
1351
+ currency_amount_original_value: original_value
1352
+ currency_amount_original_unit: original_unit
1353
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1354
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1355
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1354
1356
  }
1355
1357
  }
1356
- }
1358
+ }`;
1359
+ var LightsparkNodeWithRemoteSigning_default = LightsparkNodeWithRemoteSigning;
1357
1360
 
1358
- ${FRAGMENT6}
1359
- `,
1360
- variables: { id },
1361
- constructObject: (data) => LightsparkNodeFromJson(data.entity)
1362
- };
1363
- }
1364
- };
1361
+ // src/objects/LightsparkNode.ts
1365
1362
  var LightsparkNodeFromJson = (obj) => {
1366
1363
  if (obj["__typename"] == "LightsparkNodeWithOSK") {
1367
1364
  return new LightsparkNodeWithOSK_default(
@@ -1393,6 +1390,7 @@ var LightsparkNodeFromJson = (obj) => {
1393
1390
  !!obj["lightspark_node_with_o_s_k_blockchain_balance"] ? BlockchainBalanceFromJson(
1394
1391
  obj["lightspark_node_with_o_s_k_blockchain_balance"]
1395
1392
  ) : void 0,
1393
+ !!obj["lightspark_node_with_o_s_k_balances"] ? BalancesFromJson(obj["lightspark_node_with_o_s_k_balances"]) : void 0,
1396
1394
  !!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"] ? SecretFromJson(
1397
1395
  obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
1398
1396
  ) : void 0
@@ -1427,7 +1425,8 @@ var LightsparkNodeFromJson = (obj) => {
1427
1425
  ) : void 0,
1428
1426
  !!obj["lightspark_node_with_remote_signing_blockchain_balance"] ? BlockchainBalanceFromJson(
1429
1427
  obj["lightspark_node_with_remote_signing_blockchain_balance"]
1430
- ) : void 0
1428
+ ) : void 0,
1429
+ !!obj["lightspark_node_with_remote_signing_balances"] ? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"]) : void 0
1431
1430
  );
1432
1431
  }
1433
1432
  throw new LightsparkException(
@@ -1537,6 +1536,33 @@ fragment LightsparkNodeFragment on LightsparkNode {
1537
1536
  }
1538
1537
  }
1539
1538
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
1539
+ lightspark_node_with_o_s_k_balances: balances {
1540
+ __typename
1541
+ balances_owned_balance: owned_balance {
1542
+ __typename
1543
+ currency_amount_original_value: original_value
1544
+ currency_amount_original_unit: original_unit
1545
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1546
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1547
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1548
+ }
1549
+ balances_available_to_send_balance: available_to_send_balance {
1550
+ __typename
1551
+ currency_amount_original_value: original_value
1552
+ currency_amount_original_unit: original_unit
1553
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1554
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1555
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1556
+ }
1557
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
1558
+ __typename
1559
+ currency_amount_original_value: original_value
1560
+ currency_amount_original_unit: original_unit
1561
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1562
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1563
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1564
+ }
1565
+ }
1540
1566
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
1541
1567
  __typename
1542
1568
  secret_encrypted_value: encrypted_value
@@ -1642,9 +1668,52 @@ fragment LightsparkNodeFragment on LightsparkNode {
1642
1668
  }
1643
1669
  }
1644
1670
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
1671
+ lightspark_node_with_remote_signing_balances: balances {
1672
+ __typename
1673
+ balances_owned_balance: owned_balance {
1674
+ __typename
1675
+ currency_amount_original_value: original_value
1676
+ currency_amount_original_unit: original_unit
1677
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1678
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1679
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1680
+ }
1681
+ balances_available_to_send_balance: available_to_send_balance {
1682
+ __typename
1683
+ currency_amount_original_value: original_value
1684
+ currency_amount_original_unit: original_unit
1685
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1686
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1687
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1688
+ }
1689
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
1690
+ __typename
1691
+ currency_amount_original_value: original_value
1692
+ currency_amount_original_unit: original_unit
1693
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1694
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1695
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1696
+ }
1697
+ }
1645
1698
  }
1646
1699
  }`;
1647
- var LightsparkNode_default = LightsparkNode;
1700
+ var getLightsparkNodeQuery = (id) => {
1701
+ return {
1702
+ queryPayload: `
1703
+ query GetLightsparkNode($id: ID!) {
1704
+ entity(id: $id) {
1705
+ ... on LightsparkNode {
1706
+ ...LightsparkNodeFragment
1707
+ }
1708
+ }
1709
+ }
1710
+
1711
+ ${FRAGMENT6}
1712
+ `,
1713
+ variables: { id },
1714
+ constructObject: (data) => LightsparkNodeFromJson(data.entity)
1715
+ };
1716
+ };
1648
1717
 
1649
1718
  // src/objects/AccountToNodesConnection.ts
1650
1719
  var AccountToNodesConnectionFromJson = (obj) => {
@@ -1658,104 +1727,15 @@ var AccountToNodesConnectionFromJson = (obj) => {
1658
1727
  };
1659
1728
  };
1660
1729
 
1661
- // src/objects/PaymentRequest.ts
1662
- import { LightsparkException as LightsparkException3 } from "@lightsparkdev/core";
1663
-
1664
- // src/objects/Node.ts
1665
- import { LightsparkException as LightsparkException2 } from "@lightsparkdev/core";
1666
- import autoBind7 from "auto-bind";
1667
-
1668
- // src/objects/GraphNode.ts
1669
- import autoBind6 from "auto-bind";
1670
- var GraphNode = class {
1671
- constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, typename, alias, color, conductivity, publicKey) {
1672
- this.id = id;
1673
- this.createdAt = createdAt;
1674
- this.updatedAt = updatedAt;
1675
- this.bitcoinNetwork = bitcoinNetwork;
1676
- this.displayName = displayName;
1677
- this.typename = typename;
1678
- this.alias = alias;
1679
- this.color = color;
1680
- this.conductivity = conductivity;
1681
- this.publicKey = publicKey;
1682
- autoBind6(this);
1683
- }
1684
- async getAddresses(client, first = void 0, types = void 0) {
1685
- return await client.executeRawQuery({
1686
- queryPayload: `
1687
- query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [NodeAddressType!]) {
1688
- entity(id: $entity_id) {
1689
- ... on GraphNode {
1690
- addresses(, first: $first, types: $types) {
1691
- __typename
1692
- node_to_addresses_connection_count: count
1693
- node_to_addresses_connection_entities: entities {
1694
- __typename
1695
- node_address_address: address
1696
- node_address_type: type
1697
- }
1698
- }
1699
- }
1700
- }
1701
- }
1702
- `,
1703
- variables: { entity_id: this.id, first, types },
1704
- constructObject: (json) => {
1705
- const connection = json["entity"]["addresses"];
1706
- return NodeToAddressesConnectionFromJson(connection);
1707
- }
1708
- });
1709
- }
1710
- static getGraphNodeQuery(id) {
1711
- return {
1712
- queryPayload: `
1713
- query GetGraphNode($id: ID!) {
1714
- entity(id: $id) {
1715
- ... on GraphNode {
1716
- ...GraphNodeFragment
1717
- }
1718
- }
1719
- }
1720
-
1721
- ${FRAGMENT7}
1722
- `,
1723
- variables: { id },
1724
- constructObject: (data) => GraphNodeFromJson(data.entity)
1725
- };
1726
- }
1727
- };
1728
- var GraphNodeFromJson = (obj) => {
1729
- return new GraphNode(
1730
- obj["graph_node_id"],
1731
- obj["graph_node_created_at"],
1732
- obj["graph_node_updated_at"],
1733
- BitcoinNetwork_default[obj["graph_node_bitcoin_network"]] ?? BitcoinNetwork_default.FUTURE_VALUE,
1734
- obj["graph_node_display_name"],
1735
- "GraphNode",
1736
- obj["graph_node_alias"],
1737
- obj["graph_node_color"],
1738
- obj["graph_node_conductivity"],
1739
- obj["graph_node_public_key"]
1740
- );
1741
- };
1742
- var FRAGMENT7 = `
1743
- fragment GraphNodeFragment on GraphNode {
1744
- __typename
1745
- graph_node_id: id
1746
- graph_node_created_at: created_at
1747
- graph_node_updated_at: updated_at
1748
- graph_node_alias: alias
1749
- graph_node_bitcoin_network: bitcoin_network
1750
- graph_node_color: color
1751
- graph_node_conductivity: conductivity
1752
- graph_node_display_name: display_name
1753
- graph_node_public_key: public_key
1754
- }`;
1755
- var GraphNode_default = GraphNode;
1756
-
1730
+ // src/objects/PaymentRequest.ts
1731
+ import { LightsparkException as LightsparkException3 } from "@lightsparkdev/core";
1732
+
1757
1733
  // src/objects/Node.ts
1758
- var Node = class {
1734
+ import { LightsparkException as LightsparkException2 } from "@lightsparkdev/core";
1735
+
1736
+ // src/objects/GraphNode.ts
1737
+ import autoBind5 from "auto-bind";
1738
+ var GraphNode = class {
1759
1739
  constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, typename, alias, color, conductivity, publicKey) {
1760
1740
  this.id = id;
1761
1741
  this.createdAt = createdAt;
@@ -1767,14 +1747,14 @@ var Node = class {
1767
1747
  this.color = color;
1768
1748
  this.conductivity = conductivity;
1769
1749
  this.publicKey = publicKey;
1770
- autoBind7(this);
1750
+ autoBind5(this);
1771
1751
  }
1772
1752
  async getAddresses(client, first = void 0, types = void 0) {
1773
1753
  return await client.executeRawQuery({
1774
1754
  queryPayload: `
1775
1755
  query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [NodeAddressType!]) {
1776
1756
  entity(id: $entity_id) {
1777
- ... on Node {
1757
+ ... on GraphNode {
1778
1758
  addresses(, first: $first, types: $types) {
1779
1759
  __typename
1780
1760
  node_to_addresses_connection_count: count
@@ -1795,24 +1775,68 @@ query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [Node
1795
1775
  }
1796
1776
  });
1797
1777
  }
1798
- static getNodeQuery(id) {
1778
+ static getGraphNodeQuery(id) {
1799
1779
  return {
1800
1780
  queryPayload: `
1801
- query GetNode($id: ID!) {
1781
+ query GetGraphNode($id: ID!) {
1802
1782
  entity(id: $id) {
1803
- ... on Node {
1804
- ...NodeFragment
1783
+ ... on GraphNode {
1784
+ ...GraphNodeFragment
1805
1785
  }
1806
1786
  }
1807
1787
  }
1808
1788
 
1809
- ${FRAGMENT8}
1789
+ ${FRAGMENT7}
1810
1790
  `,
1811
1791
  variables: { id },
1812
- constructObject: (data) => NodeFromJson(data.entity)
1792
+ constructObject: (data) => GraphNodeFromJson(data.entity)
1793
+ };
1794
+ }
1795
+ toJson() {
1796
+ return {
1797
+ __typename: "GraphNode",
1798
+ graph_node_id: this.id,
1799
+ graph_node_created_at: this.createdAt,
1800
+ graph_node_updated_at: this.updatedAt,
1801
+ graph_node_alias: this.alias,
1802
+ graph_node_bitcoin_network: this.bitcoinNetwork,
1803
+ graph_node_color: this.color,
1804
+ graph_node_conductivity: this.conductivity,
1805
+ graph_node_display_name: this.displayName,
1806
+ graph_node_public_key: this.publicKey
1813
1807
  };
1814
1808
  }
1815
1809
  };
1810
+ var GraphNodeFromJson = (obj) => {
1811
+ return new GraphNode(
1812
+ obj["graph_node_id"],
1813
+ obj["graph_node_created_at"],
1814
+ obj["graph_node_updated_at"],
1815
+ BitcoinNetwork_default[obj["graph_node_bitcoin_network"]] ?? BitcoinNetwork_default.FUTURE_VALUE,
1816
+ obj["graph_node_display_name"],
1817
+ "GraphNode",
1818
+ obj["graph_node_alias"],
1819
+ obj["graph_node_color"],
1820
+ obj["graph_node_conductivity"],
1821
+ obj["graph_node_public_key"]
1822
+ );
1823
+ };
1824
+ var FRAGMENT7 = `
1825
+ fragment GraphNodeFragment on GraphNode {
1826
+ __typename
1827
+ graph_node_id: id
1828
+ graph_node_created_at: created_at
1829
+ graph_node_updated_at: updated_at
1830
+ graph_node_alias: alias
1831
+ graph_node_bitcoin_network: bitcoin_network
1832
+ graph_node_color: color
1833
+ graph_node_conductivity: conductivity
1834
+ graph_node_display_name: display_name
1835
+ graph_node_public_key: public_key
1836
+ }`;
1837
+ var GraphNode_default = GraphNode;
1838
+
1839
+ // src/objects/Node.ts
1816
1840
  var NodeFromJson = (obj) => {
1817
1841
  if (obj["__typename"] == "GraphNode") {
1818
1842
  return new GraphNode_default(
@@ -1858,6 +1882,7 @@ var NodeFromJson = (obj) => {
1858
1882
  !!obj["lightspark_node_with_o_s_k_blockchain_balance"] ? BlockchainBalanceFromJson(
1859
1883
  obj["lightspark_node_with_o_s_k_blockchain_balance"]
1860
1884
  ) : void 0,
1885
+ !!obj["lightspark_node_with_o_s_k_balances"] ? BalancesFromJson(obj["lightspark_node_with_o_s_k_balances"]) : void 0,
1861
1886
  !!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"] ? SecretFromJson(
1862
1887
  obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
1863
1888
  ) : void 0
@@ -1892,7 +1917,8 @@ var NodeFromJson = (obj) => {
1892
1917
  ) : void 0,
1893
1918
  !!obj["lightspark_node_with_remote_signing_blockchain_balance"] ? BlockchainBalanceFromJson(
1894
1919
  obj["lightspark_node_with_remote_signing_blockchain_balance"]
1895
- ) : void 0
1920
+ ) : void 0,
1921
+ !!obj["lightspark_node_with_remote_signing_balances"] ? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"]) : void 0
1896
1922
  );
1897
1923
  }
1898
1924
  throw new LightsparkException2(
@@ -1900,6 +1926,82 @@ var NodeFromJson = (obj) => {
1900
1926
  `Couldn't find a concrete type for interface Node corresponding to the typename=${obj["__typename"]}`
1901
1927
  );
1902
1928
  };
1929
+ var NodeToJson = (obj) => {
1930
+ if (obj.typename == "GraphNode") {
1931
+ const graphNode = obj;
1932
+ return {
1933
+ __typename: "GraphNode",
1934
+ graph_node_id: graphNode.id,
1935
+ graph_node_created_at: graphNode.createdAt,
1936
+ graph_node_updated_at: graphNode.updatedAt,
1937
+ graph_node_alias: graphNode.alias,
1938
+ graph_node_bitcoin_network: graphNode.bitcoinNetwork,
1939
+ graph_node_color: graphNode.color,
1940
+ graph_node_conductivity: graphNode.conductivity,
1941
+ graph_node_display_name: graphNode.displayName,
1942
+ graph_node_public_key: graphNode.publicKey
1943
+ };
1944
+ }
1945
+ if (obj.typename == "LightsparkNodeWithOSK") {
1946
+ const lightsparkNodeWithOSK = obj;
1947
+ return {
1948
+ __typename: "LightsparkNodeWithOSK",
1949
+ lightspark_node_with_o_s_k_id: lightsparkNodeWithOSK.id,
1950
+ lightspark_node_with_o_s_k_created_at: lightsparkNodeWithOSK.createdAt,
1951
+ lightspark_node_with_o_s_k_updated_at: lightsparkNodeWithOSK.updatedAt,
1952
+ lightspark_node_with_o_s_k_alias: lightsparkNodeWithOSK.alias,
1953
+ lightspark_node_with_o_s_k_bitcoin_network: lightsparkNodeWithOSK.bitcoinNetwork,
1954
+ lightspark_node_with_o_s_k_color: lightsparkNodeWithOSK.color,
1955
+ lightspark_node_with_o_s_k_conductivity: lightsparkNodeWithOSK.conductivity,
1956
+ lightspark_node_with_o_s_k_display_name: lightsparkNodeWithOSK.displayName,
1957
+ lightspark_node_with_o_s_k_public_key: lightsparkNodeWithOSK.publicKey,
1958
+ lightspark_node_with_o_s_k_owner: { id: lightsparkNodeWithOSK.ownerId },
1959
+ lightspark_node_with_o_s_k_status: lightsparkNodeWithOSK.status,
1960
+ lightspark_node_with_o_s_k_total_balance: lightsparkNodeWithOSK.totalBalance ? CurrencyAmountToJson(lightsparkNodeWithOSK.totalBalance) : void 0,
1961
+ lightspark_node_with_o_s_k_total_local_balance: lightsparkNodeWithOSK.totalLocalBalance ? CurrencyAmountToJson(lightsparkNodeWithOSK.totalLocalBalance) : void 0,
1962
+ lightspark_node_with_o_s_k_local_balance: lightsparkNodeWithOSK.localBalance ? CurrencyAmountToJson(lightsparkNodeWithOSK.localBalance) : void 0,
1963
+ lightspark_node_with_o_s_k_remote_balance: lightsparkNodeWithOSK.remoteBalance ? CurrencyAmountToJson(lightsparkNodeWithOSK.remoteBalance) : void 0,
1964
+ lightspark_node_with_o_s_k_blockchain_balance: lightsparkNodeWithOSK.blockchainBalance ? BlockchainBalanceToJson(lightsparkNodeWithOSK.blockchainBalance) : void 0,
1965
+ lightspark_node_with_o_s_k_uma_prescreening_utxos: lightsparkNodeWithOSK.umaPrescreeningUtxos,
1966
+ lightspark_node_with_o_s_k_balances: lightsparkNodeWithOSK.balances ? BalancesToJson(lightsparkNodeWithOSK.balances) : void 0,
1967
+ lightspark_node_with_o_s_k_encrypted_signing_private_key: lightsparkNodeWithOSK.encryptedSigningPrivateKey ? SecretToJson(lightsparkNodeWithOSK.encryptedSigningPrivateKey) : void 0
1968
+ };
1969
+ }
1970
+ if (obj.typename == "LightsparkNodeWithRemoteSigning") {
1971
+ const lightsparkNodeWithRemoteSigning = obj;
1972
+ return {
1973
+ __typename: "LightsparkNodeWithRemoteSigning",
1974
+ lightspark_node_with_remote_signing_id: lightsparkNodeWithRemoteSigning.id,
1975
+ lightspark_node_with_remote_signing_created_at: lightsparkNodeWithRemoteSigning.createdAt,
1976
+ lightspark_node_with_remote_signing_updated_at: lightsparkNodeWithRemoteSigning.updatedAt,
1977
+ lightspark_node_with_remote_signing_alias: lightsparkNodeWithRemoteSigning.alias,
1978
+ lightspark_node_with_remote_signing_bitcoin_network: lightsparkNodeWithRemoteSigning.bitcoinNetwork,
1979
+ lightspark_node_with_remote_signing_color: lightsparkNodeWithRemoteSigning.color,
1980
+ lightspark_node_with_remote_signing_conductivity: lightsparkNodeWithRemoteSigning.conductivity,
1981
+ lightspark_node_with_remote_signing_display_name: lightsparkNodeWithRemoteSigning.displayName,
1982
+ lightspark_node_with_remote_signing_public_key: lightsparkNodeWithRemoteSigning.publicKey,
1983
+ lightspark_node_with_remote_signing_owner: {
1984
+ id: lightsparkNodeWithRemoteSigning.ownerId
1985
+ },
1986
+ lightspark_node_with_remote_signing_status: lightsparkNodeWithRemoteSigning.status,
1987
+ lightspark_node_with_remote_signing_total_balance: lightsparkNodeWithRemoteSigning.totalBalance ? CurrencyAmountToJson(lightsparkNodeWithRemoteSigning.totalBalance) : void 0,
1988
+ lightspark_node_with_remote_signing_total_local_balance: lightsparkNodeWithRemoteSigning.totalLocalBalance ? CurrencyAmountToJson(
1989
+ lightsparkNodeWithRemoteSigning.totalLocalBalance
1990
+ ) : void 0,
1991
+ lightspark_node_with_remote_signing_local_balance: lightsparkNodeWithRemoteSigning.localBalance ? CurrencyAmountToJson(lightsparkNodeWithRemoteSigning.localBalance) : void 0,
1992
+ lightspark_node_with_remote_signing_remote_balance: lightsparkNodeWithRemoteSigning.remoteBalance ? CurrencyAmountToJson(lightsparkNodeWithRemoteSigning.remoteBalance) : void 0,
1993
+ lightspark_node_with_remote_signing_blockchain_balance: lightsparkNodeWithRemoteSigning.blockchainBalance ? BlockchainBalanceToJson(
1994
+ lightsparkNodeWithRemoteSigning.blockchainBalance
1995
+ ) : void 0,
1996
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: lightsparkNodeWithRemoteSigning.umaPrescreeningUtxos,
1997
+ lightspark_node_with_remote_signing_balances: lightsparkNodeWithRemoteSigning.balances ? BalancesToJson(lightsparkNodeWithRemoteSigning.balances) : void 0
1998
+ };
1999
+ }
2000
+ throw new LightsparkException2(
2001
+ "DeserializationError",
2002
+ `Couldn't find a concrete type for interface Node corresponding to the typename=${obj.typename}`
2003
+ );
2004
+ };
1903
2005
  var FRAGMENT8 = `
1904
2006
  fragment NodeFragment on Node {
1905
2007
  __typename
@@ -2014,6 +2116,33 @@ fragment NodeFragment on Node {
2014
2116
  }
2015
2117
  }
2016
2118
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
2119
+ lightspark_node_with_o_s_k_balances: balances {
2120
+ __typename
2121
+ balances_owned_balance: owned_balance {
2122
+ __typename
2123
+ currency_amount_original_value: original_value
2124
+ currency_amount_original_unit: original_unit
2125
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2126
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2127
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2128
+ }
2129
+ balances_available_to_send_balance: available_to_send_balance {
2130
+ __typename
2131
+ currency_amount_original_value: original_value
2132
+ currency_amount_original_unit: original_unit
2133
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2134
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2135
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2136
+ }
2137
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
2138
+ __typename
2139
+ currency_amount_original_value: original_value
2140
+ currency_amount_original_unit: original_unit
2141
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2142
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2143
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2144
+ }
2145
+ }
2017
2146
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
2018
2147
  __typename
2019
2148
  secret_encrypted_value: encrypted_value
@@ -2119,9 +2248,52 @@ fragment NodeFragment on Node {
2119
2248
  }
2120
2249
  }
2121
2250
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
2251
+ lightspark_node_with_remote_signing_balances: balances {
2252
+ __typename
2253
+ balances_owned_balance: owned_balance {
2254
+ __typename
2255
+ currency_amount_original_value: original_value
2256
+ currency_amount_original_unit: original_unit
2257
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2258
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2259
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2260
+ }
2261
+ balances_available_to_send_balance: available_to_send_balance {
2262
+ __typename
2263
+ currency_amount_original_value: original_value
2264
+ currency_amount_original_unit: original_unit
2265
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2266
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2267
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2268
+ }
2269
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
2270
+ __typename
2271
+ currency_amount_original_value: original_value
2272
+ currency_amount_original_unit: original_unit
2273
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2274
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2275
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2276
+ }
2277
+ }
2122
2278
  }
2123
2279
  }`;
2124
- var Node_default = Node;
2280
+ var getNodeQuery = (id) => {
2281
+ return {
2282
+ queryPayload: `
2283
+ query GetNode($id: ID!) {
2284
+ entity(id: $id) {
2285
+ ... on Node {
2286
+ ...NodeFragment
2287
+ }
2288
+ }
2289
+ }
2290
+
2291
+ ${FRAGMENT8}
2292
+ `,
2293
+ variables: { id },
2294
+ constructObject: (data) => NodeFromJson(data.entity)
2295
+ };
2296
+ };
2125
2297
 
2126
2298
  // src/objects/InvoiceData.ts
2127
2299
  var InvoiceDataFromJson = (obj) => {
@@ -2267,6 +2439,33 @@ fragment InvoiceDataFragment on InvoiceData {
2267
2439
  }
2268
2440
  }
2269
2441
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
2442
+ lightspark_node_with_o_s_k_balances: balances {
2443
+ __typename
2444
+ balances_owned_balance: owned_balance {
2445
+ __typename
2446
+ currency_amount_original_value: original_value
2447
+ currency_amount_original_unit: original_unit
2448
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2449
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2450
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2451
+ }
2452
+ balances_available_to_send_balance: available_to_send_balance {
2453
+ __typename
2454
+ currency_amount_original_value: original_value
2455
+ currency_amount_original_unit: original_unit
2456
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2457
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2458
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2459
+ }
2460
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
2461
+ __typename
2462
+ currency_amount_original_value: original_value
2463
+ currency_amount_original_unit: original_unit
2464
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2465
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2466
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2467
+ }
2468
+ }
2270
2469
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
2271
2470
  __typename
2272
2471
  secret_encrypted_value: encrypted_value
@@ -2372,6 +2571,33 @@ fragment InvoiceDataFragment on InvoiceData {
2372
2571
  }
2373
2572
  }
2374
2573
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
2574
+ lightspark_node_with_remote_signing_balances: balances {
2575
+ __typename
2576
+ balances_owned_balance: owned_balance {
2577
+ __typename
2578
+ currency_amount_original_value: original_value
2579
+ currency_amount_original_unit: original_unit
2580
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2581
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2582
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2583
+ }
2584
+ balances_available_to_send_balance: available_to_send_balance {
2585
+ __typename
2586
+ currency_amount_original_value: original_value
2587
+ currency_amount_original_unit: original_unit
2588
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2589
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2590
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2591
+ }
2592
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
2593
+ __typename
2594
+ currency_amount_original_value: original_value
2595
+ currency_amount_original_unit: original_unit
2596
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2597
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2598
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2599
+ }
2600
+ }
2375
2601
  }
2376
2602
  }
2377
2603
  }`;
@@ -2540,6 +2766,33 @@ fragment PaymentRequestFragment on PaymentRequest {
2540
2766
  }
2541
2767
  }
2542
2768
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
2769
+ lightspark_node_with_o_s_k_balances: balances {
2770
+ __typename
2771
+ balances_owned_balance: owned_balance {
2772
+ __typename
2773
+ currency_amount_original_value: original_value
2774
+ currency_amount_original_unit: original_unit
2775
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2776
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2777
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2778
+ }
2779
+ balances_available_to_send_balance: available_to_send_balance {
2780
+ __typename
2781
+ currency_amount_original_value: original_value
2782
+ currency_amount_original_unit: original_unit
2783
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2784
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2785
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2786
+ }
2787
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
2788
+ __typename
2789
+ currency_amount_original_value: original_value
2790
+ currency_amount_original_unit: original_unit
2791
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2792
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2793
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2794
+ }
2795
+ }
2543
2796
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
2544
2797
  __typename
2545
2798
  secret_encrypted_value: encrypted_value
@@ -2645,6 +2898,33 @@ fragment PaymentRequestFragment on PaymentRequest {
2645
2898
  }
2646
2899
  }
2647
2900
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
2901
+ lightspark_node_with_remote_signing_balances: balances {
2902
+ __typename
2903
+ balances_owned_balance: owned_balance {
2904
+ __typename
2905
+ currency_amount_original_value: original_value
2906
+ currency_amount_original_unit: original_unit
2907
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2908
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2909
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2910
+ }
2911
+ balances_available_to_send_balance: available_to_send_balance {
2912
+ __typename
2913
+ currency_amount_original_value: original_value
2914
+ currency_amount_original_unit: original_unit
2915
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2916
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2917
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2918
+ }
2919
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
2920
+ __typename
2921
+ currency_amount_original_value: original_value
2922
+ currency_amount_original_unit: original_unit
2923
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2924
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2925
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2926
+ }
2927
+ }
2648
2928
  }
2649
2929
  }
2650
2930
  }
@@ -2695,7 +2975,7 @@ var AccountToPaymentRequestsConnectionFromJson = (obj) => {
2695
2975
  import { LightsparkException as LightsparkException5 } from "@lightsparkdev/core";
2696
2976
 
2697
2977
  // src/objects/IncomingPayment.ts
2698
- import autoBind8 from "auto-bind";
2978
+ import autoBind6 from "auto-bind";
2699
2979
 
2700
2980
  // src/objects/IncomingPaymentAttemptStatus.ts
2701
2981
  var IncomingPaymentAttemptStatus = /* @__PURE__ */ ((IncomingPaymentAttemptStatus2) => {
@@ -2780,6 +3060,12 @@ var PostTransactionDataFromJson = (obj) => {
2780
3060
  amount: CurrencyAmountFromJson(obj["post_transaction_data_amount"])
2781
3061
  };
2782
3062
  };
3063
+ var PostTransactionDataToJson = (obj) => {
3064
+ return {
3065
+ post_transaction_data_utxo: obj.utxo,
3066
+ post_transaction_data_amount: CurrencyAmountToJson(obj.amount)
3067
+ };
3068
+ };
2783
3069
 
2784
3070
  // src/objects/TransactionStatus.ts
2785
3071
  var TransactionStatus = /* @__PURE__ */ ((TransactionStatus2) => {
@@ -2808,7 +3094,7 @@ var IncomingPayment = class {
2808
3094
  this.transactionHash = transactionHash;
2809
3095
  this.paymentRequestId = paymentRequestId;
2810
3096
  this.umaPostTransactionData = umaPostTransactionData;
2811
- autoBind8(this);
3097
+ autoBind6(this);
2812
3098
  }
2813
3099
  async getAttempts(client, first = void 0, statuses = void 0, after = void 0) {
2814
3100
  return await client.executeRawQuery({
@@ -2879,6 +3165,21 @@ ${FRAGMENT12}
2879
3165
  constructObject: (data) => IncomingPaymentFromJson(data.entity)
2880
3166
  };
2881
3167
  }
3168
+ toJson() {
3169
+ return {
3170
+ __typename: "IncomingPayment",
3171
+ incoming_payment_id: this.id,
3172
+ incoming_payment_created_at: this.createdAt,
3173
+ incoming_payment_updated_at: this.updatedAt,
3174
+ incoming_payment_status: this.status,
3175
+ incoming_payment_resolved_at: this.resolvedAt,
3176
+ incoming_payment_amount: CurrencyAmountToJson(this.amount),
3177
+ incoming_payment_transaction_hash: this.transactionHash,
3178
+ incoming_payment_destination: { id: this.destinationId },
3179
+ incoming_payment_payment_request: { id: this.paymentRequestId },
3180
+ incoming_payment_uma_post_transaction_data: this.umaPostTransactionData?.map((e) => PostTransactionDataToJson(e))
3181
+ };
3182
+ }
2882
3183
  };
2883
3184
  var IncomingPaymentFromJson = (obj) => {
2884
3185
  return new IncomingPayment(
@@ -2936,17 +3237,32 @@ fragment IncomingPaymentFragment on IncomingPayment {
2936
3237
  var IncomingPayment_default = IncomingPayment;
2937
3238
 
2938
3239
  // src/objects/OutgoingPayment.ts
2939
- import autoBind10 from "auto-bind";
3240
+ import autoBind8 from "auto-bind";
2940
3241
 
2941
3242
  // src/objects/OutgoingPaymentAttempt.ts
2942
- import autoBind9 from "auto-bind";
3243
+ import autoBind7 from "auto-bind";
2943
3244
 
2944
3245
  // src/objects/ChannelSnapshot.ts
2945
3246
  var ChannelSnapshotFromJson = (obj) => {
2946
3247
  return {
3248
+ channelId: obj["channel_snapshot_channel"].id,
3249
+ timestamp: obj["channel_snapshot_timestamp"],
2947
3250
  localBalance: !!obj["channel_snapshot_local_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_balance"]) : void 0,
2948
3251
  localUnsettledBalance: !!obj["channel_snapshot_local_unsettled_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_unsettled_balance"]) : void 0,
2949
- localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0
3252
+ localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0,
3253
+ remoteBalance: !!obj["channel_snapshot_remote_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_remote_balance"]) : void 0,
3254
+ remoteUnsettledBalance: !!obj["channel_snapshot_remote_unsettled_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_remote_unsettled_balance"]) : void 0
3255
+ };
3256
+ };
3257
+ var ChannelSnapshotToJson = (obj) => {
3258
+ return {
3259
+ channel_snapshot_channel: { id: obj.channelId },
3260
+ channel_snapshot_timestamp: obj.timestamp,
3261
+ channel_snapshot_local_balance: obj.localBalance ? CurrencyAmountToJson(obj.localBalance) : void 0,
3262
+ channel_snapshot_local_unsettled_balance: obj.localUnsettledBalance ? CurrencyAmountToJson(obj.localUnsettledBalance) : void 0,
3263
+ channel_snapshot_local_channel_reserve: obj.localChannelReserve ? CurrencyAmountToJson(obj.localChannelReserve) : void 0,
3264
+ channel_snapshot_remote_balance: obj.remoteBalance ? CurrencyAmountToJson(obj.remoteBalance) : void 0,
3265
+ channel_snapshot_remote_unsettled_balance: obj.remoteUnsettledBalance ? CurrencyAmountToJson(obj.remoteUnsettledBalance) : void 0
2950
3266
  };
2951
3267
  };
2952
3268
 
@@ -2977,6 +3293,7 @@ var HtlcAttemptFailureCode = /* @__PURE__ */ ((HtlcAttemptFailureCode2) => {
2977
3293
  HtlcAttemptFailureCode2["EXPIRY_TOO_FAR"] = "EXPIRY_TOO_FAR";
2978
3294
  HtlcAttemptFailureCode2["MPP_TIMEOUT"] = "MPP_TIMEOUT";
2979
3295
  HtlcAttemptFailureCode2["INVALID_ONION_PAYLOAD"] = "INVALID_ONION_PAYLOAD";
3296
+ HtlcAttemptFailureCode2["INVALID_ONION_BLINDING"] = "INVALID_ONION_BLINDING";
2980
3297
  HtlcAttemptFailureCode2["INTERNAL_FAILURE"] = "INTERNAL_FAILURE";
2981
3298
  HtlcAttemptFailureCode2["UNKNOWN_FAILURE"] = "UNKNOWN_FAILURE";
2982
3299
  HtlcAttemptFailureCode2["UNREADABLE_FAILURE"] = "UNREADABLE_FAILURE";
@@ -3085,7 +3402,7 @@ var OutgoingPaymentAttempt = class {
3085
3402
  this.amount = amount;
3086
3403
  this.fees = fees;
3087
3404
  this.channelSnapshot = channelSnapshot;
3088
- autoBind9(this);
3405
+ autoBind7(this);
3089
3406
  }
3090
3407
  async getHops(client, first = void 0, after = void 0) {
3091
3408
  return await client.executeRawQuery({
@@ -3160,6 +3477,22 @@ ${FRAGMENT14}
3160
3477
  constructObject: (data) => OutgoingPaymentAttemptFromJson(data.entity)
3161
3478
  };
3162
3479
  }
3480
+ toJson() {
3481
+ return {
3482
+ __typename: "OutgoingPaymentAttempt",
3483
+ outgoing_payment_attempt_id: this.id,
3484
+ outgoing_payment_attempt_created_at: this.createdAt,
3485
+ outgoing_payment_attempt_updated_at: this.updatedAt,
3486
+ outgoing_payment_attempt_status: this.status,
3487
+ outgoing_payment_attempt_failure_code: this.failureCode,
3488
+ outgoing_payment_attempt_failure_source_index: this.failureSourceIndex,
3489
+ outgoing_payment_attempt_resolved_at: this.resolvedAt,
3490
+ outgoing_payment_attempt_amount: this.amount ? CurrencyAmountToJson(this.amount) : void 0,
3491
+ outgoing_payment_attempt_fees: this.fees ? CurrencyAmountToJson(this.fees) : void 0,
3492
+ outgoing_payment_attempt_outgoing_payment: { id: this.outgoingPaymentId },
3493
+ outgoing_payment_attempt_channel_snapshot: this.channelSnapshot ? ChannelSnapshotToJson(this.channelSnapshot) : void 0
3494
+ };
3495
+ }
3163
3496
  };
3164
3497
  var OutgoingPaymentAttemptFromJson = (obj) => {
3165
3498
  return new OutgoingPaymentAttempt(
@@ -3210,6 +3543,10 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
3210
3543
  }
3211
3544
  outgoing_payment_attempt_channel_snapshot: channel_snapshot {
3212
3545
  __typename
3546
+ channel_snapshot_channel: channel {
3547
+ id
3548
+ }
3549
+ channel_snapshot_timestamp: timestamp
3213
3550
  channel_snapshot_local_balance: local_balance {
3214
3551
  __typename
3215
3552
  currency_amount_original_value: original_value
@@ -3234,6 +3571,22 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
3234
3571
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3235
3572
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3236
3573
  }
3574
+ channel_snapshot_remote_balance: remote_balance {
3575
+ __typename
3576
+ currency_amount_original_value: original_value
3577
+ currency_amount_original_unit: original_unit
3578
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3579
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3580
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3581
+ }
3582
+ channel_snapshot_remote_unsettled_balance: remote_unsettled_balance {
3583
+ __typename
3584
+ currency_amount_original_value: original_value
3585
+ currency_amount_original_unit: original_unit
3586
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3587
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3588
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3589
+ }
3237
3590
  }
3238
3591
  }`;
3239
3592
  var OutgoingPaymentAttempt_default = OutgoingPaymentAttempt;
@@ -3290,6 +3643,26 @@ var PaymentRequestDataFromJson = (obj) => {
3290
3643
  `Couldn't find a concrete type for interface PaymentRequestData corresponding to the typename=${obj["__typename"]}`
3291
3644
  );
3292
3645
  };
3646
+ var PaymentRequestDataToJson = (obj) => {
3647
+ if (obj.typename == "InvoiceData") {
3648
+ const invoiceData = obj;
3649
+ return {
3650
+ __typename: "InvoiceData",
3651
+ invoice_data_encoded_payment_request: invoiceData.encodedPaymentRequest,
3652
+ invoice_data_bitcoin_network: invoiceData.bitcoinNetwork,
3653
+ invoice_data_payment_hash: invoiceData.paymentHash,
3654
+ invoice_data_amount: CurrencyAmountToJson(invoiceData.amount),
3655
+ invoice_data_created_at: invoiceData.createdAt,
3656
+ invoice_data_expires_at: invoiceData.expiresAt,
3657
+ invoice_data_memo: invoiceData.memo,
3658
+ invoice_data_destination: NodeToJson(invoiceData.destination)
3659
+ };
3660
+ }
3661
+ throw new LightsparkException4(
3662
+ "DeserializationError",
3663
+ `Couldn't find a concrete type for interface PaymentRequestData corresponding to the typename=${obj.typename}`
3664
+ );
3665
+ };
3293
3666
 
3294
3667
  // src/objects/RichText.ts
3295
3668
  var RichTextFromJson = (obj) => {
@@ -3297,6 +3670,11 @@ var RichTextFromJson = (obj) => {
3297
3670
  text: obj["rich_text_text"]
3298
3671
  };
3299
3672
  };
3673
+ var RichTextToJson = (obj) => {
3674
+ return {
3675
+ rich_text_text: obj.text
3676
+ };
3677
+ };
3300
3678
 
3301
3679
  // src/objects/OutgoingPayment.ts
3302
3680
  var OutgoingPayment = class {
@@ -3317,7 +3695,7 @@ var OutgoingPayment = class {
3317
3695
  this.failureMessage = failureMessage;
3318
3696
  this.umaPostTransactionData = umaPostTransactionData;
3319
3697
  this.paymentPreimage = paymentPreimage;
3320
- autoBind10(this);
3698
+ autoBind8(this);
3321
3699
  }
3322
3700
  async getAttempts(client, first = void 0, after = void 0) {
3323
3701
  return await client.executeRawQuery({
@@ -3365,6 +3743,10 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
3365
3743
  }
3366
3744
  outgoing_payment_attempt_channel_snapshot: channel_snapshot {
3367
3745
  __typename
3746
+ channel_snapshot_channel: channel {
3747
+ id
3748
+ }
3749
+ channel_snapshot_timestamp: timestamp
3368
3750
  channel_snapshot_local_balance: local_balance {
3369
3751
  __typename
3370
3752
  currency_amount_original_value: original_value
@@ -3389,6 +3771,22 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
3389
3771
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3390
3772
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3391
3773
  }
3774
+ channel_snapshot_remote_balance: remote_balance {
3775
+ __typename
3776
+ currency_amount_original_value: original_value
3777
+ currency_amount_original_unit: original_unit
3778
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3779
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3780
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3781
+ }
3782
+ channel_snapshot_remote_unsettled_balance: remote_unsettled_balance {
3783
+ __typename
3784
+ currency_amount_original_value: original_value
3785
+ currency_amount_original_unit: original_unit
3786
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3787
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3788
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3789
+ }
3392
3790
  }
3393
3791
  }
3394
3792
  }
@@ -3420,6 +3818,26 @@ ${FRAGMENT15}
3420
3818
  constructObject: (data) => OutgoingPaymentFromJson(data.entity)
3421
3819
  };
3422
3820
  }
3821
+ toJson() {
3822
+ return {
3823
+ __typename: "OutgoingPayment",
3824
+ outgoing_payment_id: this.id,
3825
+ outgoing_payment_created_at: this.createdAt,
3826
+ outgoing_payment_updated_at: this.updatedAt,
3827
+ outgoing_payment_status: this.status,
3828
+ outgoing_payment_resolved_at: this.resolvedAt,
3829
+ outgoing_payment_amount: CurrencyAmountToJson(this.amount),
3830
+ outgoing_payment_transaction_hash: this.transactionHash,
3831
+ outgoing_payment_origin: { id: this.originId },
3832
+ outgoing_payment_destination: { id: this.destinationId },
3833
+ outgoing_payment_fees: this.fees ? CurrencyAmountToJson(this.fees) : void 0,
3834
+ outgoing_payment_payment_request_data: this.paymentRequestData ? PaymentRequestDataToJson(this.paymentRequestData) : void 0,
3835
+ outgoing_payment_failure_reason: this.failureReason,
3836
+ outgoing_payment_failure_message: this.failureMessage ? RichTextToJson(this.failureMessage) : void 0,
3837
+ outgoing_payment_uma_post_transaction_data: this.umaPostTransactionData?.map((e) => PostTransactionDataToJson(e)),
3838
+ outgoing_payment_payment_preimage: this.paymentPreimage
3839
+ };
3840
+ }
3423
3841
  };
3424
3842
  var OutgoingPaymentFromJson = (obj) => {
3425
3843
  return new OutgoingPayment(
@@ -3605,6 +4023,33 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
3605
4023
  }
3606
4024
  }
3607
4025
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
4026
+ lightspark_node_with_o_s_k_balances: balances {
4027
+ __typename
4028
+ balances_owned_balance: owned_balance {
4029
+ __typename
4030
+ currency_amount_original_value: original_value
4031
+ currency_amount_original_unit: original_unit
4032
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4033
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4034
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4035
+ }
4036
+ balances_available_to_send_balance: available_to_send_balance {
4037
+ __typename
4038
+ currency_amount_original_value: original_value
4039
+ currency_amount_original_unit: original_unit
4040
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4041
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4042
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4043
+ }
4044
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
4045
+ __typename
4046
+ currency_amount_original_value: original_value
4047
+ currency_amount_original_unit: original_unit
4048
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4049
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4050
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4051
+ }
4052
+ }
3608
4053
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
3609
4054
  __typename
3610
4055
  secret_encrypted_value: encrypted_value
@@ -3710,6 +4155,33 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
3710
4155
  }
3711
4156
  }
3712
4157
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
4158
+ lightspark_node_with_remote_signing_balances: balances {
4159
+ __typename
4160
+ balances_owned_balance: owned_balance {
4161
+ __typename
4162
+ currency_amount_original_value: original_value
4163
+ currency_amount_original_unit: original_unit
4164
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4165
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4166
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4167
+ }
4168
+ balances_available_to_send_balance: available_to_send_balance {
4169
+ __typename
4170
+ currency_amount_original_value: original_value
4171
+ currency_amount_original_unit: original_unit
4172
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4173
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4174
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4175
+ }
4176
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
4177
+ __typename
4178
+ currency_amount_original_value: original_value
4179
+ currency_amount_original_unit: original_unit
4180
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4181
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4182
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4183
+ }
4184
+ }
3713
4185
  }
3714
4186
  }
3715
4187
  }
@@ -4177,6 +4649,33 @@ fragment TransactionFragment on Transaction {
4177
4649
  }
4178
4650
  }
4179
4651
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
4652
+ lightspark_node_with_o_s_k_balances: balances {
4653
+ __typename
4654
+ balances_owned_balance: owned_balance {
4655
+ __typename
4656
+ currency_amount_original_value: original_value
4657
+ currency_amount_original_unit: original_unit
4658
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4659
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4660
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4661
+ }
4662
+ balances_available_to_send_balance: available_to_send_balance {
4663
+ __typename
4664
+ currency_amount_original_value: original_value
4665
+ currency_amount_original_unit: original_unit
4666
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4667
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4668
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4669
+ }
4670
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
4671
+ __typename
4672
+ currency_amount_original_value: original_value
4673
+ currency_amount_original_unit: original_unit
4674
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4675
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4676
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4677
+ }
4678
+ }
4180
4679
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
4181
4680
  __typename
4182
4681
  secret_encrypted_value: encrypted_value
@@ -4282,6 +4781,33 @@ fragment TransactionFragment on Transaction {
4282
4781
  }
4283
4782
  }
4284
4783
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
4784
+ lightspark_node_with_remote_signing_balances: balances {
4785
+ __typename
4786
+ balances_owned_balance: owned_balance {
4787
+ __typename
4788
+ currency_amount_original_value: original_value
4789
+ currency_amount_original_unit: original_unit
4790
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4791
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4792
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4793
+ }
4794
+ balances_available_to_send_balance: available_to_send_balance {
4795
+ __typename
4796
+ currency_amount_original_value: original_value
4797
+ currency_amount_original_unit: original_unit
4798
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4799
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4800
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4801
+ }
4802
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
4803
+ __typename
4804
+ currency_amount_original_value: original_value
4805
+ currency_amount_original_unit: original_unit
4806
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4807
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4808
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4809
+ }
4810
+ }
4285
4811
  }
4286
4812
  }
4287
4813
  }
@@ -4416,20 +4942,7 @@ var AccountToTransactionsConnectionFromJson = (obj) => {
4416
4942
  };
4417
4943
 
4418
4944
  // src/objects/Wallet.ts
4419
- import autoBind11 from "auto-bind";
4420
-
4421
- // src/objects/Balances.ts
4422
- var BalancesFromJson = (obj) => {
4423
- return {
4424
- ownedBalance: CurrencyAmountFromJson(obj["balances_owned_balance"]),
4425
- availableToSendBalance: CurrencyAmountFromJson(
4426
- obj["balances_available_to_send_balance"]
4427
- ),
4428
- availableToWithdrawBalance: CurrencyAmountFromJson(
4429
- obj["balances_available_to_withdraw_balance"]
4430
- )
4431
- };
4432
- };
4945
+ import autoBind9 from "auto-bind";
4433
4946
 
4434
4947
  // src/objects/WalletStatus.ts
4435
4948
  var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
@@ -4487,7 +5000,7 @@ var Wallet = class {
4487
5000
  this.lastLoginAt = lastLoginAt;
4488
5001
  this.balances = balances;
4489
5002
  this.accountId = accountId;
4490
- autoBind11(this);
5003
+ autoBind9(this);
4491
5004
  }
4492
5005
  async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
4493
5006
  return await client.executeRawQuery({
@@ -4799,6 +5312,33 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
4799
5312
  }
4800
5313
  }
4801
5314
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
5315
+ lightspark_node_with_o_s_k_balances: balances {
5316
+ __typename
5317
+ balances_owned_balance: owned_balance {
5318
+ __typename
5319
+ currency_amount_original_value: original_value
5320
+ currency_amount_original_unit: original_unit
5321
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5322
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5323
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5324
+ }
5325
+ balances_available_to_send_balance: available_to_send_balance {
5326
+ __typename
5327
+ currency_amount_original_value: original_value
5328
+ currency_amount_original_unit: original_unit
5329
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5330
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5331
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5332
+ }
5333
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
5334
+ __typename
5335
+ currency_amount_original_value: original_value
5336
+ currency_amount_original_unit: original_unit
5337
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5338
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5339
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5340
+ }
5341
+ }
4802
5342
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
4803
5343
  __typename
4804
5344
  secret_encrypted_value: encrypted_value
@@ -4904,6 +5444,33 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
4904
5444
  }
4905
5445
  }
4906
5446
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
5447
+ lightspark_node_with_remote_signing_balances: balances {
5448
+ __typename
5449
+ balances_owned_balance: owned_balance {
5450
+ __typename
5451
+ currency_amount_original_value: original_value
5452
+ currency_amount_original_unit: original_unit
5453
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5454
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5455
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5456
+ }
5457
+ balances_available_to_send_balance: available_to_send_balance {
5458
+ __typename
5459
+ currency_amount_original_value: original_value
5460
+ currency_amount_original_unit: original_unit
5461
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5462
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5463
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5464
+ }
5465
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
5466
+ __typename
5467
+ currency_amount_original_value: original_value
5468
+ currency_amount_original_unit: original_unit
5469
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5470
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5471
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5472
+ }
5473
+ }
4907
5474
  }
4908
5475
  }
4909
5476
  }
@@ -5168,6 +5735,33 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte
5168
5735
  }
5169
5736
  }
5170
5737
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
5738
+ lightspark_node_with_o_s_k_balances: balances {
5739
+ __typename
5740
+ balances_owned_balance: owned_balance {
5741
+ __typename
5742
+ currency_amount_original_value: original_value
5743
+ currency_amount_original_unit: original_unit
5744
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5745
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5746
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5747
+ }
5748
+ balances_available_to_send_balance: available_to_send_balance {
5749
+ __typename
5750
+ currency_amount_original_value: original_value
5751
+ currency_amount_original_unit: original_unit
5752
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5753
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5754
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5755
+ }
5756
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
5757
+ __typename
5758
+ currency_amount_original_value: original_value
5759
+ currency_amount_original_unit: original_unit
5760
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5761
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5762
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5763
+ }
5764
+ }
5171
5765
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
5172
5766
  __typename
5173
5767
  secret_encrypted_value: encrypted_value
@@ -5231,7 +5825,31 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte
5231
5825
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5232
5826
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5233
5827
  }
5234
- blockchain_balance_confirmed_balance: confirmed_balance {
5828
+ blockchain_balance_confirmed_balance: confirmed_balance {
5829
+ __typename
5830
+ currency_amount_original_value: original_value
5831
+ currency_amount_original_unit: original_unit
5832
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5833
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5834
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5835
+ }
5836
+ blockchain_balance_unconfirmed_balance: unconfirmed_balance {
5837
+ __typename
5838
+ currency_amount_original_value: original_value
5839
+ currency_amount_original_unit: original_unit
5840
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5841
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5842
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5843
+ }
5844
+ blockchain_balance_locked_balance: locked_balance {
5845
+ __typename
5846
+ currency_amount_original_value: original_value
5847
+ currency_amount_original_unit: original_unit
5848
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5849
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5850
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5851
+ }
5852
+ blockchain_balance_required_reserve: required_reserve {
5235
5853
  __typename
5236
5854
  currency_amount_original_value: original_value
5237
5855
  currency_amount_original_unit: original_unit
@@ -5239,7 +5857,7 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte
5239
5857
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5240
5858
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5241
5859
  }
5242
- blockchain_balance_unconfirmed_balance: unconfirmed_balance {
5860
+ blockchain_balance_available_balance: available_balance {
5243
5861
  __typename
5244
5862
  currency_amount_original_value: original_value
5245
5863
  currency_amount_original_unit: original_unit
@@ -5247,7 +5865,11 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte
5247
5865
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5248
5866
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5249
5867
  }
5250
- blockchain_balance_locked_balance: locked_balance {
5868
+ }
5869
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
5870
+ lightspark_node_with_remote_signing_balances: balances {
5871
+ __typename
5872
+ balances_owned_balance: owned_balance {
5251
5873
  __typename
5252
5874
  currency_amount_original_value: original_value
5253
5875
  currency_amount_original_unit: original_unit
@@ -5255,7 +5877,7 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte
5255
5877
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5256
5878
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5257
5879
  }
5258
- blockchain_balance_required_reserve: required_reserve {
5880
+ balances_available_to_send_balance: available_to_send_balance {
5259
5881
  __typename
5260
5882
  currency_amount_original_value: original_value
5261
5883
  currency_amount_original_unit: original_unit
@@ -5263,7 +5885,7 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte
5263
5885
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5264
5886
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5265
5887
  }
5266
- blockchain_balance_available_balance: available_balance {
5888
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
5267
5889
  __typename
5268
5890
  currency_amount_original_value: original_value
5269
5891
  currency_amount_original_unit: original_unit
@@ -5272,7 +5894,6 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte
5272
5894
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5273
5895
  }
5274
5896
  }
5275
- lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
5276
5897
  }
5277
5898
  }
5278
5899
  }
@@ -5380,6 +6001,19 @@ ${FRAGMENT17}
5380
6001
  constructObject: (data) => WalletFromJson(data.entity)
5381
6002
  };
5382
6003
  }
6004
+ toJson() {
6005
+ return {
6006
+ __typename: "Wallet",
6007
+ wallet_id: this.id,
6008
+ wallet_created_at: this.createdAt,
6009
+ wallet_updated_at: this.updatedAt,
6010
+ wallet_last_login_at: this.lastLoginAt,
6011
+ wallet_balances: this.balances ? BalancesToJson(this.balances) : void 0,
6012
+ wallet_third_party_identifier: this.thirdPartyIdentifier,
6013
+ wallet_account: { id: this.accountId },
6014
+ wallet_status: this.status
6015
+ };
6016
+ }
5383
6017
  };
5384
6018
  var WalletFromJson = (obj) => {
5385
6019
  return new Wallet(
@@ -5456,7 +6090,7 @@ var Account = class {
5456
6090
  this.updatedAt = updatedAt;
5457
6091
  this.typename = typename;
5458
6092
  this.name = name;
5459
- autoBind12(this);
6093
+ autoBind10(this);
5460
6094
  }
5461
6095
  async getApiTokens(client, first = void 0, after = void 0) {
5462
6096
  return await client.executeRawQuery({
@@ -5723,6 +6357,33 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
5723
6357
  }
5724
6358
  }
5725
6359
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
6360
+ lightspark_node_with_o_s_k_balances: balances {
6361
+ __typename
6362
+ balances_owned_balance: owned_balance {
6363
+ __typename
6364
+ currency_amount_original_value: original_value
6365
+ currency_amount_original_unit: original_unit
6366
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6367
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6368
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6369
+ }
6370
+ balances_available_to_send_balance: available_to_send_balance {
6371
+ __typename
6372
+ currency_amount_original_value: original_value
6373
+ currency_amount_original_unit: original_unit
6374
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6375
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6376
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6377
+ }
6378
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
6379
+ __typename
6380
+ currency_amount_original_value: original_value
6381
+ currency_amount_original_unit: original_unit
6382
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6383
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6384
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6385
+ }
6386
+ }
5726
6387
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
5727
6388
  __typename
5728
6389
  secret_encrypted_value: encrypted_value
@@ -5828,6 +6489,33 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
5828
6489
  }
5829
6490
  }
5830
6491
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
6492
+ lightspark_node_with_remote_signing_balances: balances {
6493
+ __typename
6494
+ balances_owned_balance: owned_balance {
6495
+ __typename
6496
+ currency_amount_original_value: original_value
6497
+ currency_amount_original_unit: original_unit
6498
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6499
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6500
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6501
+ }
6502
+ balances_available_to_send_balance: available_to_send_balance {
6503
+ __typename
6504
+ currency_amount_original_value: original_value
6505
+ currency_amount_original_unit: original_unit
6506
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6507
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6508
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6509
+ }
6510
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
6511
+ __typename
6512
+ currency_amount_original_value: original_value
6513
+ currency_amount_original_unit: original_unit
6514
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6515
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6516
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6517
+ }
6518
+ }
5831
6519
  }
5832
6520
  }
5833
6521
  }
@@ -6350,6 +7038,33 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
6350
7038
  }
6351
7039
  }
6352
7040
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
7041
+ lightspark_node_with_o_s_k_balances: balances {
7042
+ __typename
7043
+ balances_owned_balance: owned_balance {
7044
+ __typename
7045
+ currency_amount_original_value: original_value
7046
+ currency_amount_original_unit: original_unit
7047
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7048
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7049
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7050
+ }
7051
+ balances_available_to_send_balance: available_to_send_balance {
7052
+ __typename
7053
+ currency_amount_original_value: original_value
7054
+ currency_amount_original_unit: original_unit
7055
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7056
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7057
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7058
+ }
7059
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
7060
+ __typename
7061
+ currency_amount_original_value: original_value
7062
+ currency_amount_original_unit: original_unit
7063
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7064
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7065
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7066
+ }
7067
+ }
6353
7068
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
6354
7069
  __typename
6355
7070
  secret_encrypted_value: encrypted_value
@@ -6455,6 +7170,33 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
6455
7170
  }
6456
7171
  }
6457
7172
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
7173
+ lightspark_node_with_remote_signing_balances: balances {
7174
+ __typename
7175
+ balances_owned_balance: owned_balance {
7176
+ __typename
7177
+ currency_amount_original_value: original_value
7178
+ currency_amount_original_unit: original_unit
7179
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7180
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7181
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7182
+ }
7183
+ balances_available_to_send_balance: available_to_send_balance {
7184
+ __typename
7185
+ currency_amount_original_value: original_value
7186
+ currency_amount_original_unit: original_unit
7187
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7188
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7189
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7190
+ }
7191
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
7192
+ __typename
7193
+ currency_amount_original_value: original_value
7194
+ currency_amount_original_unit: original_unit
7195
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7196
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7197
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7198
+ }
7199
+ }
6458
7200
  }
6459
7201
  }
6460
7202
  }
@@ -6721,6 +7463,33 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
6721
7463
  }
6722
7464
  }
6723
7465
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
7466
+ lightspark_node_with_o_s_k_balances: balances {
7467
+ __typename
7468
+ balances_owned_balance: owned_balance {
7469
+ __typename
7470
+ currency_amount_original_value: original_value
7471
+ currency_amount_original_unit: original_unit
7472
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7473
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7474
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7475
+ }
7476
+ balances_available_to_send_balance: available_to_send_balance {
7477
+ __typename
7478
+ currency_amount_original_value: original_value
7479
+ currency_amount_original_unit: original_unit
7480
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7481
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7482
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7483
+ }
7484
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
7485
+ __typename
7486
+ currency_amount_original_value: original_value
7487
+ currency_amount_original_unit: original_unit
7488
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7489
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7490
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7491
+ }
7492
+ }
6724
7493
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
6725
7494
  __typename
6726
7495
  secret_encrypted_value: encrypted_value
@@ -6826,6 +7595,33 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
6826
7595
  }
6827
7596
  }
6828
7597
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
7598
+ lightspark_node_with_remote_signing_balances: balances {
7599
+ __typename
7600
+ balances_owned_balance: owned_balance {
7601
+ __typename
7602
+ currency_amount_original_value: original_value
7603
+ currency_amount_original_unit: original_unit
7604
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7605
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7606
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7607
+ }
7608
+ balances_available_to_send_balance: available_to_send_balance {
7609
+ __typename
7610
+ currency_amount_original_value: original_value
7611
+ currency_amount_original_unit: original_unit
7612
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7613
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7614
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7615
+ }
7616
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
7617
+ __typename
7618
+ currency_amount_original_value: original_value
7619
+ currency_amount_original_unit: original_unit
7620
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7621
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7622
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7623
+ }
7624
+ }
6829
7625
  }
6830
7626
  }
6831
7627
  }
@@ -6943,6 +7739,15 @@ ${FRAGMENT18}
6943
7739
  constructObject: (data) => AccountFromJson(data.current_account)
6944
7740
  };
6945
7741
  }
7742
+ toJson() {
7743
+ return {
7744
+ __typename: "Account",
7745
+ account_id: this.id,
7746
+ account_created_at: this.createdAt,
7747
+ account_updated_at: this.updatedAt,
7748
+ account_name: this.name
7749
+ };
7750
+ }
6946
7751
  };
6947
7752
  var AccountFromJson = (obj) => {
6948
7753
  return new Account(
@@ -7427,6 +8232,33 @@ fragment InvoiceFragment on Invoice {
7427
8232
  }
7428
8233
  }
7429
8234
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
8235
+ lightspark_node_with_o_s_k_balances: balances {
8236
+ __typename
8237
+ balances_owned_balance: owned_balance {
8238
+ __typename
8239
+ currency_amount_original_value: original_value
8240
+ currency_amount_original_unit: original_unit
8241
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8242
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8243
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8244
+ }
8245
+ balances_available_to_send_balance: available_to_send_balance {
8246
+ __typename
8247
+ currency_amount_original_value: original_value
8248
+ currency_amount_original_unit: original_unit
8249
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8250
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8251
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8252
+ }
8253
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
8254
+ __typename
8255
+ currency_amount_original_value: original_value
8256
+ currency_amount_original_unit: original_unit
8257
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8258
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8259
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8260
+ }
8261
+ }
7430
8262
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
7431
8263
  __typename
7432
8264
  secret_encrypted_value: encrypted_value
@@ -7532,6 +8364,33 @@ fragment InvoiceFragment on Invoice {
7532
8364
  }
7533
8365
  }
7534
8366
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
8367
+ lightspark_node_with_remote_signing_balances: balances {
8368
+ __typename
8369
+ balances_owned_balance: owned_balance {
8370
+ __typename
8371
+ currency_amount_original_value: original_value
8372
+ currency_amount_original_unit: original_unit
8373
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8374
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8375
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8376
+ }
8377
+ balances_available_to_send_balance: available_to_send_balance {
8378
+ __typename
8379
+ currency_amount_original_value: original_value
8380
+ currency_amount_original_unit: original_unit
8381
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8382
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8383
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8384
+ }
8385
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
8386
+ __typename
8387
+ currency_amount_original_value: original_value
8388
+ currency_amount_original_unit: original_unit
8389
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8390
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8391
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8392
+ }
8393
+ }
7535
8394
  }
7536
8395
  }
7537
8396
  }
@@ -7842,6 +8701,33 @@ fragment LightningTransactionFragment on LightningTransaction {
7842
8701
  }
7843
8702
  }
7844
8703
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
8704
+ lightspark_node_with_o_s_k_balances: balances {
8705
+ __typename
8706
+ balances_owned_balance: owned_balance {
8707
+ __typename
8708
+ currency_amount_original_value: original_value
8709
+ currency_amount_original_unit: original_unit
8710
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8711
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8712
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8713
+ }
8714
+ balances_available_to_send_balance: available_to_send_balance {
8715
+ __typename
8716
+ currency_amount_original_value: original_value
8717
+ currency_amount_original_unit: original_unit
8718
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8719
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8720
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8721
+ }
8722
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
8723
+ __typename
8724
+ currency_amount_original_value: original_value
8725
+ currency_amount_original_unit: original_unit
8726
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8727
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8728
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8729
+ }
8730
+ }
7845
8731
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
7846
8732
  __typename
7847
8733
  secret_encrypted_value: encrypted_value
@@ -7947,6 +8833,33 @@ fragment LightningTransactionFragment on LightningTransaction {
7947
8833
  }
7948
8834
  }
7949
8835
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
8836
+ lightspark_node_with_remote_signing_balances: balances {
8837
+ __typename
8838
+ balances_owned_balance: owned_balance {
8839
+ __typename
8840
+ currency_amount_original_value: original_value
8841
+ currency_amount_original_unit: original_unit
8842
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8843
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8844
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8845
+ }
8846
+ balances_available_to_send_balance: available_to_send_balance {
8847
+ __typename
8848
+ currency_amount_original_value: original_value
8849
+ currency_amount_original_unit: original_unit
8850
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8851
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8852
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8853
+ }
8854
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
8855
+ __typename
8856
+ currency_amount_original_value: original_value
8857
+ currency_amount_original_unit: original_unit
8858
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8859
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8860
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8861
+ }
8862
+ }
7950
8863
  }
7951
8864
  }
7952
8865
  }
@@ -8641,7 +9554,7 @@ ${FRAGMENT32}
8641
9554
  };
8642
9555
 
8643
9556
  // src/objects/WithdrawalRequest.ts
8644
- import autoBind13 from "auto-bind";
9557
+ import autoBind11 from "auto-bind";
8645
9558
 
8646
9559
  // src/objects/WithdrawalRequestStatus.ts
8647
9560
  var WithdrawalRequestStatus = /* @__PURE__ */ ((WithdrawalRequestStatus2) => {
@@ -8690,7 +9603,7 @@ var WithdrawalRequest = class {
8690
9603
  this.estimatedAmount = estimatedAmount;
8691
9604
  this.completedAt = completedAt;
8692
9605
  this.withdrawalId = withdrawalId;
8693
- autoBind13(this);
9606
+ autoBind11(this);
8694
9607
  }
8695
9608
  async getChannelClosingTransactions(client, first = void 0) {
8696
9609
  return await client.executeRawQuery({
@@ -8833,6 +9746,21 @@ ${FRAGMENT33}
8833
9746
  constructObject: (data) => WithdrawalRequestFromJson(data.entity)
8834
9747
  };
8835
9748
  }
9749
+ toJson() {
9750
+ return {
9751
+ __typename: "WithdrawalRequest",
9752
+ withdrawal_request_id: this.id,
9753
+ withdrawal_request_created_at: this.createdAt,
9754
+ withdrawal_request_updated_at: this.updatedAt,
9755
+ withdrawal_request_amount: CurrencyAmountToJson(this.amount),
9756
+ withdrawal_request_estimated_amount: this.estimatedAmount ? CurrencyAmountToJson(this.estimatedAmount) : void 0,
9757
+ withdrawal_request_bitcoin_address: this.bitcoinAddress,
9758
+ withdrawal_request_withdrawal_mode: this.withdrawalMode,
9759
+ withdrawal_request_status: this.status,
9760
+ withdrawal_request_completed_at: this.completedAt,
9761
+ withdrawal_request_withdrawal: { id: this.withdrawalId }
9762
+ };
9763
+ }
8836
9764
  };
8837
9765
  var WithdrawalRequestFromJson = (obj) => {
8838
9766
  return new WithdrawalRequest(
@@ -8898,7 +9826,7 @@ export {
8898
9826
  Channel_default,
8899
9827
  LightsparkNodeWithOSK_default,
8900
9828
  LightsparkNodeWithRemoteSigning_default,
8901
- Node_default,
9829
+ getNodeQuery,
8902
9830
  InvoiceDataFromJson,
8903
9831
  FRAGMENT9 as FRAGMENT4,
8904
9832
  PaymentRequestStatus_default,
@@ -8937,7 +9865,7 @@ export {
8937
9865
  TransactionUpdateFromJson,
8938
9866
  FRAGMENT31 as FRAGMENT12,
8939
9867
  AccountToChannelsConnection_default,
8940
- LightsparkNode_default,
9868
+ getLightsparkNodeQuery,
8941
9869
  WalletStatus_default,
8942
9870
  Wallet_default,
8943
9871
  Account_default,