@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
package/dist/index.cjs CHANGED
@@ -1851,11 +1851,9 @@ __export(src_exports, {
1851
1851
  IncomingPaymentAttemptStatus: () => IncomingPaymentAttemptStatus_default,
1852
1852
  InvoiceType: () => InvoiceType_default,
1853
1853
  LightsparkClient: () => client_default,
1854
- LightsparkNode: () => LightsparkNode_default,
1855
1854
  LightsparkNodeStatus: () => LightsparkNodeStatus_default,
1856
1855
  LightsparkNodeWithOSK: () => LightsparkNodeWithOSK_default,
1857
1856
  LightsparkNodeWithRemoteSigning: () => LightsparkNodeWithRemoteSigning_default,
1858
- Node: () => Node_default,
1859
1857
  NodeAddressType: () => NodeAddressType_default,
1860
1858
  OutgoingPayment: () => OutgoingPayment_default,
1861
1859
  OutgoingPaymentAttempt: () => OutgoingPaymentAttempt_default,
@@ -1889,6 +1887,8 @@ __export(src_exports, {
1889
1887
  getInvoiceQuery: () => getInvoiceQuery,
1890
1888
  getLightningTransactionQuery: () => getLightningTransactionQuery,
1891
1889
  getLightsparkNodeOwnerQuery: () => getLightsparkNodeOwnerQuery,
1890
+ getLightsparkNodeQuery: () => getLightsparkNodeQuery,
1891
+ getNodeQuery: () => getNodeQuery,
1892
1892
  getOnChainTransactionQuery: () => getOnChainTransactionQuery,
1893
1893
  getPaymentRequestQuery: () => getPaymentRequestQuery,
1894
1894
  getRoutingTransactionQuery: () => getRoutingTransactionQuery,
@@ -1932,13 +1932,13 @@ var AccountTokenAuthProvider = class {
1932
1932
  var AccountTokenAuthProvider_default = AccountTokenAuthProvider;
1933
1933
 
1934
1934
  // src/client.ts
1935
- var import_auto_bind15 = __toESM(require("auto-bind"), 1);
1935
+ var import_auto_bind13 = __toESM(require("auto-bind"), 1);
1936
1936
  var import_core9 = require("@lightsparkdev/core");
1937
1937
 
1938
1938
  // package.json
1939
1939
  var package_default = {
1940
1940
  name: "@lightsparkdev/lightspark-sdk",
1941
- version: "1.1.6",
1941
+ version: "1.2.0",
1942
1942
  description: "Lightspark JS SDK",
1943
1943
  author: "Lightspark Inc.",
1944
1944
  keywords: [
@@ -2047,7 +2047,7 @@ var package_default = {
2047
2047
  eslint: "^8.3.0",
2048
2048
  "eslint-watch": "^8.0.0",
2049
2049
  jest: "^29.6.2",
2050
- prettier: "3.0.2",
2050
+ prettier: "3.0.3",
2051
2051
  "prettier-plugin-organize-imports": "^3.2.2",
2052
2052
  "ts-jest": "^29.1.1",
2053
2053
  "tsc-absolute": "^1.0.1",
@@ -2081,6 +2081,15 @@ var CurrencyAmountFromJson = (obj) => {
2081
2081
  preferredCurrencyValueApprox: obj["currency_amount_preferred_currency_value_approx"]
2082
2082
  };
2083
2083
  };
2084
+ var CurrencyAmountToJson = (obj) => {
2085
+ return {
2086
+ currency_amount_original_value: obj.originalValue,
2087
+ currency_amount_original_unit: obj.originalUnit,
2088
+ currency_amount_preferred_currency_unit: obj.preferredCurrencyUnit,
2089
+ currency_amount_preferred_currency_value_rounded: obj.preferredCurrencyValueRounded,
2090
+ currency_amount_preferred_currency_value_approx: obj.preferredCurrencyValueApprox
2091
+ };
2092
+ };
2084
2093
  var FRAGMENT = `
2085
2094
  fragment CurrencyAmountFragment on CurrencyAmount {
2086
2095
  __typename
@@ -2243,7 +2252,30 @@ var BitcoinNetwork_default = BitcoinNetwork;
2243
2252
 
2244
2253
  // src/objects/Node.ts
2245
2254
  var import_core2 = require("@lightsparkdev/core");
2246
- var import_auto_bind6 = __toESM(require("auto-bind"), 1);
2255
+
2256
+ // src/objects/Balances.ts
2257
+ var BalancesFromJson = (obj) => {
2258
+ return {
2259
+ ownedBalance: CurrencyAmountFromJson(obj["balances_owned_balance"]),
2260
+ availableToSendBalance: CurrencyAmountFromJson(
2261
+ obj["balances_available_to_send_balance"]
2262
+ ),
2263
+ availableToWithdrawBalance: CurrencyAmountFromJson(
2264
+ obj["balances_available_to_withdraw_balance"]
2265
+ )
2266
+ };
2267
+ };
2268
+ var BalancesToJson = (obj) => {
2269
+ return {
2270
+ balances_owned_balance: CurrencyAmountToJson(obj.ownedBalance),
2271
+ balances_available_to_send_balance: CurrencyAmountToJson(
2272
+ obj.availableToSendBalance
2273
+ ),
2274
+ balances_available_to_withdraw_balance: CurrencyAmountToJson(
2275
+ obj.availableToWithdrawBalance
2276
+ )
2277
+ };
2278
+ };
2247
2279
 
2248
2280
  // src/objects/BlockchainBalance.ts
2249
2281
  var BlockchainBalanceFromJson = (obj) => {
@@ -2256,6 +2288,16 @@ var BlockchainBalanceFromJson = (obj) => {
2256
2288
  availableBalance: !!obj["blockchain_balance_available_balance"] ? CurrencyAmountFromJson(obj["blockchain_balance_available_balance"]) : void 0
2257
2289
  };
2258
2290
  };
2291
+ var BlockchainBalanceToJson = (obj) => {
2292
+ return {
2293
+ blockchain_balance_total_balance: obj.totalBalance ? CurrencyAmountToJson(obj.totalBalance) : void 0,
2294
+ blockchain_balance_confirmed_balance: obj.confirmedBalance ? CurrencyAmountToJson(obj.confirmedBalance) : void 0,
2295
+ blockchain_balance_unconfirmed_balance: obj.unconfirmedBalance ? CurrencyAmountToJson(obj.unconfirmedBalance) : void 0,
2296
+ blockchain_balance_locked_balance: obj.lockedBalance ? CurrencyAmountToJson(obj.lockedBalance) : void 0,
2297
+ blockchain_balance_required_reserve: obj.requiredReserve ? CurrencyAmountToJson(obj.requiredReserve) : void 0,
2298
+ blockchain_balance_available_balance: obj.availableBalance ? CurrencyAmountToJson(obj.availableBalance) : void 0
2299
+ };
2300
+ };
2259
2301
 
2260
2302
  // src/objects/GraphNode.ts
2261
2303
  var import_auto_bind2 = __toESM(require("auto-bind"), 1);
@@ -2346,6 +2388,20 @@ ${FRAGMENT4}
2346
2388
  constructObject: (data) => GraphNodeFromJson(data.entity)
2347
2389
  };
2348
2390
  }
2391
+ toJson() {
2392
+ return {
2393
+ __typename: "GraphNode",
2394
+ graph_node_id: this.id,
2395
+ graph_node_created_at: this.createdAt,
2396
+ graph_node_updated_at: this.updatedAt,
2397
+ graph_node_alias: this.alias,
2398
+ graph_node_bitcoin_network: this.bitcoinNetwork,
2399
+ graph_node_color: this.color,
2400
+ graph_node_conductivity: this.conductivity,
2401
+ graph_node_display_name: this.displayName,
2402
+ graph_node_public_key: this.publicKey
2403
+ };
2404
+ }
2349
2405
  };
2350
2406
  var GraphNodeFromJson = (obj) => {
2351
2407
  return new GraphNode(
@@ -2406,6 +2462,12 @@ var ChannelFeesFromJson = (obj) => {
2406
2462
  feeRatePerMil: obj["channel_fees_fee_rate_per_mil"]
2407
2463
  };
2408
2464
  };
2465
+ var ChannelFeesToJson = (obj) => {
2466
+ return {
2467
+ channel_fees_base_fee: obj.baseFee ? CurrencyAmountToJson(obj.baseFee) : void 0,
2468
+ channel_fees_fee_rate_per_mil: obj.feeRatePerMil
2469
+ };
2470
+ };
2409
2471
 
2410
2472
  // src/objects/ChannelStatus.ts
2411
2473
  var ChannelStatus = /* @__PURE__ */ ((ChannelStatus2) => {
@@ -2550,6 +2612,29 @@ ${FRAGMENT5}
2550
2612
  constructObject: (data) => ChannelFromJson(data.entity)
2551
2613
  };
2552
2614
  }
2615
+ toJson() {
2616
+ return {
2617
+ __typename: "Channel",
2618
+ channel_id: this.id,
2619
+ channel_created_at: this.createdAt,
2620
+ channel_updated_at: this.updatedAt,
2621
+ channel_funding_transaction: { id: this.fundingTransactionId },
2622
+ channel_capacity: this.capacity ? CurrencyAmountToJson(this.capacity) : void 0,
2623
+ channel_local_balance: this.localBalance ? CurrencyAmountToJson(this.localBalance) : void 0,
2624
+ channel_local_unsettled_balance: this.localUnsettledBalance ? CurrencyAmountToJson(this.localUnsettledBalance) : void 0,
2625
+ channel_remote_balance: this.remoteBalance ? CurrencyAmountToJson(this.remoteBalance) : void 0,
2626
+ channel_remote_unsettled_balance: this.remoteUnsettledBalance ? CurrencyAmountToJson(this.remoteUnsettledBalance) : void 0,
2627
+ channel_unsettled_balance: this.unsettledBalance ? CurrencyAmountToJson(this.unsettledBalance) : void 0,
2628
+ channel_total_balance: this.totalBalance ? CurrencyAmountToJson(this.totalBalance) : void 0,
2629
+ channel_status: this.status,
2630
+ channel_estimated_force_closure_wait_minutes: this.estimatedForceClosureWaitMinutes,
2631
+ channel_commit_fee: this.commitFee ? CurrencyAmountToJson(this.commitFee) : void 0,
2632
+ channel_fees: this.fees ? ChannelFeesToJson(this.fees) : void 0,
2633
+ channel_remote_node: { id: this.remoteNodeId },
2634
+ channel_local_node: { id: this.localNodeId },
2635
+ channel_short_channel_id: this.shortChannelId
2636
+ };
2637
+ }
2553
2638
  };
2554
2639
  var ChannelFromJson = (obj) => {
2555
2640
  return new Channel(
@@ -2702,10 +2787,16 @@ var SecretFromJson = (obj) => {
2702
2787
  cipher: obj["secret_cipher"]
2703
2788
  };
2704
2789
  };
2790
+ var SecretToJson = (obj) => {
2791
+ return {
2792
+ secret_encrypted_value: obj.encryptedValue,
2793
+ secret_cipher: obj.cipher
2794
+ };
2795
+ };
2705
2796
 
2706
2797
  // src/objects/LightsparkNodeWithOSK.ts
2707
2798
  var LightsparkNodeWithOSK = class {
2708
- constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, encryptedSigningPrivateKey) {
2799
+ constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, balances, encryptedSigningPrivateKey) {
2709
2800
  this.id = id;
2710
2801
  this.createdAt = createdAt;
2711
2802
  this.updatedAt = updatedAt;
@@ -2724,6 +2815,7 @@ var LightsparkNodeWithOSK = class {
2724
2815
  this.localBalance = localBalance;
2725
2816
  this.remoteBalance = remoteBalance;
2726
2817
  this.blockchainBalance = blockchainBalance;
2818
+ this.balances = balances;
2727
2819
  this.encryptedSigningPrivateKey = encryptedSigningPrivateKey;
2728
2820
  (0, import_auto_bind4.default)(this);
2729
2821
  }
@@ -2897,6 +2989,30 @@ ${FRAGMENT6}
2897
2989
  constructObject: (data) => LightsparkNodeWithOSKFromJson(data.entity)
2898
2990
  };
2899
2991
  }
2992
+ toJson() {
2993
+ return {
2994
+ __typename: "LightsparkNodeWithOSK",
2995
+ lightspark_node_with_o_s_k_id: this.id,
2996
+ lightspark_node_with_o_s_k_created_at: this.createdAt,
2997
+ lightspark_node_with_o_s_k_updated_at: this.updatedAt,
2998
+ lightspark_node_with_o_s_k_alias: this.alias,
2999
+ lightspark_node_with_o_s_k_bitcoin_network: this.bitcoinNetwork,
3000
+ lightspark_node_with_o_s_k_color: this.color,
3001
+ lightspark_node_with_o_s_k_conductivity: this.conductivity,
3002
+ lightspark_node_with_o_s_k_display_name: this.displayName,
3003
+ lightspark_node_with_o_s_k_public_key: this.publicKey,
3004
+ lightspark_node_with_o_s_k_owner: { id: this.ownerId },
3005
+ lightspark_node_with_o_s_k_status: this.status,
3006
+ lightspark_node_with_o_s_k_total_balance: this.totalBalance ? CurrencyAmountToJson(this.totalBalance) : void 0,
3007
+ lightspark_node_with_o_s_k_total_local_balance: this.totalLocalBalance ? CurrencyAmountToJson(this.totalLocalBalance) : void 0,
3008
+ lightspark_node_with_o_s_k_local_balance: this.localBalance ? CurrencyAmountToJson(this.localBalance) : void 0,
3009
+ lightspark_node_with_o_s_k_remote_balance: this.remoteBalance ? CurrencyAmountToJson(this.remoteBalance) : void 0,
3010
+ lightspark_node_with_o_s_k_blockchain_balance: this.blockchainBalance ? BlockchainBalanceToJson(this.blockchainBalance) : void 0,
3011
+ lightspark_node_with_o_s_k_uma_prescreening_utxos: this.umaPrescreeningUtxos,
3012
+ lightspark_node_with_o_s_k_balances: this.balances ? BalancesToJson(this.balances) : void 0,
3013
+ lightspark_node_with_o_s_k_encrypted_signing_private_key: this.encryptedSigningPrivateKey ? SecretToJson(this.encryptedSigningPrivateKey) : void 0
3014
+ };
3015
+ }
2900
3016
  };
2901
3017
  var LightsparkNodeWithOSKFromJson = (obj) => {
2902
3018
  return new LightsparkNodeWithOSK(
@@ -2922,6 +3038,7 @@ var LightsparkNodeWithOSKFromJson = (obj) => {
2922
3038
  !!obj["lightspark_node_with_o_s_k_blockchain_balance"] ? BlockchainBalanceFromJson(
2923
3039
  obj["lightspark_node_with_o_s_k_blockchain_balance"]
2924
3040
  ) : void 0,
3041
+ !!obj["lightspark_node_with_o_s_k_balances"] ? BalancesFromJson(obj["lightspark_node_with_o_s_k_balances"]) : void 0,
2925
3042
  !!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"] ? SecretFromJson(
2926
3043
  obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
2927
3044
  ) : void 0
@@ -3027,6 +3144,33 @@ fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK {
3027
3144
  }
3028
3145
  }
3029
3146
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
3147
+ lightspark_node_with_o_s_k_balances: balances {
3148
+ __typename
3149
+ balances_owned_balance: owned_balance {
3150
+ __typename
3151
+ currency_amount_original_value: original_value
3152
+ currency_amount_original_unit: original_unit
3153
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3154
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3155
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3156
+ }
3157
+ balances_available_to_send_balance: available_to_send_balance {
3158
+ __typename
3159
+ currency_amount_original_value: original_value
3160
+ currency_amount_original_unit: original_unit
3161
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3162
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3163
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3164
+ }
3165
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
3166
+ __typename
3167
+ currency_amount_original_value: original_value
3168
+ currency_amount_original_unit: original_unit
3169
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3170
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3171
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3172
+ }
3173
+ }
3030
3174
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
3031
3175
  __typename
3032
3176
  secret_encrypted_value: encrypted_value
@@ -3038,7 +3182,7 @@ var LightsparkNodeWithOSK_default = LightsparkNodeWithOSK;
3038
3182
  // src/objects/LightsparkNodeWithRemoteSigning.ts
3039
3183
  var import_auto_bind5 = __toESM(require("auto-bind"), 1);
3040
3184
  var LightsparkNodeWithRemoteSigning = class {
3041
- constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance) {
3185
+ constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, balances) {
3042
3186
  this.id = id;
3043
3187
  this.createdAt = createdAt;
3044
3188
  this.updatedAt = updatedAt;
@@ -3057,6 +3201,7 @@ var LightsparkNodeWithRemoteSigning = class {
3057
3201
  this.localBalance = localBalance;
3058
3202
  this.remoteBalance = remoteBalance;
3059
3203
  this.blockchainBalance = blockchainBalance;
3204
+ this.balances = balances;
3060
3205
  (0, import_auto_bind5.default)(this);
3061
3206
  }
3062
3207
  async getAddresses(client, first = void 0, types = void 0) {
@@ -3229,6 +3374,29 @@ ${FRAGMENT7}
3229
3374
  constructObject: (data) => LightsparkNodeWithRemoteSigningFromJson(data.entity)
3230
3375
  };
3231
3376
  }
3377
+ toJson() {
3378
+ return {
3379
+ __typename: "LightsparkNodeWithRemoteSigning",
3380
+ lightspark_node_with_remote_signing_id: this.id,
3381
+ lightspark_node_with_remote_signing_created_at: this.createdAt,
3382
+ lightspark_node_with_remote_signing_updated_at: this.updatedAt,
3383
+ lightspark_node_with_remote_signing_alias: this.alias,
3384
+ lightspark_node_with_remote_signing_bitcoin_network: this.bitcoinNetwork,
3385
+ lightspark_node_with_remote_signing_color: this.color,
3386
+ lightspark_node_with_remote_signing_conductivity: this.conductivity,
3387
+ lightspark_node_with_remote_signing_display_name: this.displayName,
3388
+ lightspark_node_with_remote_signing_public_key: this.publicKey,
3389
+ lightspark_node_with_remote_signing_owner: { id: this.ownerId },
3390
+ lightspark_node_with_remote_signing_status: this.status,
3391
+ lightspark_node_with_remote_signing_total_balance: this.totalBalance ? CurrencyAmountToJson(this.totalBalance) : void 0,
3392
+ lightspark_node_with_remote_signing_total_local_balance: this.totalLocalBalance ? CurrencyAmountToJson(this.totalLocalBalance) : void 0,
3393
+ lightspark_node_with_remote_signing_local_balance: this.localBalance ? CurrencyAmountToJson(this.localBalance) : void 0,
3394
+ lightspark_node_with_remote_signing_remote_balance: this.remoteBalance ? CurrencyAmountToJson(this.remoteBalance) : void 0,
3395
+ lightspark_node_with_remote_signing_blockchain_balance: this.blockchainBalance ? BlockchainBalanceToJson(this.blockchainBalance) : void 0,
3396
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: this.umaPrescreeningUtxos,
3397
+ lightspark_node_with_remote_signing_balances: this.balances ? BalancesToJson(this.balances) : void 0
3398
+ };
3399
+ }
3232
3400
  };
3233
3401
  var LightsparkNodeWithRemoteSigningFromJson = (obj) => {
3234
3402
  return new LightsparkNodeWithRemoteSigning(
@@ -3259,7 +3427,8 @@ var LightsparkNodeWithRemoteSigningFromJson = (obj) => {
3259
3427
  ) : void 0,
3260
3428
  !!obj["lightspark_node_with_remote_signing_blockchain_balance"] ? BlockchainBalanceFromJson(
3261
3429
  obj["lightspark_node_with_remote_signing_blockchain_balance"]
3262
- ) : void 0
3430
+ ) : void 0,
3431
+ !!obj["lightspark_node_with_remote_signing_balances"] ? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"]) : void 0
3263
3432
  );
3264
3433
  };
3265
3434
  var FRAGMENT7 = `
@@ -3362,68 +3531,37 @@ fragment LightsparkNodeWithRemoteSigningFragment on LightsparkNodeWithRemoteSign
3362
3531
  }
3363
3532
  }
3364
3533
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
3365
- }`;
3366
- var LightsparkNodeWithRemoteSigning_default = LightsparkNodeWithRemoteSigning;
3367
-
3368
- // src/objects/Node.ts
3369
- var Node = class {
3370
- constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, typename, alias, color, conductivity, publicKey) {
3371
- this.id = id;
3372
- this.createdAt = createdAt;
3373
- this.updatedAt = updatedAt;
3374
- this.bitcoinNetwork = bitcoinNetwork;
3375
- this.displayName = displayName;
3376
- this.typename = typename;
3377
- this.alias = alias;
3378
- this.color = color;
3379
- this.conductivity = conductivity;
3380
- this.publicKey = publicKey;
3381
- (0, import_auto_bind6.default)(this);
3382
- }
3383
- async getAddresses(client, first = void 0, types = void 0) {
3384
- return await client.executeRawQuery({
3385
- queryPayload: `
3386
- query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [NodeAddressType!]) {
3387
- entity(id: $entity_id) {
3388
- ... on Node {
3389
- addresses(, first: $first, types: $types) {
3390
- __typename
3391
- node_to_addresses_connection_count: count
3392
- node_to_addresses_connection_entities: entities {
3393
- __typename
3394
- node_address_address: address
3395
- node_address_type: type
3396
- }
3397
- }
3534
+ lightspark_node_with_remote_signing_balances: balances {
3535
+ __typename
3536
+ balances_owned_balance: owned_balance {
3537
+ __typename
3538
+ currency_amount_original_value: original_value
3539
+ currency_amount_original_unit: original_unit
3540
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3541
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3542
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3398
3543
  }
3399
- }
3400
- }
3401
- `,
3402
- variables: { entity_id: this.id, first, types },
3403
- constructObject: (json) => {
3404
- const connection = json["entity"]["addresses"];
3405
- return NodeToAddressesConnectionFromJson(connection);
3406
- }
3407
- });
3408
- }
3409
- static getNodeQuery(id) {
3410
- return {
3411
- queryPayload: `
3412
- query GetNode($id: ID!) {
3413
- entity(id: $id) {
3414
- ... on Node {
3415
- ...NodeFragment
3544
+ balances_available_to_send_balance: available_to_send_balance {
3545
+ __typename
3546
+ currency_amount_original_value: original_value
3547
+ currency_amount_original_unit: original_unit
3548
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3549
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3550
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3551
+ }
3552
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
3553
+ __typename
3554
+ currency_amount_original_value: original_value
3555
+ currency_amount_original_unit: original_unit
3556
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3557
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3558
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3416
3559
  }
3417
3560
  }
3418
- }
3561
+ }`;
3562
+ var LightsparkNodeWithRemoteSigning_default = LightsparkNodeWithRemoteSigning;
3419
3563
 
3420
- ${FRAGMENT8}
3421
- `,
3422
- variables: { id },
3423
- constructObject: (data) => NodeFromJson(data.entity)
3424
- };
3425
- }
3426
- };
3564
+ // src/objects/Node.ts
3427
3565
  var NodeFromJson = (obj) => {
3428
3566
  if (obj["__typename"] == "GraphNode") {
3429
3567
  return new GraphNode_default(
@@ -3469,6 +3607,7 @@ var NodeFromJson = (obj) => {
3469
3607
  !!obj["lightspark_node_with_o_s_k_blockchain_balance"] ? BlockchainBalanceFromJson(
3470
3608
  obj["lightspark_node_with_o_s_k_blockchain_balance"]
3471
3609
  ) : void 0,
3610
+ !!obj["lightspark_node_with_o_s_k_balances"] ? BalancesFromJson(obj["lightspark_node_with_o_s_k_balances"]) : void 0,
3472
3611
  !!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"] ? SecretFromJson(
3473
3612
  obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
3474
3613
  ) : void 0
@@ -3503,7 +3642,8 @@ var NodeFromJson = (obj) => {
3503
3642
  ) : void 0,
3504
3643
  !!obj["lightspark_node_with_remote_signing_blockchain_balance"] ? BlockchainBalanceFromJson(
3505
3644
  obj["lightspark_node_with_remote_signing_blockchain_balance"]
3506
- ) : void 0
3645
+ ) : void 0,
3646
+ !!obj["lightspark_node_with_remote_signing_balances"] ? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"]) : void 0
3507
3647
  );
3508
3648
  }
3509
3649
  throw new import_core2.LightsparkException(
@@ -3511,6 +3651,82 @@ var NodeFromJson = (obj) => {
3511
3651
  `Couldn't find a concrete type for interface Node corresponding to the typename=${obj["__typename"]}`
3512
3652
  );
3513
3653
  };
3654
+ var NodeToJson = (obj) => {
3655
+ if (obj.typename == "GraphNode") {
3656
+ const graphNode = obj;
3657
+ return {
3658
+ __typename: "GraphNode",
3659
+ graph_node_id: graphNode.id,
3660
+ graph_node_created_at: graphNode.createdAt,
3661
+ graph_node_updated_at: graphNode.updatedAt,
3662
+ graph_node_alias: graphNode.alias,
3663
+ graph_node_bitcoin_network: graphNode.bitcoinNetwork,
3664
+ graph_node_color: graphNode.color,
3665
+ graph_node_conductivity: graphNode.conductivity,
3666
+ graph_node_display_name: graphNode.displayName,
3667
+ graph_node_public_key: graphNode.publicKey
3668
+ };
3669
+ }
3670
+ if (obj.typename == "LightsparkNodeWithOSK") {
3671
+ const lightsparkNodeWithOSK = obj;
3672
+ return {
3673
+ __typename: "LightsparkNodeWithOSK",
3674
+ lightspark_node_with_o_s_k_id: lightsparkNodeWithOSK.id,
3675
+ lightspark_node_with_o_s_k_created_at: lightsparkNodeWithOSK.createdAt,
3676
+ lightspark_node_with_o_s_k_updated_at: lightsparkNodeWithOSK.updatedAt,
3677
+ lightspark_node_with_o_s_k_alias: lightsparkNodeWithOSK.alias,
3678
+ lightspark_node_with_o_s_k_bitcoin_network: lightsparkNodeWithOSK.bitcoinNetwork,
3679
+ lightspark_node_with_o_s_k_color: lightsparkNodeWithOSK.color,
3680
+ lightspark_node_with_o_s_k_conductivity: lightsparkNodeWithOSK.conductivity,
3681
+ lightspark_node_with_o_s_k_display_name: lightsparkNodeWithOSK.displayName,
3682
+ lightspark_node_with_o_s_k_public_key: lightsparkNodeWithOSK.publicKey,
3683
+ lightspark_node_with_o_s_k_owner: { id: lightsparkNodeWithOSK.ownerId },
3684
+ lightspark_node_with_o_s_k_status: lightsparkNodeWithOSK.status,
3685
+ lightspark_node_with_o_s_k_total_balance: lightsparkNodeWithOSK.totalBalance ? CurrencyAmountToJson(lightsparkNodeWithOSK.totalBalance) : void 0,
3686
+ lightspark_node_with_o_s_k_total_local_balance: lightsparkNodeWithOSK.totalLocalBalance ? CurrencyAmountToJson(lightsparkNodeWithOSK.totalLocalBalance) : void 0,
3687
+ lightspark_node_with_o_s_k_local_balance: lightsparkNodeWithOSK.localBalance ? CurrencyAmountToJson(lightsparkNodeWithOSK.localBalance) : void 0,
3688
+ lightspark_node_with_o_s_k_remote_balance: lightsparkNodeWithOSK.remoteBalance ? CurrencyAmountToJson(lightsparkNodeWithOSK.remoteBalance) : void 0,
3689
+ lightspark_node_with_o_s_k_blockchain_balance: lightsparkNodeWithOSK.blockchainBalance ? BlockchainBalanceToJson(lightsparkNodeWithOSK.blockchainBalance) : void 0,
3690
+ lightspark_node_with_o_s_k_uma_prescreening_utxos: lightsparkNodeWithOSK.umaPrescreeningUtxos,
3691
+ lightspark_node_with_o_s_k_balances: lightsparkNodeWithOSK.balances ? BalancesToJson(lightsparkNodeWithOSK.balances) : void 0,
3692
+ lightspark_node_with_o_s_k_encrypted_signing_private_key: lightsparkNodeWithOSK.encryptedSigningPrivateKey ? SecretToJson(lightsparkNodeWithOSK.encryptedSigningPrivateKey) : void 0
3693
+ };
3694
+ }
3695
+ if (obj.typename == "LightsparkNodeWithRemoteSigning") {
3696
+ const lightsparkNodeWithRemoteSigning = obj;
3697
+ return {
3698
+ __typename: "LightsparkNodeWithRemoteSigning",
3699
+ lightspark_node_with_remote_signing_id: lightsparkNodeWithRemoteSigning.id,
3700
+ lightspark_node_with_remote_signing_created_at: lightsparkNodeWithRemoteSigning.createdAt,
3701
+ lightspark_node_with_remote_signing_updated_at: lightsparkNodeWithRemoteSigning.updatedAt,
3702
+ lightspark_node_with_remote_signing_alias: lightsparkNodeWithRemoteSigning.alias,
3703
+ lightspark_node_with_remote_signing_bitcoin_network: lightsparkNodeWithRemoteSigning.bitcoinNetwork,
3704
+ lightspark_node_with_remote_signing_color: lightsparkNodeWithRemoteSigning.color,
3705
+ lightspark_node_with_remote_signing_conductivity: lightsparkNodeWithRemoteSigning.conductivity,
3706
+ lightspark_node_with_remote_signing_display_name: lightsparkNodeWithRemoteSigning.displayName,
3707
+ lightspark_node_with_remote_signing_public_key: lightsparkNodeWithRemoteSigning.publicKey,
3708
+ lightspark_node_with_remote_signing_owner: {
3709
+ id: lightsparkNodeWithRemoteSigning.ownerId
3710
+ },
3711
+ lightspark_node_with_remote_signing_status: lightsparkNodeWithRemoteSigning.status,
3712
+ lightspark_node_with_remote_signing_total_balance: lightsparkNodeWithRemoteSigning.totalBalance ? CurrencyAmountToJson(lightsparkNodeWithRemoteSigning.totalBalance) : void 0,
3713
+ lightspark_node_with_remote_signing_total_local_balance: lightsparkNodeWithRemoteSigning.totalLocalBalance ? CurrencyAmountToJson(
3714
+ lightsparkNodeWithRemoteSigning.totalLocalBalance
3715
+ ) : void 0,
3716
+ lightspark_node_with_remote_signing_local_balance: lightsparkNodeWithRemoteSigning.localBalance ? CurrencyAmountToJson(lightsparkNodeWithRemoteSigning.localBalance) : void 0,
3717
+ lightspark_node_with_remote_signing_remote_balance: lightsparkNodeWithRemoteSigning.remoteBalance ? CurrencyAmountToJson(lightsparkNodeWithRemoteSigning.remoteBalance) : void 0,
3718
+ lightspark_node_with_remote_signing_blockchain_balance: lightsparkNodeWithRemoteSigning.blockchainBalance ? BlockchainBalanceToJson(
3719
+ lightsparkNodeWithRemoteSigning.blockchainBalance
3720
+ ) : void 0,
3721
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: lightsparkNodeWithRemoteSigning.umaPrescreeningUtxos,
3722
+ lightspark_node_with_remote_signing_balances: lightsparkNodeWithRemoteSigning.balances ? BalancesToJson(lightsparkNodeWithRemoteSigning.balances) : void 0
3723
+ };
3724
+ }
3725
+ throw new import_core2.LightsparkException(
3726
+ "DeserializationError",
3727
+ `Couldn't find a concrete type for interface Node corresponding to the typename=${obj.typename}`
3728
+ );
3729
+ };
3514
3730
  var FRAGMENT8 = `
3515
3731
  fragment NodeFragment on Node {
3516
3732
  __typename
@@ -3625,6 +3841,33 @@ fragment NodeFragment on Node {
3625
3841
  }
3626
3842
  }
3627
3843
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
3844
+ lightspark_node_with_o_s_k_balances: balances {
3845
+ __typename
3846
+ balances_owned_balance: owned_balance {
3847
+ __typename
3848
+ currency_amount_original_value: original_value
3849
+ currency_amount_original_unit: original_unit
3850
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3851
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3852
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3853
+ }
3854
+ balances_available_to_send_balance: available_to_send_balance {
3855
+ __typename
3856
+ currency_amount_original_value: original_value
3857
+ currency_amount_original_unit: original_unit
3858
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3859
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3860
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3861
+ }
3862
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
3863
+ __typename
3864
+ currency_amount_original_value: original_value
3865
+ currency_amount_original_unit: original_unit
3866
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3867
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3868
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3869
+ }
3870
+ }
3628
3871
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
3629
3872
  __typename
3630
3873
  secret_encrypted_value: encrypted_value
@@ -3730,9 +3973,52 @@ fragment NodeFragment on Node {
3730
3973
  }
3731
3974
  }
3732
3975
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
3976
+ lightspark_node_with_remote_signing_balances: balances {
3977
+ __typename
3978
+ balances_owned_balance: owned_balance {
3979
+ __typename
3980
+ currency_amount_original_value: original_value
3981
+ currency_amount_original_unit: original_unit
3982
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3983
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3984
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3985
+ }
3986
+ balances_available_to_send_balance: available_to_send_balance {
3987
+ __typename
3988
+ currency_amount_original_value: original_value
3989
+ currency_amount_original_unit: original_unit
3990
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3991
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3992
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3993
+ }
3994
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
3995
+ __typename
3996
+ currency_amount_original_value: original_value
3997
+ currency_amount_original_unit: original_unit
3998
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3999
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4000
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4001
+ }
4002
+ }
3733
4003
  }
3734
4004
  }`;
3735
- var Node_default = Node;
4005
+ var getNodeQuery = (id) => {
4006
+ return {
4007
+ queryPayload: `
4008
+ query GetNode($id: ID!) {
4009
+ entity(id: $id) {
4010
+ ... on Node {
4011
+ ...NodeFragment
4012
+ }
4013
+ }
4014
+ }
4015
+
4016
+ ${FRAGMENT8}
4017
+ `,
4018
+ variables: { id },
4019
+ constructObject: (data) => NodeFromJson(data.entity)
4020
+ };
4021
+ };
3736
4022
 
3737
4023
  // src/objects/InvoiceData.ts
3738
4024
  var InvoiceDataFromJson = (obj) => {
@@ -3878,23 +4164,50 @@ fragment InvoiceDataFragment on InvoiceData {
3878
4164
  }
3879
4165
  }
3880
4166
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
3881
- lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
4167
+ lightspark_node_with_o_s_k_balances: balances {
3882
4168
  __typename
3883
- secret_encrypted_value: encrypted_value
3884
- secret_cipher: cipher
3885
- }
3886
- }
3887
- ... on LightsparkNodeWithRemoteSigning {
3888
- __typename
3889
- lightspark_node_with_remote_signing_id: id
3890
- lightspark_node_with_remote_signing_created_at: created_at
3891
- lightspark_node_with_remote_signing_updated_at: updated_at
3892
- lightspark_node_with_remote_signing_alias: alias
3893
- lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network
3894
- lightspark_node_with_remote_signing_color: color
3895
- lightspark_node_with_remote_signing_conductivity: conductivity
3896
- lightspark_node_with_remote_signing_display_name: display_name
3897
- lightspark_node_with_remote_signing_public_key: public_key
4169
+ balances_owned_balance: owned_balance {
4170
+ __typename
4171
+ currency_amount_original_value: original_value
4172
+ currency_amount_original_unit: original_unit
4173
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4174
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4175
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4176
+ }
4177
+ balances_available_to_send_balance: available_to_send_balance {
4178
+ __typename
4179
+ currency_amount_original_value: original_value
4180
+ currency_amount_original_unit: original_unit
4181
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4182
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4183
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4184
+ }
4185
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
4186
+ __typename
4187
+ currency_amount_original_value: original_value
4188
+ currency_amount_original_unit: original_unit
4189
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4190
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4191
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4192
+ }
4193
+ }
4194
+ lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
4195
+ __typename
4196
+ secret_encrypted_value: encrypted_value
4197
+ secret_cipher: cipher
4198
+ }
4199
+ }
4200
+ ... on LightsparkNodeWithRemoteSigning {
4201
+ __typename
4202
+ lightspark_node_with_remote_signing_id: id
4203
+ lightspark_node_with_remote_signing_created_at: created_at
4204
+ lightspark_node_with_remote_signing_updated_at: updated_at
4205
+ lightspark_node_with_remote_signing_alias: alias
4206
+ lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network
4207
+ lightspark_node_with_remote_signing_color: color
4208
+ lightspark_node_with_remote_signing_conductivity: conductivity
4209
+ lightspark_node_with_remote_signing_display_name: display_name
4210
+ lightspark_node_with_remote_signing_public_key: public_key
3898
4211
  lightspark_node_with_remote_signing_owner: owner {
3899
4212
  id
3900
4213
  }
@@ -3983,6 +4296,33 @@ fragment InvoiceDataFragment on InvoiceData {
3983
4296
  }
3984
4297
  }
