Skip to content

Commit 8e124d8

Browse files
committed
Move create_blinded_path_using_absolute_expiry to flow.rs
1 parent cba7288 commit 8e124d8

File tree

7 files changed

+226
-182
lines changed

7 files changed

+226
-182
lines changed

lightning-background-processor/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
647647
/// # type NetworkGraph = lightning::routing::gossip::NetworkGraph<Arc<Logger>>;
648648
/// # type P2PGossipSync<UL> = lightning::routing::gossip::P2PGossipSync<Arc<NetworkGraph>, Arc<UL>, Arc<Logger>>;
649649
/// # type ChannelManager<B, F, FE> = lightning::ln::channelmanager::SimpleArcChannelManager<ChainMonitor<B, F, FE>, B, FE, Logger>;
650-
/// # type OffersMessageFlow<B, F, FE> = lightning::offers::flow::OffersMessageFlow<Arc<lightning::sign::KeysManager>, Arc<ChannelManager<B, F, FE>>, Arc<Logger>>;
650+
/// # type OffersMessageFlow<B, F, FE> = lightning::offers::flow::OffersMessageFlow<Arc<lightning::sign::KeysManager>, Arc<ChannelManager<B, F, FE>>, Arc<lightning::onion_message::messenger::DefaultMessageRouter<Arc<NetworkGraph>, Arc<Logger>, Arc<lightning::sign::KeysManager>>>, Arc<Logger>>;
651651
/// # type OnionMessenger<B, F, FE> = lightning::onion_message::messenger::OnionMessenger<Arc<lightning::sign::KeysManager>, Arc<lightning::sign::KeysManager>, Arc<Logger>, Arc<ChannelManager<B, F, FE>>, Arc<lightning::onion_message::messenger::DefaultMessageRouter<Arc<NetworkGraph>, Arc<Logger>, Arc<lightning::sign::KeysManager>>>, Arc<OffersMessageFlow<B, F, FE>>, lightning::ln::peer_handler::IgnoringMessageHandler, lightning::ln::peer_handler::IgnoringMessageHandler, lightning::ln::peer_handler::IgnoringMessageHandler>;
652652
/// # type Scorer = RwLock<lightning::routing::scoring::ProbabilisticScorer<Arc<NetworkGraph>, Arc<Logger>>>;
653653
/// # type PeerManager<B, F, FE, UL> = lightning::ln::peer_handler::SimpleArcPeerManager<SocketDescriptor, ChainMonitor<B, F, FE>, B, FE, Arc<UL>, Logger>;

lightning/src/ln/blinded_payment_tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ fn blinded_keysend() {
12251225
&nodes[2].keys_manager.get_inbound_payment_key_material()
12261226
);
12271227
let payment_secret = inbound_payment::create_for_spontaneous_payment(
1228-
&inbound_payment_key, None, u32::MAX, nodes[2].node.duration_since_epoch().as_secs(), None
1228+
&inbound_payment_key, None, u32::MAX, nodes[2].offers_handler.duration_since_epoch().as_secs(), None
12291229
).unwrap();
12301230

12311231
let amt_msat = 5000;
@@ -1266,7 +1266,7 @@ fn blinded_mpp_keysend() {
12661266
&nodes[3].keys_manager.get_inbound_payment_key_material()
12671267
);
12681268
let payment_secret = inbound_payment::create_for_spontaneous_payment(
1269-
&inbound_payment_key, None, u32::MAX, nodes[3].node.duration_since_epoch().as_secs(), None
1269+
&inbound_payment_key, None, u32::MAX, nodes[3].offers_handler.duration_since_epoch().as_secs(), None
12701270
).unwrap();
12711271

12721272
let amt_msat = 15_000_000;

lightning/src/ln/channelmanager.rs

+25-126
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ use bitcoin::secp256k1::Secp256k1;
3333
use bitcoin::{secp256k1, Sequence, Weight};
3434

