-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathtypes.proto
More file actions
685 lines (547 loc) · 28.6 KB
/
types.proto
File metadata and controls
685 lines (547 loc) · 28.6 KB
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
syntax = "proto3";
package types;
// Represents a payment.
// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.PaymentDetails.html
message Payment {
// An identifier used to uniquely identify a payment in hex-encoded form.
string id = 1;
// The kind of the payment.
PaymentKind kind = 2;
// The amount transferred.
optional uint64 amount_msat = 3;
// The fees that were paid for this payment.
//
// For Lightning payments, this will only be updated for outbound payments once they
// succeeded.
optional uint64 fee_paid_msat = 7;
// The direction of the payment.
PaymentDirection direction = 4;
// The status of the payment.
PaymentStatus status = 5;
// The timestamp, in seconds since start of the UNIX epoch, when this entry was last updated.
uint64 latest_update_timestamp = 6;
}
message PaymentKind {
oneof kind {
Onchain onchain = 1;
Bolt11 bolt11 = 2;
Bolt11Jit bolt11_jit = 3;
Bolt12Offer bolt12_offer = 4;
Bolt12Refund bolt12_refund = 5;
Spontaneous spontaneous = 6;
}
}
// Represents an on-chain payment.
message Onchain {
// The transaction identifier of this payment.
string txid = 1;
// The confirmation status of this payment.
ConfirmationStatus status = 2;
}
message ConfirmationStatus {
oneof status {
Confirmed confirmed = 1;
Unconfirmed unconfirmed = 2;
}
}
// The on-chain transaction is confirmed in the best chain.
message Confirmed {
// The hex representation of hash of the block in which the transaction was confirmed.
string block_hash = 1;
// The height under which the block was confirmed.
uint32 height = 2;
// The timestamp, in seconds since start of the UNIX epoch, when this entry was last updated.
uint64 timestamp = 3;
}
// The on-chain transaction is unconfirmed.
message Unconfirmed {}
// Represents a BOLT 11 payment.
message Bolt11 {
// The payment hash, i.e., the hash of the preimage.
string hash = 1;
// The pre-image used by the payment.
optional string preimage = 2;
// The secret used by the payment.
optional bytes secret = 3;
}
// Represents a BOLT 11 payment intended to open an LSPS 2 just-in-time channel.
message Bolt11Jit {
// The payment hash, i.e., the hash of the preimage.
string hash = 1;
// The pre-image used by the payment.
optional string preimage = 2;
// The secret used by the payment.
optional bytes secret = 3;
// Limits applying to how much fee we allow an LSP to deduct from the payment amount.
//
// Allowing them to deduct this fee from the first inbound payment will pay for the LSP’s channel opening fees.
//
// See [`LdkChannelConfig::accept_underpaying_htlcs`](https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.accept_underpaying_htlcs)
// for more information.
LSPFeeLimits lsp_fee_limits = 4;
// The value, in thousands of a satoshi, that was deducted from this payment as an extra
// fee taken by our channel counterparty.
//
// Will only be `Some` once we received the payment.
optional uint64 counterparty_skimmed_fee_msat = 5;
}
// Represents a BOLT 12 ‘offer’ payment, i.e., a payment for an Offer.
message Bolt12Offer {
// The payment hash, i.e., the hash of the preimage.
optional string hash = 1;
// The pre-image used by the payment.
optional string preimage = 2;
// The secret used by the payment.
optional bytes secret = 3;
// The hex-encoded ID of the offer this payment is for.
string offer_id = 4;
// The payer's note for the payment.
// Truncated to [PAYER_NOTE_LIMIT](https://docs.rs/lightning/latest/lightning/offers/invoice_request/constant.PAYER_NOTE_LIMIT.html).
//
// **Caution**: The `payer_note` field may come from an untrusted source. To prevent potential misuse,
// all non-printable characters will be sanitized and replaced with safe characters.
optional string payer_note = 5;
// The quantity of an item requested in the offer.
optional uint64 quantity = 6;
}
// Represents a BOLT 12 ‘refund’ payment, i.e., a payment for a Refund.
message Bolt12Refund {
// The payment hash, i.e., the hash of the preimage.
optional string hash = 1;
// The pre-image used by the payment.
optional string preimage = 2;
// The secret used by the payment.
optional bytes secret = 3;
// The payer's note for the payment.
// Truncated to [PAYER_NOTE_LIMIT](https://docs.rs/lightning/latest/lightning/offers/invoice_request/constant.PAYER_NOTE_LIMIT.html).
//
// **Caution**: The `payer_note` field may come from an untrusted source. To prevent potential misuse,
// all non-printable characters will be sanitized and replaced with safe characters.
optional string payer_note = 5;
// The quantity of an item requested in the offer.
optional uint64 quantity = 6;
}
// Represents a spontaneous (“keysend”) payment.
message Spontaneous {
// The payment hash, i.e., the hash of the preimage.
string hash = 1;
// The pre-image used by the payment.
optional string preimage = 2;
}
// Limits applying to how much fee we allow an LSP to deduct from the payment amount.
// See [`LdkChannelConfig::accept_underpaying_htlcs`] for more information.
//
// [`LdkChannelConfig::accept_underpaying_htlcs`]: lightning::util::config::ChannelConfig::accept_underpaying_htlcs
message LSPFeeLimits {
// The maximal total amount we allow any configured LSP withhold from us when forwarding the
// payment.
optional uint64 max_total_opening_fee_msat = 1;
// The maximal proportional fee, in parts-per-million millisatoshi, we allow any configured
// LSP withhold from us when forwarding the payment.
optional uint64 max_proportional_opening_fee_ppm_msat = 2;
}
// Represents the direction of a payment.
enum PaymentDirection {
// The payment is inbound.
INBOUND = 0;
// The payment is outbound.
OUTBOUND = 1;
}
// Represents the current status of a payment.
enum PaymentStatus {
// The payment is still pending.
PENDING = 0;
// The payment succeeded.
SUCCEEDED = 1;
// The payment failed.
FAILED = 2;
}
// A forwarded payment through our node.
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.Event.html#variant.PaymentForwarded
message ForwardedPayment{
// The channel id of the incoming channel between the previous node and us.
string prev_channel_id = 1;
// The channel id of the outgoing channel between the next node and us.
string next_channel_id = 2;
// The `user_channel_id` of the incoming channel between the previous node and us.
string prev_user_channel_id = 3;
// The node id of the previous node.
string prev_node_id = 9;
// The node id of the next node.
string next_node_id = 10;
// The `user_channel_id` of the outgoing channel between the next node and us.
// This will be `None` if the payment was settled via an on-chain transaction.
// See the caveat described for the `total_fee_earned_msat` field.
optional string next_user_channel_id = 4;
// The total fee, in milli-satoshis, which was earned as a result of the payment.
//
// Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC was pending, the amount the
// next hop claimed will have been rounded down to the nearest whole satoshi. Thus, the fee calculated here may be
// higher than expected as we still claimed the full value in millisatoshis from the source.
// In this case, `claim_from_onchain_tx` will be set.
//
// If the channel which sent us the payment has been force-closed, we will claim the funds via an on-chain transaction.
// In that case we do not yet know the on-chain transaction fees which we will spend and will instead set this to `None`.
optional uint64 total_fee_earned_msat = 5;
// The share of the total fee, in milli-satoshis, which was withheld in addition to the forwarding fee.
// This will only be set if we forwarded an intercepted HTLC with less than the expected amount. This means our
// counterparty accepted to receive less than the invoice amount.
//
// The caveat described above the `total_fee_earned_msat` field applies here as well.
optional uint64 skimmed_fee_msat = 6;
// If this is true, the forwarded HTLC was claimed by our counterparty via an on-chain transaction.
bool claim_from_onchain_tx = 7;
// The final amount forwarded, in milli-satoshis, after the fee is deducted.
//
// The caveat described above the `total_fee_earned_msat` field applies here as well.
optional uint64 outbound_amount_forwarded_msat = 8;
}
message Channel {
// The channel ID (prior to funding transaction generation, this is a random 32-byte
// identifier, afterwards this is the transaction ID of the funding transaction XOR the
// funding transaction output).
//
// Note that this means this value is *not* persistent - it can change once during the
// lifetime of the channel.
string channel_id = 1;
// The node ID of our the channel's remote counterparty.
string counterparty_node_id = 2;
// The channel's funding transaction output, if we've negotiated the funding transaction with
// our counterparty already.
optional OutPoint funding_txo = 3;
// The hex-encoded local `user_channel_id` of this channel.
string user_channel_id = 4;
// The value, in satoshis, that must always be held as a reserve in the channel for us. This
// value ensures that if we broadcast a revoked state, our counterparty can punish us by
// claiming at least this value on chain.
//
// This value is not included in [`outbound_capacity_msat`] as it can never be spent.
//
// This value will be `None` for outbound channels until the counterparty accepts the channel.
optional uint64 unspendable_punishment_reserve = 5;
// The value, in satoshis, of this channel as it appears in the funding output.
uint64 channel_value_sats = 6;
// The currently negotiated fee rate denominated in satoshi per 1000 weight units,
// which is applied to commitment and HTLC transactions.
uint32 feerate_sat_per_1000_weight = 7;
// The available outbound capacity for sending HTLCs to the remote peer.
//
// The amount does not include any pending HTLCs which are not yet resolved (and, thus, whose
// balance is not available for inclusion in new outbound HTLCs). This further does not include
// any pending outgoing HTLCs which are awaiting some other resolution to be sent.
uint64 outbound_capacity_msat = 8;
// The available outbound capacity for sending HTLCs to the remote peer.
//
// The amount does not include any pending HTLCs which are not yet resolved
// (and, thus, whose balance is not available for inclusion in new inbound HTLCs). This further
// does not include any pending outgoing HTLCs which are awaiting some other resolution to be
// sent.
uint64 inbound_capacity_msat = 9;
// The number of required confirmations on the funding transactions before the funding is
// considered "locked". The amount is selected by the channel fundee.
//
// The value will be `None` for outbound channels until the counterparty accepts the channel.
optional uint32 confirmations_required = 10;
// The current number of confirmations on the funding transaction.
optional uint32 confirmations = 11;
// Is `true` if the channel was initiated (and therefore funded) by us.
bool is_outbound = 12;
// Is `true` if both parties have exchanged `channel_ready` messages, and the channel is
// not currently being shut down. Both parties exchange `channel_ready` messages upon
// independently verifying that the required confirmations count provided by
// `confirmations_required` has been reached.
bool is_channel_ready = 13;
// Is `true` if the channel (a) `channel_ready` messages have been exchanged, (b) the
// peer is connected, and (c) the channel is not currently negotiating shutdown.
//
// This is a strict superset of `is_channel_ready`.
bool is_usable = 14;
// Is `true` if this channel is (or will be) publicly-announced
bool is_announced = 15;
// Set of configurable parameters set by self that affect channel operation.
ChannelConfig channel_config = 16;
// The available outbound capacity for sending a single HTLC to the remote peer. This is
// similar to `outbound_capacity_msat` but it may be further restricted by
// the current state and per-HTLC limit(s). This is intended for use when routing, allowing us
// to use a limit as close as possible to the HTLC limit we can currently send.
uint64 next_outbound_htlc_limit_msat = 17;
// The minimum value for sending a single HTLC to the remote peer. This is the equivalent of
// `next_outbound_htlc_limit_msat` but represents a lower-bound, rather than
// an upper-bound. This is intended for use when routing, allowing us to ensure we pick a
// route which is valid.
uint64 next_outbound_htlc_minimum_msat = 18;
// The number of blocks (after our commitment transaction confirms) that we will need to wait
// until we can claim our funds after we force-close the channel. During this time our
// counterparty is allowed to punish us if we broadcasted a stale state. If our counterparty
// force-closes the channel and broadcasts a commitment transaction we do not have to wait any
// time to claim our non-HTLC-encumbered funds.
//
// This value will be `None` for outbound channels until the counterparty accepts the channel.
optional uint32 force_close_spend_delay = 19;
// The smallest value HTLC (in msat) the remote peer will accept, for this channel.
//
// This field is only `None` before we have received either the `OpenChannel` or
// `AcceptChannel` message from the remote peer.
optional uint64 counterparty_outbound_htlc_minimum_msat = 20;
// The largest value HTLC (in msat) the remote peer currently will accept, for this channel.
optional uint64 counterparty_outbound_htlc_maximum_msat = 21;
// The value, in satoshis, that must always be held in the channel for our counterparty. This
// value ensures that if our counterparty broadcasts a revoked state, we can punish them by
// claiming at least this value on chain.
//
// This value is not included in `inbound_capacity_msat` as it can never be spent.
uint64 counterparty_unspendable_punishment_reserve = 22;
// Base routing fee in millisatoshis.
optional uint32 counterparty_forwarding_info_fee_base_msat = 23;
// Proportional fee, in millionths of a satoshi the channel will charge per transferred satoshi.
optional uint32 counterparty_forwarding_info_fee_proportional_millionths = 24;
// The minimum difference in CLTV expiry between an ingoing HTLC and its outgoing counterpart,
// such that the outgoing HTLC is forwardable to this counterparty.
optional uint32 counterparty_forwarding_info_cltv_expiry_delta = 25;
}
// ChannelConfig represents the configuration settings for a channel in a Lightning Network node.
// See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html
message ChannelConfig {
// Amount (in millionths of a satoshi) charged per satoshi for payments forwarded outbound
// over the channel.
// See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.forwarding_fee_proportional_millionths
optional uint32 forwarding_fee_proportional_millionths = 1;
// Amount (in milli-satoshi) charged for payments forwarded outbound over the channel,
// in excess of forwarding_fee_proportional_millionths.
// See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.forwarding_fee_base_msat
optional uint32 forwarding_fee_base_msat = 2;
// The difference in the CLTV value between incoming HTLCs and an outbound HTLC forwarded
// over the channel this config applies to.
// See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.cltv_expiry_delta
optional uint32 cltv_expiry_delta = 3;
// The maximum additional fee we’re willing to pay to avoid waiting for the counterparty’s
// to_self_delay to reclaim funds.
// See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.force_close_avoidance_max_fee_satoshis
optional uint64 force_close_avoidance_max_fee_satoshis = 4;
// If set, allows this channel’s counterparty to skim an additional fee off this node’s
// inbound HTLCs. Useful for liquidity providers to offload on-chain channel costs to end users.
// See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.accept_underpaying_htlcs
optional bool accept_underpaying_htlcs = 5;
// Limit our total exposure to potential loss to on-chain fees on close, including
// in-flight HTLCs which are burned to fees as they are too small to claim on-chain
// and fees on commitment transaction(s) broadcasted by our counterparty in excess of
// our own fee estimate.
// See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.max_dust_htlc_exposure
oneof max_dust_htlc_exposure {
// This sets a fixed limit on the total dust exposure in millisatoshis.
// See more: https://docs.rs/lightning/latest/lightning/util/config/enum.MaxDustHTLCExposure.html#variant.FixedLimitMsat
uint64 fixed_limit_msat = 6;
// This sets a multiplier on the ConfirmationTarget::OnChainSweep feerate (in sats/KW) to determine the maximum allowed dust exposure.
// See more: https://docs.rs/lightning/latest/lightning/util/config/enum.MaxDustHTLCExposure.html#variant.FeeRateMultiplier
uint64 fee_rate_multiplier = 7;
}
}
// Represent a transaction outpoint.
message OutPoint {
// The referenced transaction's txid.
string txid = 1;
// The index of the referenced output in its transaction's vout.
uint32 vout = 2;
}
message BestBlock {
// The block’s hash
string block_hash = 1;
// The height at which the block was confirmed.
uint32 height = 2;
}
// Details about the status of a known Lightning balance.
message LightningBalance {
oneof balance_type {
ClaimableOnChannelClose claimable_on_channel_close = 1;
ClaimableAwaitingConfirmations claimable_awaiting_confirmations = 2;
ContentiousClaimable contentious_claimable = 3;
MaybeTimeoutClaimableHTLC maybe_timeout_claimable_htlc = 4;
MaybePreimageClaimableHTLC maybe_preimage_claimable_htlc = 5;
CounterpartyRevokedOutputClaimable counterparty_revoked_output_claimable = 6;
}
}
// The channel is not yet closed (or the commitment or closing transaction has not yet appeared in a block).
// The given balance is claimable (less on-chain fees) if the channel is force-closed now.
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.ClaimableOnChannelClose
message ClaimableOnChannelClose {
// The identifier of the channel this balance belongs to.
string channel_id = 1;
// The identifier of our channel counterparty.
string counterparty_node_id = 2;
// The amount available to claim, in satoshis, excluding the on-chain fees which will be required to do so.
uint64 amount_satoshis = 3;
// The transaction fee we pay for the closing commitment transaction.
// This amount is not included in the `amount_satoshis` value.
//
// Note that if this channel is inbound (and thus our counterparty pays the commitment transaction fee) this value
// will be zero.
uint64 transaction_fee_satoshis = 4;
// The amount of millisatoshis which has been burned to fees from HTLCs which are outbound from us and are related to
// a payment which was sent by us. This is the sum of the millisatoshis part of all HTLCs which are otherwise
// represented by `LightningBalance::MaybeTimeoutClaimableHTLC` with their
// `LightningBalance::MaybeTimeoutClaimableHTLC::outbound_payment` flag set, as well as any dust HTLCs which would
// otherwise be represented the same.
//
// This amount (rounded up to a whole satoshi value) will not be included in `amount_satoshis`.
uint64 outbound_payment_htlc_rounded_msat = 5;
// The amount of millisatoshis which has been burned to fees from HTLCs which are outbound from us and are related to
// a forwarded HTLC. This is the sum of the millisatoshis part of all HTLCs which are otherwise represented by
// `LightningBalance::MaybeTimeoutClaimableHTLC` with their `LightningBalance::MaybeTimeoutClaimableHTLC::outbound_payment`
// flag not set, as well as any dust HTLCs which would otherwise be represented the same.
//
// This amount (rounded up to a whole satoshi value) will not be included in `amount_satoshis`.
uint64 outbound_forwarded_htlc_rounded_msat = 6;
// The amount of millisatoshis which has been burned to fees from HTLCs which are inbound to us and for which we know
// the preimage. This is the sum of the millisatoshis part of all HTLCs which would be represented by
// `LightningBalance::ContentiousClaimable` on channel close, but whose current value is included in `amount_satoshis`,
// as well as any dust HTLCs which would otherwise be represented the same.
//
// This amount (rounded up to a whole satoshi value) will not be included in `amount_satoshis`.
uint64 inbound_claiming_htlc_rounded_msat = 7;
// The amount of millisatoshis which has been burned to fees from HTLCs which are inbound to us and for which we do
// not know the preimage. This is the sum of the millisatoshis part of all HTLCs which would be represented by
// `LightningBalance::MaybePreimageClaimableHTLC` on channel close, as well as any dust HTLCs which would otherwise be
// represented the same.
//
// This amount (rounded up to a whole satoshi value) will not be included in the counterparty’s `amount_satoshis`.
uint64 inbound_htlc_rounded_msat = 8;
}
// The channel has been closed, and the given balance is ours but awaiting confirmations until we consider it spendable.
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.ClaimableAwaitingConfirmations
message ClaimableAwaitingConfirmations {
// The identifier of the channel this balance belongs to.
string channel_id = 1;
// The identifier of our channel counterparty.
string counterparty_node_id = 2;
// The amount available to claim, in satoshis, possibly excluding the on-chain fees which were spent in broadcasting
// the transaction.
uint64 amount_satoshis = 3;
// The height at which we start tracking it as `SpendableOutput`.
uint32 confirmation_height = 4;
}
// The channel has been closed, and the given balance should be ours but awaiting spending transaction confirmation.
// If the spending transaction does not confirm in time, it is possible our counterparty can take the funds by
// broadcasting an HTLC timeout on-chain.
//
// Once the spending transaction confirms, before it has reached enough confirmations to be considered safe from chain
// reorganizations, the balance will instead be provided via `LightningBalance::ClaimableAwaitingConfirmations`.
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.ContentiousClaimable
message ContentiousClaimable {
// The identifier of the channel this balance belongs to.
string channel_id = 1;
// The identifier of our channel counterparty.
string counterparty_node_id = 2;
// The amount available to claim, in satoshis, excluding the on-chain fees which were spent in broadcasting
// the transaction.
uint64 amount_satoshis = 3;
// The height at which the counterparty may be able to claim the balance if we have not done so.
uint32 timeout_height = 4;
// The payment hash that locks this HTLC.
string payment_hash = 5;
// The preimage that can be used to claim this HTLC.
string payment_preimage = 6;
}
// HTLCs which we sent to our counterparty which are claimable after a timeout (less on-chain fees) if the counterparty
// does not know the preimage for the HTLCs. These are somewhat likely to be claimed by our counterparty before we do.
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.MaybeTimeoutClaimableHTLC
message MaybeTimeoutClaimableHTLC {
// The identifier of the channel this balance belongs to.
string channel_id = 1;
// The identifier of our channel counterparty.
string counterparty_node_id = 2;
// The amount available to claim, in satoshis, excluding the on-chain fees which were spent in broadcasting
// the transaction.
uint64 amount_satoshis = 3;
// The height at which we will be able to claim the balance if our counterparty has not done so.
uint32 claimable_height = 4;
// The payment hash whose preimage our counterparty needs to claim this HTLC.
string payment_hash = 5;
// Indicates whether this HTLC represents a payment which was sent outbound from us.
bool outbound_payment = 6;
}
// HTLCs which we received from our counterparty which are claimable with a preimage which we do not currently have.
// This will only be claimable if we receive the preimage from the node to which we forwarded this HTLC before the
// timeout.
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.MaybePreimageClaimableHTLC
message MaybePreimageClaimableHTLC {
// The identifier of the channel this balance belongs to.
string channel_id = 1;
// The identifier of our channel counterparty.
string counterparty_node_id = 2;
// The amount available to claim, in satoshis, excluding the on-chain fees which were spent in broadcasting
// the transaction.
uint64 amount_satoshis = 3;
// The height at which our counterparty will be able to claim the balance if we have not yet received the preimage and
// claimed it ourselves.
uint32 expiry_height = 4;
// The payment hash whose preimage we need to claim this HTLC.
string payment_hash = 5;
}
// The channel has been closed, and our counterparty broadcasted a revoked commitment transaction.
//
// Thus, we’re able to claim all outputs in the commitment transaction, one of which has the following amount.
//
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.CounterpartyRevokedOutputClaimable
message CounterpartyRevokedOutputClaimable {
// The identifier of the channel this balance belongs to.
string channel_id = 1;
// The identifier of our channel counterparty.
string counterparty_node_id = 2;
// The amount, in satoshis, of the output which we can claim.
uint64 amount_satoshis = 3;
}
// Details about the status of a known balance currently being swept to our on-chain wallet.
message PendingSweepBalance {
oneof balance_type {
PendingBroadcast pending_broadcast = 1;
BroadcastAwaitingConfirmation broadcast_awaiting_confirmation = 2;
AwaitingThresholdConfirmations awaiting_threshold_confirmations = 3;
}
}
// The spendable output is about to be swept, but a spending transaction has yet to be generated and broadcast.
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.PendingSweepBalance.html#variant.PendingBroadcast
message PendingBroadcast {
// The identifier of the channel this balance belongs to.
optional string channel_id = 1;
// The amount, in satoshis, of the output being swept.
uint64 amount_satoshis = 2;
}
// A spending transaction has been generated and broadcast and is awaiting confirmation on-chain.
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.PendingSweepBalance.html#variant.BroadcastAwaitingConfirmation
message BroadcastAwaitingConfirmation {
// The identifier of the channel this balance belongs to.
optional string channel_id = 1;
// The best height when we last broadcast a transaction spending the output being swept.
uint32 latest_broadcast_height = 2;
// The identifier of the transaction spending the swept output we last broadcast.
string latest_spending_txid = 3;
// The amount, in satoshis, of the output being swept.
uint64 amount_satoshis = 4;
}
// A spending transaction has been confirmed on-chain and is awaiting threshold confirmations.
//
// It will be considered irrevocably confirmed after reaching `ANTI_REORG_DELAY`.
// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.PendingSweepBalance.html#variant.AwaitingThresholdConfirmations
message AwaitingThresholdConfirmations {
// The identifier of the channel this balance belongs to.
optional string channel_id = 1;
// The identifier of the confirmed transaction spending the swept output.
string latest_spending_txid = 2;
// The hash of the block in which the spending transaction was confirmed.
string confirmation_hash = 3;
// The height at which the spending transaction was confirmed.
uint32 confirmation_height = 4;
// The amount, in satoshis, of the output being swept.
uint64 amount_satoshis = 5;
}
// Token used to determine start of next page in paginated APIs.
message PageToken {
string token = 1;
int64 index = 2;
}
message Bolt11InvoiceDescription {
oneof kind {
string direct = 1;
string hash = 2;
}
}