@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.
Files changed (84) hide show
  1. package/CHANGELOG.md +22 -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 +3393 -841
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +388 -93
  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 +10 -8
  12. package/src/NodeKeyLoaderCache.ts +87 -0
  13. package/src/SigningKeyLoader.ts +177 -0
  14. package/src/client.ts +160 -71
  15. package/src/graphql/CreateInvoice.ts +3 -2
  16. package/src/graphql/CreateLnurlInvoice.ts +2 -0
  17. package/src/graphql/CreateUmaInvoice.ts +23 -0
  18. package/src/graphql/MultiNodeDashboard.ts +0 -3
  19. package/src/graphql/PayUmaInvoice.ts +29 -0
  20. package/src/graphql/RecoverNodeSigningKey.ts +1 -1
  21. package/src/graphql/SingleNodeDashboard.ts +0 -1
  22. package/src/lightspark_crypto/lightspark_crypto.d.ts +157 -0
  23. package/src/lightspark_crypto/lightspark_crypto.js +1010 -0
  24. package/src/lightspark_crypto/lightspark_crypto_bg.wasm +0 -0
  25. package/src/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts +120 -0
  26. package/src/lightspark_crypto/package.json +11 -0
  27. package/src/objects/Account.ts +424 -107
  28. package/src/objects/AccountToNodesConnection.ts +0 -13
  29. package/src/objects/{CryptoSanctionsScreeningProvider.ts → ComplianceProvider.ts} +3 -3
  30. package/src/objects/Connection.ts +0 -6
  31. package/src/objects/CreateInvoiceInput.ts +0 -6
  32. package/src/objects/CreateLnurlInvoiceInput.ts +0 -6
  33. package/src/objects/CreateTestModePaymentoutput.ts +13 -1
  34. package/src/objects/CreateUmaInvoiceInput.ts +24 -0
  35. package/src/objects/DeclineToSignMessagesInput.ts +16 -0
  36. package/src/objects/DeclineToSignMessagesOutput.ts +28 -0
  37. package/src/objects/Entity.ts +401 -66
  38. package/src/objects/IdAndSignature.ts +16 -0
  39. package/src/objects/IncomingPayment.ts +18 -5
  40. package/src/objects/Invoice.ts +118 -21
  41. package/src/objects/InvoiceData.ts +118 -21
  42. package/src/objects/LightningTransaction.ts +149 -25
  43. package/src/objects/LightsparkNode.ts +270 -110
  44. package/src/objects/LightsparkNodeOwner.ts +4 -0
  45. package/src/objects/LightsparkNodeWithOSK.ts +389 -0
  46. package/src/objects/LightsparkNodeWithRemoteSigning.ts +384 -0
  47. package/src/objects/Node.ts +209 -56
  48. package/src/objects/OutgoingPayment.ts +136 -21
  49. package/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts +25 -0
  50. package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +28 -0
  51. package/src/objects/PayUmaInvoiceInput.ts +25 -0
  52. package/src/objects/{LightsparkNodePurpose.ts → PaymentDirection.ts} +5 -7
  53. package/src/objects/PaymentRequest.ts +118 -21
  54. package/src/objects/PaymentRequestData.ts +118 -21
  55. package/src/objects/PostTransactionData.ts +39 -0
  56. package/src/objects/RegisterPaymentInput.ts +31 -0
  57. package/src/objects/RegisterPaymentOutput.ts +23 -0
  58. package/src/objects/ReleaseChannelPerCommitmentSecretInput.ts +23 -0
  59. package/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts +23 -0
  60. package/src/objects/ReleasePaymentPreimageInput.ts +20 -0
  61. package/src/objects/ReleasePaymentPreimageOutput.ts +23 -0
  62. package/src/objects/RemoteSigningSubEventType.ts +26 -0
  63. package/src/objects/ScreenNodeInput.ts +20 -0
  64. package/src/objects/ScreenNodeOutput.ts +22 -0
  65. package/src/objects/SetInvoicePaymentHashInput.ts +24 -0
  66. package/src/objects/SetInvoicePaymentHashOutput.ts +23 -0
  67. package/src/objects/SignInvoiceInput.ts +19 -0
  68. package/src/objects/SignInvoiceOutput.ts +21 -0
  69. package/src/objects/SignMessagesInput.ts +18 -0
  70. package/src/objects/SignMessagesOutput.ts +26 -0
  71. package/src/objects/Signable.ts +58 -0
  72. package/src/objects/SignablePayload.ts +93 -0
  73. package/src/objects/SignablePayloadStatus.ts +17 -0
  74. package/src/objects/SingleNodeDashboard.ts +0 -2
  75. package/src/objects/Transaction.ts +149 -25
  76. package/src/objects/UpdateChannelPerCommitmentPointInput.ts +25 -0
  77. package/src/objects/UpdateChannelPerCommitmentPointOutput.ts +23 -0
  78. package/src/objects/UpdateNodeSharedSecretInput.ts +18 -0
  79. package/src/objects/UpdateNodeSharedSecretOutput.ts +23 -0
  80. package/src/objects/Wallet.ts +265 -45
  81. package/src/objects/index.ts +37 -4
  82. package/src/objects/ScreenBitcoinAddressesInput.ts +0 -23
  83. package/src/objects/ScreenBitcoinAddressesOutput.ts +0 -25
  84. /package/src/{__tests__ → tests}/webhooks.test.ts +0 -0
