@@ -321,7 +321,7 @@ impl SiPrefix {
321321}
322322
323323/// Enum representing the crypto currencies (or networks) supported by this library
324- #[ derive( Eq , PartialEq , Debug , Clone ) ]
324+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
325325pub enum Currency {
326326 /// Bitcoin mainnet
327327 Bitcoin ,
@@ -342,7 +342,7 @@ pub enum Currency {
342342/// Tagged field which may have an unknown tag
343343///
344344/// (C-not exported) as we don't currently support TaggedField
345- #[ derive( Eq , PartialEq , Debug , Clone ) ]
345+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
346346pub enum RawTaggedField {
347347 /// Parsed tagged field with known tag
348348 KnownSemantics ( TaggedField ) ,
@@ -357,7 +357,7 @@ pub enum RawTaggedField {
357357/// (C-not exported) As we don't yet support enum variants with the same name the struct contained
358358/// in the variant.
359359#[ allow( missing_docs) ]
360- #[ derive( Eq , PartialEq , Debug , Clone ) ]
360+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
361361pub enum TaggedField {
362362 PaymentHash ( Sha256 ) ,
363363 Description ( Description ) ,
@@ -372,18 +372,18 @@ pub enum TaggedField {
372372}
373373
374374/// SHA-256 hash
375- #[ derive( Eq , PartialEq , Debug , Clone ) ]
375+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
376376pub struct Sha256 ( pub sha256:: Hash ) ;
377377
378378/// Description string
379379///
380380/// # Invariants
381381/// The description can be at most 639 __bytes__ long
382- #[ derive( Eq , PartialEq , Debug , Clone ) ]
382+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
383383pub struct Description ( String ) ;
384384
385385/// Payee public key
386- #[ derive( Eq , PartialEq , Debug , Clone ) ]
386+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
387387pub struct PayeePubKey ( pub PublicKey ) ;
388388
389389/// Positive duration that defines when (relatively to the timestamp) in the future the invoice
@@ -393,17 +393,17 @@ pub struct PayeePubKey(pub PublicKey);
393393/// The number of seconds this expiry time represents has to be in the range
394394/// `0...(SYSTEM_TIME_MAX_UNIX_TIMESTAMP - MAX_EXPIRY_TIME)` to avoid overflows when adding it to a
395395/// timestamp
396- #[ derive( Eq , PartialEq , Debug , Clone ) ]
396+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
397397pub struct ExpiryTime ( Duration ) ;
398398
399399/// `min_final_cltv_expiry` to use for the last HTLC in the route
400- #[ derive( Eq , PartialEq , Debug , Clone ) ]
400+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
401401pub struct MinFinalCltvExpiry ( pub u64 ) ;
402402
403403// TODO: better types instead onf byte arrays
404404/// Fallback address in case no LN payment is possible
405405#[ allow( missing_docs) ]
406- #[ derive( Eq , PartialEq , Debug , Clone ) ]
406+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
407407pub enum Fallback {
408408 SegWitProgram {
409409 version : u5 ,
@@ -414,15 +414,15 @@ pub enum Fallback {
414414}
415415
416416/// Recoverable signature
417- #[ derive( Eq , PartialEq , Debug , Clone ) ]
417+ #[ derive( Clone , Debug , Eq , PartialEq ) ]
418418pub struct InvoiceSignature ( pub RecoverableSignature ) ;
419419
420420/// Private routing information
421421///
422422/// # Invariants
423423/// The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops)
424424///
425- #[ derive( Eq , PartialEq , Debug , Clone ) ]
425+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
426426pub struct PrivateRoute ( RouteHint ) ;
427427
428428/// Tag constants as specified in BOLT11
0 commit comments