@lightsparkdev/lightspark-sdk 0.4.11 → 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.
- package/CHANGELOG.md +22 -0
- package/README.md +1 -1
- package/dist/{chunk-NXUFC5J7.js → chunk-LZC5C5NI.js} +2908 -635
- package/dist/{index-3ffe9e7b.d.ts → index-09d4ac20.d.ts} +373 -62
- package/dist/index.cjs +3393 -841
- package/dist/index.d.ts +2 -2
- package/dist/index.js +388 -93
- package/dist/objects/index.cjs +2735 -553
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +17 -5
- package/package.json +10 -8
- package/src/NodeKeyLoaderCache.ts +87 -0
- package/src/SigningKeyLoader.ts +177 -0
- package/src/client.ts +160 -71
- package/src/graphql/CreateInvoice.ts +3 -2
- package/src/graphql/CreateLnurlInvoice.ts +2 -0
- package/src/graphql/CreateUmaInvoice.ts +23 -0
- package/src/graphql/MultiNodeDashboard.ts +0 -3
- package/src/graphql/PayUmaInvoice.ts +29 -0
- package/src/graphql/RecoverNodeSigningKey.ts +1 -1
- package/src/graphql/SingleNodeDashboard.ts +0 -1
- package/src/lightspark_crypto/lightspark_crypto.d.ts +157 -0
- package/src/lightspark_crypto/lightspark_crypto.js +1010 -0
- package/src/lightspark_crypto/lightspark_crypto_bg.wasm +0 -0
- package/src/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts +120 -0
- package/src/lightspark_crypto/package.json +11 -0
- package/src/objects/Account.ts +424 -107
- package/src/objects/AccountToNodesConnection.ts +0 -13
- package/src/objects/{CryptoSanctionsScreeningProvider.ts → ComplianceProvider.ts} +3 -3
- package/src/objects/Connection.ts +0 -6
- package/src/objects/CreateInvoiceInput.ts +0 -6
- package/src/objects/CreateLnurlInvoiceInput.ts +0 -6
- package/src/objects/CreateTestModePaymentoutput.ts +13 -1
- package/src/objects/CreateUmaInvoiceInput.ts +24 -0
- package/src/objects/DeclineToSignMessagesInput.ts +16 -0
- package/src/objects/DeclineToSignMessagesOutput.ts +28 -0
- package/src/objects/Entity.ts +401 -66
- package/src/objects/IdAndSignature.ts +16 -0
- package/src/objects/IncomingPayment.ts +18 -5
- package/src/objects/Invoice.ts +118 -21
- package/src/objects/InvoiceData.ts +118 -21
- package/src/objects/LightningTransaction.ts +149 -25
- package/src/objects/LightsparkNode.ts +270 -110
- package/src/objects/LightsparkNodeOwner.ts +4 -0
- package/src/objects/LightsparkNodeWithOSK.ts +389 -0
- package/src/objects/LightsparkNodeWithRemoteSigning.ts +384 -0
- package/src/objects/Node.ts +209 -56
- package/src/objects/OutgoingPayment.ts +136 -21
- package/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts +25 -0
- package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +28 -0
- package/src/objects/PayUmaInvoiceInput.ts +25 -0
- package/src/objects/{LightsparkNodePurpose.ts → PaymentDirection.ts} +5 -7
- package/src/objects/PaymentRequest.ts +118 -21
- package/src/objects/PaymentRequestData.ts +118 -21
- package/src/objects/PostTransactionData.ts +39 -0
- package/src/objects/RegisterPaymentInput.ts +31 -0
- package/src/objects/RegisterPaymentOutput.ts +23 -0
- package/src/objects/ReleaseChannelPerCommitmentSecretInput.ts +23 -0
- package/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts +23 -0
- package/src/objects/ReleasePaymentPreimageInput.ts +20 -0
- package/src/objects/ReleasePaymentPreimageOutput.ts +23 -0
- package/src/objects/RemoteSigningSubEventType.ts +26 -0
- package/src/objects/ScreenNodeInput.ts +20 -0
- package/src/objects/ScreenNodeOutput.ts +22 -0
- package/src/objects/SetInvoicePaymentHashInput.ts +24 -0
- package/src/objects/SetInvoicePaymentHashOutput.ts +23 -0
- package/src/objects/SignInvoiceInput.ts +19 -0
- package/src/objects/SignInvoiceOutput.ts +21 -0
- package/src/objects/SignMessagesInput.ts +18 -0
- package/src/objects/SignMessagesOutput.ts +26 -0
- package/src/objects/Signable.ts +58 -0
- package/src/objects/SignablePayload.ts +93 -0
- package/src/objects/SignablePayloadStatus.ts +17 -0
- package/src/objects/SingleNodeDashboard.ts +0 -2
- package/src/objects/Transaction.ts +149 -25
- package/src/objects/UpdateChannelPerCommitmentPointInput.ts +25 -0
- package/src/objects/UpdateChannelPerCommitmentPointOutput.ts +23 -0
- package/src/objects/UpdateNodeSharedSecretInput.ts +18 -0
- package/src/objects/UpdateNodeSharedSecretOutput.ts +23 -0
- package/src/objects/Wallet.ts +265 -45
- package/src/objects/index.ts +37 -4
- package/src/objects/ScreenBitcoinAddressesInput.ts +0 -23
- package/src/objects/ScreenBitcoinAddressesOutput.ts +0 -25
- /package/src/{__tests__ → tests}/webhooks.test.ts +0 -0
package/src/objects/Node.ts
CHANGED
|
@@ -8,9 +8,9 @@ import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
|
|
|
8
8
|
import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
|
|
9
9
|
import type Entity from "./Entity.js";
|
|
10
10
|
import GraphNode from "./GraphNode.js";
|
|
11
|
-
import LightsparkNode from "./LightsparkNode.js";
|
|
12
|
-
import LightsparkNodePurpose from "./LightsparkNodePurpose.js";
|
|
13
11
|
import LightsparkNodeStatus from "./LightsparkNodeStatus.js";
|
|
12
|
+
import LightsparkNodeWithOSK from "./LightsparkNodeWithOSK.js";
|
|
13
|
+
import LightsparkNodeWithRemoteSigning from "./LightsparkNodeWithRemoteSigning.js";
|
|
14
14
|
import type NodeAddressType from "./NodeAddressType.js";
|
|
15
15
|
import type NodeToAddressesConnection from "./NodeToAddressesConnection.js";
|
|
16
16
|
import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.js";
|
|
@@ -99,47 +99,103 @@ export const NodeFromJson = (obj: any): Node => {
|
|
|
99
99
|
obj["graph_node_public_key"],
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
|
-
if (obj["__typename"] == "
|
|
103
|
-
return new
|
|
104
|
-
obj["
|
|
105
|
-
obj["
|
|
106
|
-
obj["
|
|
107
|
-
BitcoinNetwork[obj["
|
|
102
|
+
if (obj["__typename"] == "LightsparkNodeWithOSK") {
|
|
103
|
+
return new LightsparkNodeWithOSK(
|
|
104
|
+
obj["lightspark_node_with_o_s_k_id"],
|
|
105
|
+
obj["lightspark_node_with_o_s_k_created_at"],
|
|
106
|
+
obj["lightspark_node_with_o_s_k_updated_at"],
|
|
107
|
+
BitcoinNetwork[obj["lightspark_node_with_o_s_k_bitcoin_network"]] ??
|
|
108
108
|
BitcoinNetwork.FUTURE_VALUE,
|
|
109
|
-
obj["
|
|
110
|
-
obj["
|
|
111
|
-
obj["
|
|
112
|
-
"
|
|
113
|
-
obj["
|
|
114
|
-
obj["
|
|
115
|
-
obj["
|
|
116
|
-
obj["
|
|
117
|
-
!!obj["
|
|
118
|
-
?
|
|
109
|
+
obj["lightspark_node_with_o_s_k_display_name"],
|
|
110
|
+
obj["lightspark_node_with_o_s_k_owner"].id,
|
|
111
|
+
obj["lightspark_node_with_o_s_k_uma_prescreening_utxos"],
|
|
112
|
+
"LightsparkNodeWithOSK",
|
|
113
|
+
obj["lightspark_node_with_o_s_k_alias"],
|
|
114
|
+
obj["lightspark_node_with_o_s_k_color"],
|
|
115
|
+
obj["lightspark_node_with_o_s_k_conductivity"],
|
|
116
|
+
obj["lightspark_node_with_o_s_k_public_key"],
|
|
117
|
+
!!obj["lightspark_node_with_o_s_k_status"]
|
|
118
|
+
? LightsparkNodeStatus[obj["lightspark_node_with_o_s_k_status"]] ??
|
|
119
|
+
LightsparkNodeStatus.FUTURE_VALUE
|
|
120
|
+
: null,
|
|
121
|
+
!!obj["lightspark_node_with_o_s_k_total_balance"]
|
|
122
|
+
? CurrencyAmountFromJson(
|
|
123
|
+
obj["lightspark_node_with_o_s_k_total_balance"],
|
|
124
|
+
)
|
|
119
125
|
: undefined,
|
|
120
|
-
!!obj["
|
|
121
|
-
?
|
|
126
|
+
!!obj["lightspark_node_with_o_s_k_total_local_balance"]
|
|
127
|
+
? CurrencyAmountFromJson(
|
|
128
|
+
obj["lightspark_node_with_o_s_k_total_local_balance"],
|
|
129
|
+
)
|
|
122
130
|
: undefined,
|
|
123
|
-
!!obj["
|
|
124
|
-
? CurrencyAmountFromJson(
|
|
131
|
+
!!obj["lightspark_node_with_o_s_k_local_balance"]
|
|
132
|
+
? CurrencyAmountFromJson(
|
|
133
|
+
obj["lightspark_node_with_o_s_k_local_balance"],
|
|
134
|
+
)
|
|
125
135
|
: undefined,
|
|
126
|
-
!!obj["
|
|
127
|
-
? CurrencyAmountFromJson(
|
|
136
|
+
!!obj["lightspark_node_with_o_s_k_remote_balance"]
|
|
137
|
+
? CurrencyAmountFromJson(
|
|
138
|
+
obj["lightspark_node_with_o_s_k_remote_balance"],
|
|
139
|
+
)
|
|
128
140
|
: undefined,
|
|
129
|
-
!!obj["
|
|
130
|
-
?
|
|
141
|
+
!!obj["lightspark_node_with_o_s_k_blockchain_balance"]
|
|
142
|
+
? BlockchainBalanceFromJson(
|
|
143
|
+
obj["lightspark_node_with_o_s_k_blockchain_balance"],
|
|
144
|
+
)
|
|
131
145
|
: undefined,
|
|
132
|
-
!!obj["
|
|
133
|
-
?
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
!!obj["lightspark_node_remote_balance"]
|
|
137
|
-
? CurrencyAmountFromJson(obj["lightspark_node_remote_balance"])
|
|
146
|
+
!!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
|
|
147
|
+
? SecretFromJson(
|
|
148
|
+
obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"],
|
|
149
|
+
)
|
|
138
150
|
: undefined,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
if (obj["__typename"] == "LightsparkNodeWithRemoteSigning") {
|
|
154
|
+
return new LightsparkNodeWithRemoteSigning(
|
|
155
|
+
obj["lightspark_node_with_remote_signing_id"],
|
|
156
|
+
obj["lightspark_node_with_remote_signing_created_at"],
|
|
157
|
+
obj["lightspark_node_with_remote_signing_updated_at"],
|
|
158
|
+
BitcoinNetwork[
|
|
159
|
+
obj["lightspark_node_with_remote_signing_bitcoin_network"]
|
|
160
|
+
] ?? BitcoinNetwork.FUTURE_VALUE,
|
|
161
|
+
obj["lightspark_node_with_remote_signing_display_name"],
|
|
162
|
+
obj["lightspark_node_with_remote_signing_owner"].id,
|
|
163
|
+
obj["lightspark_node_with_remote_signing_uma_prescreening_utxos"],
|
|
164
|
+
"LightsparkNodeWithRemoteSigning",
|
|
165
|
+
obj["lightspark_node_with_remote_signing_alias"],
|
|
166
|
+
obj["lightspark_node_with_remote_signing_color"],
|
|
167
|
+
obj["lightspark_node_with_remote_signing_conductivity"],
|
|
168
|
+
obj["lightspark_node_with_remote_signing_public_key"],
|
|
169
|
+
!!obj["lightspark_node_with_remote_signing_status"]
|
|
170
|
+
? LightsparkNodeStatus[
|
|
171
|
+
obj["lightspark_node_with_remote_signing_status"]
|
|
172
|
+
] ?? LightsparkNodeStatus.FUTURE_VALUE
|
|
142
173
|
: null,
|
|
174
|
+
!!obj["lightspark_node_with_remote_signing_total_balance"]
|
|
175
|
+
? CurrencyAmountFromJson(
|
|
176
|
+
obj["lightspark_node_with_remote_signing_total_balance"],
|
|
177
|
+
)
|
|
178
|
+
: undefined,
|
|
179
|
+
!!obj["lightspark_node_with_remote_signing_total_local_balance"]
|
|
180
|
+
? CurrencyAmountFromJson(
|
|
181
|
+
obj["lightspark_node_with_remote_signing_total_local_balance"],
|
|
182
|
+
)
|
|
183
|
+
: undefined,
|
|
184
|
+
!!obj["lightspark_node_with_remote_signing_local_balance"]
|
|
185
|
+
? CurrencyAmountFromJson(
|
|
186
|
+
obj["lightspark_node_with_remote_signing_local_balance"],
|
|
187
|
+
)
|
|
188
|
+
: undefined,
|
|
189
|
+
!!obj["lightspark_node_with_remote_signing_remote_balance"]
|
|
190
|
+
? CurrencyAmountFromJson(
|
|
191
|
+
obj["lightspark_node_with_remote_signing_remote_balance"],
|
|
192
|
+
)
|
|
193
|
+
: undefined,
|
|
194
|
+
!!obj["lightspark_node_with_remote_signing_blockchain_balance"]
|
|
195
|
+
? BlockchainBalanceFromJson(
|
|
196
|
+
obj["lightspark_node_with_remote_signing_blockchain_balance"],
|
|
197
|
+
)
|
|
198
|
+
: undefined,
|
|
143
199
|
);
|
|
144
200
|
}
|
|
145
201
|
throw new LightsparkException(
|
|
@@ -163,24 +219,54 @@ fragment NodeFragment on Node {
|
|
|
163
219
|
graph_node_display_name: display_name
|
|
164
220
|
graph_node_public_key: public_key
|
|
165
221
|
}
|
|
166
|
-
... on
|
|
222
|
+
... on LightsparkNodeWithOSK {
|
|
167
223
|
__typename
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
224
|
+
lightspark_node_with_o_s_k_id: id
|
|
225
|
+
lightspark_node_with_o_s_k_created_at: created_at
|
|
226
|
+
lightspark_node_with_o_s_k_updated_at: updated_at
|
|
227
|
+
lightspark_node_with_o_s_k_alias: alias
|
|
228
|
+
lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network
|
|
229
|
+
lightspark_node_with_o_s_k_color: color
|
|
230
|
+
lightspark_node_with_o_s_k_conductivity: conductivity
|
|
231
|
+
lightspark_node_with_o_s_k_display_name: display_name
|
|
232
|
+
lightspark_node_with_o_s_k_public_key: public_key
|
|
233
|
+
lightspark_node_with_o_s_k_owner: owner {
|
|
178
234
|
id
|
|
179
235
|
}
|
|
180
|
-
|
|
181
|
-
|
|
236
|
+
lightspark_node_with_o_s_k_status: status
|
|
237
|
+
lightspark_node_with_o_s_k_total_balance: total_balance {
|
|
238
|
+
__typename
|
|
239
|
+
currency_amount_original_value: original_value
|
|
240
|
+
currency_amount_original_unit: original_unit
|
|
241
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
242
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
243
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
182
244
|
}
|
|
183
|
-
|
|
245
|
+
lightspark_node_with_o_s_k_total_local_balance: total_local_balance {
|
|
246
|
+
__typename
|
|
247
|
+
currency_amount_original_value: original_value
|
|
248
|
+
currency_amount_original_unit: original_unit
|
|
249
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
250
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
251
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
252
|
+
}
|
|
253
|
+
lightspark_node_with_o_s_k_local_balance: local_balance {
|
|
254
|
+
__typename
|
|
255
|
+
currency_amount_original_value: original_value
|
|
256
|
+
currency_amount_original_unit: original_unit
|
|
257
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
258
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
259
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
260
|
+
}
|
|
261
|
+
lightspark_node_with_o_s_k_remote_balance: remote_balance {
|
|
262
|
+
__typename
|
|
263
|
+
currency_amount_original_value: original_value
|
|
264
|
+
currency_amount_original_unit: original_unit
|
|
265
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
266
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
267
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
268
|
+
}
|
|
269
|
+
lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance {
|
|
184
270
|
__typename
|
|
185
271
|
blockchain_balance_total_balance: total_balance {
|
|
186
272
|
__typename
|
|
@@ -231,12 +317,29 @@ fragment NodeFragment on Node {
|
|
|
231
317
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
232
318
|
}
|
|
233
319
|
}
|
|
234
|
-
|
|
320
|
+
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
321
|
+
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
235
322
|
__typename
|
|
236
323
|
secret_encrypted_value: encrypted_value
|
|
237
324
|
secret_cipher: cipher
|
|
238
325
|
}
|
|
239
|
-
|
|
326
|
+
}
|
|
327
|
+
... on LightsparkNodeWithRemoteSigning {
|
|
328
|
+
__typename
|
|
329
|
+
lightspark_node_with_remote_signing_id: id
|
|
330
|
+
lightspark_node_with_remote_signing_created_at: created_at
|
|
331
|
+
lightspark_node_with_remote_signing_updated_at: updated_at
|
|
332
|
+
lightspark_node_with_remote_signing_alias: alias
|
|
333
|
+
lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network
|
|
334
|
+
lightspark_node_with_remote_signing_color: color
|
|
335
|
+
lightspark_node_with_remote_signing_conductivity: conductivity
|
|
336
|
+
lightspark_node_with_remote_signing_display_name: display_name
|
|
337
|
+
lightspark_node_with_remote_signing_public_key: public_key
|
|
338
|
+
lightspark_node_with_remote_signing_owner: owner {
|
|
339
|
+
id
|
|
340
|
+
}
|
|
341
|
+
lightspark_node_with_remote_signing_status: status
|
|
342
|
+
lightspark_node_with_remote_signing_total_balance: total_balance {
|
|
240
343
|
__typename
|
|
241
344
|
currency_amount_original_value: original_value
|
|
242
345
|
currency_amount_original_unit: original_unit
|
|
@@ -244,7 +347,7 @@ fragment NodeFragment on Node {
|
|
|
244
347
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
245
348
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
246
349
|
}
|
|
247
|
-
|
|
350
|
+
lightspark_node_with_remote_signing_total_local_balance: total_local_balance {
|
|
248
351
|
__typename
|
|
249
352
|
currency_amount_original_value: original_value
|
|
250
353
|
currency_amount_original_unit: original_unit
|
|
@@ -252,7 +355,7 @@ fragment NodeFragment on Node {
|
|
|
252
355
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
253
356
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
254
357
|
}
|
|
255
|
-
|
|
358
|
+
lightspark_node_with_remote_signing_local_balance: local_balance {
|
|
256
359
|
__typename
|
|
257
360
|
currency_amount_original_value: original_value
|
|
258
361
|
currency_amount_original_unit: original_unit
|
|
@@ -260,8 +363,7 @@ fragment NodeFragment on Node {
|
|
|
260
363
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
261
364
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
262
365
|
}
|
|
263
|
-
|
|
264
|
-
lightspark_node_remote_balance: remote_balance {
|
|
366
|
+
lightspark_node_with_remote_signing_remote_balance: remote_balance {
|
|
265
367
|
__typename
|
|
266
368
|
currency_amount_original_value: original_value
|
|
267
369
|
currency_amount_original_unit: original_unit
|
|
@@ -269,7 +371,58 @@ fragment NodeFragment on Node {
|
|
|
269
371
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
270
372
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
271
373
|
}
|
|
272
|
-
|
|
374
|
+
lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance {
|
|
375
|
+
__typename
|
|
376
|
+
blockchain_balance_total_balance: total_balance {
|
|
377
|
+
__typename
|
|
378
|
+
currency_amount_original_value: original_value
|
|
379
|
+
currency_amount_original_unit: original_unit
|
|
380
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
381
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
382
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
383
|
+
}
|
|
384
|
+
blockchain_balance_confirmed_balance: confirmed_balance {
|
|
385
|
+
__typename
|
|
386
|
+
currency_amount_original_value: original_value
|
|
387
|
+
currency_amount_original_unit: original_unit
|
|
388
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
389
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
390
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
391
|
+
}
|
|
392
|
+
blockchain_balance_unconfirmed_balance: unconfirmed_balance {
|
|
393
|
+
__typename
|
|
394
|
+
currency_amount_original_value: original_value
|
|
395
|
+
currency_amount_original_unit: original_unit
|
|
396
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
397
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
398
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
399
|
+
}
|
|
400
|
+
blockchain_balance_locked_balance: locked_balance {
|
|
401
|
+
__typename
|
|
402
|
+
currency_amount_original_value: original_value
|
|
403
|
+
currency_amount_original_unit: original_unit
|
|
404
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
405
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
406
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
407
|
+
}
|
|
408
|
+
blockchain_balance_required_reserve: required_reserve {
|
|
409
|
+
__typename
|
|
410
|
+
currency_amount_original_value: original_value
|
|
411
|
+
currency_amount_original_unit: original_unit
|
|
412
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
413
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
414
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
415
|
+
}
|
|
416
|
+
blockchain_balance_available_balance: available_balance {
|
|
417
|
+
__typename
|
|
418
|
+
currency_amount_original_value: original_value
|
|
419
|
+
currency_amount_original_unit: original_unit
|
|
420
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
421
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
422
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
273
426
|
}
|
|
274
427
|
}`;
|
|
275
428
|
|
|
@@ -11,6 +11,8 @@ import { OutgoingPaymentToAttemptsConnectionFromJson } from "./OutgoingPaymentTo
|
|
|
11
11
|
import PaymentFailureReason from "./PaymentFailureReason.js";
|
|
12
12
|
import type PaymentRequestData from "./PaymentRequestData.js";
|
|
13
13
|
import { PaymentRequestDataFromJson } from "./PaymentRequestData.js";
|
|
14
|
+
import type PostTransactionData from "./PostTransactionData.js";
|
|
15
|
+
import { PostTransactionDataFromJson } from "./PostTransactionData.js";
|
|
14
16
|
import type RichText from "./RichText.js";
|
|
15
17
|
import { RichTextFromJson } from "./RichText.js";
|
|
16
18
|
import TransactionStatus from "./TransactionStatus.js";
|
|
@@ -32,6 +34,7 @@ class OutgoingPayment implements LightningTransaction {
|
|
|
32
34
|
public readonly paymentRequestData?: PaymentRequestData,
|
|
33
35
|
public readonly failureReason?: PaymentFailureReason,
|
|
34
36
|
public readonly failureMessage?: RichText,
|
|
37
|
+
public readonly umaPostTransactionData?: PostTransactionData[],
|
|
35
38
|
) {
|
|
36
39
|
autoBind(this);
|
|
37
40
|
}
|
|
@@ -143,6 +146,9 @@ export const OutgoingPaymentFromJson = (obj: any): OutgoingPayment => {
|
|
|
143
146
|
!!obj["outgoing_payment_failure_message"]
|
|
144
147
|
? RichTextFromJson(obj["outgoing_payment_failure_message"])
|
|
145
148
|
: undefined,
|
|
149
|
+
obj["outgoing_payment_uma_post_transaction_data"]?.map((e) =>
|
|
150
|
+
PostTransactionDataFromJson(e),
|
|
151
|
+
),
|
|
146
152
|
);
|
|
147
153
|
};
|
|
148
154
|
|
|
@@ -209,24 +215,54 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
209
215
|
graph_node_display_name: display_name
|
|
210
216
|
graph_node_public_key: public_key
|
|
211
217
|
}
|
|
212
|
-
... on
|
|
218
|
+
... on LightsparkNodeWithOSK {
|
|
213
219
|
__typename
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
220
|
+
lightspark_node_with_o_s_k_id: id
|
|
221
|
+
lightspark_node_with_o_s_k_created_at: created_at
|
|
222
|
+
lightspark_node_with_o_s_k_updated_at: updated_at
|
|
223
|
+
lightspark_node_with_o_s_k_alias: alias
|
|
224
|
+
lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network
|
|
225
|
+
lightspark_node_with_o_s_k_color: color
|
|
226
|
+
lightspark_node_with_o_s_k_conductivity: conductivity
|
|
227
|
+
lightspark_node_with_o_s_k_display_name: display_name
|
|
228
|
+
lightspark_node_with_o_s_k_public_key: public_key
|
|
229
|
+
lightspark_node_with_o_s_k_owner: owner {
|
|
224
230
|
id
|
|
225
231
|
}
|
|
226
|
-
|
|
227
|
-
|
|
232
|
+
lightspark_node_with_o_s_k_status: status
|
|
233
|
+
lightspark_node_with_o_s_k_total_balance: total_balance {
|
|
234
|
+
__typename
|
|
235
|
+
currency_amount_original_value: original_value
|
|
236
|
+
currency_amount_original_unit: original_unit
|
|
237
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
238
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
239
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
240
|
+
}
|
|
241
|
+
lightspark_node_with_o_s_k_total_local_balance: total_local_balance {
|
|
242
|
+
__typename
|
|
243
|
+
currency_amount_original_value: original_value
|
|
244
|
+
currency_amount_original_unit: original_unit
|
|
245
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
246
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
247
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
228
248
|
}
|
|
229
|
-
|
|
249
|
+
lightspark_node_with_o_s_k_local_balance: local_balance {
|
|
250
|
+
__typename
|
|
251
|
+
currency_amount_original_value: original_value
|
|
252
|
+
currency_amount_original_unit: original_unit
|
|
253
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
254
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
255
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
256
|
+
}
|
|
257
|
+
lightspark_node_with_o_s_k_remote_balance: remote_balance {
|
|
258
|
+
__typename
|
|
259
|
+
currency_amount_original_value: original_value
|
|
260
|
+
currency_amount_original_unit: original_unit
|
|
261
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
262
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
263
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
264
|
+
}
|
|
265
|
+
lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance {
|
|
230
266
|
__typename
|
|
231
267
|
blockchain_balance_total_balance: total_balance {
|
|
232
268
|
__typename
|
|
@@ -277,12 +313,29 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
277
313
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
278
314
|
}
|
|
279
315
|
}
|
|
280
|
-
|
|
316
|
+
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
317
|
+
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
281
318
|
__typename
|
|
282
319
|
secret_encrypted_value: encrypted_value
|
|
283
320
|
secret_cipher: cipher
|
|
284
321
|
}
|
|
285
|
-
|
|
322
|
+
}
|
|
323
|
+
... on LightsparkNodeWithRemoteSigning {
|
|
324
|
+
__typename
|
|
325
|
+
lightspark_node_with_remote_signing_id: id
|
|
326
|
+
lightspark_node_with_remote_signing_created_at: created_at
|
|
327
|
+
lightspark_node_with_remote_signing_updated_at: updated_at
|
|
328
|
+
lightspark_node_with_remote_signing_alias: alias
|
|
329
|
+
lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network
|
|
330
|
+
lightspark_node_with_remote_signing_color: color
|
|
331
|
+
lightspark_node_with_remote_signing_conductivity: conductivity
|
|
332
|
+
lightspark_node_with_remote_signing_display_name: display_name
|
|
333
|
+
lightspark_node_with_remote_signing_public_key: public_key
|
|
334
|
+
lightspark_node_with_remote_signing_owner: owner {
|
|
335
|
+
id
|
|
336
|
+
}
|
|
337
|
+
lightspark_node_with_remote_signing_status: status
|
|
338
|
+
lightspark_node_with_remote_signing_total_balance: total_balance {
|
|
286
339
|
__typename
|
|
287
340
|
currency_amount_original_value: original_value
|
|
288
341
|
currency_amount_original_unit: original_unit
|
|
@@ -290,7 +343,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
290
343
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
291
344
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
292
345
|
}
|
|
293
|
-
|
|
346
|
+
lightspark_node_with_remote_signing_total_local_balance: total_local_balance {
|
|
294
347
|
__typename
|
|
295
348
|
currency_amount_original_value: original_value
|
|
296
349
|
currency_amount_original_unit: original_unit
|
|
@@ -298,7 +351,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
298
351
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
299
352
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
300
353
|
}
|
|
301
|
-
|
|
354
|
+
lightspark_node_with_remote_signing_local_balance: local_balance {
|
|
302
355
|
__typename
|
|
303
356
|
currency_amount_original_value: original_value
|
|
304
357
|
currency_amount_original_unit: original_unit
|
|
@@ -306,8 +359,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
306
359
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
307
360
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
308
361
|
}
|
|
309
|
-
|
|
310
|
-
lightspark_node_remote_balance: remote_balance {
|
|
362
|
+
lightspark_node_with_remote_signing_remote_balance: remote_balance {
|
|
311
363
|
__typename
|
|
312
364
|
currency_amount_original_value: original_value
|
|
313
365
|
currency_amount_original_unit: original_unit
|
|
@@ -315,7 +367,58 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
315
367
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
316
368
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
317
369
|
}
|
|
318
|
-
|
|
370
|
+
lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance {
|
|
371
|
+
__typename
|
|
372
|
+
blockchain_balance_total_balance: total_balance {
|
|
373
|
+
__typename
|
|
374
|
+
currency_amount_original_value: original_value
|
|
375
|
+
currency_amount_original_unit: original_unit
|
|
376
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
377
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
378
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
379
|
+
}
|
|
380
|
+
blockchain_balance_confirmed_balance: confirmed_balance {
|
|
381
|
+
__typename
|
|
382
|
+
currency_amount_original_value: original_value
|
|
383
|
+
currency_amount_original_unit: original_unit
|
|
384
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
385
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
386
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
387
|
+
}
|
|
388
|
+
blockchain_balance_unconfirmed_balance: unconfirmed_balance {
|
|
389
|
+
__typename
|
|
390
|
+
currency_amount_original_value: original_value
|
|
391
|
+
currency_amount_original_unit: original_unit
|
|
392
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
393
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
394
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
395
|
+
}
|
|
396
|
+
blockchain_balance_locked_balance: locked_balance {
|
|
397
|
+
__typename
|
|
398
|
+
currency_amount_original_value: original_value
|
|
399
|
+
currency_amount_original_unit: original_unit
|
|
400
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
401
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
402
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
403
|
+
}
|
|
404
|
+
blockchain_balance_required_reserve: required_reserve {
|
|
405
|
+
__typename
|
|
406
|
+
currency_amount_original_value: original_value
|
|
407
|
+
currency_amount_original_unit: original_unit
|
|
408
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
409
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
410
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
411
|
+
}
|
|
412
|
+
blockchain_balance_available_balance: available_balance {
|
|
413
|
+
__typename
|
|
414
|
+
currency_amount_original_value: original_value
|
|
415
|
+
currency_amount_original_unit: original_unit
|
|
416
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
417
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
418
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
319
422
|
}
|
|
320
423
|
}
|
|
321
424
|
}
|
|
@@ -325,6 +428,18 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
325
428
|
__typename
|
|
326
429
|
rich_text_text: text
|
|
327
430
|
}
|
|
431
|
+
outgoing_payment_uma_post_transaction_data: uma_post_transaction_data {
|
|
432
|
+
__typename
|
|
433
|
+
post_transaction_data_utxo: utxo
|
|
434
|
+
post_transaction_data_amount: amount {
|
|
435
|
+
__typename
|
|
436
|
+
currency_amount_original_value: original_value
|
|
437
|
+
currency_amount_original_unit: original_unit
|
|
438
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
439
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
440
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
441
|
+
}
|
|
442
|
+
}
|
|
328
443
|
}`;
|
|
329
444
|
|
|
330
445
|
export default OutgoingPayment;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
import TransactionStatus from "./TransactionStatus.js";
|
|
4
|
+
|
|
5
|
+
type OutgoingPaymentsForInvoiceQueryInput = {
|
|
6
|
+
/** The encoded invoice that the outgoing payments paid to. **/
|
|
7
|
+
encodedInvoice: string;
|
|
8
|
+
|
|
9
|
+
/** An optional filter to only query outgoing payments of given statuses. **/
|
|
10
|
+
statuses?: TransactionStatus[];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const OutgoingPaymentsForInvoiceQueryInputFromJson = (
|
|
14
|
+
obj: any,
|
|
15
|
+
): OutgoingPaymentsForInvoiceQueryInput => {
|
|
16
|
+
return {
|
|
17
|
+
encodedInvoice:
|
|
18
|
+
obj["outgoing_payments_for_invoice_query_input_encoded_invoice"],
|
|
19
|
+
statuses: obj["outgoing_payments_for_invoice_query_input_statuses"]?.map(
|
|
20
|
+
(e) => TransactionStatus[e],
|
|
21
|
+
),
|
|
22
|
+
} as OutgoingPaymentsForInvoiceQueryInput;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default OutgoingPaymentsForInvoiceQueryInput;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
import type OutgoingPayment from "./OutgoingPayment.js";
|
|
4
|
+
import { OutgoingPaymentFromJson } from "./OutgoingPayment.js";
|
|
5
|
+
|
|
6
|
+
type OutgoingPaymentsForInvoiceQueryOutput = {
|
|
7
|
+
payments: OutgoingPayment[];
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const OutgoingPaymentsForInvoiceQueryOutputFromJson = (
|
|
11
|
+
obj: any,
|
|
12
|
+
): OutgoingPaymentsForInvoiceQueryOutput => {
|
|
13
|
+
return {
|
|
14
|
+
payments: obj["outgoing_payments_for_invoice_query_output_payments"].map(
|
|
15
|
+
(e) => OutgoingPaymentFromJson(e),
|
|
16
|
+
),
|
|
17
|
+
} as OutgoingPaymentsForInvoiceQueryOutput;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const FRAGMENT = `
|
|
21
|
+
fragment OutgoingPaymentsForInvoiceQueryOutputFragment on OutgoingPaymentsForInvoiceQueryOutput {
|
|
22
|
+
__typename
|
|
23
|
+
outgoing_payments_for_invoice_query_output_payments: payments {
|
|
24
|
+
id
|
|
25
|
+
}
|
|
26
|
+
}`;
|
|
27
|
+
|
|
28
|
+
export default OutgoingPaymentsForInvoiceQueryOutput;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
type PayUmaInvoiceInput = {
|
|
4
|
+
nodeId: string;
|
|
5
|
+
|
|
6
|
+
encodedInvoice: string;
|
|
7
|
+
|
|
8
|
+
timeoutSecs: number;
|
|
9
|
+
|
|
10
|
+
maximumFeesMsats: number;
|
|
11
|
+
|
|
12
|
+
amountMsats?: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const PayUmaInvoiceInputFromJson = (obj: any): PayUmaInvoiceInput => {
|
|
16
|
+
return {
|
|
17
|
+
nodeId: obj["pay_uma_invoice_input_node_id"],
|
|
18
|
+
encodedInvoice: obj["pay_uma_invoice_input_encoded_invoice"],
|
|
19
|
+
timeoutSecs: obj["pay_uma_invoice_input_timeout_secs"],
|
|
20
|
+
maximumFeesMsats: obj["pay_uma_invoice_input_maximum_fees_msats"],
|
|
21
|
+
amountMsats: obj["pay_uma_invoice_input_amount_msats"],
|
|
22
|
+
} as PayUmaInvoiceInput;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default PayUmaInvoiceInput;
|