3985
4298
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
4299
+ lightspark_node_with_remote_signing_balances: balances {
4300
+ __typename
4301
+ balances_owned_balance: owned_balance {
4302
+ __typename
4303
+ currency_amount_original_value: original_value
4304
+ currency_amount_original_unit: original_unit
4305
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4306
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4307
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4308
+ }
4309
+ balances_available_to_send_balance: available_to_send_balance {
4310
+ __typename
4311
+ currency_amount_original_value: original_value
4312
+ currency_amount_original_unit: original_unit
4313
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4314
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4315
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4316
+ }
4317
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
4318
+ __typename
4319
+ currency_amount_original_value: original_value
4320
+ currency_amount_original_unit: original_unit
4321
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4322
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4323
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4324
+ }
4325
+ }
3986
4326
  }
3987
4327
  }
3988
4328
  }`;
@@ -4143,6 +4483,33 @@ fragment InvoiceFragment on Invoice {
4143
4483
  }
4144
4484
  }
4145
4485
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
4486
+ lightspark_node_with_o_s_k_balances: balances {
4487
+ __typename
4488
+ balances_owned_balance: owned_balance {
4489
+ __typename
4490
+ currency_amount_original_value: original_value
4491
+ currency_amount_original_unit: original_unit
4492
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4493
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4494
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4495
+ }
4496
+ balances_available_to_send_balance: available_to_send_balance {
4497
+ __typename
4498
+ currency_amount_original_value: original_value
4499
+ currency_amount_original_unit: original_unit
4500
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4501
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4502
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4503
+ }
4504
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
4505
+ __typename
4506
+ currency_amount_original_value: original_value
4507
+ currency_amount_original_unit: original_unit
4508
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4509
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4510
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4511
+ }
4512
+ }
4146
4513
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
4147
4514
  __typename
4148
4515
  secret_encrypted_value: encrypted_value
@@ -4248,6 +4615,33 @@ fragment InvoiceFragment on Invoice {
4248
4615
  }
4249
4616
  }
4250
4617
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
4618
+ lightspark_node_with_remote_signing_balances: balances {
4619
+ __typename
4620
+ balances_owned_balance: owned_balance {
4621
+ __typename
4622
+ currency_amount_original_value: original_value
4623
+ currency_amount_original_unit: original_unit
4624
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4625
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4626
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4627
+ }
4628
+ balances_available_to_send_balance: available_to_send_balance {
4629
+ __typename
4630
+ currency_amount_original_value: original_value
4631
+ currency_amount_original_unit: original_unit
4632
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4633
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4634
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4635
+ }
4636
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
4637
+ __typename
4638
+ currency_amount_original_value: original_value
4639
+ currency_amount_original_unit: original_unit
4640
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4641
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4642
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4643
+ }
4644
+ }
4251
4645
  }
4252
4646
  }
4253
4647
  }
@@ -4334,7 +4728,7 @@ mutation CreateTestModeInvoice(
4334
4728
  `;
