///
/// # Invariants
/// The description can be at most 639 __bytes__ long
-#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
+#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd, Default)]
pub struct Description(String);
/// Payee public key
/// The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops)
///
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
-pub struct PrivateRoute(RouteHint);
+pub struct PrivateRoute(pub RouteHint);
/// Tag constants as specified in BOLT11
#[allow(missing_docs)]
}
}
+impl From<PositiveTimestamp> for Duration {
+ fn from(val: PositiveTimestamp) -> Self {
+ val.0
+ }
+}
+
#[cfg(feature = "std")]
impl From<PositiveTimestamp> for SystemTime {
fn from(val: PositiveTimestamp) -> Self {