@@ -165,6 +165,52 @@ pub struct LspFeeLimits {
165
165
#[ prost( uint64, optional, tag = "2" ) ]
166
166
pub max_proportional_opening_fee_ppm_msat : :: core:: option:: Option < u64 > ,
167
167
}
168
+ /// A forwarded payment through our node.
169
+ /// See more: <https://docs.rs/ldk-node/latest/ldk_node/enum.Event.html#variant.PaymentForwarded>
170
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
171
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
172
+ pub struct ForwardedPayment {
173
+ /// The channel id of the incoming channel between the previous node and us.
174
+ #[ prost( string, tag = "1" ) ]
175
+ pub prev_channel_id : :: prost:: alloc:: string:: String ,
176
+ /// The channel id of the outgoing channel between the next node and us.
177
+ #[ prost( string, tag = "2" ) ]
178
+ pub next_channel_id : :: prost:: alloc:: string:: String ,
179
+ /// The `user_channel_id` of the incoming channel between the previous node and us.
180
+ #[ prost( string, tag = "3" ) ]
181
+ pub prev_user_channel_id : :: prost:: alloc:: string:: String ,
182
+ /// The `user_channel_id` of the outgoing channel between the next node and us.
183
+ /// This will be `None` if the payment was settled via an on-chain transaction.
184
+ /// See the caveat described for the `total_fee_earned_msat` field.
185
+ #[ prost( string, optional, tag = "4" ) ]
186
+ pub next_user_channel_id : :: core:: option:: Option < :: prost:: alloc:: string:: String > ,
187
+ /// The total fee, in milli-satoshis, which was earned as a result of the payment.
188
+ ///
189
+ /// Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC was pending, the amount the
190
+ /// next hop claimed will have been rounded down to the nearest whole satoshi. Thus, the fee calculated here may be
191
+ /// higher than expected as we still claimed the full value in millisatoshis from the source.
192
+ /// In this case, `claim_from_onchain_tx` will be set.
193
+ ///
194
+ /// If the channel which sent us the payment has been force-closed, we will claim the funds via an on-chain transaction.
195
+ /// In that case we do not yet know the on-chain transaction fees which we will spend and will instead set this to `None`.
196
+ #[ prost( uint64, optional, tag = "5" ) ]
197
+ pub total_fee_earned_msat : :: core:: option:: Option < u64 > ,
198
+ /// The share of the total fee, in milli-satoshis, which was withheld in addition to the forwarding fee.
199
+ /// This will only be set if we forwarded an intercepted HTLC with less than the expected amount. This means our
200
+ /// counterparty accepted to receive less than the invoice amount.
201
+ ///
202
+ /// The caveat described above the `total_fee_earned_msat` field applies here as well.
203
+ #[ prost( uint64, optional, tag = "6" ) ]
204
+ pub skimmed_fee_msat : :: core:: option:: Option < u64 > ,
205
+ /// If this is true, the forwarded HTLC was claimed by our counterparty via an on-chain transaction.
206
+ #[ prost( bool , tag = "7" ) ]
207
+ pub claim_from_onchain_tx : bool ,
208
+ /// The final amount forwarded, in milli-satoshis, after the fee is deducted.
209
+ ///
210
+ /// The caveat described above the `total_fee_earned_msat` field applies here as well.
211
+ #[ prost( uint64, optional, tag = "8" ) ]
212
+ pub outbound_amount_forwarded_msat : :: core:: option:: Option < u64 > ,
213
+ }
168
214
#[ allow( clippy:: derive_partial_eq_without_eq) ]
169
215
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
170
216
pub struct Channel {
@@ -647,6 +693,15 @@ pub struct AwaitingThresholdConfirmations {
647
693
#[ prost( uint64, tag = "5" ) ]
648
694
pub amount_satoshis : u64 ,
649
695
}
696
+ /// Token used to determine start of next page in paginated APIs.
697
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
698
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
699
+ pub struct PageToken {
700
+ #[ prost( string, tag = "1" ) ]
701
+ pub token : :: prost:: alloc:: string:: String ,
702
+ #[ prost( int64, tag = "2" ) ]
703
+ pub index : i64 ,
704
+ }
650
705
/// Represents the direction of a payment.
651
706
#[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , PartialOrd , Ord , :: prost:: Enumeration ) ]
652
707
#[ repr( i32 ) ]
0 commit comments