@lightsparkdev/lightspark-sdk 0.4.10 → 1.0.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 (125) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-NXUFC5J7.js → chunk-LZC5C5NI.js} +2908 -635
  4. package/dist/{index-3ffe9e7b.d.ts → index-09d4ac20.d.ts} +373 -62
  5. package/dist/index.cjs +3395 -842
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +390 -94
  8. package/dist/objects/index.cjs +2735 -553
  9. package/dist/objects/index.d.ts +1 -1
  10. package/dist/objects/index.js +17 -5
  11. package/package.json +12 -9
  12. package/src/NodeKeyLoaderCache.ts +87 -0
  13. package/src/SigningKeyLoader.ts +177 -0
  14. package/src/auth/AccountTokenAuthProvider.ts +4 -4
  15. package/src/client.ts +209 -118
  16. package/src/graphql/CreateInvoice.ts +3 -2
  17. package/src/graphql/CreateLnurlInvoice.ts +2 -0
  18. package/src/graphql/CreateUmaInvoice.ts +23 -0
  19. package/src/graphql/MultiNodeDashboard.ts +0 -3
  20. package/src/graphql/PayUmaInvoice.ts +29 -0
  21. package/src/graphql/RecoverNodeSigningKey.ts +1 -1
  22. package/src/graphql/SingleNodeDashboard.ts +0 -1
  23. package/src/lightspark_crypto/lightspark_crypto.d.ts +157 -0
  24. package/src/lightspark_crypto/lightspark_crypto.js +1010 -0
  25. package/src/lightspark_crypto/lightspark_crypto_bg.wasm +0 -0
  26. package/src/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts +120 -0
  27. package/src/lightspark_crypto/package.json +11 -0
  28. package/src/objects/Account.ts +437 -120
  29. package/src/objects/AccountToApiTokensConnection.ts +3 -3
  30. package/src/objects/AccountToChannelsConnection.ts +4 -4
  31. package/src/objects/AccountToNodesConnection.ts +2 -15
  32. package/src/objects/AccountToPaymentRequestsConnection.ts +3 -3
  33. package/src/objects/AccountToTransactionsConnection.ts +6 -6
  34. package/src/objects/AccountToWalletsConnection.ts +2 -2
  35. package/src/objects/Balances.ts +2 -2
  36. package/src/objects/Channel.ts +4 -4
  37. package/src/objects/ChannelClosingTransaction.ts +2 -2
  38. package/src/objects/ChannelOpeningTransaction.ts +2 -2
  39. package/src/objects/ChannelToTransactionsConnection.ts +4 -4
  40. package/src/objects/{CryptoSanctionsScreeningProvider.ts → ComplianceProvider.ts} +3 -3
  41. package/src/objects/Connection.ts +25 -31
  42. package/src/objects/CreateApiTokenInput.ts +1 -1
  43. package/src/objects/CreateApiTokenOutput.ts +1 -1
  44. package/src/objects/CreateInvoiceInput.ts +0 -6
  45. package/src/objects/CreateLnurlInvoiceInput.ts +1 -7
  46. package/src/objects/CreateNodeWalletAddressInput.ts +1 -1
  47. package/src/objects/CreateNodeWalletAddressOutput.ts +1 -1
  48. package/src/objects/CreateTestModeInvoiceInput.ts +1 -1
  49. package/src/objects/CreateTestModeInvoiceOutput.ts +1 -1
  50. package/src/objects/CreateTestModePaymentInput.ts +1 -1
  51. package/src/objects/CreateTestModePaymentoutput.ts +14 -2
  52. package/src/objects/CreateUmaInvoiceInput.ts +24 -0
  53. package/src/objects/DeclineToSignMessagesInput.ts +16 -0
  54. package/src/objects/DeclineToSignMessagesOutput.ts +28 -0
  55. package/src/objects/DeleteApiTokenOutput.ts +1 -1
  56. package/src/objects/Entity.ts +401 -66
  57. package/src/objects/GraphNode.ts +3 -3
  58. package/src/objects/IdAndSignature.ts +16 -0
  59. package/src/objects/IncomingPayment.ts +21 -8
  60. package/src/objects/IncomingPaymentAttempt.ts +2 -2
  61. package/src/objects/IncomingPaymentToAttemptsConnection.ts +3 -3
  62. package/src/objects/Invoice.ts +118 -21
  63. package/src/objects/InvoiceData.ts +118 -21
  64. package/src/objects/LightningFeeEstimateForInvoiceInput.ts +1 -1
  65. package/src/objects/LightningFeeEstimateForNodeInput.ts +1 -1
  66. package/src/objects/LightningFeeEstimateOutput.ts +2 -2
  67. package/src/objects/LightningTransaction.ts +155 -31
  68. package/src/objects/LightsparkNode.ts +272 -112
  69. package/src/objects/LightsparkNodeOwner.ts +8 -4
  70. package/src/objects/LightsparkNodeToChannelsConnection.ts +3 -3
  71. package/src/objects/LightsparkNodeWithOSK.ts +389 -0
  72. package/src/objects/LightsparkNodeWithRemoteSigning.ts +384 -0
  73. package/src/objects/Node.ts +213 -60
  74. package/src/objects/NodeToAddressesConnection.ts +2 -2
  75. package/src/objects/OnChainTransaction.ts +2 -2
  76. package/src/objects/OutgoingPayment.ts +139 -24
  77. package/src/objects/OutgoingPaymentAttempt.ts +5 -5
  78. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +3 -3
  79. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +3 -3
  80. package/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts +25 -0
  81. package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +28 -0
  82. package/src/objects/PayUmaInvoiceInput.ts +25 -0
  83. package/src/objects/{LightsparkNodePurpose.ts → PaymentDirection.ts} +5 -7
  84. package/src/objects/PaymentRequest.ts +119 -22
  85. package/src/objects/PaymentRequestData.ts +119 -22
  86. package/src/objects/PostTransactionData.ts +39 -0
  87. package/src/objects/RegisterPaymentInput.ts +31 -0
  88. package/src/objects/RegisterPaymentOutput.ts +23 -0
  89. package/src/objects/ReleaseChannelPerCommitmentSecretInput.ts +23 -0
  90. package/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts +23 -0
  91. package/src/objects/ReleasePaymentPreimageInput.ts +20 -0
  92. package/src/objects/ReleasePaymentPreimageOutput.ts +23 -0
  93. package/src/objects/RemoteSigningSubEventType.ts +26 -0
  94. package/src/objects/RequestWithdrawalInput.ts +1 -1
  95. package/src/objects/RequestWithdrawalOutput.ts +1 -1
  96. package/src/objects/RoutingTransaction.ts +1 -1
  97. package/src/objects/ScreenNodeInput.ts +20 -0
  98. package/src/objects/ScreenNodeOutput.ts +22 -0
  99. package/src/objects/SetInvoicePaymentHashInput.ts +24 -0
  100. package/src/objects/SetInvoicePaymentHashOutput.ts +23 -0
  101. package/src/objects/SignInvoiceInput.ts +19 -0
  102. package/src/objects/SignInvoiceOutput.ts +21 -0
  103. package/src/objects/SignMessagesInput.ts +18 -0
  104. package/src/objects/SignMessagesOutput.ts +26 -0
  105. package/src/objects/Signable.ts +58 -0
  106. package/src/objects/SignablePayload.ts +93 -0
  107. package/src/objects/SignablePayloadStatus.ts +17 -0
  108. package/src/objects/SingleNodeDashboard.ts +0 -2
  109. package/src/objects/Transaction.ts +153 -29
  110. package/src/objects/TransactionFailures.ts +1 -1
  111. package/src/objects/UpdateChannelPerCommitmentPointInput.ts +25 -0
  112. package/src/objects/UpdateChannelPerCommitmentPointOutput.ts +23 -0
  113. package/src/objects/UpdateNodeSharedSecretInput.ts +18 -0
  114. package/src/objects/UpdateNodeSharedSecretOutput.ts +23 -0
  115. package/src/objects/Wallet.ts +271 -51
  116. package/src/objects/WalletToPaymentRequestsConnection.ts +3 -3
  117. package/src/objects/WalletToTransactionsConnection.ts +3 -3
  118. package/src/objects/WithdrawalRequest.ts +6 -6
  119. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +2 -2
  120. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +2 -2
  121. package/src/objects/index.ts +37 -4
  122. package/src/{__tests__ → tests}/webhooks.test.ts +1 -1
  123. package/src/webhooks.ts +1 -1
  124. package/src/objects/ScreenBitcoinAddressesInput.ts +0 -23
  125. package/src/objects/ScreenBitcoinAddressesOutput.ts +0 -25