@@ -0,0 +1,22 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import RiskRating from "./RiskRating.js";
4
+
5
+ type ScreenNodeOutput = {
6
+ rating: RiskRating;
7
+ };
8
+
9
+ export const ScreenNodeOutputFromJson = (obj: any): ScreenNodeOutput => {
10
+ return {
11
+ rating:
12
+ RiskRating[obj["screen_node_output_rating"]] ?? RiskRating.FUTURE_VALUE,
13
+ } as ScreenNodeOutput;
14
+ };
15
+
16
+ export const FRAGMENT = `
17
+ fragment ScreenNodeOutputFragment on ScreenNodeOutput {
18
+ __typename
19
+ screen_node_output_rating: rating
20
+ }`;
21
+
22
+ export default ScreenNodeOutput;
@@ -0,0 +1,24 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type SetInvoicePaymentHashInput = {
4
+ /** The invoice that needs to be updated. **/
5
+ invoiceId: string;
6
+
7
+ /** The 32-byte hash of the payment preimage. **/
8
+ paymentHash: string;
9
+
10
+ /** The 32-byte nonce used to generate the invoice preimage. **/
11
+ preimageNonce: string;
12
+ };
13
+
14
+ export const SetInvoicePaymentHashInputFromJson = (
15
+ obj: any,
16
+ ): SetInvoicePaymentHashInput => {
17
+ return {
18
+ invoiceId: obj["set_invoice_payment_hash_input_invoice_id"],
19
+ paymentHash: obj["set_invoice_payment_hash_input_payment_hash"],
20
+ preimageNonce: obj["set_invoice_payment_hash_input_preimage_nonce"],
21
+ } as SetInvoicePaymentHashInput;
22
+ };
23
+
24
+ export default SetInvoicePaymentHashInput;
@@ -0,0 +1,23 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type SetInvoicePaymentHashOutput = {
4
+ invoiceId: string;
5
+ };
6
+
7
+ export const SetInvoicePaymentHashOutputFromJson = (
8
+ obj: any,
9
+ ): SetInvoicePaymentHashOutput => {
10
+ return {
11
+ invoiceId: obj["set_invoice_payment_hash_output_invoice"].id,
12
+ } as SetInvoicePaymentHashOutput;
13
+ };
14
+
15
+ export const FRAGMENT = `
16
+ fragment SetInvoicePaymentHashOutputFragment on SetInvoicePaymentHashOutput {
17
+ __typename
18
+ set_invoice_payment_hash_output_invoice: invoice {
19
+ id
20
+ }
21
+ }`;
22
+
23
+ export default SetInvoicePaymentHashOutput;
@@ -0,0 +1,19 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type SignInvoiceInput = {
4
+ invoiceId: string;
5
+
6
+ signature: string;
7
+
8
+ recoveryId: number;
9
+ };
10
+
11
+ export const SignInvoiceInputFromJson = (obj: any): SignInvoiceInput => {
12
+ return {
13
+ invoiceId: obj["sign_invoice_input_invoice_id"],
14
+ signature: obj["sign_invoice_input_signature"],
15
+ recoveryId: obj["sign_invoice_input_recovery_id"],
16
+ } as SignInvoiceInput;
17
+ };
18
+
19
+ export default SignInvoiceInput;
@@ -0,0 +1,21 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type SignInvoiceOutput = {
4
+ invoiceId: string;
5
+ };
6
+
7
+ export const SignInvoiceOutputFromJson = (obj: any): SignInvoiceOutput => {
8
+ return {
9
+ invoiceId: obj["sign_invoice_output_invoice"].id,
10
+ } as SignInvoiceOutput;
11
+ };
12
+
13
+ export const FRAGMENT = `
14
+ fragment SignInvoiceOutputFragment on SignInvoiceOutput {
15
+ __typename
16
+ sign_invoice_output_invoice: invoice {
17
+ id
18
+ }
19
+ }`;
20
+
21
+ export default SignInvoiceOutput;
@@ -0,0 +1,18 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import type IdAndSignature from "./IdAndSignature.js";
4
+ import { IdAndSignatureFromJson } from "./IdAndSignature.js";
5
+
6
+ type SignMessagesInput = {
7
+ signatures: IdAndSignature[];
8
+ };
9
+
10
+ export const SignMessagesInputFromJson = (obj: any): SignMessagesInput => {
11
+ return {
12
+ signatures: obj["sign_messages_input_signatures"].map((e) =>
13
+ IdAndSignatureFromJson(e),
14
+ ),
15
+ } as SignMessagesInput;
16
+ };
17
+
18
+ export default SignMessagesInput;
@@ -0,0 +1,26 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import type SignablePayload from "./SignablePayload.js";
4
+ import { SignablePayloadFromJson } from "./SignablePayload.js";
5
+
6
+ type SignMessagesOutput = {
7
+ signedPayloads: SignablePayload[];
8
+ };
9
+
10
+ export const SignMessagesOutputFromJson = (obj: any): SignMessagesOutput => {
11
+ return {
12
+ signedPayloads: obj["sign_messages_output_signed_payloads"].map((e) =>
13
+ SignablePayloadFromJson(e),
14
+ ),
15
+ } as SignMessagesOutput;
16
+ };
17
+
18
+ export const FRAGMENT = `
19
+ fragment SignMessagesOutputFragment on SignMessagesOutput {
20
+ __typename
21
+ sign_messages_output_signed_payloads: signed_payloads {
22
+ id
23
+ }
24
+ }`;
25
+
26
+ export default SignMessagesOutput;
@@ -0,0 +1,58 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import { type Query } from "@lightsparkdev/core";
4
+ import type Entity from "./Entity.js";
5
+
6
+ type Signable = Entity & {
7
+ /**
8
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
9
+ * string.
10
+ **/
11
+ id: string;
12
+
13
+ /** The date and time when the entity was first created. **/
14
+ createdAt: string;
15
+
16
+ /** The date and time when the entity was last updated. **/
17
+ updatedAt: string;
18
+
19
+ /** The typename of the object **/
20
+ typename: string;
21
+ };
22
+
23
+ export const SignableFromJson = (obj: any): Signable => {
24
+ return {
25
+ id: obj["signable_id"],
26
+ createdAt: obj["signable_created_at"],
27
+ updatedAt: obj["signable_updated_at"],
28
+ typename: "Signable",
29
+ } as Signable;
30
+ };
31
+
32
+ export const FRAGMENT = `
33
+ fragment SignableFragment on Signable {
34
+ __typename
35
+ signable_id: id
36
+ signable_created_at: created_at
37
+ signable_updated_at: updated_at
38
+ }`;
39
+
40
+ export const getSignableQuery = (id: string): Query<Signable> => {
41
+ return {
42
+ queryPayload: `
43
+ query GetSignable($id: ID!) {
44
+ entity(id: $id) {
45
+ ... on Signable {
46
+ ...SignableFragment
47
+ }
48
+ }
49
+ }
50
+
51
+ ${FRAGMENT}
52
+ `,
53
+ variables: { id },
54
+ constructObject: (data: any) => SignableFromJson(data.entity),
55
+ };
56
+ };
57
+
58
+ export default Signable;
@@ -0,0 +1,93 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import { type Query } from "@lightsparkdev/core";
4
+ import type Entity from "./Entity.js";
5
+ import SignablePayloadStatus from "./SignablePayloadStatus.js";
6
+
7
+ type SignablePayload = Entity & {
8
+ /**
9
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
10
+ * string.
11
+ **/
12
+ id: string;
13
+
14
+ /** The date and time when the entity was first created. **/
15
+ createdAt: string;
16
+
17
+ /** The date and time when the entity was last updated. **/
18
+ updatedAt: string;
19
+
20
+ /** The payload that needs to be signed. **/
21
+ payload: string;
22
+
23
+ /** The consistent method for generating the same set of accounts and wallets for a given private key **/
24
+ derivationPath: string;
25
+
26
+ /** The status of the payload. **/
27
+ status: SignablePayloadStatus;
28
+
29
+ /** The signable this payload belongs to. **/
30
+ signableId: string;
31
+
32
+ /** The typename of the object **/
33
+ typename: string;
34
+
35
+ /** The tweak value to add. **/
36
+ addTweak?: string;
37
+
38
+ /** The tweak value to multiply. **/
39
+ mulTweak?: string;
40
+ };
41
+
42
+ export const SignablePayloadFromJson = (obj: any): SignablePayload => {
43
+ return {
44
+ id: obj["signable_payload_id"],
45
+ createdAt: obj["signable_payload_created_at"],
46
+ updatedAt: obj["signable_payload_updated_at"],
47
+ payload: obj["signable_payload_payload"],
48
+ derivationPath: obj["signable_payload_derivation_path"],
49
+ status:
50
+ SignablePayloadStatus[obj["signable_payload_status"]] ??
51
+ SignablePayloadStatus.FUTURE_VALUE,
52
+ signableId: obj["signable_payload_signable"].id,
53
+ typename: "SignablePayload",
54
+ addTweak: obj["signable_payload_add_tweak"],
55
+ mulTweak: obj["signable_payload_mul_tweak"],
56
+ } as SignablePayload;
57
+ };
58
+
59
+ export const FRAGMENT = `
60
+ fragment SignablePayloadFragment on SignablePayload {
61
+ __typename
62
+ signable_payload_id: id
63
+ signable_payload_created_at: created_at
64
+ signable_payload_updated_at: updated_at
65
+ signable_payload_payload: payload
66
+ signable_payload_derivation_path: derivation_path
67
+ signable_payload_status: status
68
+ signable_payload_add_tweak: add_tweak
69
+ signable_payload_mul_tweak: mul_tweak
70
+ signable_payload_signable: signable {
71
+ id
72
+ }
73
+ }`;
74
+
75
+ export const getSignablePayloadQuery = (id: string): Query<SignablePayload> => {
76
+ return {
77
+ queryPayload: `
78
+ query GetSignablePayload($id: ID!) {
79
+ entity(id: $id) {
80
+ ... on SignablePayload {
81
+ ...SignablePayloadFragment
82
+ }
83
+ }
84
+ }
85
+
86
+ ${FRAGMENT}
87
+ `,
88
+ variables: { id },
89
+ constructObject: (data: any) => SignablePayloadFromJson(data.entity),
90
+ };
91
+ };
92
+
93
+ export default SignablePayload;
@@ -0,0 +1,17 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ export enum SignablePayloadStatus {
4
+ /**
5
+ * This is an enum value that represents values that could be added in the future.
6
+ * Clients should support unknown values as more of them could be added without notice.
7
+ */
8
+ FUTURE_VALUE = "FUTURE_VALUE",
9
+
10
+ CREATED = "CREATED",
11
+
12
+ SIGNED = "SIGNED",
13
+
14
+ VALIDATION_FAILED = "VALIDATION_FAILED",
15
+ }
16
+
17
+ export default SignablePayloadStatus;
@@ -1,6 +1,5 @@
1
1
  import type { Maybe } from "@lightsparkdev/core";