3535
use crate::events::FundingInfo;
36-
use crate::blinded_path::message::{AsyncPaymentsContext, MessageContext, OffersContext};
36+
use crate::blinded_path::message::{AsyncPaymentsContext, MessageContext, MessageForwardNode, OffersContext};
3737
use crate::blinded_path::NodeIdLookUp;
38-
use crate::blinded_path::message::{BlindedMessagePath, MessageForwardNode};
38+
use crate::blinded_path::message::BlindedMessagePath;
3939
use crate::blinded_path::payment::{BlindedPaymentPath, PaymentConstraints, PaymentContext, ReceiveTlvs};
4040
use crate::chain;
4141
use crate::chain::{Confirm, ChannelMonitorUpdateStatus, Watch, BestBlock};
@@ -47,7 +47,6 @@ use crate::events::{self, Event, EventHandler, EventsProvider, InboundChannelFun
4747
// construct one themselves.
4848
use crate::ln::inbound_payment;
4949
use crate::ln::types::ChannelId;
50-
use crate::offers::offer::Offer;
5150
use crate::offers::flow::OffersMessageCommons;
5251
use crate::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
5352
use crate::ln::channel::{self, Channel, ChannelPhase, ChannelError, ChannelUpdateStatus, ShutdownResult, UpdateFulfillCommitFetch, OutboundV1Channel, InboundV1Channel, WithChannelContext, InboundV2Channel, InteractivelyFunded as _};
@@ -68,14 +67,13 @@ use crate::ln::outbound_payment;
6867
use crate::ln::outbound_payment::{OutboundPayments, PendingOutboundPayment, RetryableInvoiceRequest, SendAlongPathArgs, StaleExpiration};
6968
use crate::offers::invoice::Bolt12Invoice;
7069
use crate::offers::invoice::UnsignedBolt12Invoice;
71-
use crate::offers::invoice_request::{InvoiceRequest, InvoiceRequestBuilder};
70+
use crate::offers::invoice_request::InvoiceRequest;
7271
use crate::offers::nonce::Nonce;
7372
use crate::offers::parse::Bolt12SemanticError;
7473
use crate::offers::signer;
7574
#[cfg(async_payments)]
7675
use crate::offers::static_invoice::StaticInvoice;
7776
use crate::onion_message::async_payments::{AsyncPaymentsMessage, HeldHtlcAvailable, ReleaseHeldHtlc, AsyncPaymentsMessageHandler};
78-
use crate::onion_message::dns_resolution::HumanReadableName;
7977
use crate::onion_message::messenger::{DefaultMessageRouter, Destination, MessageRouter, MessageSendInstructions, Responder, ResponseInstruction};
8078
use crate::onion_message::offers::OffersMessage;
8179
use crate::sign::{EntropySource, NodeSigner, Recipient, SignerProvider};
@@ -2605,26 +2603,6 @@ const MAX_UNFUNDED_CHANNEL_PEERS: usize = 50;
26052603
/// many peers we reject new (inbound) connections.
26062604
const MAX_NO_CHANNEL_PEERS: usize = 250;
26072605

2608-
/// The maximum expiration from the current time where an [`Offer`] or [`Refund`] is considered
2609-
/// short-lived, while anything with a greater expiration is considered long-lived.
2610-
///
2611-
/// Using [`OffersMessageFlow::create_offer_builder`] or [`OffersMessageFlow::create_refund_builder`],
2612-
/// will included a [`BlindedMessagePath`] created using:
2613-
/// - [`MessageRouter::create_compact_blinded_paths`] when short-lived, and
2614-
/// - [`MessageRouter::create_blinded_paths`] when long-lived.
2615-
///
2616-
/// [`OffersMessageFlow::create_offer_builder`]: crate::offers::flow::OffersMessageFlow::create_offer_builder
2617-
/// [`OffersMessageFlow::create_refund_builder`]: crate::offers::flow::OffersMessageFlow::create_refund_builder
2618-
///
2619-
///
2620-
/// Using compact [`BlindedMessagePath`]s may provide better privacy as the [`MessageRouter`] could select
2621-
/// more hops. However, since they use short channel ids instead of pubkeys, they are more likely to
2622-
/// become invalid over time as channels are closed. Thus, they are only suitable for short-term use.
2623-
///
2624-
/// [`Offer`]: crate::offers::offer
2625-
/// [`Refund`]: crate::offers::refund
2626-
pub const MAX_SHORT_LIVED_RELATIVE_EXPIRY: Duration = Duration::from_secs(60 * 60 * 24);
2627-
26282606
/// Used by [`ChannelManager::list_recent_payments`] to express the status of recent payments.
26292607
/// These include payments that have yet to find a successful path, or have unresolved HTLCs.
26302608
#[derive(Debug, PartialEq)]
@@ -9573,6 +9551,23 @@ where
95739551
)
95749552
}
95759553

