This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
forked from apotdevin/thunderhub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.gql
765 lines (689 loc) · 16.5 KB
/
schema.gql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type AmbossSubscription {
end_date: String!
subscribed: Boolean!
upgradable: Boolean!
}
type AmbossUser {
subscription: AmbossSubscription
}
type AuthResponse {
message: String!
status: String!
}
type Balances {
lightning: LightningBalance!
onchain: OnChainBalance!
}
type BaseInvoice {
id: String!
request: String!
}
type BaseNode {
_id: String
name: String
public_key: String!
socket: String!
}
type BasePoints {
alias: String!
amount: Float!
}
type BitcoinFee {
fast: Float!
halfHour: Float!
hour: Float!
minimum: Float!
}
type BoltzInfoType {
feePercent: Float!
max: Float!
min: Float!
}
type BoltzSwap {
boltz: BoltzSwapStatus
id: String
}
type BoltzSwapStatus {
status: String!
transaction: BoltzSwapTransaction
}
type BoltzSwapTransaction {
eta: Float
hex: String
id: String
}
type BosDecrease {
decreased_inbound_on: String!
liquidity_inbound: String!
liquidity_inbound_opening: String
liquidity_inbound_pending: String
liquidity_outbound: String!
liquidity_outbound_opening: String
liquidity_outbound_pending: String
}
type BosIncrease {
increased_inbound_on: String!
liquidity_inbound: String!
liquidity_inbound_opening: String
liquidity_inbound_pending: String
liquidity_outbound: String!
liquidity_outbound_opening: String
liquidity_outbound_pending: String
}
type BosRebalanceResult {
decrease: BosDecrease
increase: BosIncrease
result: BosResult
}
type BosResult {
rebalance_fees_spent: String!
rebalanced: String!
}
type ChainAddressSend {
confirmationCount: Float!
id: String!
isConfirmed: Boolean!
isOutgoing: Boolean!
tokens: Float
}
type ChainTransaction {
block_id: String
confirmation_count: Float
confirmation_height: Float
created_at: String!
description: String
fee: Float
id: String!
is_confirmed: Boolean!
is_outgoing: Boolean!
output_addresses: [String!]!
tokens: Float!
transaction: String
}
type Channel {
capacity: Float!
channel_age: Float!
commit_transaction_fee: Float!
commit_transaction_weight: Float!
id: String!
is_active: Boolean!
is_closing: Boolean!
is_opening: Boolean!
is_partner_initiated: Boolean!
is_private: Boolean!
local_balance: Float!
local_reserve: Float!
partner_fee_info: SingleChannel!
partner_node_info: Node!
partner_public_key: String!
past_states: Float!
pending_payments: [PendingPayment!]!
pending_resume: PendingResume!
received: Float!
remote_balance: Float!
remote_reserve: Float!
sent: Float!
time_offline: Float
time_online: Float
transaction_id: String!
transaction_vout: Float!
unsettled_balance: Float!
}
type ChannelFeeHealth {
id: String
mySide: FeeHealth
partner: Node
partnerSide: FeeHealth
}
type ChannelHealth {
averageVolumeNormalized: String
id: String
partner: Node
score: Float
volumeNormalized: String
}
type ChannelReport {
commit: Float!
incomingPendingHtlc: Float!
local: Float!
maxIn: Float!
maxOut: Float!
outgoingPendingHtlc: Float!
remote: Float!
totalPendingHtlc: Float!
}
type ChannelRequest {
callback: String
k1: String
tag: String
uri: String
}
type ChannelTimeHealth {
id: String
monitoredDowntime: Float
monitoredTime: Float
monitoredUptime: Float
partner: Node
score: Float
significant: Boolean
}
type ChannelsFeeHealth {
channels: [ChannelFeeHealth!]
score: Float
}
type ChannelsHealth {
channels: [ChannelHealth!]
score: Float
}
type ChannelsTimeHealth {
channels: [ChannelTimeHealth!]
score: Float
}
type ClosedChannel {
capacity: Float!
channel_age: Float
close_confirm_height: Float
close_transaction_id: String
closed_for_blocks: Float
final_local_balance: Float!
final_time_locked_balance: Float!
id: String
is_breach_close: Boolean!
is_cooperative_close: Boolean!
is_funding_cancel: Boolean!
is_local_force_close: Boolean!
is_remote_force_close: Boolean!
partner_node_info: Node!
partner_public_key: String!
transaction_id: String!
transaction_vout: Float!
}
type CreateBoltzReverseSwapType {
decodedInvoice: DecodeInvoice
id: String!
invoice: String!
lockupAddress: String!
minerFeeInvoice: String
onchainAmount: Float!
preimage: String
preimageHash: String
privateKey: String
publicKey: String
receivingAddress: String!
redeemScript: String!
timeoutBlockHeight: Float!
}
type CreateInvoice {
chain_address: String
created_at: String!
description: String!
id: String!
mtokens: String
request: String!
secret: String!
tokens: Float
}
type CreateMacaroon {
base: String!
hex: String!
}
type DecodeInvoice {
chain_address: String
cltv_delta: Float
description: String!
description_hash: String
destination: String!
destination_node: Node
expires_at: String!
id: String!
mtokens: String!
payment: String
routes: [[Route!]!]!
safe_tokens: Float!
tokens: Float!
}
type FeeHealth {
base: String
baseOver: Boolean
baseScore: Float
rate: Float
rateOver: Boolean
rateScore: Float
score: Float
}
type Forward {
created_at: String!
fee: Float!
fee_mtokens: String!
incoming_channel: String!
mtokens: String!
outgoing_channel: String!
tokens: Float!
}
type GetInvoicesType {
invoices: [InvoiceType!]!
next: String
}
type GetMessages {
messages: [Message!]!
token: String
}
type GetPaymentsType {
next: String
payments: [PaymentType!]!
}
type Hops {
channel: String!
channel_capacity: Float!
fee_mtokens: String!
forward_mtokens: String!
timeout: Float!
}
type InvoicePayment {
in_channel: String!
messages: MessageType
}
type InvoiceType {
chain_address: String
confirmed_at: String
created_at: String!
date: String!
description: String!
description_hash: String
expires_at: String!
id: String!
is_canceled: Boolean
is_confirmed: Boolean!
is_held: Boolean
is_private: Boolean!
is_push: Boolean
payments: [InvoicePayment!]!
received: Float!
received_mtokens: String!
request: String
secret: String!
tokens: String!
type: String!
}
type LightningAddress {
lightning_address: String!
pubkey: String!
}
type LightningBalance {
active: String!
commit: String!
confirmed: String!
pending: String!
}
type LightningNodeSocialInfo {
socials: NodeSocial
}
type LnMarketsUserInfo {
account_type: String
balance: String
last_ip: String
linkingpublickey: String
uid: String
username: String
}
union LnUrlRequest = ChannelRequest | PayRequest | WithdrawRequest
type Message {
alias: String
contentType: String
date: String!
id: String!
message: String
sender: String
tokens: Float
verified: Boolean!
}
type MessageType {
message: String
}
type Mutation {
addPeer(isTemporary: Boolean, publicKey: String, socket: String, url: String): Boolean!
bosRebalance(avoid: [String!], in_through: String, max_fee: Float, max_fee_rate: Float, max_rebalance: Float, node: String, out_inbound: Float, out_through: String, timeout_minutes: Float): BosRebalanceResult!
claimBoltzTransaction(destination: String!, fee: Float!, preimage: String!, privateKey: String!, redeem: String!, transaction: String!): String!
closeChannel(forceClose: Boolean, id: String!, targetConfirmations: Float, tokensPerVByte: Float): OpenOrCloseChannel!
createAddress: String!
createBaseInvoice(amount: Float!): BaseInvoice!
createBoltzReverseSwap(address: String, amount: Float!): CreateBoltzReverseSwapType!
createInvoice(amount: Float!, description: String, includePrivate: Boolean, secondsUntil: Float): CreateInvoice!
createMacaroon(permissions: NetworkInfoInput!): CreateMacaroon!
createThunderPoints(alias: String!, id: String!, public_key: String!, uris: [String!]!): Boolean!
fetchLnUrl(url: String!): LnUrlRequest!
getAuthToken(cookie: String): Boolean!
getSessionToken(id: String!, password: String!, token: String): String!
keysend(destination: String, tokens: Float!): PayInvoice!
lnMarketsDeposit(amount: Float!): Boolean!
lnMarketsLogin: AuthResponse!
lnMarketsLogout: Boolean!
lnMarketsWithdraw(amount: Float!): Boolean!
lnUrlAuth(url: String!): AuthResponse!
lnUrlChannel(callback: String!, k1: String!, uri: String!): String!
lnUrlPay(amount: Float!, callback: String!, comment: String): PaySuccess!
lnUrlWithdraw(amount: Float!, callback: String!, description: String, k1: String!): String!
loginAmboss: Boolean!
logout: Boolean!
openChannel(amount: Float!, isPrivate: Boolean, partnerPublicKey: String!, pushTokens: Float = 0, tokensPerVByte: Float): OpenOrCloseChannel!
pay(max_fee: Float!, max_paths: Float!, out: [String!], request: String!): Boolean!
removePeer(publicKey: String): Boolean!
removeTwofaSecret(token: String!): Boolean!
sendMessage(maxFee: Float, message: String!, messageType: String, publicKey: String!, tokens: Float): Float!
sendToAddress(address: String!, fee: Float, sendAll: Boolean, target: Float, tokens: Float): ChainAddressSend!
toggleAutoBackups: Boolean!
updateFees(base_fee_tokens: Float, cltv_delta: Float, fee_rate: Float, max_htlc_mtokens: String, min_htlc_mtokens: String, transaction_id: String, transaction_vout: Float): Boolean!
updateMultipleFees(channels: [UpdateRoutingFeesParams!]!): Boolean!
updateTwofaSecret(secret: String!, token: String!): Boolean!
}
type NetworkInfo {
averageChannelSize: Float!
channelCount: Float!
maxChannelSize: Float!
medianChannelSize: Float!
minChannelSize: Float!
nodeCount: Float!
notRecentlyUpdatedPolicyCount: Float!
totalCapacity: Float!
}
input NetworkInfoInput {
is_ok_to_adjust_peers: Boolean!
is_ok_to_create_chain_addresses: Boolean!
is_ok_to_create_invoices: Boolean!
is_ok_to_create_macaroons: Boolean!
is_ok_to_derive_keys: Boolean!
is_ok_to_get_access_ids: Boolean!
is_ok_to_get_chain_transactions: Boolean!
is_ok_to_get_invoices: Boolean!
is_ok_to_get_payments: Boolean!
is_ok_to_get_peers: Boolean!
is_ok_to_get_wallet_info: Boolean!
is_ok_to_pay: Boolean!
is_ok_to_revoke_access_ids: Boolean!
is_ok_to_send_to_chain_addresses: Boolean!
is_ok_to_sign_bytes: Boolean!
is_ok_to_sign_messages: Boolean!
is_ok_to_stop_daemon: Boolean!
is_ok_to_verify_bytes_signatures: Boolean!
is_ok_to_verify_messages: Boolean!
}
type Node {
node: NodeType
}
type NodeInfo {
active_channels_count: Float!
alias: String!
chains: [String!]!
closed_channels_count: Float!
color: String!
current_block_hash: String!
current_block_height: Float!
is_synced_to_chain: Boolean!
is_synced_to_graph: Boolean!
latest_block_at: String!
peers_count: Float!
pending_channels_count: Float!
public_key: String!
uris: [String!]!
version: String!
}
type NodePolicy {
base_fee_mtokens: String
cltv_delta: Float
fee_rate: Float
is_disabled: Boolean
max_htlc_mtokens: String
min_htlc_mtokens: String
node: Node
updated_at: String
}
type NodeSocial {
info: NodeSocialInfo
}
type NodeSocialInfo {
email: String
private: Boolean
telegram: String
twitter: String
twitter_verified: Boolean
website: String
}
type NodeType {
alias: String!
public_key: String!
}
type OnChainBalance {
closing: String!
confirmed: String!
pending: String!
}
type OpenOrCloseChannel {
transactionId: String!
transactionOutputIndex: String!
}
type PayInvoice {
fee: Float!
fee_mtokens: String!
hops: [Hops!]!
id: String!
is_confirmed: Boolean!
is_outgoing: Boolean!
mtokens: String!
safe_fee: Float!
safe_tokens: Float!
secret: String!
tokens: Float!
}
type PayRequest {
callback: String
commentAllowed: Float
maxSendable: String
metadata: String
minSendable: String
tag: String
}
type PaySuccess {
ciphertext: String
description: String
iv: String
message: String
tag: String
url: String
}
type PaymentType {
created_at: String!
date: String!
destination: String!
destination_node: Node!
fee: Float!
fee_mtokens: String!
hops: [Node!]!
id: String!
index: Float
is_confirmed: Boolean!
is_outgoing: Boolean!
mtokens: String!
request: String
safe_fee: Float!
safe_tokens: Float
secret: String!
tokens: String!
type: String!
}
type Peer {
bytes_received: Float!
bytes_sent: Float!
is_inbound: Boolean!
is_sync_peer: Boolean
partner_node_info: Node!
ping_time: Float!
public_key: String!
socket: String!
tokens_received: Float!
tokens_sent: Float!
}
type PendingChannel {
close_transaction_id: String
is_active: Boolean!
is_closing: Boolean!
is_opening: Boolean!
is_timelocked: Boolean!
local_balance: Float!
local_reserve: Float!
partner_node_info: Node!
partner_public_key: String!
received: Float!
remote_balance: Float!
remote_reserve: Float!
sent: Float!
timelock_blocks: Float
timelock_expiration: Float
transaction_fee: Float
transaction_id: String!
transaction_vout: Float!
}
type PendingPayment {
id: String!
is_outgoing: Boolean!
timeout: Float!
tokens: Float!
}
type PendingResume {
incoming_amount: Float!
incoming_tokens: Float!
outgoing_amount: Float!
outgoing_tokens: Float!
total_amount: Float!
total_tokens: Float!
}
type Policy {
base_fee_mtokens: String
cltv_delta: Float
fee_rate: Float
is_disabled: Boolean
max_htlc_mtokens: String
min_htlc_mtokens: String
public_key: String!
updated_at: String
}
type Query {
decodeRequest(request: String!): DecodeInvoice!
getAccount: ServerAccount!
getAccountingReport(category: String, currency: String, fiat: String, month: String, year: String): String!
getAmbossLoginToken: String!
getAmbossUser: AmbossUser
getBackupState: Boolean!
getBackups: String!
getBaseCanConnect: Boolean!
getBaseNodes: [BaseNode!]!
getBasePoints: [BasePoints!]!
getBitcoinFees: BitcoinFee!
getBitcoinPrice: String!
getBoltzInfo: BoltzInfoType!
getBoltzSwapStatus(ids: [String!]!): [BoltzSwap!]!
getChainTransactions: [ChainTransaction!]!
getChannel(id: String!): SingleChannel!
getChannelReport: ChannelReport!
getChannels(active: Boolean): [Channel!]!
getClosedChannels: [ClosedChannel!]!
getFeeHealth: ChannelsFeeHealth!
getForwards(days: Float!): [Forward!]!
getHello: String!
getInvoiceStatusChange(id: String!): String!
getInvoices(token: String): GetInvoicesType!
getLatestVersion: String!
getLightningAddressInfo(address: String!): PayRequest!
getLightningAddresses: [LightningAddress!]!
getLnMarketsStatus: String!
getLnMarketsUrl: String!
getLnMarketsUserInfo: LnMarketsUserInfo!
getMessages(initialize: Boolean): GetMessages!
getNetworkInfo: NetworkInfo!
getNode(publicKey: String!, withoutChannels: Boolean): Node!
getNodeBalances: Balances!
getNodeInfo: NodeInfo!
getNodeSocialInfo(pubkey: String!): LightningNodeSocialInfo!
getPayments(token: String): GetPaymentsType!
getPeers: [Peer!]!
getPendingChannels: [PendingChannel!]!
getServerAccounts: [ServerAccount!]!
getTimeHealth: ChannelsTimeHealth!
getTwofaSecret: TwofaResult!
getUtxos: [Utxo!]!
getVolumeHealth: ChannelsHealth!
getWalletInfo: Wallet!
recoverFunds(backup: String!): Boolean!
signMessage(message: String!): String!
verifyBackup(backup: String!): Boolean!
verifyBackups(backup: String!): Boolean!
verifyMessage(message: String!, signature: String!): String!
}
type Route {
base_fee_mtokens: String
channel: String
cltv_delta: Float
fee_rate: Float
public_key: String!
}
type ServerAccount {
id: String!
loggedIn: Boolean!
name: String!
twofaEnabled: Boolean!
type: String!
}
type SingleChannel {
capacity: Float!
id: String!
node_policies: NodePolicy
partner_node_policies: NodePolicy
policies: [Policy!]!
transaction_id: String!
transaction_vout: Float!
updated_at: String
}
type TwofaResult {
secret: String!
url: String!
}
input UpdateRoutingFeesParams {
base_fee_mtokens: String
base_fee_tokens: Float
cltv_delta: Float
fee_rate: Float
max_htlc_mtokens: String
min_htlc_mtokens: String
transaction_id: String
transaction_vout: Float
}
type Utxo {
address: String!
address_format: String!
confirmation_count: Float!
output_script: String!
tokens: Float!
transaction_id: String!
transaction_vout: Float!
}
type Wallet {
build_tags: [String!]!
commit_hash: String!
is_autopilotrpc_enabled: Boolean!
is_chainrpc_enabled: Boolean!
is_invoicesrpc_enabled: Boolean!
is_signrpc_enabled: Boolean!
is_walletrpc_enabled: Boolean!
is_watchtowerrpc_enabled: Boolean!
is_wtclientrpc_enabled: Boolean!
}
type WithdrawRequest {
callback: String
defaultDescription: String
k1: String
maxWithdrawable: String
minWithdrawable: String
tag: String
}