@@ -40,10 +40,7 @@ use core::time::Duration;
40
40
/// `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
41
41
/// in excess of the current time.
42
42
///
43
- /// 'duration_since_epoch' is the current time since epoch in seconds.
44
- ///
45
- /// ['std::time::SystemTime'] has been removed to allow this function to be used in a 'no_std' environment,
46
- /// where [`std::time::SystemTime`] is not available and the current time is supplied by the caller.
43
+ /// `duration_since_epoch` is the current time since epoch in seconds.
47
44
///
48
45
/// You can specify a custom `min_final_cltv_expiry_delta`, or let LDK default it to
49
46
/// [`MIN_FINAL_CLTV_EXPIRY_DELTA`]. The provided expiry must be at least [`MIN_FINAL_CLTV_EXPIRY_DELTA`] - 3.
@@ -60,6 +57,9 @@ use core::time::Duration;
60
57
/// [`ChannelManager::create_inbound_payment_for_hash`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
61
58
/// [`PhantomRouteHints::channels`]: lightning::ln::channelmanager::PhantomRouteHints::channels
62
59
/// [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
60
+ ///
61
+ /// This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
62
+ /// available and the current time is supplied by the caller.
63
63
pub fn create_phantom_invoice < ES : Deref , NS : Deref , L : Deref > (
64
64
amt_msat : Option < u64 > , payment_hash : Option < PaymentHash > , description : String ,
65
65
invoice_expiry_delta_secs : u32 , phantom_route_hints : Vec < PhantomRouteHints > , entropy_source : ES ,
@@ -100,10 +100,7 @@ where
100
100
/// `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
101
101
/// in excess of the current time.
102
102
///
103
- /// 'duration_since_epoch' is the current time since epoch in seconds.
104
- ///
105
- /// ['std::time::SystemTime'] has been removed to allow this function to be used in a 'no_std' environment,
106
- /// where [`std::time::SystemTime`] is not available and the current time is supplied by the caller.
103
+ /// `duration_since_epoch` is the current time since epoch in seconds.
107
104
///
108
105
/// Note that the provided `keys_manager`'s `NodeSigner` implementation must support phantom
109
106
/// invoices in its `sign_invoice` implementation ([`PhantomKeysManager`] satisfies this
@@ -114,6 +111,9 @@ where
114
111
/// [`ChannelManager::create_inbound_payment`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment
115
112
/// [`ChannelManager::create_inbound_payment_for_hash`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
116
113
/// [`PhantomRouteHints::channels`]: lightning::ln::channelmanager::PhantomRouteHints::channels
114
+ ///
115
+ /// This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
116
+ /// available and the current time is supplied by the caller.
117
117
pub fn create_phantom_invoice_with_description_hash < ES : Deref , NS : Deref , L : Deref > (
118
118
amt_msat : Option < u64 > , payment_hash : Option < PaymentHash > , invoice_expiry_delta_secs : u32 ,
119
119
description_hash : Sha256 , phantom_route_hints : Vec < PhantomRouteHints > , entropy_source : ES ,
0 commit comments