9554+
fn get_peer_for_blinded_path(&self) -> Vec<MessageForwardNode> {
9555+
self.per_peer_state.read().unwrap()
9556+
.iter()
9557+
.map(|(node_id, peer_state)| (node_id, peer_state.lock().unwrap()))
9558+
.filter(|(_, peer)| peer.is_connected)
9559+
.filter(|(_, peer)| peer.latest_features.supports_onion_messages())
9560+
.map(|(node_id, peer)| MessageForwardNode {
9561+
node_id: *node_id,
9562+
short_channel_id: peer.channel_by_id
9563+
.iter()
9564+
.filter(|(_, channel)| channel.context().is_usable())
9565+
.min_by_key(|(_, channel)| channel.context().channel_creation_height)
9566+
.and_then(|(_, channel)| channel.context().get_short_channel_id()),
9567+
})
9568+
.collect::<Vec<_>>()
9569+
}
9570+
95769571
fn verify_bolt12_invoice(
95779572
&self, invoice: &Bolt12Invoice, context: Option<&OffersContext>,
95789573
) -> Result<PaymentId, ()> {
@@ -9729,19 +9724,6 @@ where
97299724
res
97309725
}
97319726

9732-
fn create_blinded_paths_using_absolute_expiry(
9733-
&self, context: OffersContext, absolute_expiry: Option<Duration>,
9734-
) -> Result<Vec<BlindedMessagePath>, ()> {
9735-
let now = self.duration_since_epoch();
9736-
let max_short_lived_absolute_expiry = now.saturating_add(MAX_SHORT_LIVED_RELATIVE_EXPIRY);
9737-
9738-
if absolute_expiry.unwrap_or(Duration::MAX) <= max_short_lived_absolute_expiry {
9739-
self.create_compact_blinded_paths(context)
9740-
} else {
9741-
self.create_blinded_paths(MessageContext::Offers(context))
9742-
}
9743-
}
9744-
97459727
fn get_chain_hash(&self) -> ChainHash {
97469728
self.chain_hash
97479729
}
@@ -9760,53 +9742,6 @@ where
97609742
self.pending_outbound_payments.add_new_awaiting_offer(payment_id, expiration, retry_strategy, max_total_routing_fee_msat, amount_msats)
97619743
}
97629744

