pub(crate) mod utils;
use bitcoin::secp256k1::{self, PublicKey, Secp256k1, SecretKey};
+use core::ops::Deref;
use crate::ln::msgs::DecodeError;
use crate::offers::invoice::BlindedPayInfo;
/// The next hop to forward an onion message along its path.
///
/// Note that payment blinded paths always specify their next hop using an explicit node id.
-#[derive(Debug)]
+#[derive(Clone, Debug, Hash, PartialEq, Eq)]
pub enum NextMessageHop {
/// The node id of the next hop.
NodeId(PublicKey),
}
}
+impl Deref for EmptyNodeIdLookUp {
+ type Target = EmptyNodeIdLookUp;
+ fn deref(&self) -> &Self { self }
+}
+
/// An encrypted payload and node id corresponding to a hop in a payment or onion message path, to
/// be encoded in the sender's onion packet. These hops cannot be identified by outside observers
/// and thus can be used to hide the identity of the recipient.