4335
4729
 
4336
4730
  // src/objects/IncomingPayment.ts
4337
- var import_auto_bind7 = __toESM(require("auto-bind"), 1);
4731
+ var import_auto_bind6 = __toESM(require("auto-bind"), 1);
4338
4732
 
4339
4733
  // src/objects/IncomingPaymentAttemptStatus.ts
4340
4734
  var IncomingPaymentAttemptStatus = /* @__PURE__ */ ((IncomingPaymentAttemptStatus2) => {
@@ -4419,6 +4813,12 @@ var PostTransactionDataFromJson = (obj) => {
4419
4813
  amount: CurrencyAmountFromJson(obj["post_transaction_data_amount"])
4420
4814
  };
4421
4815
  };
4816
+ var PostTransactionDataToJson = (obj) => {
4817
+ return {
4818
+ post_transaction_data_utxo: obj.utxo,
4819
+ post_transaction_data_amount: CurrencyAmountToJson(obj.amount)
4820
+ };
4821
+ };
4422
4822
 
4423
4823
  // src/objects/TransactionStatus.ts
4424
4824
  var TransactionStatus = /* @__PURE__ */ ((TransactionStatus2) => {
@@ -4447,7 +4847,7 @@ var IncomingPayment = class {
4447
4847
  this.transactionHash = transactionHash;
4448
4848
  this.paymentRequestId = paymentRequestId;
4449
4849
  this.umaPostTransactionData = umaPostTransactionData;
4450
- (0, import_auto_bind7.default)(this);
4850
+ (0, import_auto_bind6.default)(this);
4451
4851
  }
4452
4852
  async getAttempts(client, first = void 0, statuses = void 0, after = void 0) {
4453
4853
  return await client.executeRawQuery({
@@ -4518,6 +4918,21 @@ ${FRAGMENT12}
4518
4918
  constructObject: (data) => IncomingPaymentFromJson(data.entity)
4519
4919
  };
4520
4920
  }
4921
+ toJson() {
4922
+ return {
4923
+ __typename: "IncomingPayment",
4924
+ incoming_payment_id: this.id,
4925
+ incoming_payment_created_at: this.createdAt,
4926
+ incoming_payment_updated_at: this.updatedAt,
4927
+ incoming_payment_status: this.status,
4928
+ incoming_payment_resolved_at: this.resolvedAt,
4929
+ incoming_payment_amount: CurrencyAmountToJson(this.amount),
4930
+ incoming_payment_transaction_hash: this.transactionHash,
4931
+ incoming_payment_destination: { id: this.destinationId },
4932
+ incoming_payment_payment_request: { id: this.paymentRequestId },
4933
+ incoming_payment_uma_post_transaction_data: this.umaPostTransactionData?.map((e) => PostTransactionDataToJson(e))
4934
+ };
4935
+ }
4521
4936
  };
4522
4937
  var IncomingPaymentFromJson = (obj) => {
4523
4938
  return new IncomingPayment(
@@ -4788,17 +5203,32 @@ var MultiNodeDashboard = `
4788
5203
  `;
4789
5204
 
4790
5205
  // src/objects/OutgoingPayment.ts
4791
- var import_auto_bind9 = __toESM(require("auto-bind"), 1);
5206
+ var import_auto_bind8 = __toESM(require("auto-bind"), 1);
4792
5207
 
4793
5208
  // src/objects/OutgoingPaymentAttempt.ts
4794
- var import_auto_bind8 = __toESM(require("auto-bind"), 1);
5209
+ var import_auto_bind7 = __toESM(require("auto-bind"), 1);
4795
5210
 
4796
5211
  // src/objects/ChannelSnapshot.ts
4797
5212
  var ChannelSnapshotFromJson = (obj) => {
4798
5213
  return {
5214
+ channelId: obj["channel_snapshot_channel"].id,
5215
+ timestamp: obj["channel_snapshot_timestamp"],
4799
5216
  localBalance: !!obj["channel_snapshot_local_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_balance"]) : void 0,
4800
5217
  localUnsettledBalance: !!obj["channel_snapshot_local_unsettled_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_unsettled_balance"]) : void 0,
4801
- localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0
5218
+ localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0,
5219
+ remoteBalance: !!obj["channel_snapshot_remote_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_remote_balance"]) : void 0,
5220
+ remoteUnsettledBalance: !!obj["channel_snapshot_remote_unsettled_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_remote_unsettled_balance"]) : void 0
5221
+ };
5222
+ };
5223
+ var ChannelSnapshotToJson = (obj) => {
5224
+ return {
5225
+ channel_snapshot_channel: { id: obj.channelId },
5226
+ channel_snapshot_timestamp: obj.timestamp,
5227
+ channel_snapshot_local_balance: obj.localBalance ? CurrencyAmountToJson(obj.localBalance) : void 0,
5228
+ channel_snapshot_local_unsettled_balance: obj.localUnsettledBalance ? CurrencyAmountToJson(obj.localUnsettledBalance) : void 0,
5229
+ channel_snapshot_local_channel_reserve: obj.localChannelReserve ? CurrencyAmountToJson(obj.localChannelReserve) : void 0,
5230
+ channel_snapshot_remote_balance: obj.remoteBalance ? CurrencyAmountToJson(obj.remoteBalance) : void 0,
5231
+ channel_snapshot_remote_unsettled_balance: obj.remoteUnsettledBalance ? CurrencyAmountToJson(obj.remoteUnsettledBalance) : void 0
4802
5232
  };
4803
5233
  };
4804
5234
 
@@ -4829,6 +5259,7 @@ var HtlcAttemptFailureCode = /* @__PURE__ */ ((HtlcAttemptFailureCode2) => {
4829
5259
  HtlcAttemptFailureCode2["EXPIRY_TOO_FAR"] = "EXPIRY_TOO_FAR";
4830
5260
  HtlcAttemptFailureCode2["MPP_TIMEOUT"] = "MPP_TIMEOUT";
4831
5261
  HtlcAttemptFailureCode2["INVALID_ONION_PAYLOAD"] = "INVALID_ONION_PAYLOAD";
5262
+ HtlcAttemptFailureCode2["INVALID_ONION_BLINDING"] = "INVALID_ONION_BLINDING";
4832
5263
  HtlcAttemptFailureCode2["INTERNAL_FAILURE"] = "INTERNAL_FAILURE";
4833
5264
  HtlcAttemptFailureCode2["UNKNOWN_FAILURE"] = "UNKNOWN_FAILURE";
4834
5265
  HtlcAttemptFailureCode2["UNREADABLE_FAILURE"] = "UNREADABLE_FAILURE";
@@ -4937,7 +5368,7 @@ var OutgoingPaymentAttempt = class {
4937
5368
  this.amount = amount;
4938
5369
  this.fees = fees;
4939
5370
  this.channelSnapshot = channelSnapshot;
4940
- (0, import_auto_bind8.default)(this);
5371
+ (0, import_auto_bind7.default)(this);
4941
5372
  }
4942
5373
  async getHops(client, first = void 0, after = void 0) {
4943
5374
  return await client.executeRawQuery({
@@ -5012,6 +5443,22 @@ ${FRAGMENT15}
5012
5443
  constructObject: (data) => OutgoingPaymentAttemptFromJson(data.entity)
5013
5444
  };
5014
5445
  }
5446
+ toJson() {
5447
+ return {
5448
+ __typename: "OutgoingPaymentAttempt",
5449
+ outgoing_payment_attempt_id: this.id,
5450
+ outgoing_payment_attempt_created_at: this.createdAt,
5451
+ outgoing_payment_attempt_updated_at: this.updatedAt,
5452
+ outgoing_payment_attempt_status: this.status,
5453
+ outgoing_payment_attempt_failure_code: this.failureCode,
5454
+ outgoing_payment_attempt_failure_source_index: this.failureSourceIndex,
5455
+ outgoing_payment_attempt_resolved_at: this.resolvedAt,
5456
+ outgoing_payment_attempt_amount: this.amount ? CurrencyAmountToJson(this.amount) : void 0,
5457
+ outgoing_payment_attempt_fees: this.fees ? CurrencyAmountToJson(this.fees) : void 0,
5458
+ outgoing_payment_attempt_outgoing_payment: { id: this.outgoingPaymentId },
5459
+ outgoing_payment_attempt_channel_snapshot: this.channelSnapshot ? ChannelSnapshotToJson(this.channelSnapshot) : void 0
5460
+ };
5461
+ }
5015
5462
  };
5016
5463
  var OutgoingPaymentAttemptFromJson = (obj) => {
5017
5464
  return new OutgoingPaymentAttempt(
@@ -5062,6 +5509,10 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
5062
5509
  }
5063
5510
  outgoing_payment_attempt_channel_snapshot: channel_snapshot {
5064
5511
  __typename
5512
+ channel_snapshot_channel: channel {
5513
+ id
5514
+ }
5515
+ channel_snapshot_timestamp: timestamp
5065
5516
  channel_snapshot_local_balance: local_balance {
5066
5517
  __typename
5067
5518
  currency_amount_original_value: original_value
@@ -5086,6 +5537,22 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
5086
5537
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5087
5538
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5088
5539
  }
5540
+ channel_snapshot_remote_balance: remote_balance {
5541
+ __typename
5542
+ currency_amount_original_value: original_value
5543
+ currency_amount_original_unit: original_unit
5544
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5545
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5546
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5547
+ }
5548
+ channel_snapshot_remote_unsettled_balance: remote_unsettled_balance {
5549
+ __typename
5550
+ currency_amount_original_value: original_value
5551
+ currency_amount_original_unit: original_unit
5552
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5553
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5554
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5555
+ }
5089
5556
  }
5090
5557
  }`;
5091
5558
  var OutgoingPaymentAttempt_default = OutgoingPaymentAttempt;
@@ -5142,6 +5609,26 @@ var PaymentRequestDataFromJson = (obj) => {
5142
5609
  `Couldn't find a concrete type for interface PaymentRequestData corresponding to the typename=${obj["__typename"]}`
5143
5610
  );
5144
5611
  };
5612
+ var PaymentRequestDataToJson = (obj) => {
5613
+ if (obj.typename == "InvoiceData") {
5614
+ const invoiceData = obj;
5615
+ return {
5616
+ __typename: "InvoiceData",
5617
+ invoice_data_encoded_payment_request: invoiceData.encodedPaymentRequest,
5618
+ invoice_data_bitcoin_network: invoiceData.bitcoinNetwork,
5619
+ invoice_data_payment_hash: invoiceData.paymentHash,
5620
+ invoice_data_amount: CurrencyAmountToJson(invoiceData.amount),
5621
+ invoice_data_created_at: invoiceData.createdAt,
5622
+ invoice_data_expires_at: invoiceData.expiresAt,
5623
+ invoice_data_memo: invoiceData.memo,
5624
+ invoice_data_destination: NodeToJson(invoiceData.destination)
5625
+ };
5626
+ }
5627
+ throw new import_core3.LightsparkException(
5628
+ "DeserializationError",
5629
+ `Couldn't find a concrete type for interface PaymentRequestData corresponding to the typename=${obj.typename}`
5630
+ );
5631
+ };
5145
5632
 
5146
5633
  // src/objects/RichText.ts
5147
5634
  var RichTextFromJson = (obj) => {
@@ -5149,6 +5636,11 @@ var RichTextFromJson = (obj) => {
5149
5636
  text: obj["rich_text_text"]
5150
5637
  };
5151
5638
  };
5639
+ var RichTextToJson = (obj) => {
5640
+ return {
5641
+ rich_text_text: obj.text
5642
+ };
5643
+ };
5152
5644
 
5153
5645
  // src/objects/OutgoingPayment.ts
5154
5646
  var OutgoingPayment = class {
@@ -5169,7 +5661,7 @@ var OutgoingPayment = class {
5169
5661
  this.failureMessage = failureMessage;
5170
5662
  this.umaPostTransactionData = umaPostTransactionData;
5171
5663
  this.paymentPreimage = paymentPreimage;
5172
- (0, import_auto_bind9.default)(this);
5664
+ (0, import_auto_bind8.default)(this);
5173
5665
  }
5174
5666
  async getAttempts(client, first = void 0, after = void 0) {
5175
5667
  return await client.executeRawQuery({
@@ -5217,6 +5709,10 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
5217
5709
  }
5218
5710
  outgoing_payment_attempt_channel_snapshot: channel_snapshot {
5219
5711
  __typename
5712
+ channel_snapshot_channel: channel {
5713
+ id
5714
+ }
5715
+ channel_snapshot_timestamp: timestamp
5220
5716
  channel_snapshot_local_balance: local_balance {
5221
5717
  __typename
5222
5718
  currency_amount_original_value: original_value
@@ -5241,6 +5737,22 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
5241
5737
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
5242
5738
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
5243
5739
  }
5740
+ channel_snapshot_remote_balance: remote_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
+ channel_snapshot_remote_unsettled_balance: remote_unsettled_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
+ }
5244
5756
  }
5245
5757
  }
5246
5758
  }
@@ -5272,6 +5784,26 @@ ${FRAGMENT16}
5272
5784
  constructObject: (data) => OutgoingPaymentFromJson(data.entity)
5273
5785
  };