9763-
fn pay_for_offer_intern<CPP: FnOnce(&InvoiceRequest, Nonce) -> Result<(), Bolt12SemanticError>>(
9764-
&self, offer: &Offer, quantity: Option<u64>, amount_msats: Option<u64>,
9765-
payer_note: Option<String>, payment_id: PaymentId,
9766-
human_readable_name: Option<HumanReadableName>, create_pending_payment: CPP,
9767-
) -> Result<(), Bolt12SemanticError> {
9768-
let expanded_key = &self.inbound_payment_key;
9769-
let entropy = &*self.entropy_source;
9770-
let secp_ctx = &self.secp_ctx;
9771-
9772-
let nonce = Nonce::from_entropy_source(entropy);
9773-
let builder: InvoiceRequestBuilder<secp256k1::All> = offer
9774-
.request_invoice(expanded_key, nonce, secp_ctx, payment_id)?
9775-
.into();
9776-
let builder = builder.chain_hash(self.chain_hash)?;
9777-
9778-
let builder = match quantity {
9779-
None => builder,
9780-
Some(quantity) => builder.quantity(quantity)?,
9781-
};
9782-
let builder = match amount_msats {
9783-
None => builder,
9784-
Some(amount_msats) => builder.amount_msats(amount_msats)?,
9785-
};
9786-
let builder = match payer_note {
9787-
None => builder,
9788-
Some(payer_note) => builder.payer_note(payer_note),
9789-
};
9790-
let builder = match human_readable_name {
9791-
None => builder,
9792-
Some(hrn) => builder.sourced_from_human_readable_name(hrn),
9793-
};
9794-
let invoice_request = builder.build_and_sign()?;
9795-
9796-
let hmac = payment_id.hmac_for_offer_payment(nonce, expanded_key);
9797-
let context = MessageContext::Offers(
9798-
OffersContext::OutboundPayment { payment_id, nonce, hmac: Some(hmac) }
9799-
);
9800-
let reply_paths = self.create_blinded_paths(context)
9801-
.map_err(|_| Bolt12SemanticError::MissingPaths)?;
9802-
9803-
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
9804-
9805-
create_pending_payment(&invoice_request, nonce)?;
9806-
9807-
self.enqueue_invoice_request(invoice_request, reply_paths)
9808-
}
9809-
98109745
#[cfg(feature = "dnssec")]
98119746
fn amt_msats_for_payment_awaiting_offer(&self, payment_id: PaymentId) -> Result<u64, ()> {
98129747
self.pending_outbound_payments.amt_msats_for_payment_awaiting_offer(payment_id)
@@ -9818,6 +9753,11 @@ where
98189753
) -> Result<(), ()> {
98199754
self.pending_outbound_payments.received_offer(payment_id, retryable_invoice_request)
98209755
}
9756+
9757+
#[cfg(not(feature = "std"))]
9758+
fn get_highest_seen_timestamp(&self) -> Duration {
9759+
Duration::from_secs(self.highest_seen_timestamp.load(Ordering::Acquire) as u64)
9760+
}
98219761
}
98229762

98239763
/// Defines the maximum number of [`OffersMessage`] including different reply paths to be sent
@@ -9900,47 +9840,6 @@ where
99009840
inbound_payment::get_payment_preimage(payment_hash, payment_secret, &self.inbound_payment_key)
99019841
}
99029842

9903-
pub(super) fn duration_since_epoch(&self) -> Duration {
9904-
#[cfg(not(feature = "std"))]
9905-
let now = Duration::from_secs(
9906-
self.highest_seen_timestamp.load(Ordering::Acquire) as u64
9907-
);
9908-
#[cfg(feature = "std")]
9909-
let now = std::time::SystemTime::now()
9910-
.duration_since(std::time::SystemTime::UNIX_EPOCH)
9911-
.expect("SystemTime::now() should come after SystemTime::UNIX_EPOCH");
9912-
9913-
now
9914-
}
9915-
9916-
/// Creates a collection of blinded paths by delegating to
9917-
/// [`MessageRouter::create_compact_blinded_paths`].
9918-
///
9919-
/// Errors if the `MessageRouter` errors.
9920-
fn create_compact_blinded_paths(&self, context: OffersContext) -> Result<Vec<BlindedMessagePath>, ()> {
9921-
let recipient = self.get_our_node_id();
9922-
let secp_ctx = &self.secp_ctx;
9923-
9924-
let peers = self.per_peer_state.read().unwrap()
9925-
.iter()
9926-
.map(|(node_id, peer_state)| (node_id, peer_state.lock().unwrap()))
9927-
.filter(|(_, peer)| peer.is_connected)
9928-
.filter(|(_, peer)| peer.latest_features.supports_onion_messages())
9929-
.map(|(node_id, peer)| MessageForwardNode {
9930-
node_id: *node_id,
9931-
short_channel_id: peer.channel_by_id
9932-
.iter()
9933-
.filter(|(_, channel)| channel.context().is_usable())
9934-
.min_by_key(|(_, channel)| channel.context().channel_creation_height)
9935-
.and_then(|(_, channel)| channel.context().get_short_channel_id()),
9936-
})
9937-
.collect::<Vec<_>>();
9938-
9939-
self.message_router
9940-
.create_compact_blinded_paths(recipient, MessageContext::Offers(context), peers, secp_ctx)
9941-
.and_then(|paths| (!paths.is_empty()).then(|| paths).ok_or(()))
9942-
}
9943-
99449843
/// Gets a fake short channel id for use in receiving [phantom node payments]. These fake scids
99459844
/// are used when constructing the phantom invoice's route hints.
99469845
///

