1+ /// Retrieve the latest node info like `node_id`, `current_best_block` etc.
2+ /// See more:
3+ /// - <https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.node_id>
4+ /// - <https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.status>
5+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
6+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
7+ pub struct GetNodeInfoRequest { }
8+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
9+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
10+ pub struct GetNodeInfoResponse {
11+ /// The hex-encoded `node-id` or public key for our own lightning node.
12+ #[ prost( string, tag = "1" ) ]
13+ pub node_id : :: prost:: alloc:: string:: String ,
14+ /// The best block to which our Lightning wallet is currently synced.
15+ ///
16+ /// Should be always set, will never be `None`.
17+ #[ prost( message, optional, tag = "3" ) ]
18+ pub current_best_block : :: core:: option:: Option < BestBlock > ,
19+ /// The timestamp, in seconds since start of the UNIX epoch, when we last successfully synced our Lightning wallet
20+ /// to the chain tip.
21+ ///
22+ /// Will be `None` if the wallet hasn’t been synced since the node was initialized.
23+ #[ prost( uint64, optional, tag = "4" ) ]
24+ pub latest_wallet_sync_timestamp : :: core:: option:: Option < u64 > ,
25+ /// The timestamp, in seconds since start of the UNIX epoch, when we last successfully synced our on-chain
26+ /// wallet to the chain tip.
27+ ///
28+ /// Will be `None` if the wallet hasn’t been synced since the node was initialized.
29+ #[ prost( uint64, optional, tag = "5" ) ]
30+ pub latest_onchain_wallet_sync_timestamp : :: core:: option:: Option < u64 > ,
31+ /// The timestamp, in seconds since start of the UNIX epoch, when we last successfully update our fee rate cache.
32+ ///
33+ /// Will be `None` if the cache hasn’t been updated since the node was initialized.
34+ #[ prost( uint64, optional, tag = "6" ) ]
35+ pub latest_fee_rate_cache_update_timestamp : :: core:: option:: Option < u64 > ,
36+ /// The timestamp, in seconds since start of the UNIX epoch, when the last rapid gossip sync (RGS) snapshot we
37+ /// successfully applied was generated.
38+ ///
39+ /// Will be `None` if RGS isn’t configured or the snapshot hasn’t been updated since the node was initialized.
40+ #[ prost( uint64, optional, tag = "7" ) ]
41+ pub latest_rgs_snapshot_timestamp : :: core:: option:: Option < u64 > ,
42+ /// The timestamp, in seconds since start of the UNIX epoch, when we last broadcasted a node announcement.
43+ ///
44+ /// Will be `None` if we have no public channels or we haven’t broadcasted since the node was initialized.
45+ #[ prost( uint64, optional, tag = "8" ) ]
46+ pub latest_node_announcement_broadcast_timestamp : :: core:: option:: Option < u64 > ,
47+ }
148/// Retrieve a new on-chain funding address.
249/// See more: <https://docs.rs/ldk-node/latest/ldk_node/payment/struct.OnchainPayment.html#method.new_address>
350#[ allow( clippy:: derive_partial_eq_without_eq) ]
@@ -184,28 +231,28 @@ pub struct ChannelConfig {
184231 /// Amount (in millionths of a satoshi) charged per satoshi for payments forwarded outbound
185232 /// over the channel.
186233 /// See more: <https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.forwarding_fee_proportional_millionths>
187- #[ prost( uint32, tag = "1" ) ]
188- pub forwarding_fee_proportional_millionths : u32 ,
234+ #[ prost( uint32, optional , tag = "1" ) ]
235+ pub forwarding_fee_proportional_millionths : :: core :: option :: Option < u32 > ,
189236 /// Amount (in milli-satoshi) charged for payments forwarded outbound over the channel,
190237 /// in excess of forwarding_fee_proportional_millionths.
191238 /// See more: <https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.forwarding_fee_base_msat>
192- #[ prost( uint32, tag = "2" ) ]
193- pub forwarding_fee_base_msat : u32 ,
239+ #[ prost( uint32, optional , tag = "2" ) ]
240+ pub forwarding_fee_base_msat : :: core :: option :: Option < u32 > ,
194241 /// The difference in the CLTV value between incoming HTLCs and an outbound HTLC forwarded
195242 /// over the channel this config applies to.
196243 /// See more: <https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.cltv_expiry_delta>
197- #[ prost( uint32, tag = "3" ) ]
198- pub cltv_expiry_delta : u32 ,
244+ #[ prost( uint32, optional , tag = "3" ) ]
245+ pub cltv_expiry_delta : :: core :: option :: Option < u32 > ,
199246 /// The maximum additional fee we’re willing to pay to avoid waiting for the counterparty’s
200247 /// to_self_delay to reclaim funds.
201248 /// See more: <https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.force_close_avoidance_max_fee_satoshis>
202- #[ prost( uint64, tag = "4" ) ]
203- pub force_close_avoidance_max_fee_satoshis : u64 ,
249+ #[ prost( uint64, optional , tag = "4" ) ]
250+ pub force_close_avoidance_max_fee_satoshis : :: core :: option :: Option < u64 > ,
204251 /// If set, allows this channel’s counterparty to skim an additional fee off this node’s
205252 /// inbound HTLCs. Useful for liquidity providers to offload on-chain channel costs to end users.
206253 /// See more: <https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.accept_underpaying_htlcs>
207- #[ prost( bool , tag = "5" ) ]
208- pub accept_underpaying_htlcs : bool ,
254+ #[ prost( bool , optional , tag = "5" ) ]
255+ pub accept_underpaying_htlcs : :: core :: option :: Option < bool > ,
209256 /// Limit our total exposure to potential loss to on-chain fees on close, including
210257 /// in-flight HTLCs which are burned to fees as they are too small to claim on-chain
211258 /// and fees on commitment transaction(s) broadcasted by our counterparty in excess of
@@ -284,9 +331,9 @@ pub struct Channel {
284331 /// our counterparty already.
285332 #[ prost( message, optional, tag = "3" ) ]
286333 pub funding_txo : :: core:: option:: Option < OutPoint > ,
287- /// The local `user_channel_id` of this channel.
288- #[ prost( bytes = "bytes" , tag = "4" ) ]
289- pub user_channel_id : :: prost:: bytes :: Bytes ,
334+ /// The hex-encoded local `user_channel_id` of this channel.
335+ #[ prost( string , tag = "4" ) ]
336+ pub user_channel_id : :: prost:: alloc :: string :: String ,
290337 /// The value, in satoshis, that must always be held as a reserve in the channel for us. This
291338 /// value ensures that if we broadcast a revoked state, our counterparty can punish us by
292339 /// claiming at least this value on chain.
@@ -383,8 +430,8 @@ pub struct Channel {
383430 /// claiming at least this value on chain.
384431 ///
385432 /// This value is not included in `inbound_capacity_msat` as it can never be spent.
386- #[ prost( uint64, optional , tag = "22" ) ]
387- pub counterparty_unspendable_punishment_reserve : :: core :: option :: Option < u64 > ,
433+ #[ prost( uint64, tag = "22" ) ]
434+ pub counterparty_unspendable_punishment_reserve : u64 ,
388435 /// Base routing fee in millisatoshis.
389436 #[ prost( uint32, optional, tag = "23" ) ]
390437 pub counterparty_forwarding_info_fee_base_msat : :: core:: option:: Option < u32 > ,
@@ -407,3 +454,13 @@ pub struct OutPoint {
407454 #[ prost( uint32, tag = "2" ) ]
408455 pub vout : u32 ,
409456}
457+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
458+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
459+ pub struct BestBlock {
460+ /// The block’s hash
461+ #[ prost( string, tag = "1" ) ]
462+ pub block_hash : :: prost:: alloc:: string:: String ,
463+ /// The height at which the block was confirmed.
464+ #[ prost( uint32, tag = "2" ) ]
465+ pub height : u32 ,
466+ }
0 commit comments