@@ -21,7 +21,7 @@ class GraphNode implements Node {
21
21
  public readonly alias?: string,
22
22
  public readonly color?: string,
23
23
  public readonly conductivity?: number,
24
- public readonly publicKey?: string
24
+ public readonly publicKey?: string,
25
25
  ) {
26
26
  autoBind(this);
27
27
  }
@@ -29,7 +29,7 @@ class GraphNode implements Node {
29
29
  public async getAddresses(
30
30
  client: LightsparkClient,
31
31
  first: number | undefined = undefined,
32
- types: NodeAddressType[] | undefined = undefined
32
+ types: NodeAddressType[] | undefined = undefined,
33
33
  ): Promise<NodeToAddressesConnection> {
34
34
  return (await client.executeRawQuery({
35
35
  queryPayload: `
@@ -88,7 +88,7 @@ export const GraphNodeFromJson = (obj: any): GraphNode => {
88
88
  obj["graph_node_alias"],
89
89
  obj["graph_node_color"],
90
90
  obj["graph_node_conductivity"],
91
- obj["graph_node_public_key"]
91
+ obj["graph_node_public_key"],
92
92
  );
93
93
  };
94
94
 
@@ -0,0 +1,16 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type IdAndSignature = {
4
+ id: string;
5
+
6
+ signature: string;
7
+ };
8
+
9
+ export const IdAndSignatureFromJson = (obj: any): IdAndSignature => {
10
+ return {
11
+ id: obj["id_and_signature_id"],
12
+ signature: obj["id_and_signature_signature"],
13
+ } as IdAndSignature;
14
+ };
15
+
16
+ export default IdAndSignature;
@@ -9,6 +9,8 @@ import type IncomingPaymentAttemptStatus from "./IncomingPaymentAttemptStatus.js
9
9
  import type IncomingPaymentToAttemptsConnection from "./IncomingPaymentToAttemptsConnection.js";
10
10
  import { IncomingPaymentToAttemptsConnectionFromJson } from "./IncomingPaymentToAttemptsConnection.js";
11
11
  import type LightningTransaction from "./LightningTransaction.js";
12
+ import type PostTransactionData from "./PostTransactionData.js";
13
+ import { PostTransactionDataFromJson } from "./PostTransactionData.js";
12
14
  import TransactionStatus from "./TransactionStatus.js";
13
15
 
14
16
  /** This object represents any payment sent to a Lightspark node on the Lightning Network. You can retrieve this object to receive payment related information about a specific payment received by a Lightspark node. **/
@@ -23,8 +25,8 @@ class IncomingPayment implements LightningTransaction {
23
25
  public readonly typename: string,
24
26
  public readonly resolvedAt?: string,
25
27
  public readonly transactionHash?: string,
26
- public readonly originId?: string,
27
- public readonly paymentRequestId?: string
28
+ public readonly paymentRequestId?: string,
29
+ public readonly umaPostTransactionData?: PostTransactionData[],
28
30
  ) {
29
31
  autoBind(this);
30
32
  }
@@ -33,7 +35,7 @@ class IncomingPayment implements LightningTransaction {
33
35
  client: LightsparkClient,
34
36
  first: number | undefined = undefined,
35
37
  statuses: IncomingPaymentAttemptStatus[] | undefined = undefined,
36
- after: string | undefined = undefined
38
+ after: string | undefined = undefined,
37
39
  ): Promise<IncomingPaymentToAttemptsConnection> {
38
40
  return (await client.executeRawQuery({
39
41
  queryPayload: `
@@ -118,8 +120,10 @@ export const IncomingPaymentFromJson = (obj: any): IncomingPayment => {
118
120
  "IncomingPayment",
119
121
  obj["incoming_payment_resolved_at"],
120
122
  obj["incoming_payment_transaction_hash"],
121
- obj["incoming_payment_origin"]?.id ?? undefined,
122
- obj["incoming_payment_payment_request"]?.id ?? undefined
123
+ obj["incoming_payment_payment_request"]?.id ?? undefined,
124
+ obj["incoming_payment_uma_post_transaction_data"]?.map((e) =>
125
+ PostTransactionDataFromJson(e),
126
+ ),
123
127
  );
124
128
  };
125
129
 
@@ -140,15 +144,24 @@ fragment IncomingPaymentFragment on IncomingPayment {
140
144
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
141
145
  }
142
146
  incoming_payment_transaction_hash: transaction_hash
143
- incoming_payment_origin: origin {
144
- id
145
- }
146
147
  incoming_payment_destination: destination {
147
148
  id
148
149
  }
149
150
  incoming_payment_payment_request: payment_request {
150
151
  id
151
152
  }
153
+ incoming_payment_uma_post_transaction_data: uma_post_transaction_data {
154
+ __typename
155
+ post_transaction_data_utxo: utxo
156
+ post_transaction_data_amount: amount {
157
+ __typename
158
+ currency_amount_original_value: original_value
159
+ currency_amount_original_unit: original_unit
160
+ currency_amount_preferred_currency_unit: preferred_currency_unit
161
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
162
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
163
+ }
164
+ }
152
165
  }`;
153
166
 
154
167
  export default IncomingPayment;
@@ -37,7 +37,7 @@ type IncomingPaymentAttempt = Entity & {
37
37
  };
38
38
 
39
39
  export const IncomingPaymentAttemptFromJson = (
40
- obj: any
40
+ obj: any,
41
41
  ): IncomingPaymentAttempt => {
42
42
  return {
43
43
  id: obj["incoming_payment_attempt_id"],
@@ -75,7 +75,7 @@ fragment IncomingPaymentAttemptFragment on IncomingPaymentAttempt {
75
75
  }`;
76
76
 
77
77
  export const getIncomingPaymentAttemptQuery = (
78
- id: string
78
+ id: string,
79
79
  ): Query<IncomingPaymentAttempt> => {
80
80
  return {
81
81
  queryPayload: `
@@ -25,15 +25,15 @@ type IncomingPaymentToAttemptsConnection = Connection & {
25
25
  };
26
26
 
27
27
  export const IncomingPaymentToAttemptsConnectionFromJson = (
28
- obj: any
28
+ obj: any,
29
29
  ): IncomingPaymentToAttemptsConnection => {
30
30
  return {
31
31
  count: obj["incoming_payment_to_attempts_connection_count"],
32
32
  pageInfo: PageInfoFromJson(
33
- obj["incoming_payment_to_attempts_connection_page_info"]
33
+ obj["incoming_payment_to_attempts_connection_page_info"],
34
34
  ),
35
35
  entities: obj["incoming_payment_to_attempts_connection_entities"].map((e) =>
36
- IncomingPaymentAttemptFromJson(e)
36
+ IncomingPaymentAttemptFromJson(e),
37
37
  ),
38
38
  typename: "IncomingPaymentToAttemptsConnection",
39
39
  } as IncomingPaymentToAttemptsConnection;
@@ -89,24 +89,54 @@ fragment InvoiceFragment on Invoice {
89
89
  graph_node_display_name: display_name
90
90
  graph_node_public_key: public_key
91
91
  }
92
- ... on LightsparkNode {
92
+ ... on LightsparkNodeWithOSK {
93
93
  __typename
94
- lightspark_node_id: id
95
- lightspark_node_created_at: created_at
96
- lightspark_node_updated_at: updated_at
97
- lightspark_node_alias: alias
98
- lightspark_node_bitcoin_network: bitcoin_network
99
- lightspark_node_color: color
100
- lightspark_node_conductivity: conductivity
101
- lightspark_node_display_name: display_name
102
- lightspark_node_public_key: public_key
103
- lightspark_node_account: account {
94
+ lightspark_node_with_o_s_k_id: id
95
+ lightspark_node_with_o_s_k_created_at: created_at
96
+ lightspark_node_with_o_s_k_updated_at: updated_at
97
+ lightspark_node_with_o_s_k_alias: alias
98
+ lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network
99
+ lightspark_node_with_o_s_k_color: color
100
+ lightspark_node_with_o_s_k_conductivity: conductivity
101
+ lightspark_node_with_o_s_k_display_name: display_name
102
+ lightspark_node_with_o_s_k_public_key: public_key
103
+ lightspark_node_with_o_s_k_owner: owner {
104
104
  id
105
105
  }
106
- lightspark_node_owner: owner {
107
- id
106
+ lightspark_node_with_o_s_k_status: status
107
+ lightspark_node_with_o_s_k_total_balance: total_balance {
108
+ __typename
109
+ currency_amount_original_value: original_value
110
+ currency_amount_original_unit: original_unit
111
+ currency_amount_preferred_currency_unit: preferred_currency_unit
112
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
113
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
114
+ }
115
+ lightspark_node_with_o_s_k_total_local_balance: total_local_balance {
116
+ __typename
117
+ currency_amount_original_value: original_value
118
+ currency_amount_original_unit: original_unit
119
+ currency_amount_preferred_currency_unit: preferred_currency_unit
120
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
121
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
122
+ }
123
+ lightspark_node_with_o_s_k_local_balance: local_balance {
124
+ __typename
125
+ currency_amount_original_value: original_value
126
+ currency_amount_original_unit: original_unit
127
+ currency_amount_preferred_currency_unit: preferred_currency_unit
128
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
129
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
108
130
  }
109
- lightspark_node_blockchain_balance: blockchain_balance {
131
+ lightspark_node_with_o_s_k_remote_balance: remote_balance {
132
+ __typename
133
+ currency_amount_original_value: original_value
134
+ currency_amount_original_unit: original_unit
135
+ currency_amount_preferred_currency_unit: preferred_currency_unit
136
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
137
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
138
+ }
139
+ lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance {
110
140
  __typename
111
141
  blockchain_balance_total_balance: total_balance {
112
142
  __typename
@@ -157,12 +187,29 @@ fragment InvoiceFragment on Invoice {
157
187
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
158
188
  }
159
189
  }
160
- lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key {
190
+ lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
191
+ lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
161
192
  __typename
162
193
  secret_encrypted_value: encrypted_value
163
194
  secret_cipher: cipher
164
195
  }
165
- lightspark_node_total_balance: total_balance {
196
+ }
197
+ ... on LightsparkNodeWithRemoteSigning {
198
+ __typename
199
+ lightspark_node_with_remote_signing_id: id
200
+ lightspark_node_with_remote_signing_created_at: created_at
201
+ lightspark_node_with_remote_signing_updated_at: updated_at
202
+ lightspark_node_with_remote_signing_alias: alias
203
+ lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network
204
+ lightspark_node_with_remote_signing_color: color
205
+ lightspark_node_with_remote_signing_conductivity: conductivity
206
+ lightspark_node_with_remote_signing_display_name: display_name
207
+ lightspark_node_with_remote_signing_public_key: public_key
208
+ lightspark_node_with_remote_signing_owner: owner {
209
+ id
210
+ }
211
+ lightspark_node_with_remote_signing_status: status
212
+ lightspark_node_with_remote_signing_total_balance: total_balance {
166
213
  __typename
167
214
  currency_amount_original_value: original_value
168
215
  currency_amount_original_unit: original_unit
@@ -170,7 +217,7 @@ fragment InvoiceFragment on Invoice {
170
217
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
171
218
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
172
219
  }
173
- lightspark_node_total_local_balance: total_local_balance {
220
+ lightspark_node_with_remote_signing_total_local_balance: total_local_balance {
174
221
  __typename
175
222
  currency_amount_original_value: original_value
176
223
  currency_amount_original_unit: original_unit
@@ -178,7 +225,7 @@ fragment InvoiceFragment on Invoice {
178
225
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
179
226
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
180
227
  }
181
- lightspark_node_local_balance: local_balance {
228
+ lightspark_node_with_remote_signing_local_balance: local_balance {
182
229
  __typename
183
230
  currency_amount_original_value: original_value
184
231
  currency_amount_original_unit: original_unit
@@ -186,8 +233,7 @@ fragment InvoiceFragment on Invoice {
186
233
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
187
234
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
188
235
  }
189
- lightspark_node_purpose: purpose
190
- lightspark_node_remote_balance: remote_balance {
236
+ lightspark_node_with_remote_signing_remote_balance: remote_balance {
191
237
  __typename
192
238
  currency_amount_original_value: original_value
193
239
  currency_amount_original_unit: original_unit
@@ -195,7 +241,58 @@ fragment InvoiceFragment on Invoice {
195
241
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
196
242
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
197
243
  }
198
- lightspark_node_status: status
244
+ lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance {
245
+ __typename
246
+ blockchain_balance_total_balance: total_balance {
247
+ __typename
248
+ currency_amount_original_value: original_value
249
+ currency_amount_original_unit: original_unit
250
+ currency_amount_preferred_currency_unit: preferred_currency_unit
251
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
252
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
253
+ }
254
+ blockchain_balance_confirmed_balance: confirmed_balance {
255
+ __typename
256
+ currency_amount_original_value: original_value
257
+ currency_amount_original_unit: original_unit
258
+ currency_amount_preferred_currency_unit: preferred_currency_unit
259
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
260
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
261
+ }
262
+ blockchain_balance_unconfirmed_balance: unconfirmed_balance {
263
+ __typename
264
+ currency_amount_original_value: original_value
265
+ currency_amount_original_unit: original_unit
266
+ currency_amount_preferred_currency_unit: preferred_currency_unit
267
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
268
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
269
+ }
270
+ blockchain_balance_locked_balance: locked_balance {
271
+ __typename
272
+ currency_amount_original_value: original_value
273
+ currency_amount_original_unit: original_unit
274
+ currency_amount_preferred_currency_unit: preferred_currency_unit
275
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
276
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
277
+ }
278
+ blockchain_balance_required_reserve: required_reserve {
279
+ __typename
280
+ currency_amount_original_value: original_value
281
+ currency_amount_original_unit: original_unit
282
+ currency_amount_preferred_currency_unit: preferred_currency_unit
283
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
284
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
285
+ }
286
+ blockchain_balance_available_balance: available_balance {
287
+ __typename
288
+ currency_amount_original_value: original_value
289
+ currency_amount_original_unit: original_unit
290
+ currency_amount_preferred_currency_unit: preferred_currency_unit
291
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
292
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
293
+ }
294
+ }
295
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
199
296
  }
200
297
  }
201
298
  }
@@ -85,24 +85,54 @@ fragment InvoiceDataFragment on InvoiceData {
85
85
  graph_node_display_name: display_name
86
86
  graph_node_public_key: public_key
87
87
  }
88
- ... on LightsparkNode {
88
+ ... on LightsparkNodeWithOSK {
89
89
  __typename
90
- lightspark_node_id: id
91
- lightspark_node_created_at: created_at
92
- lightspark_node_updated_at: updated_at
93
- lightspark_node_alias: alias
94
- lightspark_node_bitcoin_network: bitcoin_network
95
- lightspark_node_color: color
96
- lightspark_node_conductivity: conductivity
97
- lightspark_node_display_name: display_name
98
- lightspark_node_public_key: public_key
99
- lightspark_node_account: account {
90
+ lightspark_node_with_o_s_k_id: id
91
+ lightspark_node_with_o_s_k_created_at: created_at
92
+ lightspark_node_with_o_s_k_updated_at: updated_at
93
+ lightspark_node_with_o_s_k_alias: alias
94
+ lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network
95
+ lightspark_node_with_o_s_k_color: color
96
+ lightspark_node_with_o_s_k_conductivity: conductivity
97
+ lightspark_node_with_o_s_k_display_name: display_name
98
+ lightspark_node_with_o_s_k_public_key: public_key
99
+ lightspark_node_with_o_s_k_owner: owner {
100
100
  id
101
101
  }
102
- lightspark_node_owner: owner {
103
- id
102
+ lightspark_node_with_o_s_k_status: status
103
+ lightspark_node_with_o_s_k_total_balance: total_balance {
104
+ __typename
105
+ currency_amount_original_value: original_value
106
+ currency_amount_original_unit: original_unit
107
+ currency_amount_preferred_currency_unit: preferred_currency_unit
108
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
109
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
110
+ }
111
+ lightspark_node_with_o_s_k_total_local_balance: total_local_balance {
112
+ __typename
113
+ currency_amount_original_value: original_value
114
+ currency_amount_original_unit: original_unit
115
+ currency_amount_preferred_currency_unit: preferred_currency_unit
116
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
117
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
118
+ }
119
+ lightspark_node_with_o_s_k_local_balance: local_balance {
120
+ __typename
121
+ currency_amount_original_value: original_value
122
+ currency_amount_original_unit: original_unit
123
+ currency_amount_preferred_currency_unit: preferred_currency_unit
124
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
125
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
104
126
  }
105
- lightspark_node_blockchain_balance: blockchain_balance {
127
+ lightspark_node_with_o_s_k_remote_balance: remote_balance {
128
+ __typename
129
+ currency_amount_original_value: original_value
130
+ currency_amount_original_unit: original_unit
131
+ currency_amount_preferred_currency_unit: preferred_currency_unit
132
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
133
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
134
+ }
135
+ lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance {
106
136
  __typename
107
137
  blockchain_balance_total_balance: total_balance {
108
138
  __typename
@@ -153,12 +183,29 @@ fragment InvoiceDataFragment on InvoiceData {
153
183
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
154
184
  }
155
185
  }
156
- lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key {
186
+ lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
187
+ lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
157
188
  __typename
158
189
  secret_encrypted_value: encrypted_value
159
190
  secret_cipher: cipher
160
191
  }
161
- lightspark_node_total_balance: total_balance {
192
+ }
193
+ ... on LightsparkNodeWithRemoteSigning {
194
+ __typename
195
+ lightspark_node_with_remote_signing_id: id
196
+ lightspark_node_with_remote_signing_created_at: created_at
197
+ lightspark_node_with_remote_signing_updated_at: updated_at
198
+ lightspark_node_with_remote_signing_alias: alias
199
+ lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network
200
+ lightspark_node_with_remote_signing_color: color
201
+ lightspark_node_with_remote_signing_conductivity: conductivity
202
+ lightspark_node_with_remote_signing_display_name: display_name
203
+ lightspark_node_with_remote_signing_public_key: public_key
204
+ lightspark_node_with_remote_signing_owner: owner {
205
+ id
206
+ }
207
+ lightspark_node_with_remote_signing_status: status
208
+ lightspark_node_with_remote_signing_total_balance: total_balance {
162
209
  __typename
163
210
  currency_amount_original_value: original_value
164
211
  currency_amount_original_unit: original_unit
@@ -166,7 +213,7 @@ fragment InvoiceDataFragment on InvoiceData {
166
213
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
167
214
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
168
215
  }
169
- lightspark_node_total_local_balance: total_local_balance {
216
+ lightspark_node_with_remote_signing_total_local_balance: total_local_balance {
170
217
  __typename
171
218
  currency_amount_original_value: original_value
172
219
  currency_amount_original_unit: original_unit
@@ -174,7 +221,7 @@ fragment InvoiceDataFragment on InvoiceData {
174
221
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
175
222
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
176
223
  }
177
- lightspark_node_local_balance: local_balance {
224
+ lightspark_node_with_remote_signing_local_balance: local_balance {
178
225
  __typename
179
226
  currency_amount_original_value: original_value
180
227
  currency_amount_original_unit: original_unit
@@ -182,8 +229,7 @@ fragment InvoiceDataFragment on InvoiceData {
182
229
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
183
230
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
184
231
  }
185
- lightspark_node_purpose: purpose
186
- lightspark_node_remote_balance: remote_balance {
232
+ lightspark_node_with_remote_signing_remote_balance: remote_balance {
187
233
  __typename
188
234
  currency_amount_original_value: original_value
189
235
  currency_amount_original_unit: original_unit
@@ -191,7 +237,58 @@ fragment InvoiceDataFragment on InvoiceData {
191
237
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
192
238
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
193
239
  }
194
- lightspark_node_status: status
240
+ lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance {
241
+ __typename
242
+ blockchain_balance_total_balance: total_balance {
243
+ __typename
244
+ currency_amount_original_value: original_value
245
+ currency_amount_original_unit: original_unit
246
+ currency_amount_preferred_currency_unit: preferred_currency_unit
247
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
248
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
249
+ }
250
+ blockchain_balance_confirmed_balance: confirmed_balance {
251
+ __typename
252
+ currency_amount_original_value: original_value
253
+ currency_amount_original_unit: original_unit
254
+ currency_amount_preferred_currency_unit: preferred_currency_unit
255
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
256
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
257
+ }
258
+ blockchain_balance_unconfirmed_balance: unconfirmed_balance {
259
+ __typename
260
+ currency_amount_original_value: original_value
261
+ currency_amount_original_unit: original_unit
262
+ currency_amount_preferred_currency_unit: preferred_currency_unit
263
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
264
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
265
+ }
266
+ blockchain_balance_locked_balance: locked_balance {
267
+ __typename
268
+ currency_amount_original_value: original_value
269
+ currency_amount_original_unit: original_unit
270
+ currency_amount_preferred_currency_unit: preferred_currency_unit
271
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
272
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
273
+ }
274
+ blockchain_balance_required_reserve: required_reserve {
275
+ __typename
276
+ currency_amount_original_value: original_value
277
+ currency_amount_original_unit: original_unit
278
+ currency_amount_preferred_currency_unit: preferred_currency_unit
279
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
280
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
281
+ }
282
+ blockchain_balance_available_balance: available_balance {
283
+ __typename
284
+ currency_amount_original_value: original_value
285
+ currency_amount_original_unit: original_unit
286
+ currency_amount_preferred_currency_unit: preferred_currency_unit
287
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
288
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
289
+ }
290
+ }
291
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
195
292
  }
196
293
  }
197
294
  }`;
@@ -15,7 +15,7 @@ type LightningFeeEstimateForInvoiceInput = {
15
15
  };
16
16
 
17
17
  export const LightningFeeEstimateForInvoiceInputFromJson = (
18
- obj: any
18
+ obj: any,
19
19
  ): LightningFeeEstimateForInvoiceInput => {
20
20
  return {
21
21
  nodeId: obj["lightning_fee_estimate_for_invoice_input_node_id"],
@@ -12,7 +12,7 @@ type LightningFeeEstimateForNodeInput = {
12
12
  };
13
13
 
14
14
  export const LightningFeeEstimateForNodeInputFromJson = (
15
- obj: any
15
+ obj: any,
16
16
  ): LightningFeeEstimateForNodeInput => {
17
17
  return {
18
18
  nodeId: obj["lightning_fee_estimate_for_node_input_node_id"],
@@ -9,11 +9,11 @@ type LightningFeeEstimateOutput = {
9
9
  };
10
10
 
11
11
  export const LightningFeeEstimateOutputFromJson = (
12
- obj: any
12
+ obj: any,
13
13
  ): LightningFeeEstimateOutput => {
14
14
  return {
15
15
  feeEstimate: CurrencyAmountFromJson(
16
- obj["lightning_fee_estimate_output_fee_estimate"]
16
+ obj["lightning_fee_estimate_output_fee_estimate"],
17
17
  ),
18
18
  } as LightningFeeEstimateOutput;
19
19
  };