lightning/src/ln/functional_test_utils.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ type TestChannelManager<'node_cfg, 'chan_mon_cfg> = ChannelManager<
415415
pub type TestOffersMessageFlow<'chan_man, 'node_cfg, 'chan_mon_cfg> = OffersMessageFlow<
416416
&'node_cfg test_utils::TestKeysInterface,
417417
&'chan_man TestChannelManager<'node_cfg, 'chan_mon_cfg>,
418+
&'node_cfg test_utils::TestMessageRouter<'chan_mon_cfg>,
418419
&'chan_mon_cfg test_utils::TestLogger,
419420
>;
420421

@@ -1194,7 +1195,7 @@ macro_rules! reload_node {
11941195
$new_channelmanager = _reload_node(&$node, $new_config, &chanman_encoded, $monitors_encoded);
11951196

11961197
let offers_handler = $crate::sync::Arc::new($crate::offers::flow::OffersMessageFlow::new(
1197-
$new_channelmanager.inbound_payment_key, $new_channelmanager.get_our_node_id(), $node.keys_manager, &$new_channelmanager, $node.logger
1198+
$new_channelmanager.inbound_payment_key, $new_channelmanager.get_our_node_id(), $node.keys_manager, &$new_channelmanager, $node.message_router, $node.logger
11981199
));
11991200

12001201
$node.node = &$new_channelmanager;
@@ -3340,7 +3341,7 @@ pub fn create_network<'a, 'b: 'a, 'c: 'b>(node_count: usize, cfgs: &'b Vec<NodeC
33403341
for i in 0..node_count {
33413342
let dedicated_entropy = DedicatedEntropy(RandomBytes::new([i as u8; 32]));
33423343
let offers_handler = Arc::new(OffersMessageFlow::new(
3343-
chan_mgrs[i].inbound_payment_key, chan_mgrs[i].get_our_node_id(), cfgs[i].keys_manager, &chan_mgrs[i], cfgs[i].logger
3344+
chan_mgrs[i].inbound_payment_key, chan_mgrs[i].get_our_node_id(), cfgs[i].keys_manager, &chan_mgrs[i], &cfgs[i].message_router, cfgs[i].logger
33443345
));
33453346
#[cfg(feature = "dnssec")]
33463347
let onion_messenger = OnionMessenger::new(

lightning/src/ln/offers_tests.rs

+9-8
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ use crate::blinded_path::message::BlindedMessagePath;
4848
use crate::blinded_path::payment::{Bolt12OfferContext, Bolt12RefundContext, PaymentContext};
4949
use crate::blinded_path::message::{MessageContext, OffersContext};
5050
use crate::events::{ClosureReason, Event, MessageSendEventsProvider, PaymentFailureReason, PaymentPurpose};
51-
use crate::ln::channelmanager::{MAX_SHORT_LIVED_RELATIVE_EXPIRY, PaymentId, RecentPaymentDetails, Retry, self};
51+
use crate::ln::channelmanager::{PaymentId, RecentPaymentDetails, Retry, self};
5252
use crate::types::features::Bolt12InvoiceFeatures;
5353
use crate::ln::functional_test_utils::*;
5454
use crate::ln::inbound_payment::ExpandedKey;
5555
use crate::ln::msgs::{ChannelMessageHandler, Init, NodeAnnouncement, OnionMessage, OnionMessageHandler, RoutingMessageHandler, SocketAddress, UnsignedGossipMessage, UnsignedNodeAnnouncement};
56+
use crate::offers::flow::MAX_SHORT_LIVED_RELATIVE_EXPIRY;
5657
use crate::offers::invoice::Bolt12Invoice;
5758
use crate::offers::invoice_error::InvoiceError;
5859
use crate::offers::invoice_request::{InvoiceRequest, InvoiceRequestFields};
@@ -388,7 +389,7 @@ fn creates_short_lived_offer() {
388389
let alice_id = alice.node.get_our_node_id();
389390
let bob = &nodes[1];
390391

391-
let absolute_expiry = alice.node.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY;
392+
let absolute_expiry = alice.offers_handler.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY;
392393
let offer = alice.offers_handler
393394
.create_offer_builder(Some(absolute_expiry)).unwrap()
394395
.build().unwrap();
@@ -414,7 +415,7 @@ fn creates_long_lived_offer() {
414415
let alice = &nodes[0];
415416
let alice_id = alice.node.get_our_node_id();
416417

417-
let absolute_expiry = alice.node.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY
418+
let absolute_expiry = alice.offers_handler.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY
418419
+ Duration::from_secs(1);
419420
let offer = alice.offers_handler
420421
.create_offer_builder(Some(absolute_expiry))
@@ -450,7 +451,7 @@ fn creates_short_lived_refund() {
450451
let bob = &nodes[1];
451452
let bob_id = bob.node.get_our_node_id();
452453

453-
let absolute_expiry = bob.node.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY;
454+
let absolute_expiry = bob.offers_handler.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY;
454455
let payment_id = PaymentId([1; 32]);
455456
let refund = bob.offers_handler
456457
.create_refund_builder(10_000_000, absolute_expiry, payment_id, Retry::Attempts(0), None)
@@ -478,7 +479,7 @@ fn creates_long_lived_refund() {
478479
let bob = &nodes[1];
479480
let bob_id = bob.node.get_our_node_id();
480481

481-
let absolute_expiry = bob.node.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY
482+
let absolute_expiry = bob.offers_handler.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY
482483
+ Duration::from_secs(1);
483484
let payment_id = PaymentId([1; 32]);
484485
let refund = bob.offers_handler
@@ -1607,7 +1608,7 @@ fn fails_creating_or_paying_for_offer_without_connected_peers() {
16071608
disconnect_peers(alice, &[bob, charlie, david, &nodes[4], &nodes[5]]);
16081609
disconnect_peers(david, &[bob, charlie, &nodes[4], &nodes[5]]);
16091610

1610-
let absolute_expiry = alice.node.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY;
1611+
let absolute_expiry = alice.offers_handler.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY;
16111612
match alice.offers_handler.create_offer_builder(Some(absolute_expiry)) {
16121613
Ok(_) => panic!("Expected error"),
16131614
Err(e) => assert_eq!(e, Bolt12SemanticError::MissingPaths),
@@ -1678,7 +1679,7 @@ fn fails_creating_refund_or_sending_invoice_without_connected_peers() {
16781679
disconnect_peers(alice, &[bob, charlie, david, &nodes[4], &nodes[5]]);
16791680
disconnect_peers(david, &[bob, charlie, &nodes[4], &nodes[5]]);
16801681

1681-
let absolute_expiry = david.node.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY;
1682+
let absolute_expiry = david.offers_handler.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY;
16821683
let payment_id = PaymentId([1; 32]);
16831684
match david.offers_handler.create_refund_builder(
16841685
10_000_000, absolute_expiry, payment_id, Retry::Attempts(0), None
@@ -2144,7 +2145,7 @@ fn fails_paying_invoice_with_unknown_required_features() {
21442145
let expanded_key = ExpandedKey::new(&alice.keys_manager.get_inbound_payment_key_material());
21452146
let secp_ctx = Secp256k1::new();
21462147

2147-
let created_at = alice.node.duration_since_epoch();
2148+
let created_at = alice.offers_handler.duration_since_epoch();
21482149
let invoice = invoice_request
21492150
.verify_using_recipient_data(nonce, &expanded_key, &secp_ctx).unwrap()
21502151
.respond_using_derived_keys_no_std(payment_paths, payment_hash, created_at).unwrap()

0 commit comments

Comments
 (0)