5274
5786
  }
5787
+ toJson() {
5788
+ return {
5789
+ __typename: "OutgoingPayment",
5790
+ outgoing_payment_id: this.id,
5791
+ outgoing_payment_created_at: this.createdAt,
5792
+ outgoing_payment_updated_at: this.updatedAt,
5793
+ outgoing_payment_status: this.status,
5794
+ outgoing_payment_resolved_at: this.resolvedAt,
5795
+ outgoing_payment_amount: CurrencyAmountToJson(this.amount),
5796
+ outgoing_payment_transaction_hash: this.transactionHash,
5797
+ outgoing_payment_origin: { id: this.originId },
5798
+ outgoing_payment_destination: { id: this.destinationId },
5799
+ outgoing_payment_fees: this.fees ? CurrencyAmountToJson(this.fees) : void 0,
5800
+ outgoing_payment_payment_request_data: this.paymentRequestData ? PaymentRequestDataToJson(this.paymentRequestData) : void 0,
5801
+ outgoing_payment_failure_reason: this.failureReason,
5802
+ outgoing_payment_failure_message: this.failureMessage ? RichTextToJson(this.failureMessage) : void 0,
5803
+ outgoing_payment_uma_post_transaction_data: this.umaPostTransactionData?.map((e) => PostTransactionDataToJson(e)),
5804
+ outgoing_payment_payment_preimage: this.paymentPreimage
5805
+ };
5806
+ }
5275
5807
  };