2
2
  import type CurrencyAmount from "./CurrencyAmount.js";
3
- import type LightsparkNodePurpose from "./LightsparkNodePurpose.js";
4
3
  import type LightsparkNodeStatus from "./LightsparkNodeStatus.js";
5
4
  import type NodeAddressType from "./NodeAddressType.js";
6
5
  import type Transaction from "./Transaction.js";
@@ -8,7 +7,6 @@ import type Transaction from "./Transaction.js";
8
7
  type SingleNodeDashboard = {
9
8
  id: string;
10
9
  displayName: string;
11
- purpose: Maybe<LightsparkNodePurpose>;
12
10
  color: Maybe<string>;
13
11
  publicKey: Maybe<string>;
14
12
  status: Maybe<LightsparkNodeStatus>;
@@ -11,6 +11,7 @@ import IncomingPayment from "./IncomingPayment.js";
11
11
  import OutgoingPayment from "./OutgoingPayment.js";
12
12
  import PaymentFailureReason from "./PaymentFailureReason.js";
13
13
  import { PaymentRequestDataFromJson } from "./PaymentRequestData.js";
14
+ import { PostTransactionDataFromJson } from "./PostTransactionData.js";
14
15
  import { RichTextFromJson } from "./RichText.js";
15
16
  import type RoutingTransaction from "./RoutingTransaction.js";
16
17
  import RoutingTransactionFailureReason from "./RoutingTransactionFailureReason.js";
@@ -128,8 +129,10 @@ export const TransactionFromJson = (obj: any): Transaction => {
128
129
  "IncomingPayment",
129
130
  obj["incoming_payment_resolved_at"],
130
131
  obj["incoming_payment_transaction_hash"],
131
- obj["incoming_payment_origin"]?.id ?? undefined,
132
132
  obj["incoming_payment_payment_request"]?.id ?? undefined,
133
+ obj["incoming_payment_uma_post_transaction_data"]?.map((e) =>
134
+ PostTransactionDataFromJson(e),
135
+ ),
133
136
  );
134
137
  }
