@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
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
2
|
|
|
3
|
-
/** This is an enum
|
|
4
|
-
export enum
|
|
3
|
+
/** This is an enum indicating the direction of the payment. **/
|
|
4
|
+
export enum PaymentDirection {
|
|
5
5
|
/**
|
|
6
6
|
* This is an enum value that represents values that could be added in the future.
|
|
7
7
|
* Clients should support unknown values as more of them could be added without notice.
|
|
8
8
|
*/
|
|
9
9
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
SENT = "SENT",
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
ROUTING = "ROUTING",
|
|
13
|
+
RECEIVED = "RECEIVED",
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
export default
|
|
16
|
+
export default PaymentDirection;
|
|
@@ -92,24 +92,54 @@ fragment PaymentRequestFragment on PaymentRequest {
|
|
|
92
92
|
graph_node_display_name: display_name
|
|
93
93
|
graph_node_public_key: public_key
|
|
94
94
|
}
|
|
95
|
-
... on
|
|
95
|
+
... on LightsparkNodeWithOSK {
|
|
96
96
|
__typename
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
lightspark_node_with_o_s_k_id: id
|
|
98
|
+
lightspark_node_with_o_s_k_created_at: created_at
|
|
99
|
+
lightspark_node_with_o_s_k_updated_at: updated_at
|
|
100
|
+
lightspark_node_with_o_s_k_alias: alias
|
|
101
|
+
lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network
|
|
102
|
+
lightspark_node_with_o_s_k_color: color
|
|
103
|
+
lightspark_node_with_o_s_k_conductivity: conductivity
|
|
104
|
+
lightspark_node_with_o_s_k_display_name: display_name
|
|
105
|
+
lightspark_node_with_o_s_k_public_key: public_key
|
|
106
|
+
lightspark_node_with_o_s_k_owner: owner {
|
|
107
107
|
id
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
lightspark_node_with_o_s_k_status: status
|
|
110
|
+
lightspark_node_with_o_s_k_total_balance: total_balance {
|
|
111
|
+
__typename
|
|
112
|
+
currency_amount_original_value: original_value
|
|
113
|
+
currency_amount_original_unit: original_unit
|
|
114
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
115
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
116
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
117
|
+
}
|
|
118
|
+
lightspark_node_with_o_s_k_total_local_balance: total_local_balance {
|
|
119
|
+
__typename
|
|
120
|
+
currency_amount_original_value: original_value
|
|
121
|
+
currency_amount_original_unit: original_unit
|
|
122
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
123
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
124
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
125
|
+
}
|
|
126
|
+
lightspark_node_with_o_s_k_local_balance: local_balance {
|
|
127
|
+
__typename
|
|
128
|
+
currency_amount_original_value: original_value
|
|
129
|
+
currency_amount_original_unit: original_unit
|
|
130
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
131
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
132
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
111
133
|
}
|
|
112
|
-
|
|
134
|
+
lightspark_node_with_o_s_k_remote_balance: remote_balance {
|
|
135
|
+
__typename
|
|
136
|
+
currency_amount_original_value: original_value
|
|
137
|
+
currency_amount_original_unit: original_unit
|
|
138
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
139
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
140
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
141
|
+
}
|
|
142
|
+
lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance {
|
|
113
143
|
__typename
|
|
114
144
|
blockchain_balance_total_balance: total_balance {
|
|
115
145
|
__typename
|
|
@@ -160,12 +190,29 @@ fragment PaymentRequestFragment on PaymentRequest {
|
|
|
160
190
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
161
191
|
}
|
|
162
192
|
}
|
|
163
|
-
|
|
193
|
+
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
194
|
+
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
164
195
|
__typename
|
|
165
196
|
secret_encrypted_value: encrypted_value
|
|
166
197
|
secret_cipher: cipher
|
|
167
198
|
}
|
|
168
|
-
|
|
199
|
+
}
|
|
200
|
+
... on LightsparkNodeWithRemoteSigning {
|
|
201
|
+
__typename
|
|
202
|
+
lightspark_node_with_remote_signing_id: id
|
|
203
|
+
lightspark_node_with_remote_signing_created_at: created_at
|
|
204
|
+
lightspark_node_with_remote_signing_updated_at: updated_at
|
|
205
|
+
lightspark_node_with_remote_signing_alias: alias
|
|
206
|
+
lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network
|
|
207
|
+
lightspark_node_with_remote_signing_color: color
|
|
208
|
+
lightspark_node_with_remote_signing_conductivity: conductivity
|
|
209
|
+
lightspark_node_with_remote_signing_display_name: display_name
|
|
210
|
+
lightspark_node_with_remote_signing_public_key: public_key
|
|
211
|
+
lightspark_node_with_remote_signing_owner: owner {
|
|
212
|
+
id
|
|
213
|
+
}
|
|
214
|
+
lightspark_node_with_remote_signing_status: status
|
|
215
|
+
lightspark_node_with_remote_signing_total_balance: total_balance {
|
|
169
216
|
__typename
|
|
170
217
|
currency_amount_original_value: original_value
|
|
171
218
|
currency_amount_original_unit: original_unit
|
|
@@ -173,7 +220,7 @@ fragment PaymentRequestFragment on PaymentRequest {
|
|
|
173
220
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
174
221
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
175
222
|
}
|
|
176
|
-
|
|
223
|
+
lightspark_node_with_remote_signing_total_local_balance: total_local_balance {
|
|
177
224
|
__typename
|
|
178
225
|
currency_amount_original_value: original_value
|
|
179
226
|
currency_amount_original_unit: original_unit
|
|
@@ -181,7 +228,7 @@ fragment PaymentRequestFragment on PaymentRequest {
|
|
|
181
228
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
182
229
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
183
230
|
}
|
|
184
|
-
|
|
231
|
+
lightspark_node_with_remote_signing_local_balance: local_balance {
|
|
185
232
|
__typename
|
|
186
233
|
currency_amount_original_value: original_value
|
|
187
234
|
currency_amount_original_unit: original_unit
|
|
@@ -189,8 +236,7 @@ fragment PaymentRequestFragment on PaymentRequest {
|
|
|
189
236
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
190
237
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
191
238
|
}
|
|
192
|
-
|
|
193
|
-
lightspark_node_remote_balance: remote_balance {
|
|
239
|
+
lightspark_node_with_remote_signing_remote_balance: remote_balance {
|
|
194
240
|
__typename
|
|
195
241
|
currency_amount_original_value: original_value
|
|
196
242
|
currency_amount_original_unit: original_unit
|
|
@@ -198,7 +244,58 @@ fragment PaymentRequestFragment on PaymentRequest {
|
|
|
198
244
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
199
245
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
200
246
|
}
|
|
201
|
-
|
|
247
|
+
lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance {
|
|
248
|
+
__typename
|
|
249
|
+
blockchain_balance_total_balance: total_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
|
+
blockchain_balance_confirmed_balance: confirmed_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
|
+
blockchain_balance_unconfirmed_balance: unconfirmed_balance {
|
|
266
|
+
__typename
|
|
267
|
+
currency_amount_original_value: original_value
|
|
268
|
+
currency_amount_original_unit: original_unit
|
|
269
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
270
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
271
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
272
|
+
}
|
|
273
|
+
blockchain_balance_locked_balance: locked_balance {
|
|
274
|
+
__typename
|
|
275
|
+
currency_amount_original_value: original_value
|
|
276
|
+
currency_amount_original_unit: original_unit
|
|
277
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
278
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
279
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
280
|
+
}
|
|
281
|
+
blockchain_balance_required_reserve: required_reserve {
|
|
282
|
+
__typename
|
|
283
|
+
currency_amount_original_value: original_value
|
|
284
|
+
currency_amount_original_unit: original_unit
|
|
285
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
286
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
287
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
288
|
+
}
|
|
289
|
+
blockchain_balance_available_balance: available_balance {
|
|
290
|
+
__typename
|
|
291
|
+
currency_amount_original_value: original_value
|
|
292
|
+
currency_amount_original_unit: original_unit
|
|
293
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
294
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
295
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
202
299
|
}
|
|
203
300
|
}
|
|
204
301
|
}
|
|
@@ -71,24 +71,54 @@ fragment PaymentRequestDataFragment on PaymentRequestData {
|
|
|
71
71
|
graph_node_display_name: display_name
|
|
72
72
|
graph_node_public_key: public_key
|
|
73
73
|
}
|
|
74
|
-
... on
|
|
74
|
+
... on LightsparkNodeWithOSK {
|
|
75
75
|
__typename
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
lightspark_node_with_o_s_k_id: id
|
|
77
|
+
lightspark_node_with_o_s_k_created_at: created_at
|
|
78
|
+
lightspark_node_with_o_s_k_updated_at: updated_at
|
|
79
|
+
lightspark_node_with_o_s_k_alias: alias
|
|
80
|
+
lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network
|
|
81
|
+
lightspark_node_with_o_s_k_color: color
|
|
82
|
+
lightspark_node_with_o_s_k_conductivity: conductivity
|
|
83
|
+
lightspark_node_with_o_s_k_display_name: display_name
|
|
84
|
+
lightspark_node_with_o_s_k_public_key: public_key
|
|
85
|
+
lightspark_node_with_o_s_k_owner: owner {
|
|
86
86
|
id
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
lightspark_node_with_o_s_k_status: status
|
|
89
|
+
lightspark_node_with_o_s_k_total_balance: total_balance {
|
|
90
|
+
__typename
|
|
91
|
+
currency_amount_original_value: original_value
|
|
92
|
+
currency_amount_original_unit: original_unit
|
|
93
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
94
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
95
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
96
|
+
}
|
|
97
|
+
lightspark_node_with_o_s_k_total_local_balance: total_local_balance {
|
|
98
|
+
__typename
|
|
99
|
+
currency_amount_original_value: original_value
|
|
100
|
+
currency_amount_original_unit: original_unit
|
|
101
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
102
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
103
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
104
|
+
}
|
|
105
|
+
lightspark_node_with_o_s_k_local_balance: local_balance {
|
|
106
|
+
__typename
|
|
107
|
+
currency_amount_original_value: original_value
|
|
108
|
+
currency_amount_original_unit: original_unit
|
|
109
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
110
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
111
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
90
112
|
}
|
|
91
|
-
|
|
113
|
+
lightspark_node_with_o_s_k_remote_balance: remote_balance {
|
|
114
|
+
__typename
|
|
115
|
+
currency_amount_original_value: original_value
|
|
116
|
+
currency_amount_original_unit: original_unit
|
|
117
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
118
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
119
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
120
|
+
}
|
|
121
|
+
lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance {
|
|
92
122
|
__typename
|
|
93
123
|
blockchain_balance_total_balance: total_balance {
|
|
94
124
|
__typename
|
|
@@ -139,12 +169,29 @@ fragment PaymentRequestDataFragment on PaymentRequestData {
|
|
|
139
169
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
140
170
|
}
|
|
141
171
|
}
|
|
142
|
-
|
|
172
|
+
lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
|
|
173
|
+
lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
143
174
|
__typename
|
|
144
175
|
secret_encrypted_value: encrypted_value
|
|
145
176
|
secret_cipher: cipher
|
|
146
177
|
}
|
|
147
|
-
|
|
178
|
+
}
|
|
179
|
+
... on LightsparkNodeWithRemoteSigning {
|
|
180
|
+
__typename
|
|
181
|
+
lightspark_node_with_remote_signing_id: id
|
|
182
|
+
lightspark_node_with_remote_signing_created_at: created_at
|
|
183
|
+
lightspark_node_with_remote_signing_updated_at: updated_at
|
|
184
|
+
lightspark_node_with_remote_signing_alias: alias
|
|
185
|
+
lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network
|
|
186
|
+
lightspark_node_with_remote_signing_color: color
|
|
187
|
+
lightspark_node_with_remote_signing_conductivity: conductivity
|
|
188
|
+
lightspark_node_with_remote_signing_display_name: display_name
|
|
189
|
+
lightspark_node_with_remote_signing_public_key: public_key
|
|
190
|
+
lightspark_node_with_remote_signing_owner: owner {
|
|
191
|
+
id
|
|
192
|
+
}
|
|
193
|
+
lightspark_node_with_remote_signing_status: status
|
|
194
|
+
lightspark_node_with_remote_signing_total_balance: total_balance {
|
|
148
195
|
__typename
|
|
149
196
|
currency_amount_original_value: original_value
|
|
150
197
|
currency_amount_original_unit: original_unit
|
|
@@ -152,7 +199,7 @@ fragment PaymentRequestDataFragment on PaymentRequestData {
|
|
|
152
199
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
153
200
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
154
201
|
}
|
|
155
|
-
|
|
202
|
+
lightspark_node_with_remote_signing_total_local_balance: total_local_balance {
|
|
156
203
|
__typename
|
|
157
204
|
currency_amount_original_value: original_value
|
|
158
205
|
currency_amount_original_unit: original_unit
|
|
@@ -160,7 +207,7 @@ fragment PaymentRequestDataFragment on PaymentRequestData {
|
|
|
160
207
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
161
208
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
162
209
|
}
|
|
163
|
-
|
|
210
|
+
lightspark_node_with_remote_signing_local_balance: local_balance {
|
|
164
211
|
__typename
|
|
165
212
|
currency_amount_original_value: original_value
|
|
166
213
|
currency_amount_original_unit: original_unit
|
|
@@ -168,8 +215,7 @@ fragment PaymentRequestDataFragment on PaymentRequestData {
|
|
|
168
215
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
169
216
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
170
217
|
}
|
|
171
|
-
|
|
172
|
-
lightspark_node_remote_balance: remote_balance {
|
|
218
|
+
lightspark_node_with_remote_signing_remote_balance: remote_balance {
|
|
173
219
|
__typename
|
|
174
220
|
currency_amount_original_value: original_value
|
|
175
221
|
currency_amount_original_unit: original_unit
|
|
@@ -177,7 +223,58 @@ fragment PaymentRequestDataFragment on PaymentRequestData {
|
|
|
177
223
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
178
224
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
179
225
|
}
|
|
180
|
-
|
|
226
|
+
lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance {
|
|
227
|
+
__typename
|
|
228
|
+
blockchain_balance_total_balance: total_balance {
|
|
229
|
+
__typename
|
|
230
|
+
currency_amount_original_value: original_value
|
|
231
|
+
currency_amount_original_unit: original_unit
|
|
232
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
233
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
234
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
235
|
+
}
|
|
236
|
+
blockchain_balance_confirmed_balance: confirmed_balance {
|
|
237
|
+
__typename
|
|
238
|
+
currency_amount_original_value: original_value
|
|
239
|
+
currency_amount_original_unit: original_unit
|
|
240
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
241
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
242
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
243
|
+
}
|
|
244
|
+
blockchain_balance_unconfirmed_balance: unconfirmed_balance {
|
|
245
|
+
__typename
|
|
246
|
+
currency_amount_original_value: original_value
|
|
247
|
+
currency_amount_original_unit: original_unit
|
|
248
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
249
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
250
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
251
|
+
}
|
|
252
|
+
blockchain_balance_locked_balance: locked_balance {
|
|
253
|
+
__typename
|
|
254
|
+
currency_amount_original_value: original_value
|
|
255
|
+
currency_amount_original_unit: original_unit
|
|
256
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
257
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
258
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
259
|
+
}
|
|
260
|
+
blockchain_balance_required_reserve: required_reserve {
|
|
261
|
+
__typename
|
|
262
|
+
currency_amount_original_value: original_value
|
|
263
|
+
currency_amount_original_unit: original_unit
|
|
264
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
265
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
266
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
267
|
+
}
|
|
268
|
+
blockchain_balance_available_balance: available_balance {
|
|
269
|
+
__typename
|
|
270
|
+
currency_amount_original_value: original_value
|
|
271
|
+
currency_amount_original_unit: original_unit
|
|
272
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
273
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
274
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
|
|
181
278
|
}
|
|
182
279
|
}
|
|
183
280
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
import type CurrencyAmount from "./CurrencyAmount.js";
|
|
4
|
+
import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
|
|
5
|
+
|
|
6
|
+
/** This object represents post-transaction data that could be used to register payment for KYT. **/
|
|
7
|
+
type PostTransactionData = {
|
|
8
|
+
/**
|
|
9
|
+
* The utxo of the channel over which the payment went through in the format of
|
|
10
|
+
* <transaction_hash>:<output_index>.
|
|
11
|
+
**/
|
|
12
|
+
utxo: string;
|
|
13
|
+
|
|
14
|
+
/** The amount of funds transferred in the payment. **/
|
|
15
|
+
amount: CurrencyAmount;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const PostTransactionDataFromJson = (obj: any): PostTransactionData => {
|
|
19
|
+
return {
|
|
20
|
+
utxo: obj["post_transaction_data_utxo"],
|
|
21
|
+
amount: CurrencyAmountFromJson(obj["post_transaction_data_amount"]),
|
|
22
|
+
} as PostTransactionData;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const FRAGMENT = `
|
|
26
|
+
fragment PostTransactionDataFragment on PostTransactionData {
|
|
27
|
+
__typename
|
|
28
|
+
post_transaction_data_utxo: utxo
|
|
29
|
+
post_transaction_data_amount: amount {
|
|
30
|
+
__typename
|
|
31
|
+
currency_amount_original_value: original_value
|
|
32
|
+
currency_amount_original_unit: original_unit
|
|
33
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
34
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
35
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
36
|
+
}
|
|
37
|
+
}`;
|
|
38
|
+
|
|
39
|
+
export default PostTransactionData;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
import ComplianceProvider from "./ComplianceProvider.js";
|
|
4
|
+
import PaymentDirection from "./PaymentDirection.js";
|
|
5
|
+
|
|
6
|
+
type RegisterPaymentInput = {
|
|
7
|
+
provider: ComplianceProvider;
|
|
8
|
+
|
|
9
|
+
paymentId: string;
|
|
10
|
+
|
|
11
|
+
nodePubkey: string;
|
|
12
|
+
|
|
13
|
+
direction: PaymentDirection;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const RegisterPaymentInputFromJson = (
|
|
17
|
+
obj: any,
|
|
18
|
+
): RegisterPaymentInput => {
|
|
19
|
+
return {
|
|
20
|
+
provider:
|
|
21
|
+
ComplianceProvider[obj["register_payment_input_provider"]] ??
|
|
22
|
+
ComplianceProvider.FUTURE_VALUE,
|
|
23
|
+
paymentId: obj["register_payment_input_payment_id"],
|
|
24
|
+
nodePubkey: obj["register_payment_input_node_pubkey"],
|
|
25
|
+
direction:
|
|
26
|
+
PaymentDirection[obj["register_payment_input_direction"]] ??
|
|
27
|
+
PaymentDirection.FUTURE_VALUE,
|
|
28
|
+
} as RegisterPaymentInput;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default RegisterPaymentInput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
type RegisterPaymentOutput = {
|
|
4
|
+
paymentId: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const RegisterPaymentOutputFromJson = (
|
|
8
|
+
obj: any,
|
|
9
|
+
): RegisterPaymentOutput => {
|
|
10
|
+
return {
|
|
11
|
+
paymentId: obj["register_payment_output_payment"].id,
|
|
12
|
+
} as RegisterPaymentOutput;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const FRAGMENT = `
|
|
16
|
+
fragment RegisterPaymentOutputFragment on RegisterPaymentOutput {
|
|
17
|
+
__typename
|
|
18
|
+
register_payment_output_payment: payment {
|
|
19
|
+
id
|
|
20
|
+
}
|
|
21
|
+
}`;
|
|
22
|
+
|
|
23
|
+
export default RegisterPaymentOutput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
type ReleaseChannelPerCommitmentSecretInput = {
|
|
4
|
+
channelId: string;
|
|
5
|
+
|
|
6
|
+
perCommitmentSecret: string;
|
|
7
|
+
|
|
8
|
+
perCommitmentIndex: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const ReleaseChannelPerCommitmentSecretInputFromJson = (
|
|
12
|
+
obj: any,
|
|
13
|
+
): ReleaseChannelPerCommitmentSecretInput => {
|
|
14
|
+
return {
|
|
15
|
+
channelId: obj["release_channel_per_commitment_secret_input_channel_id"],
|
|
16
|
+
perCommitmentSecret:
|
|
17
|
+
obj["release_channel_per_commitment_secret_input_per_commitment_secret"],
|
|
18
|
+
perCommitmentIndex:
|
|
19
|
+
obj["release_channel_per_commitment_secret_input_per_commitment_index"],
|
|
20
|
+
} as ReleaseChannelPerCommitmentSecretInput;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default ReleaseChannelPerCommitmentSecretInput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
type ReleaseChannelPerCommitmentSecretOutput = {
|
|
4
|
+
channelId: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const ReleaseChannelPerCommitmentSecretOutputFromJson = (
|
|
8
|
+
obj: any,
|
|
9
|
+
): ReleaseChannelPerCommitmentSecretOutput => {
|
|
10
|
+
return {
|
|
11
|
+
channelId: obj["release_channel_per_commitment_secret_output_channel"].id,
|
|
12
|
+
} as ReleaseChannelPerCommitmentSecretOutput;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const FRAGMENT = `
|
|
16
|
+
fragment ReleaseChannelPerCommitmentSecretOutputFragment on ReleaseChannelPerCommitmentSecretOutput {
|
|
17
|
+
__typename
|
|
18
|
+
release_channel_per_commitment_secret_output_channel: channel {
|
|
19
|
+
id
|
|
20
|
+
}
|
|
21
|
+
}`;
|
|
22
|
+
|
|
23
|
+
export default ReleaseChannelPerCommitmentSecretOutput;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
type ReleasePaymentPreimageInput = {
|
|
4
|
+
/** The invoice the preimage belongs to. **/
|
|
5
|
+
invoiceId: string;
|
|
6
|
+
|
|
7
|
+
/** The preimage to release. **/
|
|
8
|
+
paymentPreimage: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const ReleasePaymentPreimageInputFromJson = (
|
|
12
|
+
obj: any,
|
|
13
|
+
): ReleasePaymentPreimageInput => {
|
|
14
|
+
return {
|
|
15
|
+
invoiceId: obj["release_payment_preimage_input_invoice_id"],
|
|
16
|
+
paymentPreimage: obj["release_payment_preimage_input_payment_preimage"],
|
|
17
|
+
} as ReleasePaymentPreimageInput;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default ReleasePaymentPreimageInput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
type ReleasePaymentPreimageOutput = {
|
|
4
|
+
invoiceId: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const ReleasePaymentPreimageOutputFromJson = (
|
|
8
|
+
obj: any,
|
|
9
|
+
): ReleasePaymentPreimageOutput => {
|
|
10
|
+
return {
|
|
11
|
+
invoiceId: obj["release_payment_preimage_output_invoice"].id,
|
|
12
|
+
} as ReleasePaymentPreimageOutput;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const FRAGMENT = `
|
|
16
|
+
fragment ReleasePaymentPreimageOutputFragment on ReleasePaymentPreimageOutput {
|
|
17
|
+
__typename
|
|
18
|
+
release_payment_preimage_output_invoice: invoice {
|
|
19
|
+
id
|
|
20
|
+
}
|
|
21
|
+
}`;
|
|
22
|
+
|
|
23
|
+
export default ReleasePaymentPreimageOutput;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/** This is an enum of the potential sub-event types for Remote Signing webook events. **/
|
|
4
|
+
export enum RemoteSigningSubEventType {
|
|
5
|
+
/**
|
|
6
|
+
* This is an enum value that represents values that could be added in the future.
|
|
7
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
8
|
+
*/
|
|
9
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
10
|
+
|
|
11
|
+
ECDH = "ECDH",
|
|
12
|
+
|
|
13
|
+
GET_PER_COMMITMENT_POINT = "GET_PER_COMMITMENT_POINT",
|
|
14
|
+
|
|
15
|
+
RELEASE_PER_COMMITMENT_SECRET = "RELEASE_PER_COMMITMENT_SECRET",
|
|
16
|
+
|
|
17
|
+
SIGN_INVOICE = "SIGN_INVOICE",
|
|
18
|
+
|
|
19
|
+
DERIVE_KEY_AND_SIGN = "DERIVE_KEY_AND_SIGN",
|
|
20
|
+
|
|
21
|
+
RELEASE_PAYMENT_PREIMAGE = "RELEASE_PAYMENT_PREIMAGE",
|
|
22
|
+
|
|
23
|
+
REQUEST_INVOICE_PAYMENT_HASH = "REQUEST_INVOICE_PAYMENT_HASH",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default RemoteSigningSubEventType;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
import ComplianceProvider from "./ComplianceProvider.js";
|
|
4
|
+
|
|
5
|
+
type ScreenNodeInput = {
|
|
6
|
+
provider: ComplianceProvider;
|
|
7
|
+
|
|
8
|
+
nodePubkey: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const ScreenNodeInputFromJson = (obj: any): ScreenNodeInput => {
|
|
12
|
+
return {
|
|
13
|
+
provider:
|
|
14
|
+
ComplianceProvider[obj["screen_node_input_provider"]] ??
|
|
15
|
+
ComplianceProvider.FUTURE_VALUE,
|
|
16
|
+
nodePubkey: obj["screen_node_input_node_pubkey"],
|
|
17
|
+
} as ScreenNodeInput;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default ScreenNodeInput;
|