5276
5808
  var OutgoingPaymentFromJson = (obj) => {
5277
5809
  return new OutgoingPayment(
@@ -5457,6 +5989,33 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
5457
5989
  }
5458
5990
  }
5459
5991
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
5992
+ lightspark_node_with_o_s_k_balances: balances {
5993
+ __typename
5994
+ balances_owned_balance: owned_balance {
5995
+ __typename
5996
+ currency_amount_original_value: original_value
5997
+ currency_amount_original_unit: original_unit
5998
+ currency_amount_preferred_currency_unit: preferred_currency_unit
5999
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6000
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6001
+ }
6002
+ balances_available_to_send_balance: available_to_send_balance {
6003
+ __typename
6004
+ currency_amount_original_value: original_value
6005
+ currency_amount_original_unit: original_unit
6006
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6007
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6008
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6009
+ }
6010
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
6011
+ __typename
6012
+ currency_amount_original_value: original_value
6013
+ currency_amount_original_unit: original_unit
6014
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6015
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6016
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6017
+ }
6018
+ }
5460
6019
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
5461
6020
  __typename
5462
6021
  secret_encrypted_value: encrypted_value
@@ -5562,6 +6121,33 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
5562
6121
  }
5563
6122
  }
5564
6123
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
6124
+ lightspark_node_with_remote_signing_balances: balances {
6125
+ __typename
6126
+ balances_owned_balance: owned_balance {
6127
+ __typename
6128
+ currency_amount_original_value: original_value
6129
+ currency_amount_original_unit: original_unit
6130
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6131
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6132
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6133
+ }
6134
+ balances_available_to_send_balance: available_to_send_balance {
6135
+ __typename
6136
+ currency_amount_original_value: original_value
6137
+ currency_amount_original_unit: original_unit
6138
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6139
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6140
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6141
+ }
6142
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
6143
+ __typename
6144
+ currency_amount_original_value: original_value
6145
+ currency_amount_original_unit: original_unit
6146
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6147
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6148
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6149
+ }
6150
+ }
5565
6151
  }
5566
6152
  }
5567
6153
  }
@@ -5770,6 +6356,33 @@ fragment PaymentRequestFragment on PaymentRequest {
5770
6356
  }
5771
6357
  }
5772
6358
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
6359
+ lightspark_node_with_o_s_k_balances: balances {
6360
+ __typename
6361
+ balances_owned_balance: owned_balance {
6362
+ __typename
6363
+ currency_amount_original_value: original_value
6364
+ currency_amount_original_unit: original_unit
6365
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6366
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6367
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6368
+ }
6369
+ balances_available_to_send_balance: available_to_send_balance {
6370
+ __typename
6371
+ currency_amount_original_value: original_value
6372
+ currency_amount_original_unit: original_unit
6373
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6374
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6375
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6376
+ }
6377
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
6378
+ __typename
6379
+ currency_amount_original_value: original_value
6380
+ currency_amount_original_unit: original_unit
6381
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6382
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6383
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6384
+ }
6385
+ }
5773
6386
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
5774
6387
  __typename
5775
6388
  secret_encrypted_value: encrypted_value
@@ -5875,7 +6488,34 @@ fragment PaymentRequestFragment on PaymentRequest {
5875
6488
  }
5876
6489
  }
5877
6490
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
5878
- }
6491
+ lightspark_node_with_remote_signing_balances: balances {
6492
+ __typename
6493
+ balances_owned_balance: owned_balance {
6494
+ __typename
6495
+ currency_amount_original_value: original_value
6496
+ currency_amount_original_unit: original_unit
6497
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6498
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6499
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6500
+ }
6501
+ balances_available_to_send_balance: available_to_send_balance {
6502
+ __typename
6503
+ currency_amount_original_value: original_value
6504
+ currency_amount_original_unit: original_unit
6505
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6506
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6507
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6508
+ }
6509
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
6510
+ __typename
6511
+ currency_amount_original_value: original_value
6512
+ currency_amount_original_unit: original_unit
6513
+ currency_amount_preferred_currency_unit: preferred_currency_unit
6514
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
6515
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
6516
+ }
6517
+ }
6518
+ }
5879
6519
  }
5880
6520
  }
5881
6521
  invoice_status: status
@@ -5966,7 +6606,7 @@ var PayUmaInvoice = `
5966
6606
  `;
5967
6607
 