135
138
  if (obj["__typename"] == "OutgoingPayment") {
@@ -160,6 +163,9 @@ export const TransactionFromJson = (obj: any): Transaction => {
160
163
  !!obj["outgoing_payment_failure_message"]
161
164
  ? RichTextFromJson(obj["outgoing_payment_failure_message"])
162
165
  : undefined,
166
+ obj["outgoing_payment_uma_post_transaction_data"]?.map((e) =>
167
+ PostTransactionDataFromJson(e),
168
+ ),
163
169
  );
164
170
  }
165
171
  if (obj["__typename"] == "RoutingTransaction") {
@@ -334,15 +340,24 @@ fragment TransactionFragment on Transaction {
334
340
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
335
341
  }
336
342
  incoming_payment_transaction_hash: transaction_hash
337
- incoming_payment_origin: origin {
338
- id
339
- }
340
343
  incoming_payment_destination: destination {
341
344
  id
342
345
  }
343
346
  incoming_payment_payment_request: payment_request {
344
347
  id
345
348
  }
349
+ incoming_payment_uma_post_transaction_data: uma_post_transaction_data {
350
+ __typename
351
+ post_transaction_data_utxo: utxo
352
+ post_transaction_data_amount: amount {
353
+ __typename
354
+ currency_amount_original_value: original_value
355
+ currency_amount_original_unit: original_unit
356
+ currency_amount_preferred_currency_unit: preferred_currency_unit
357
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
358
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
359
+ }
360
+ }
346
361
  }
