@lightsparkdev/lightspark-sdk 1.1.6 → 1.1.7
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 +6 -0
- package/dist/{chunk-7UNNCH5S.js → chunk-7UT6YX37.js} +833 -23
- package/dist/{index-5235e43b.d.ts → index-d31f4469.d.ts} +35 -27
- package/dist/index.cjs +834 -24
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/objects/index.cjs +779 -23
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +1 -1
- package/package.json +1 -1
- package/src/objects/Account.ts +162 -0
- package/src/objects/ChannelSnapshot.ts +36 -0
- package/src/objects/Entity.ts +182 -0
- package/src/objects/HtlcAttemptFailureCode.ts +2 -0
- package/src/objects/Invoice.ts +54 -0
- package/src/objects/InvoiceData.ts +54 -0
- package/src/objects/LightningTransaction.ts +54 -0
- package/src/objects/LightsparkNode.ts +63 -0
- package/src/objects/LightsparkNodeWithOSK.ts +33 -0
- package/src/objects/LightsparkNodeWithRemoteSigning.ts +33 -0
- package/src/objects/Node.ts +61 -0
- package/src/objects/OutgoingPayment.ts +74 -0
- package/src/objects/OutgoingPaymentAttempt.ts +20 -0
- package/src/objects/PaymentRequest.ts +54 -0
- package/src/objects/PaymentRequestData.ts +54 -0
- package/src/objects/Transaction.ts +54 -0
- package/src/objects/Wallet.ts +108 -0
- package/src/tests/integration/client.test.ts +46 -7
|
@@ -184,6 +184,33 @@ fragment InvoiceDataFragment on InvoiceData {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
187
|
+
lightspark_node_with_o_s_k_balances: balances {
|
|
188
|
+
__typename
|
|
189
|
+
balances_owned_balance: owned_balance {
|
|
190
|
+
__typename
|
|
191
|
+
currency_amount_original_value: original_value
|
|
192
|
+
currency_amount_original_unit: original_unit
|
|
193
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
194
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
195
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
196
|
+
}
|
|
197
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
198
|
+
__typename
|
|
199
|
+
currency_amount_original_value: original_value
|
|
200
|
+
currency_amount_original_unit: original_unit
|
|
201
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
202
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
203
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
204
|
+
}
|
|
205
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
206
|
+
__typename
|
|
207
|
+
currency_amount_original_value: original_value
|
|
208
|
+
currency_amount_original_unit: original_unit
|
|
209
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
210
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
211
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
212
|
+
}
|
|
213
|
+
}
|
|
187
214
|
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
188
215
|
__typename
|
|
189
216
|
secret_encrypted_value: encrypted_value
|
|
@@ -289,6 +316,33 @@ fragment InvoiceDataFragment on InvoiceData {
|
|
|
289
316
|
}
|
|
290
317
|
}
|
|
291
318
|
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
319
|
+
lightspark_node_with_remote_signing_balances: balances {
|
|
320
|
+
__typename
|
|
321
|
+
balances_owned_balance: owned_balance {
|
|
322
|
+
__typename
|
|
323
|
+
currency_amount_original_value: original_value
|
|
324
|
+
currency_amount_original_unit: original_unit
|
|
325
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
326
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
327
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
328
|
+
}
|
|
329
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
330
|
+
__typename
|
|
331
|
+
currency_amount_original_value: original_value
|
|
332
|
+
currency_amount_original_unit: original_unit
|
|
333
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
334
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
335
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
336
|
+
}
|
|
337
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
338
|
+
__typename
|
|
339
|
+
currency_amount_original_value: original_value
|
|
340
|
+
currency_amount_original_unit: original_unit
|
|
341
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
342
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
343
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
344
|
+
}
|
|
345
|
+
}
|
|
292
346
|
}
|
|
293
347
|
}
|
|
294
348
|
}`;
|
|
@@ -335,6 +335,33 @@ fragment LightningTransactionFragment on LightningTransaction {
|
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
338
|
+
lightspark_node_with_o_s_k_balances: balances {
|
|
339
|
+
__typename
|
|
340
|
+
balances_owned_balance: owned_balance {
|
|
341
|
+
__typename
|
|
342
|
+
currency_amount_original_value: original_value
|
|
343
|
+
currency_amount_original_unit: original_unit
|
|
344
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
345
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
346
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
347
|
+
}
|
|
348
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
349
|
+
__typename
|
|
350
|
+
currency_amount_original_value: original_value
|
|
351
|
+
currency_amount_original_unit: original_unit
|
|
352
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
353
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
354
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
355
|
+
}
|
|
356
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
357
|
+
__typename
|
|
358
|
+
currency_amount_original_value: original_value
|
|
359
|
+
currency_amount_original_unit: original_unit
|
|
360
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
361
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
362
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
363
|
+
}
|
|
364
|
+
}
|
|
338
365
|
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
339
366
|
__typename
|
|
340
367
|
secret_encrypted_value: encrypted_value
|
|
@@ -440,6 +467,33 @@ fragment LightningTransactionFragment on LightningTransaction {
|
|
|
440
467
|
}
|
|
441
468
|
}
|
|
442
469
|
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
470
|
+
lightspark_node_with_remote_signing_balances: balances {
|
|
471
|
+
__typename
|
|
472
|
+
balances_owned_balance: owned_balance {
|
|
473
|
+
__typename
|
|
474
|
+
currency_amount_original_value: original_value
|
|
475
|
+
currency_amount_original_unit: original_unit
|
|
476
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
477
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
478
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
479
|
+
}
|
|
480
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
481
|
+
__typename
|
|
482
|
+
currency_amount_original_value: original_value
|
|
483
|
+
currency_amount_original_unit: original_unit
|
|
484
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
485
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
486
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
487
|
+
}
|
|
488
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
489
|
+
__typename
|
|
490
|
+
currency_amount_original_value: original_value
|
|
491
|
+
currency_amount_original_unit: original_unit
|
|
492
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
493
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
494
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
495
|
+
}
|
|
496
|
+
}
|
|
443
497
|
}
|
|
444
498
|
}
|
|
445
499
|
}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { LightsparkException, type Query } from "@lightsparkdev/core";
|
|
4
4
|
import autoBind from "auto-bind";
|
|
5
5
|
import type LightsparkClient from "../client.js";
|
|
6
|
+
import type Balances from "./Balances.js";
|
|
7
|
+
import { BalancesFromJson } from "./Balances.js";
|
|
6
8
|
import BitcoinNetwork from "./BitcoinNetwork.js";
|
|
7
9
|
import type BlockchainBalance from "./BlockchainBalance.js";
|
|
8
10
|
import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
|
|
@@ -41,6 +43,7 @@ class LightsparkNode implements Node {
|
|
|
41
43
|
public readonly localBalance?: CurrencyAmount,
|
|
42
44
|
public readonly remoteBalance?: CurrencyAmount,
|
|
43
45
|
public readonly blockchainBalance?: BlockchainBalance,
|
|
46
|
+
public readonly balances?: Balances,
|
|
44
47
|
) {
|
|
45
48
|
autoBind(this);
|
|
46
49
|
}
|
|
@@ -273,6 +276,9 @@ export const LightsparkNodeFromJson = (obj: any): LightsparkNode => {
|
|
|
273
276
|
obj["lightspark_node_with_o_s_k_blockchain_balance"],
|
|
274
277
|
)
|
|
275
278
|
: undefined,
|
|
279
|
+
!!obj["lightspark_node_with_o_s_k_balances"]
|
|
280
|
+
? BalancesFromJson(obj["lightspark_node_with_o_s_k_balances"])
|
|
281
|
+
: undefined,
|
|
276
282
|
!!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
|
|
277
283
|
? SecretFromJson(
|
|
278
284
|
obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"],
|
|
@@ -326,6 +332,9 @@ export const LightsparkNodeFromJson = (obj: any): LightsparkNode => {
|
|
|
326
332
|
obj["lightspark_node_with_remote_signing_blockchain_balance"],
|
|
327
333
|
)
|
|
328
334
|
: undefined,
|
|
335
|
+
!!obj["lightspark_node_with_remote_signing_balances"]
|
|
336
|
+
? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"])
|
|
337
|
+
: undefined,
|
|
329
338
|
);
|
|
330
339
|
}
|
|
331
340
|
throw new LightsparkException(
|
|
@@ -436,6 +445,33 @@ fragment LightsparkNodeFragment on LightsparkNode {
|
|
|
436
445
|
}
|
|
437
446
|
}
|
|
438
447
|
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
448
|
+
lightspark_node_with_o_s_k_balances: balances {
|
|
449
|
+
__typename
|
|
450
|
+
balances_owned_balance: owned_balance {
|
|
451
|
+
__typename
|
|
452
|
+
currency_amount_original_value: original_value
|
|
453
|
+
currency_amount_original_unit: original_unit
|
|
454
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
455
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
456
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
457
|
+
}
|
|
458
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
459
|
+
__typename
|
|
460
|
+
currency_amount_original_value: original_value
|
|
461
|
+
currency_amount_original_unit: original_unit
|
|
462
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
463
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
464
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
465
|
+
}
|
|
466
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
467
|
+
__typename
|
|
468
|
+
currency_amount_original_value: original_value
|
|
469
|
+
currency_amount_original_unit: original_unit
|
|
470
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
471
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
472
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
473
|
+
}
|
|
474
|
+
}
|
|
439
475
|
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
440
476
|
__typename
|
|
441
477
|
secret_encrypted_value: encrypted_value
|
|
@@ -541,6 +577,33 @@ fragment LightsparkNodeFragment on LightsparkNode {
|
|
|
541
577
|
}
|
|
542
578
|
}
|
|
543
579
|
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
580
|
+
lightspark_node_with_remote_signing_balances: balances {
|
|
581
|
+
__typename
|
|
582
|
+
balances_owned_balance: owned_balance {
|
|
583
|
+
__typename
|
|
584
|
+
currency_amount_original_value: original_value
|
|
585
|
+
currency_amount_original_unit: original_unit
|
|
586
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
587
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
588
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
589
|
+
}
|
|
590
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
591
|
+
__typename
|
|
592
|
+
currency_amount_original_value: original_value
|
|
593
|
+
currency_amount_original_unit: original_unit
|
|
594
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
595
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
596
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
597
|
+
}
|
|
598
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
599
|
+
__typename
|
|
600
|
+
currency_amount_original_value: original_value
|
|
601
|
+
currency_amount_original_unit: original_unit
|
|
602
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
603
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
604
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
605
|
+
}
|
|
606
|
+
}
|
|
544
607
|
}
|
|
545
608
|
}`;
|
|
546
609
|
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { type Query } from "@lightsparkdev/core";
|
|
4
4
|
import autoBind from "auto-bind";
|
|
5
5
|
import type LightsparkClient from "../client.js";
|
|
6
|
+
import type Balances from "./Balances.js";
|
|
7
|
+
import { BalancesFromJson } from "./Balances.js";
|
|
6
8
|
import BitcoinNetwork from "./BitcoinNetwork.js";
|
|
7
9
|
import type BlockchainBalance from "./BlockchainBalance.js";
|
|
8
10
|
import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
|
|
@@ -40,6 +42,7 @@ class LightsparkNodeWithOSK implements LightsparkNode {
|
|
|
40
42
|
public readonly localBalance?: CurrencyAmount,
|
|
41
43
|
public readonly remoteBalance?: CurrencyAmount,
|
|
42
44
|
public readonly blockchainBalance?: BlockchainBalance,
|
|
45
|
+
public readonly balances?: Balances,
|
|
43
46
|
public readonly encryptedSigningPrivateKey?: Secret,
|
|
44
47
|
) {
|
|
45
48
|
autoBind(this);
|
|
@@ -271,6 +274,9 @@ export const LightsparkNodeWithOSKFromJson = (
|
|
|
271
274
|
obj["lightspark_node_with_o_s_k_blockchain_balance"],
|
|
272
275
|
)
|
|
273
276
|
: undefined,
|
|
277
|
+
!!obj["lightspark_node_with_o_s_k_balances"]
|
|
278
|
+
? BalancesFromJson(obj["lightspark_node_with_o_s_k_balances"])
|
|
279
|
+
: undefined,
|
|
274
280
|
!!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
|
|
275
281
|
? SecretFromJson(
|
|
276
282
|
obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"],
|
|
@@ -379,6 +385,33 @@ fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK {
|
|
|
379
385
|
}
|
|
380
386
|
}
|
|
381
387
|
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
388
|
+
lightspark_node_with_o_s_k_balances: balances {
|
|
389
|
+
__typename
|
|
390
|
+
balances_owned_balance: owned_balance {
|
|
391
|
+
__typename
|
|
392
|
+
currency_amount_original_value: original_value
|
|
393
|
+
currency_amount_original_unit: original_unit
|
|
394
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
395
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
396
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
397
|
+
}
|
|
398
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
399
|
+
__typename
|
|
400
|
+
currency_amount_original_value: original_value
|
|
401
|
+
currency_amount_original_unit: original_unit
|
|
402
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
403
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
404
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
405
|
+
}
|
|
406
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
407
|
+
__typename
|
|
408
|
+
currency_amount_original_value: original_value
|
|
409
|
+
currency_amount_original_unit: original_unit
|
|
410
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
411
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
412
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
413
|
+
}
|
|
414
|
+
}
|
|
382
415
|
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
383
416
|
__typename
|
|
384
417
|
secret_encrypted_value: encrypted_value
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { type Query } from "@lightsparkdev/core";
|
|
4
4
|
import autoBind from "auto-bind";
|
|
5
5
|
import type LightsparkClient from "../client.js";
|
|
6
|
+
import type Balances from "./Balances.js";
|
|
7
|
+
import { BalancesFromJson } from "./Balances.js";
|
|
6
8
|
import BitcoinNetwork from "./BitcoinNetwork.js";
|
|
7
9
|
import type BlockchainBalance from "./BlockchainBalance.js";
|
|
8
10
|
import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
|
|
@@ -38,6 +40,7 @@ class LightsparkNodeWithRemoteSigning implements LightsparkNode {
|
|
|
38
40
|
public readonly localBalance?: CurrencyAmount,
|
|
39
41
|
public readonly remoteBalance?: CurrencyAmount,
|
|
40
42
|
public readonly blockchainBalance?: BlockchainBalance,
|
|
43
|
+
public readonly balances?: Balances,
|
|
41
44
|
) {
|
|
42
45
|
autoBind(this);
|
|
43
46
|
}
|
|
@@ -276,6 +279,9 @@ export const LightsparkNodeWithRemoteSigningFromJson = (
|
|
|
276
279
|
obj["lightspark_node_with_remote_signing_blockchain_balance"],
|
|
277
280
|
)
|
|
278
281
|
: undefined,
|
|
282
|
+
!!obj["lightspark_node_with_remote_signing_balances"]
|
|
283
|
+
? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"])
|
|
284
|
+
: undefined,
|
|
279
285
|
);
|
|
280
286
|
};
|
|
281
287
|
|
|
@@ -379,6 +385,33 @@ fragment LightsparkNodeWithRemoteSigningFragment on LightsparkNodeWithRemoteSign
|
|
|
379
385
|
}
|
|
380
386
|
}
|
|
381
387
|
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
388
|
+
lightspark_node_with_remote_signing_balances: balances {
|
|
389
|
+
__typename
|
|
390
|
+
balances_owned_balance: owned_balance {
|
|
391
|
+
__typename
|
|
392
|
+
currency_amount_original_value: original_value
|
|
393
|
+
currency_amount_original_unit: original_unit
|
|
394
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
395
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
396
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
397
|
+
}
|
|
398
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
399
|
+
__typename
|
|
400
|
+
currency_amount_original_value: original_value
|
|
401
|
+
currency_amount_original_unit: original_unit
|
|
402
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
403
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
404
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
405
|
+
}
|
|
406
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
407
|
+
__typename
|
|
408
|
+
currency_amount_original_value: original_value
|
|
409
|
+
currency_amount_original_unit: original_unit
|
|
410
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
411
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
412
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
413
|
+
}
|
|
414
|
+
}
|
|
382
415
|
}`;
|
|
383
416
|
|
|
384
417
|
export default LightsparkNodeWithRemoteSigning;
|
package/src/objects/Node.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { LightsparkException, type Query } from "@lightsparkdev/core";
|
|
4
4
|
import autoBind from "auto-bind";
|
|
5
5
|
import type LightsparkClient from "../client.js";
|
|
6
|
+
import { BalancesFromJson } from "./Balances.js";
|
|
6
7
|
import BitcoinNetwork from "./BitcoinNetwork.js";
|
|
7
8
|
import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
|
|
8
9
|
import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
|
|
@@ -143,6 +144,9 @@ export const NodeFromJson = (obj: any): Node => {
|
|
|
143
144
|
obj["lightspark_node_with_o_s_k_blockchain_balance"],
|
|
144
145
|
)
|
|
145
146
|
: undefined,
|
|
147
|
+
!!obj["lightspark_node_with_o_s_k_balances"]
|
|
148
|
+
? BalancesFromJson(obj["lightspark_node_with_o_s_k_balances"])
|
|
149
|
+
: undefined,
|
|
146
150
|
!!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"]
|
|
147
151
|
? SecretFromJson(
|
|
148
152
|
obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"],
|
|
@@ -196,6 +200,9 @@ export const NodeFromJson = (obj: any): Node => {
|
|
|
196
200
|
obj["lightspark_node_with_remote_signing_blockchain_balance"],
|
|
197
201
|
)
|
|
198
202
|
: undefined,
|
|
203
|
+
!!obj["lightspark_node_with_remote_signing_balances"]
|
|
204
|
+
? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"])
|
|
205
|
+
: undefined,
|
|
199
206
|
);
|
|
200
207
|
}
|
|
201
208
|
throw new LightsparkException(
|
|
@@ -318,6 +325,33 @@ fragment NodeFragment on Node {
|
|
|
318
325
|
}
|
|
319
326
|
}
|
|
320
327
|
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
328
|
+
lightspark_node_with_o_s_k_balances: balances {
|
|
329
|
+
__typename
|
|
330
|
+
balances_owned_balance: owned_balance {
|
|
331
|
+
__typename
|
|
332
|
+
currency_amount_original_value: original_value
|
|
333
|
+
currency_amount_original_unit: original_unit
|
|
334
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
335
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
336
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
337
|
+
}
|
|
338
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
339
|
+
__typename
|
|
340
|
+
currency_amount_original_value: original_value
|
|
341
|
+
currency_amount_original_unit: original_unit
|
|
342
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
343
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
344
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
345
|
+
}
|
|
346
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
347
|
+
__typename
|
|
348
|
+
currency_amount_original_value: original_value
|
|
349
|
+
currency_amount_original_unit: original_unit
|
|
350
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
351
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
352
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
353
|
+
}
|
|
354
|
+
}
|
|
321
355
|
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
322
356
|
__typename
|
|
323
357
|
secret_encrypted_value: encrypted_value
|
|
@@ -423,6 +457,33 @@ fragment NodeFragment on Node {
|
|
|
423
457
|
}
|
|
424
458
|
}
|
|
425
459
|
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
460
|
+
lightspark_node_with_remote_signing_balances: balances {
|
|
461
|
+
__typename
|
|
462
|
+
balances_owned_balance: owned_balance {
|
|
463
|
+
__typename
|
|
464
|
+
currency_amount_original_value: original_value
|
|
465
|
+
currency_amount_original_unit: original_unit
|
|
466
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
467
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
468
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
469
|
+
}
|
|
470
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
471
|
+
__typename
|
|
472
|
+
currency_amount_original_value: original_value
|
|
473
|
+
currency_amount_original_unit: original_unit
|
|
474
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
475
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
476
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
477
|
+
}
|
|
478
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
479
|
+
__typename
|
|
480
|
+
currency_amount_original_value: original_value
|
|
481
|
+
currency_amount_original_unit: original_unit
|
|
482
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
483
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
484
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
485
|
+
}
|
|
486
|
+
}
|
|
426
487
|
}
|
|
427
488
|
}`;
|
|
428
489
|
|
|
@@ -90,6 +90,10 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
|
|
|
90
90
|
}
|
|
91
91
|
outgoing_payment_attempt_channel_snapshot: channel_snapshot {
|
|
92
92
|
__typename
|
|
93
|
+
channel_snapshot_channel: channel {
|
|
94
|
+
id
|
|
95
|
+
}
|
|
96
|
+
channel_snapshot_timestamp: timestamp
|
|
93
97
|
channel_snapshot_local_balance: local_balance {
|
|
94
98
|
__typename
|
|
95
99
|
currency_amount_original_value: original_value
|
|
@@ -114,6 +118,22 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
|
|
|
114
118
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
115
119
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
116
120
|
}
|
|
121
|
+
channel_snapshot_remote_balance: remote_balance {
|
|
122
|
+
__typename
|
|
123
|
+
currency_amount_original_value: original_value
|
|
124
|
+
currency_amount_original_unit: original_unit
|
|
125
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
126
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
127
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
128
|
+
}
|
|
129
|
+
channel_snapshot_remote_unsettled_balance: remote_unsettled_balance {
|
|
130
|
+
__typename
|
|
131
|
+
currency_amount_original_value: original_value
|
|
132
|
+
currency_amount_original_unit: original_unit
|
|
133
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
134
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
135
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
136
|
+
}
|
|
117
137
|
}
|
|
118
138
|
}
|
|
119
139
|
}
|
|
@@ -343,6 +363,33 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
343
363
|
}
|
|
344
364
|
}
|
|
345
365
|
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
366
|
+
lightspark_node_with_o_s_k_balances: balances {
|
|
367
|
+
__typename
|
|
368
|
+
balances_owned_balance: owned_balance {
|
|
369
|
+
__typename
|
|
370
|
+
currency_amount_original_value: original_value
|
|
371
|
+
currency_amount_original_unit: original_unit
|
|
372
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
373
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
374
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
375
|
+
}
|
|
376
|
+
balances_available_to_send_balance: available_to_send_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
|
+
balances_available_to_withdraw_balance: available_to_withdraw_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
|
+
}
|
|
346
393
|
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
347
394
|
__typename
|
|
348
395
|
secret_encrypted_value: encrypted_value
|
|
@@ -448,6 +495,33 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
448
495
|
}
|
|
449
496
|
}
|
|
450
497
|
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
498
|
+
lightspark_node_with_remote_signing_balances: balances {
|
|
499
|
+
__typename
|
|
500
|
+
balances_owned_balance: owned_balance {
|
|
501
|
+
__typename
|
|
502
|
+
currency_amount_original_value: original_value
|
|
503
|
+
currency_amount_original_unit: original_unit
|
|
504
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
505
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
506
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
507
|
+
}
|
|
508
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
509
|
+
__typename
|
|
510
|
+
currency_amount_original_value: original_value
|
|
511
|
+
currency_amount_original_unit: original_unit
|
|
512
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
513
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
514
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
515
|
+
}
|
|
516
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
517
|
+
__typename
|
|
518
|
+
currency_amount_original_value: original_value
|
|
519
|
+
currency_amount_original_unit: original_unit
|
|
520
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
521
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
522
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
523
|
+
}
|
|
524
|
+
}
|
|
451
525
|
}
|
|
452
526
|
}
|
|
453
527
|
}
|
|
@@ -177,6 +177,10 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
|
|
|
177
177
|
}
|
|
178
178
|
outgoing_payment_attempt_channel_snapshot: channel_snapshot {
|
|
179
179
|
__typename
|
|
180
|
+
channel_snapshot_channel: channel {
|
|
181
|
+
id
|
|
182
|
+
}
|
|
183
|
+
channel_snapshot_timestamp: timestamp
|
|
180
184
|
channel_snapshot_local_balance: local_balance {
|
|
181
185
|
__typename
|
|
182
186
|
currency_amount_original_value: original_value
|
|
@@ -201,6 +205,22 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
|
|
|
201
205
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
202
206
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
203
207
|
}
|
|
208
|
+
channel_snapshot_remote_balance: remote_balance {
|
|
209
|
+
__typename
|
|
210
|
+
currency_amount_original_value: original_value
|
|
211
|
+
currency_amount_original_unit: original_unit
|
|
212
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
213
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
214
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
215
|
+
}
|
|
216
|
+
channel_snapshot_remote_unsettled_balance: remote_unsettled_balance {
|
|
217
|
+
__typename
|
|
218
|
+
currency_amount_original_value: original_value
|
|
219
|
+
currency_amount_original_unit: original_unit
|
|
220
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
221
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
222
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
223
|
+
}
|
|
204
224
|
}
|
|
205
225
|
}`;
|
|
206
226
|
|
|
@@ -191,6 +191,33 @@ fragment PaymentRequestFragment on PaymentRequest {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
194
|
+
lightspark_node_with_o_s_k_balances: balances {
|
|
195
|
+
__typename
|
|
196
|
+
balances_owned_balance: owned_balance {
|
|
197
|
+
__typename
|
|
198
|
+
currency_amount_original_value: original_value
|
|
199
|
+
currency_amount_original_unit: original_unit
|
|
200
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
201
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
202
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
203
|
+
}
|
|
204
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
205
|
+
__typename
|
|
206
|
+
currency_amount_original_value: original_value
|
|
207
|
+
currency_amount_original_unit: original_unit
|
|
208
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
209
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
210
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
211
|
+
}
|
|
212
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
213
|
+
__typename
|
|
214
|
+
currency_amount_original_value: original_value
|
|
215
|
+
currency_amount_original_unit: original_unit
|
|
216
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
217
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
218
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
219
|
+
}
|
|
220
|
+
}
|
|
194
221
|
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
195
222
|
__typename
|
|
196
223
|
secret_encrypted_value: encrypted_value
|
|
@@ -296,6 +323,33 @@ fragment PaymentRequestFragment on PaymentRequest {
|
|
|
296
323
|
}
|
|
297
324
|
}
|
|
298
325
|
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
326
|
+
lightspark_node_with_remote_signing_balances: balances {
|
|
327
|
+
__typename
|
|
328
|
+
balances_owned_balance: owned_balance {
|
|
329
|
+
__typename
|
|
330
|
+
currency_amount_original_value: original_value
|
|
331
|
+
currency_amount_original_unit: original_unit
|
|
332
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
333
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
334
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
335
|
+
}
|
|
336
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
337
|
+
__typename
|
|
338
|
+
currency_amount_original_value: original_value
|
|
339
|
+
currency_amount_original_unit: original_unit
|
|
340
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
341
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
342
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
343
|
+
}
|
|
344
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
345
|
+
__typename
|
|
346
|
+
currency_amount_original_value: original_value
|
|
347
|
+
currency_amount_original_unit: original_unit
|
|
348
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
349
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
350
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
351
|
+
}
|
|
352
|
+
}
|
|
299
353
|
}
|
|
300
354
|
}
|
|
301
355
|
}
|