5968
6608
  // src/objects/WithdrawalRequest.ts
5969
- var import_auto_bind10 = __toESM(require("auto-bind"), 1);
6609
+ var import_auto_bind9 = __toESM(require("auto-bind"), 1);
5970
6610
 
5971
6611
  // src/objects/WithdrawalMode.ts
5972
6612
  var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
@@ -6164,7 +6804,7 @@ var WithdrawalRequest = class {
6164
6804
  this.estimatedAmount = estimatedAmount;
6165
6805
  this.completedAt = completedAt;
6166
6806
  this.withdrawalId = withdrawalId;
6167
- (0, import_auto_bind10.default)(this);
6807
+ (0, import_auto_bind9.default)(this);
6168
6808
  }
6169
6809
  async getChannelClosingTransactions(client, first = void 0) {
6170
6810
  return await client.executeRawQuery({
@@ -6307,6 +6947,21 @@ ${FRAGMENT20}
6307
6947
  constructObject: (data) => WithdrawalRequestFromJson(data.entity)
6308
6948
  };
6309
6949
  }
6950
+ toJson() {
6951
+ return {
6952
+ __typename: "WithdrawalRequest",
6953
+ withdrawal_request_id: this.id,
6954
+ withdrawal_request_created_at: this.createdAt,
6955
+ withdrawal_request_updated_at: this.updatedAt,
6956
+ withdrawal_request_amount: CurrencyAmountToJson(this.amount),
6957
+ withdrawal_request_estimated_amount: this.estimatedAmount ? CurrencyAmountToJson(this.estimatedAmount) : void 0,
6958
+ withdrawal_request_bitcoin_address: this.bitcoinAddress,
6959
+ withdrawal_request_withdrawal_mode: this.withdrawalMode,
6960
+ withdrawal_request_status: this.status,
6961
+ withdrawal_request_completed_at: this.completedAt,
6962
+ withdrawal_request_withdrawal: { id: this.withdrawalId }
6963
+ };
6964
+ }
6310
6965
  };
6311
6966
  var WithdrawalRequestFromJson = (obj) => {
6312
6967
  return new WithdrawalRequest(
@@ -6850,6 +7505,33 @@ fragment TransactionFragment on Transaction {
6850
7505
  }
6851
7506
  }
6852
7507
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
7508
+ lightspark_node_with_o_s_k_balances: balances {
7509
+ __typename
7510
+ balances_owned_balance: owned_balance {
7511
+ __typename
7512
+ currency_amount_original_value: original_value
7513
+ currency_amount_original_unit: original_unit
7514
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7515
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7516
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7517
+ }
7518
+ balances_available_to_send_balance: available_to_send_balance {
7519
+ __typename
7520
+ currency_amount_original_value: original_value
7521
+ currency_amount_original_unit: original_unit
7522
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7523
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7524
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7525
+ }
7526
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
7527
+ __typename
7528
+ currency_amount_original_value: original_value
7529
+ currency_amount_original_unit: original_unit
7530
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7531
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7532
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7533
+ }
7534
+ }
6853
7535
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
6854
7536
  __typename
6855
7537
  secret_encrypted_value: encrypted_value
@@ -6955,6 +7637,33 @@ fragment TransactionFragment on Transaction {
6955
7637
  }
6956
7638
  }
6957
7639
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
7640
+ lightspark_node_with_remote_signing_balances: balances {
7641
+ __typename
7642
+ balances_owned_balance: owned_balance {
7643
+ __typename
7644
+ currency_amount_original_value: original_value
7645
+ currency_amount_original_unit: original_unit
7646
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7647
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7648
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7649
+ }
7650
+ balances_available_to_send_balance: available_to_send_balance {
7651
+ __typename
7652
+ currency_amount_original_value: original_value
7653
+ currency_amount_original_unit: original_unit
7654
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7655
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7656
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7657
+ }
7658
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
7659
+ __typename
7660
+ currency_amount_original_value: original_value
7661
+ currency_amount_original_unit: original_unit
7662
+ currency_amount_preferred_currency_unit: preferred_currency_unit
7663
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7664
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7665
+ }
7666
+ }
6958
7667
  }
6959
7668
  }
6960
7669
  }
@@ -7439,7 +8148,7 @@ var NodeKeyLoaderCache = class {
7439
8148
  };
7440
8149
 
7441
8150
  // src/objects/Account.ts
7442
- var import_auto_bind14 = __toESM(require("auto-bind"), 1);
8151
+ var import_auto_bind12 = __toESM(require("auto-bind"), 1);
7443
8152
 
7444
8153
  // src/objects/AccountToApiTokensConnection.ts
7445
8154
  var AccountToApiTokensConnectionFromJson = (obj) => {
@@ -7456,12 +8165,20 @@ var AccountToApiTokensConnectionFromJson = (obj) => {
7456
8165
  };
7457
8166
 
7458
8167
  // src/objects/AccountToChannelsConnection.ts
7459
- var import_auto_bind11 = __toESM(require("auto-bind"), 1);
8168
+ var import_auto_bind10 = __toESM(require("auto-bind"), 1);
7460
8169
  var AccountToChannelsConnection = class {
7461
8170
  constructor(count, entities) {
7462
8171
  this.count = count;
7463
8172
  this.entities = entities;
7464
- (0, import_auto_bind11.default)(this);
8173
+ (0, import_auto_bind10.default)(this);
8174
+ }
8175
+ toJson() {
8176
+ return {
8177
+ account_to_channels_connection_count: this.count,
8178
+ account_to_channels_connection_entities: this.entities.map(
8179
+ (e) => e.toJson()
8180
+ )
8181
+ };
7465
8182
  }
7466
8183
  };
7467
8184
  var AccountToChannelsConnectionFromJson = (obj) => {
@@ -7476,200 +8193,6 @@ var AccountToChannelsConnection_default = AccountToChannelsConnection;
7476
8193
 
7477
8194
  // src/objects/LightsparkNode.ts
7478
8195
  var import_core8 = require("@lightsparkdev/core");
7479
- var import_auto_bind12 = __toESM(require("auto-bind"), 1);
7480
- var LightsparkNode = class {
7481
- constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance) {
7482
- this.id = id;
7483
- this.createdAt = createdAt;
7484
- this.updatedAt = updatedAt;
7485
- this.bitcoinNetwork = bitcoinNetwork;
7486
- this.displayName = displayName;
7487
- this.ownerId = ownerId;
7488
- this.umaPrescreeningUtxos = umaPrescreeningUtxos;
7489
- this.typename = typename;
7490
- this.alias = alias;
7491
- this.color = color;
7492
- this.conductivity = conductivity;
7493
- this.publicKey = publicKey;
7494
- this.status = status;
7495
- this.totalBalance = totalBalance;
7496
- this.totalLocalBalance = totalLocalBalance;
7497
- this.localBalance = localBalance;
7498
- this.remoteBalance = remoteBalance;
7499
- this.blockchainBalance = blockchainBalance;
7500
- (0, import_auto_bind12.default)(this);
7501
- }
7502
- async getAddresses(client, first = void 0, types = void 0) {
7503
- return await client.executeRawQuery({
7504
- queryPayload: `
7505
- query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [NodeAddressType!]) {
7506
- entity(id: $entity_id) {
7507
- ... on LightsparkNode {
7508
- addresses(, first: $first, types: $types) {
7509
- __typename
7510
- node_to_addresses_connection_count: count
7511
- node_to_addresses_connection_entities: entities {
7512
- __typename
7513
- node_address_address: address
7514
- node_address_type: type
7515
- }
7516
- }
7517
- }
7518
- }
7519
- }
7520
- `,
7521
- variables: { entity_id: this.id, first, types },
7522
- constructObject: (json) => {
7523
- const connection = json["entity"]["addresses"];
7524
- return NodeToAddressesConnectionFromJson(connection);
7525
- }
7526
- });
7527
- }
7528
- async getChannels(client, first = void 0, statuses = void 0, after = void 0) {
7529
- return await client.executeRawQuery({
7530
- queryPayload: `
7531
- query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) {
7532
- entity(id: $entity_id) {
7533
- ... on LightsparkNode {
7534
- channels(, first: $first, statuses: $statuses, after: $after) {
7535
- __typename
7536
- lightspark_node_to_channels_connection_count: count
7537
- lightspark_node_to_channels_connection_page_info: page_info {
7538
- __typename
7539
- page_info_has_next_page: has_next_page
7540
- page_info_has_previous_page: has_previous_page
7541
- page_info_start_cursor: start_cursor
7542
- page_info_end_cursor: end_cursor
7543
- }
7544
- lightspark_node_to_channels_connection_entities: entities {
7545
- __typename
7546
- channel_id: id
7547
- channel_created_at: created_at
7548
- channel_updated_at: updated_at
7549
- channel_funding_transaction: funding_transaction {
7550
- id
7551
- }
7552
- channel_capacity: capacity {
7553
- __typename
7554
- currency_amount_original_value: original_value
7555
- currency_amount_original_unit: original_unit
7556
- currency_amount_preferred_currency_unit: preferred_currency_unit
7557
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7558
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7559
- }
7560
- channel_local_balance: local_balance {
7561
- __typename
7562
- currency_amount_original_value: original_value
7563
- currency_amount_original_unit: original_unit
7564
- currency_amount_preferred_currency_unit: preferred_currency_unit
7565
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7566
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7567
- }
7568
- channel_local_unsettled_balance: local_unsettled_balance {
7569
- __typename
7570
- currency_amount_original_value: original_value
7571
- currency_amount_original_unit: original_unit
7572
- currency_amount_preferred_currency_unit: preferred_currency_unit
7573
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7574
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7575
- }
7576
- channel_remote_balance: remote_balance {
7577
- __typename
7578
- currency_amount_original_value: original_value
7579
- currency_amount_original_unit: original_unit
7580
- currency_amount_preferred_currency_unit: preferred_currency_unit
7581
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7582
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7583
- }
7584
- channel_remote_unsettled_balance: remote_unsettled_balance {
7585
- __typename
7586
- currency_amount_original_value: original_value
7587
- currency_amount_original_unit: original_unit
7588
- currency_amount_preferred_currency_unit: preferred_currency_unit
7589
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7590
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7591
- }
7592
- channel_unsettled_balance: unsettled_balance {
7593
- __typename
7594
- currency_amount_original_value: original_value
7595
- currency_amount_original_unit: original_unit
7596
- currency_amount_preferred_currency_unit: preferred_currency_unit
7597
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7598
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7599
- }
7600
- channel_total_balance: total_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
- channel_status: status
7609
- channel_estimated_force_closure_wait_minutes: estimated_force_closure_wait_minutes
7610
- channel_commit_fee: commit_fee {
7611
- __typename
7612
- currency_amount_original_value: original_value
7613
- currency_amount_original_unit: original_unit
7614
- currency_amount_preferred_currency_unit: preferred_currency_unit
7615
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7616
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7617
- }
7618
- channel_fees: fees {
7619
- __typename
7620
- channel_fees_base_fee: base_fee {
7621
- __typename
7622
- currency_amount_original_value: original_value
7623
- currency_amount_original_unit: original_unit
7624
- currency_amount_preferred_currency_unit: preferred_currency_unit
7625
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
7626
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
7627
- }
7628
- channel_fees_fee_rate_per_mil: fee_rate_per_mil
7629
- }
7630
- channel_remote_node: remote_node {
7631
- id
7632
- }
7633
- channel_local_node: local_node {
7634
- id
7635
- }
7636
- channel_short_channel_id: short_channel_id
7637
- }
7638
- }
7639
- }
7640
- }
7641
- }
7642
- `,
7643
- variables: {
7644
- entity_id: this.id,
7645
- first,
7646
- statuses,
7647
- after
7648
- },
7649
- constructObject: (json) => {
7650
- const connection = json["entity"]["channels"];
7651
- return LightsparkNodeToChannelsConnectionFromJson(connection);
7652
- }
7653
- });
7654
- }
7655
- static getLightsparkNodeQuery(id) {
7656
- return {
7657
- queryPayload: `
7658
- query GetLightsparkNode($id: ID!) {
7659
- entity(id: $id) {
7660
- ... on LightsparkNode {
7661
- ...LightsparkNodeFragment
7662
- }
7663
- }
7664
- }
7665
-
7666
- ${FRAGMENT23}
7667
- `,
7668
- variables: { id },
7669
- constructObject: (data) => LightsparkNodeFromJson(data.entity)
7670
- };
7671
- }
7672
- };
7673
8196
  var LightsparkNodeFromJson = (obj) => {
7674
8197
  if (obj["__typename"] == "LightsparkNodeWithOSK") {
7675
8198
  return new LightsparkNodeWithOSK_default(
@@ -7701,6 +8224,7 @@ var LightsparkNodeFromJson = (obj) => {
7701
8224
  !!obj["lightspark_node_with_o_s_k_blockchain_balance"] ? BlockchainBalanceFromJson(
7702
8225
  obj["lightspark_node_with_o_s_k_blockchain_balance"]
7703
8226
  ) : void 0,
8227
+ !!obj["lightspark_node_with_o_s_k_balances"] ? BalancesFromJson(obj["lightspark_node_with_o_s_k_balances"]) : void 0,
7704
8228
  !!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"] ? SecretFromJson(
7705
8229
  obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
7706
8230
  ) : void 0
@@ -7735,7 +8259,8 @@ var LightsparkNodeFromJson = (obj) => {
7735
8259
  ) : void 0,
7736
8260
  !!obj["lightspark_node_with_remote_signing_blockchain_balance"] ? BlockchainBalanceFromJson(
7737
8261
  obj["lightspark_node_with_remote_signing_blockchain_balance"]
7738
- ) : void 0
8262
+ ) : void 0,
8263
+ !!obj["lightspark_node_with_remote_signing_balances"] ? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"]) : void 0
7739
8264
  );
7740
8265
  }
7741
8266
  throw new import_core8.LightsparkException(
@@ -7845,6 +8370,33 @@ fragment LightsparkNodeFragment on LightsparkNode {
7845
8370
  }
7846
8371
  }
7847
8372
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
8373
+ lightspark_node_with_o_s_k_balances: balances {
8374
+ __typename
8375
+ balances_owned_balance: owned_balance {
8376
+ __typename
8377
+ currency_amount_original_value: original_value
8378
+ currency_amount_original_unit: original_unit
8379
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8380
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8381
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8382
+ }
8383
+ balances_available_to_send_balance: available_to_send_balance {
8384
+ __typename
8385
+ currency_amount_original_value: original_value
8386
+ currency_amount_original_unit: original_unit
8387
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8388
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8389
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8390
+ }
8391
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
8392
+ __typename
8393
+ currency_amount_original_value: original_value
8394
+ currency_amount_original_unit: original_unit
8395
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8396
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8397
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8398
+ }
8399
+ }
7848
8400
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
7849
8401
  __typename