347
362
  ... on OutgoingPayment {
348
363
  __typename
@@ -406,24 +421,54 @@ fragment TransactionFragment on Transaction {
406
421
  graph_node_display_name: display_name
407
422
  graph_node_public_key: public_key
408
423
  }
409
- ... on LightsparkNode {
424
+ ... on LightsparkNodeWithOSK {
410
425
  __typename
411
- lightspark_node_id: id
412
- lightspark_node_created_at: created_at
413
- lightspark_node_updated_at: updated_at
414
- lightspark_node_alias: alias
415
- lightspark_node_bitcoin_network: bitcoin_network
416
- lightspark_node_color: color
417
- lightspark_node_conductivity: conductivity
418
- lightspark_node_display_name: display_name
419
- lightspark_node_public_key: public_key
420
- lightspark_node_account: account {
426
+ lightspark_node_with_o_s_k_id: id
427
+ lightspark_node_with_o_s_k_created_at: created_at
428
+ lightspark_node_with_o_s_k_updated_at: updated_at
429
+ lightspark_node_with_o_s_k_alias: alias
430
+ lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network
431
+ lightspark_node_with_o_s_k_color: color
432
+ lightspark_node_with_o_s_k_conductivity: conductivity
433
+ lightspark_node_with_o_s_k_display_name: display_name
434
+ lightspark_node_with_o_s_k_public_key: public_key
435
+ lightspark_node_with_o_s_k_owner: owner {
421
436
  id
422
437
  }
423
- lightspark_node_owner: owner {
424
- id
438
+ lightspark_node_with_o_s_k_status: status
439
+ lightspark_node_with_o_s_k_total_balance: total_balance {
440
+ __typename
441
+ currency_amount_original_value: original_value
442
+ currency_amount_original_unit: original_unit
443
+ currency_amount_preferred_currency_unit: preferred_currency_unit
444
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
445
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
446
+ }
447
+ lightspark_node_with_o_s_k_total_local_balance: total_local_balance {
448
+ __typename
449
+ currency_amount_original_value: original_value
450
+ currency_amount_original_unit: original_unit
451
+ currency_amount_preferred_currency_unit: preferred_currency_unit
452
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
453
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
454
+ }
455
+ lightspark_node_with_o_s_k_local_balance: local_balance {
456
+ __typename
457
+ currency_amount_original_value: original_value
458
+ currency_amount_original_unit: original_unit
459
+ currency_amount_preferred_currency_unit: preferred_currency_unit
460
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
461
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
462
+ }
463
+ lightspark_node_with_o_s_k_remote_balance: remote_balance {
464
+ __typename
465
+ currency_amount_original_value: original_value
466
+ currency_amount_original_unit: original_unit
467
+ currency_amount_preferred_currency_unit: preferred_currency_unit
468
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
469
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
425
470
  }
426
- lightspark_node_blockchain_balance: blockchain_balance {
471
+ lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance {
427
472
  __typename
428
473
  blockchain_balance_total_balance: total_balance {
429
474
  __typename
@@ -474,12 +519,29 @@ fragment TransactionFragment on Transaction {
474
519
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
475
520
  }
476
521
  }
477
- lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key {
522
+ lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
523
+ lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
478
524
  __typename
479
525
  secret_encrypted_value: encrypted_value
480
526
  secret_cipher: cipher
481
527
  }
482
- lightspark_node_total_balance: total_balance {
528
+ }
529
+ ... on LightsparkNodeWithRemoteSigning {
530
+ __typename
531
+ lightspark_node_with_remote_signing_id: id
532
+ lightspark_node_with_remote_signing_created_at: created_at
533
+ lightspark_node_with_remote_signing_updated_at: updated_at
534
+ lightspark_node_with_remote_signing_alias: alias
535
+ lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network
536
+ lightspark_node_with_remote_signing_color: color
537
+ lightspark_node_with_remote_signing_conductivity: conductivity
538
+ lightspark_node_with_remote_signing_display_name: display_name
539
+ lightspark_node_with_remote_signing_public_key: public_key
540
+ lightspark_node_with_remote_signing_owner: owner {
541
+ id
542
+ }
543
+ lightspark_node_with_remote_signing_status: status
544
+ lightspark_node_with_remote_signing_total_balance: total_balance {
483
545
  __typename
484
546
  currency_amount_original_value: original_value
485
547
  currency_amount_original_unit: original_unit
@@ -487,7 +549,7 @@ fragment TransactionFragment on Transaction {
487
549
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
488
550
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
489
551
  }
490
- lightspark_node_total_local_balance: total_local_balance {
552
+ lightspark_node_with_remote_signing_total_local_balance: total_local_balance {
491
553
  __typename
492
554
  currency_amount_original_value: original_value
493
555
  currency_amount_original_unit: original_unit
@@ -495,7 +557,7 @@ fragment TransactionFragment on Transaction {
495
557
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
496
558
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
497
559
  }
498
- lightspark_node_local_balance: local_balance {
560
+ lightspark_node_with_remote_signing_local_balance: local_balance {
499
561
  __typename
500
562
  currency_amount_original_value: original_value
501
563
  currency_amount_original_unit: original_unit
@@ -503,8 +565,7 @@ fragment TransactionFragment on Transaction {
503
565
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
504
566
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
505
567
  }
506
- lightspark_node_purpose: purpose
507
- lightspark_node_remote_balance: remote_balance {
568
+ lightspark_node_with_remote_signing_remote_balance: remote_balance {
508
569
  __typename
509
570
  currency_amount_original_value: original_value
510
571
  currency_amount_original_unit: original_unit
@@ -512,7 +573,58 @@ fragment TransactionFragment on Transaction {
512
573
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
513
574
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
514
575
  }
515
- lightspark_node_status: status
576
+ lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance {
577
+ __typename
578
+ blockchain_balance_total_balance: total_balance {
579
+ __typename
580
+ currency_amount_original_value: original_value
581
+ currency_amount_original_unit: original_unit
582
+ currency_amount_preferred_currency_unit: preferred_currency_unit
583
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
584
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
585
+ }
586
+ blockchain_balance_confirmed_balance: confirmed_balance {
587
+ __typename
588
+ currency_amount_original_value: original_value
589
+ currency_amount_original_unit: original_unit
590
+ currency_amount_preferred_currency_unit: preferred_currency_unit
591
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
592
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
593
+ }
594
+ blockchain_balance_unconfirmed_balance: unconfirmed_balance {
595
+ __typename
596
+ currency_amount_original_value: original_value
597
+ currency_amount_original_unit: original_unit
598
+ currency_amount_preferred_currency_unit: preferred_currency_unit
599
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
600
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
601
+ }
602
+ blockchain_balance_locked_balance: locked_balance {
603
+ __typename
604
+ currency_amount_original_value: original_value
605
+ currency_amount_original_unit: original_unit
606
+ currency_amount_preferred_currency_unit: preferred_currency_unit
607
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
608
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
609
+ }
610
+ blockchain_balance_required_reserve: required_reserve {
611
+ __typename
612
+ currency_amount_original_value: original_value
613
+ currency_amount_original_unit: original_unit
614
+ currency_amount_preferred_currency_unit: preferred_currency_unit
615
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
616
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
617
+ }
618
+ blockchain_balance_available_balance: available_balance {
619
+ __typename
620
+ currency_amount_original_value: original_value
621
+ currency_amount_original_unit: original_unit
622
+ currency_amount_preferred_currency_unit: preferred_currency_unit
623
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
624
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
625
+ }
626
+ }
627
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
516
628
  }
517
629
  }
518
630
  }
@@ -522,6 +634,18 @@ fragment TransactionFragment on Transaction {
522
634
  __typename
523
635
  rich_text_text: text
524
636
  }
637
+ outgoing_payment_uma_post_transaction_data: uma_post_transaction_data {
638
+ __typename
639
+ post_transaction_data_utxo: utxo
640
+ post_transaction_data_amount: amount {
641
+ __typename
642
+ currency_amount_original_value: original_value
643
+ currency_amount_original_unit: original_unit
644
+ currency_amount_preferred_currency_unit: preferred_currency_unit
645
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
646
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
647
+ }
648
+ }
525
649
  }
526
650
  ... on RoutingTransaction {
527
651
  __typename
@@ -0,0 +1,25 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type UpdateChannelPerCommitmentPointInput = {
4
+ channelId: string;
5
+
6
+ perCommitmentPoint: string;
7
+
8
+ perCommitmentPointIndex: number;
9
+ };
10
+
11
+ export const UpdateChannelPerCommitmentPointInputFromJson = (
12
+ obj: any,
13
+ ): UpdateChannelPerCommitmentPointInput => {
14
+ return {
15
+ channelId: obj["update_channel_per_commitment_point_input_channel_id"],
16
+ perCommitmentPoint:
17
+ obj["update_channel_per_commitment_point_input_per_commitment_point"],
18
+ perCommitmentPointIndex:
19
+ obj[
20
+ "update_channel_per_commitment_point_input_per_commitment_point_index"
21
+ ],
22
+ } as UpdateChannelPerCommitmentPointInput;
23
+ };
24
+
25
+ export default UpdateChannelPerCommitmentPointInput;
@@ -0,0 +1,23 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type UpdateChannelPerCommitmentPointOutput = {
4
+ channelId: string;
5
+ };
6
+
7
+ export const UpdateChannelPerCommitmentPointOutputFromJson = (
8
+ obj: any,
9
+ ): UpdateChannelPerCommitmentPointOutput => {
10
+ return {
11
+ channelId: obj["update_channel_per_commitment_point_output_channel"].id,
12
+ } as UpdateChannelPerCommitmentPointOutput;
13
+ };
14
+
15
+ export const FRAGMENT = `
16
+ fragment UpdateChannelPerCommitmentPointOutputFragment on UpdateChannelPerCommitmentPointOutput {
17
+ __typename
18
+ update_channel_per_commitment_point_output_channel: channel {
19
+ id
20
+ }
21
+ }`;
22
+
23
+ export default UpdateChannelPerCommitmentPointOutput;