@@ -479,7 +479,7 @@ impl Sha256 {
479479///
480480/// # Invariants
481481/// The description can be at most 639 __bytes__ long
482- #[ derive( Clone , Debug , Hash , Eq , PartialEq , Ord , PartialOrd ) ]
482+ #[ derive( Clone , Debug , Hash , Eq , PartialEq , Ord , PartialOrd , Default ) ]
483483pub struct Description ( String ) ;
484484
485485/// Payee public key
@@ -489,7 +489,7 @@ pub struct PayeePubKey(pub PublicKey);
489489/// Positive duration that defines when (relatively to the timestamp) in the future the invoice
490490/// expires
491491#[ derive( Clone , Debug , Hash , Eq , PartialEq , Ord , PartialOrd ) ]
492- pub struct ExpiryTime ( Duration ) ;
492+ pub struct ExpiryTime ( pub Duration ) ;
493493
494494/// `min_final_cltv_expiry_delta` to use for the last HTLC in the route
495495#[ derive( Clone , Debug , Hash , Eq , PartialEq , Ord , PartialOrd ) ]
@@ -529,7 +529,7 @@ impl Ord for Bolt11InvoiceSignature {
529529/// The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops)
530530///
531531#[ derive( Clone , Debug , Hash , Eq , PartialEq , Ord , PartialOrd ) ]
532- pub struct PrivateRoute ( RouteHint ) ;
532+ pub struct PrivateRoute ( pub RouteHint ) ;
533533
534534/// Tag constants as specified in BOLT11
535535#[ allow( missing_docs) ]
@@ -1145,6 +1145,12 @@ impl PositiveTimestamp {
11451145 }
11461146}
11471147
1148+ impl From < PositiveTimestamp > for Duration {
1149+ fn from ( val : PositiveTimestamp ) -> Self {
1150+ val. 0
1151+ }
1152+ }
1153+
11481154#[ cfg( feature = "std" ) ]
11491155impl From < PositiveTimestamp > for SystemTime {
11501156 fn from ( val : PositiveTimestamp ) -> Self {
0 commit comments