7850
8402
  secret_encrypted_value: encrypted_value
@@ -7950,9 +8502,52 @@ fragment LightsparkNodeFragment on LightsparkNode {
7950
8502
  }
7951
8503
  }
7952
8504
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
8505
+ lightspark_node_with_remote_signing_balances: balances {
8506
+ __typename
8507
+ balances_owned_balance: owned_balance {
8508
+ __typename
8509
+ currency_amount_original_value: original_value
8510
+ currency_amount_original_unit: original_unit
8511
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8512
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8513
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8514
+ }
8515
+ balances_available_to_send_balance: available_to_send_balance {
8516
+ __typename
8517
+ currency_amount_original_value: original_value
8518
+ currency_amount_original_unit: original_unit
8519
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8520
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8521
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8522
+ }
8523
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
8524
+ __typename
8525
+ currency_amount_original_value: original_value
8526
+ currency_amount_original_unit: original_unit
8527
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8528
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8529
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8530
+ }
8531
+ }
7953
8532
  }
7954
8533
  }`;
7955
- var LightsparkNode_default = LightsparkNode;
8534
+ var getLightsparkNodeQuery = (id) => {
8535
+ return {
8536
+ queryPayload: `
8537
+ query GetLightsparkNode($id: ID!) {
8538
+ entity(id: $id) {
8539
+ ... on LightsparkNode {
8540
+ ...LightsparkNodeFragment
8541
+ }
8542
+ }
8543
+ }
8544
+
8545
+ ${FRAGMENT23}
8546
+ `,
8547
+ variables: { id },
8548
+ constructObject: (data) => LightsparkNodeFromJson(data.entity)
8549
+ };
8550
+ };
7956
8551
 
7957
8552
  // src/objects/AccountToNodesConnection.ts
7958
8553
  var AccountToNodesConnectionFromJson = (obj) => {
@@ -8004,20 +8599,7 @@ var AccountToTransactionsConnectionFromJson = (obj) => {
8004
8599
  };
8005
8600
 
8006
8601
  // src/objects/Wallet.ts
8007
- var import_auto_bind13 = __toESM(require("auto-bind"), 1);
8008
-
8009
- // src/objects/Balances.ts
8010
- var BalancesFromJson = (obj) => {
8011
- return {
8012
- ownedBalance: CurrencyAmountFromJson(obj["balances_owned_balance"]),
8013
- availableToSendBalance: CurrencyAmountFromJson(
8014
- obj["balances_available_to_send_balance"]
8015
- ),
8016
- availableToWithdrawBalance: CurrencyAmountFromJson(
8017
- obj["balances_available_to_withdraw_balance"]
8018
- )
8019
- };
8020
- };
8602
+ var import_auto_bind11 = __toESM(require("auto-bind"), 1);
8021
8603
 
8022
8604
  // src/objects/WalletStatus.ts
8023
8605
  var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
@@ -8075,7 +8657,7 @@ var Wallet = class {
8075
8657
  this.lastLoginAt = lastLoginAt;
8076
8658
  this.balances = balances;
8077
8659
  this.accountId = accountId;
8078
- (0, import_auto_bind13.default)(this);
8660
+ (0, import_auto_bind11.default)(this);
8079
8661
  }
8080
8662
  async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
8081
8663
  return await client.executeRawQuery({
@@ -8387,6 +8969,33 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
8387
8969
  }
8388
8970
  }
8389
8971
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
8972
+ lightspark_node_with_o_s_k_balances: balances {
8973
+ __typename
8974
+ balances_owned_balance: owned_balance {
8975
+ __typename
8976
+ currency_amount_original_value: original_value
8977
+ currency_amount_original_unit: original_unit
8978
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8979
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8980
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8981
+ }
8982
+ balances_available_to_send_balance: available_to_send_balance {
8983
+ __typename
8984
+ currency_amount_original_value: original_value
8985
+ currency_amount_original_unit: original_unit
8986
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8987
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8988
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8989
+ }
8990
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
8991
+ __typename
8992
+ currency_amount_original_value: original_value
8993
+ currency_amount_original_unit: original_unit
8994
+ currency_amount_preferred_currency_unit: preferred_currency_unit
8995
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8996
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8997
+ }
8998
+ }
8390
8999
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
8391
9000
  __typename
8392
9001
  secret_encrypted_value: encrypted_value
@@ -8450,7 +9059,31 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
8450
9059
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8451
9060
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8452
9061
  }
8453
- blockchain_balance_confirmed_balance: confirmed_balance {
9062
+ blockchain_balance_confirmed_balance: confirmed_balance {
9063
+ __typename
9064
+ currency_amount_original_value: original_value
9065
+ currency_amount_original_unit: original_unit
9066
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9067
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9068
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9069
+ }
9070
+ blockchain_balance_unconfirmed_balance: unconfirmed_balance {
9071
+ __typename
9072
+ currency_amount_original_value: original_value
9073
+ currency_amount_original_unit: original_unit
9074
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9075
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9076
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9077
+ }
9078
+ blockchain_balance_locked_balance: locked_balance {
9079
+ __typename
9080
+ currency_amount_original_value: original_value
9081
+ currency_amount_original_unit: original_unit
9082
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9083
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9084
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9085
+ }
9086
+ blockchain_balance_required_reserve: required_reserve {
8454
9087
  __typename
8455
9088
  currency_amount_original_value: original_value
8456
9089
  currency_amount_original_unit: original_unit
@@ -8458,7 +9091,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
8458
9091
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8459
9092
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8460
9093
  }
8461
- blockchain_balance_unconfirmed_balance: unconfirmed_balance {
9094
+ blockchain_balance_available_balance: available_balance {
8462
9095
  __typename
8463
9096
  currency_amount_original_value: original_value
8464
9097
  currency_amount_original_unit: original_unit
@@ -8466,7 +9099,11 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
8466
9099
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8467
9100
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8468
9101
  }
8469
- blockchain_balance_locked_balance: locked_balance {
9102
+ }
9103
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
9104
+ lightspark_node_with_remote_signing_balances: balances {
9105
+ __typename
9106
+ balances_owned_balance: owned_balance {
8470
9107
  __typename
8471
9108
  currency_amount_original_value: original_value
8472
9109
  currency_amount_original_unit: original_unit
@@ -8474,7 +9111,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
8474
9111
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8475
9112
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8476
9113
  }
8477
- blockchain_balance_required_reserve: required_reserve {
9114
+ balances_available_to_send_balance: available_to_send_balance {
8478
9115
  __typename
8479
9116
  currency_amount_original_value: original_value
8480
9117
  currency_amount_original_unit: original_unit
@@ -8482,7 +9119,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
8482
9119
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
8483
9120
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8484
9121
  }
8485
- blockchain_balance_available_balance: available_balance {
9122
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
8486
9123
  __typename
8487
9124
  currency_amount_original_value: original_value
8488
9125
  currency_amount_original_unit: original_unit
@@ -8491,7 +9128,6 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
8491
9128
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
8492
9129
  }
8493
9130
  }
8494
- lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
8495
9131
  }
8496
9132
  }
8497
9133
  }
@@ -8756,6 +9392,33 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte
8756
9392
  }
8757
9393
  }
8758
9394
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
9395
+ lightspark_node_with_o_s_k_balances: balances {
9396
+ __typename
9397
+ balances_owned_balance: owned_balance {
9398
+ __typename
9399
+ currency_amount_original_value: original_value
9400
+ currency_amount_original_unit: original_unit
9401
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9402
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9403
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9404
+ }
9405
+ balances_available_to_send_balance: available_to_send_balance {
9406
+ __typename
9407
+ currency_amount_original_value: original_value
9408
+ currency_amount_original_unit: original_unit
9409
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9410
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9411
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9412
+ }
9413
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
9414
+ __typename
9415
+ currency_amount_original_value: original_value
9416
+ currency_amount_original_unit: original_unit
9417
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9418
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9419
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9420
+ }
9421
+ }
8759
9422
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
8760
9423
  __typename
8761
9424
  secret_encrypted_value: encrypted_value
@@ -8861,6 +9524,33 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte
8861
9524
  }
8862
9525
  }
8863
9526
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
9527
+ lightspark_node_with_remote_signing_balances: balances {
9528
+ __typename
9529
+ balances_owned_balance: owned_balance {
9530
+ __typename
9531
+ currency_amount_original_value: original_value
9532
+ currency_amount_original_unit: original_unit
9533
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9534
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9535
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9536
+ }
9537
+ balances_available_to_send_balance: available_to_send_balance {
9538
+ __typename
9539
+ currency_amount_original_value: original_value
9540
+ currency_amount_original_unit: original_unit
9541
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9542
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9543
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9544
+ }
9545
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
9546
+ __typename
9547
+ currency_amount_original_value: original_value
9548
+ currency_amount_original_unit: original_unit
9549
+ currency_amount_preferred_currency_unit: preferred_currency_unit
9550
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
9551
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
9552
+ }
9553
+ }
8864
9554
  }
8865
9555
  }
8866
9556
  }
@@ -8968,6 +9658,19 @@ ${FRAGMENT24}
8968
9658
  constructObject: (data) => WalletFromJson(data.entity)
8969
9659
  };
8970
9660
  }
9661
+ toJson() {
9662
+ return {
9663
+ __typename: "Wallet",
9664
+ wallet_id: this.id,
9665
+ wallet_created_at: this.createdAt,
9666
+ wallet_updated_at: this.updatedAt,
9667
+ wallet_last_login_at: this.lastLoginAt,
9668
+ wallet_balances: this.balances ? BalancesToJson(this.balances) : void 0,
9669
+ wallet_third_party_identifier: this.thirdPartyIdentifier,
9670
+ wallet_account: { id: this.accountId },
9671
+ wallet_status: this.status
9672
+ };
9673
+ }
8971
9674
  };
8972
9675
  var WalletFromJson = (obj) => {
8973
9676
  return new Wallet(
@@ -9044,7 +9747,7 @@ var Account = class {
9044
9747
  this.updatedAt = updatedAt;
9045
9748
  this.typename = typename;
9046
9749
  this.name = name;
9047
- (0, import_auto_bind14.default)(this);
9750
+ (0, import_auto_bind12.default)(this);
9048
9751
  }
9049
9752
  async getApiTokens(client, first = void 0, after = void 0) {
9050
9753
  return await client.executeRawQuery({
@@ -9311,6 +10014,33 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
9311
10014
  }
9312
10015
  }
9313
10016
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
10017
+ lightspark_node_with_o_s_k_balances: balances {
10018
+ __typename
10019
+ balances_owned_balance: owned_balance {
10020
+ __typename
10021
+ currency_amount_original_value: original_value
10022
+ currency_amount_original_unit: original_unit
10023
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10024
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10025
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10026
+ }
10027
+ balances_available_to_send_balance: available_to_send_balance {
10028
+ __typename
10029
+ currency_amount_original_value: original_value
10030
+ currency_amount_original_unit: original_unit
10031
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10032
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10033
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10034
+ }
10035
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
10036
+ __typename
10037
+ currency_amount_original_value: original_value
10038
+ currency_amount_original_unit: original_unit
10039
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10040
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10041
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10042
+ }
10043
+ }
9314
10044
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
9315
10045
  __typename
9316
10046
  secret_encrypted_value: encrypted_value
@@ -9416,6 +10146,33 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
9416
10146
  }
9417
10147
  }
9418
10148
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
10149
+ lightspark_node_with_remote_signing_balances: balances {
10150
+ __typename
10151
+ balances_owned_balance: owned_balance {
10152
+ __typename
10153
+ currency_amount_original_value: original_value
10154
+ currency_amount_original_unit: original_unit
10155
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10156
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10157
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10158
+ }
10159
+ balances_available_to_send_balance: available_to_send_balance {
10160
+ __typename
10161
+ currency_amount_original_value: original_value
10162
+ currency_amount_original_unit: original_unit
10163
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10164
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10165
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10166
+ }
10167
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
10168
+ __typename
10169
+ currency_amount_original_value: original_value
10170
+ currency_amount_original_unit: original_unit
10171
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10172
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10173
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10174
+ }
10175
+ }
9419
10176
  }
9420
10177
  }
9421
10178
  }
@@ -9938,6 +10695,33 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
9938
10695
  }
9939
10696
  }
9940
10697
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
10698
+ lightspark_node_with_o_s_k_balances: balances {
10699
+ __typename
10700
+ balances_owned_balance: owned_balance {
10701
+ __typename
10702
+ currency_amount_original_value: original_value
10703
+ currency_amount_original_unit: original_unit
10704
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10705
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10706
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10707
+ }
10708
+ balances_available_to_send_balance: available_to_send_balance {
10709
+ __typename
10710
+ currency_amount_original_value: original_value
10711
+ currency_amount_original_unit: original_unit
10712
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10713
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10714
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10715
+ }
10716
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
10717
+ __typename
10718
+ currency_amount_original_value: original_value
10719
+ currency_amount_original_unit: original_unit
10720
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10721
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10722
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10723
+ }
10724
+ }
9941
10725
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
9942
10726
  __typename
9943
10727
  secret_encrypted_value: encrypted_value
@@ -10043,6 +10827,33 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
10043
10827
  }
10044
10828
  }
10045
10829
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
10830
+ lightspark_node_with_remote_signing_balances: balances {
10831
+ __typename
10832
+ balances_owned_balance: owned_balance {
10833
+ __typename
10834
+ currency_amount_original_value: original_value
10835
+ currency_amount_original_unit: original_unit
10836
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10837
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10838
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10839
+ }
10840
+ balances_available_to_send_balance: available_to_send_balance {
10841
+ __typename
10842
+ currency_amount_original_value: original_value
10843
+ currency_amount_original_unit: original_unit
10844
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10845
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10846
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10847
+ }
10848
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
10849
+ __typename
10850
+ currency_amount_original_value: original_value
10851
+ currency_amount_original_unit: original_unit
10852
+ currency_amount_preferred_currency_unit: preferred_currency_unit
10853
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
10854
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
10855
+ }
10856
+ }
10046
10857
  }
10047
10858
  }
10048
10859
  }
@@ -10309,6 +11120,33 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
10309
11120
  }
10310
11121
  }
10311
11122
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
11123
+ lightspark_node_with_o_s_k_balances: balances {
11124
+ __typename
11125
+ balances_owned_balance: owned_balance {
11126
+ __typename
11127
+ currency_amount_original_value: original_value
11128
+ currency_amount_original_unit: original_unit
11129
+ currency_amount_preferred_currency_unit: preferred_currency_unit
11130
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
11131
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
11132
+ }
11133
+ balances_available_to_send_balance: available_to_send_balance {
11134
+ __typename
11135
+ currency_amount_original_value: original_value
11136
+ currency_amount_original_unit: original_unit
11137
+ currency_amount_preferred_currency_unit: preferred_currency_unit
11138
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
11139
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
11140
+ }
11141
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
11142
+ __typename
11143
+ currency_amount_original_value: original_value
11144
+ currency_amount_original_unit: original_unit
11145
+ currency_amount_preferred_currency_unit: preferred_currency_unit
11146
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
11147
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
11148
+ }
11149
+ }
10312
11150
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
10313
11151
  __typename
10314
11152
  secret_encrypted_value: encrypted_value
@@ -10414,6 +11252,33 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
10414
11252
  }
10415
11253
  }
10416
11254
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
11255
+ lightspark_node_with_remote_signing_balances: balances {
11256
+ __typename
11257
+ balances_owned_balance: owned_balance {
11258
+ __typename
11259
+ currency_amount_original_value: original_value
11260
+ currency_amount_original_unit: original_unit
11261
+ currency_amount_preferred_currency_unit: preferred_currency_unit
11262
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
11263
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
11264
+ }
11265
+ balances_available_to_send_balance: available_to_send_balance {
11266
+ __typename
11267
+ currency_amount_original_value: original_value
11268
+ currency_amount_original_unit: original_unit
11269
+ currency_amount_preferred_currency_unit: preferred_currency_unit
11270
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
11271
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
11272
+ }
11273
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
11274
+ __typename
11275
+ currency_amount_original_value: original_value
11276
+ currency_amount_original_unit: original_unit
11277
+ currency_amount_preferred_currency_unit: preferred_currency_unit
11278
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
11279
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
11280
+ }
11281
+ }
10417
11282
  }
10418
11283
  }
10419
11284
  }
@@ -10531,6 +11396,15 @@ ${FRAGMENT25}
10531
11396
  constructObject: (data) => AccountFromJson(data.current_account)
10532
11397
  };
10533
11398
  }
11399
+ toJson() {
11400
+ return {
11401
+ __typename: "Account",
11402
+ account_id: this.id,
11403
+ account_created_at: this.createdAt,
11404
+ account_updated_at: this.updatedAt,
11405
+ account_name: this.name
11406
+ };
11407
+ }
10534
11408
  };
10535
11409
  var AccountFromJson = (obj) => {
10536
11410
  return new Account(
@@ -10589,7 +11463,7 @@ var LightsparkClient = class {
10589
11463
  serverUrl,
10590
11464
  this.cryptoImpl
10591
11465
  );
10592
- (0, import_auto_bind15.default)(this);
11466
+ (0, import_auto_bind13.default)(this);
10593
11467
  }
10594
11468
  requester;
10595
11469
  nodeKeyCache;
@@ -11775,6 +12649,33 @@ fragment LightningTransactionFragment on LightningTransaction {
11775
12649
  }
11776
12650
  }
11777
12651
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
12652
+ lightspark_node_with_o_s_k_balances: balances {
12653
+ __typename
12654
+ balances_owned_balance: owned_balance {
12655
+ __typename
12656
+ currency_amount_original_value: original_value
12657
+ currency_amount_original_unit: original_unit
12658
+ currency_amount_preferred_currency_unit: preferred_currency_unit
12659
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
12660
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
12661
+ }
12662
+ balances_available_to_send_balance: available_to_send_balance {
12663
+ __typename
12664
+ currency_amount_original_value: original_value
12665
+ currency_amount_original_unit: original_unit
12666
+ currency_amount_preferred_currency_unit: preferred_currency_unit
12667
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
12668
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
12669
+ }
12670
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
12671
+ __typename
12672
+ currency_amount_original_value: original_value
12673
+ currency_amount_original_unit: original_unit
12674
+ currency_amount_preferred_currency_unit: preferred_currency_unit
12675
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
12676
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
12677
+ }
12678
+ }
11778
12679
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
11779
12680
  __typename
11780
12681
  secret_encrypted_value: encrypted_value
@@ -11880,6 +12781,33 @@ fragment LightningTransactionFragment on LightningTransaction {
11880
12781
  }
11881
12782
  }
11882
12783
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
12784
+ lightspark_node_with_remote_signing_balances: balances {
12785
+ __typename
12786
+ balances_owned_balance: owned_balance {
12787
+ __typename
12788
+ currency_amount_original_value: original_value
12789
+ currency_amount_original_unit: original_unit
12790
+ currency_amount_preferred_currency_unit: preferred_currency_unit
12791
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
12792
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
12793
+ }
12794
+ balances_available_to_send_balance: available_to_send_balance {
12795
+ __typename
12796
+ currency_amount_original_value: original_value
12797
+ currency_amount_original_unit: original_unit
12798
+ currency_amount_preferred_currency_unit: preferred_currency_unit
12799
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
12800
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
12801
+ }
12802
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
12803
+ __typename
12804
+ currency_amount_original_value: original_value
12805
+ currency_amount_original_unit: original_unit
12806
+ currency_amount_preferred_currency_unit: preferred_currency_unit
12807
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
12808
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
12809
+ }
12810
+ }
11883
12811
  }
11884
12812
  }
11885
12813
  }
@@ -12600,11 +13528,9 @@ var RemoteSigningWebhookHandler = class {
12600
13528
  IncomingPaymentAttemptStatus,
12601
13529
  InvoiceType,
12602
13530
  LightsparkClient,
12603
- LightsparkNode,
12604
13531
  LightsparkNodeStatus,
12605
13532
  LightsparkNodeWithOSK,
12606
13533
  LightsparkNodeWithRemoteSigning,
12607
- Node,
12608
13534
  NodeAddressType,
12609
13535
  OutgoingPayment,
12610
13536
  OutgoingPaymentAttempt,
@@ -12638,6 +13564,8 @@ var RemoteSigningWebhookHandler = class {
12638
13564
  getInvoiceQuery,
12639
13565
  getLightningTransactionQuery,
12640
13566
  getLightsparkNodeOwnerQuery,
13567
+ getLightsparkNodeQuery,
13568
+ getNodeQuery,
12641
13569
  getOnChainTransactionQuery,
12642
13570
  getPaymentRequestQuery,
12643
13571
  getRoutingTransactionQuery,