@@ -321,7 +321,7 @@ impl SiPrefix {
321
321
}
322
322
323
323
/// Enum representing the crypto currencies (or networks) supported by this library
324
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
324
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
325
325
pub enum Currency {
326
326
/// Bitcoin mainnet
327
327
Bitcoin ,
@@ -342,7 +342,7 @@ pub enum Currency {
342
342
/// Tagged field which may have an unknown tag
343
343
///
344
344
/// (C-not exported) as we don't currently support TaggedField
345
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
345
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
346
346
pub enum RawTaggedField {
347
347
/// Parsed tagged field with known tag
348
348
KnownSemantics ( TaggedField ) ,
@@ -357,7 +357,7 @@ pub enum RawTaggedField {
357
357
/// (C-not exported) As we don't yet support enum variants with the same name the struct contained
358
358
/// in the variant.
359
359
#[ allow( missing_docs) ]
360
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
360
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
361
361
pub enum TaggedField {
362
362
PaymentHash ( Sha256 ) ,
363
363
Description ( Description ) ,
@@ -372,18 +372,18 @@ pub enum TaggedField {
372
372
}
373
373
374
374
/// SHA-256 hash
375
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
375
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
376
376
pub struct Sha256 ( pub sha256:: Hash ) ;
377
377
378
378
/// Description string
379
379
///
380
380
/// # Invariants
381
381
/// The description can be at most 639 __bytes__ long
382
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
382
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
383
383
pub struct Description ( String ) ;
384
384
385
385
/// Payee public key
386
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
386
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
387
387
pub struct PayeePubKey ( pub PublicKey ) ;
388
388
389
389
/// Positive duration that defines when (relatively to the timestamp) in the future the invoice
@@ -393,17 +393,17 @@ pub struct PayeePubKey(pub PublicKey);
393
393
/// The number of seconds this expiry time represents has to be in the range
394
394
/// `0...(SYSTEM_TIME_MAX_UNIX_TIMESTAMP - MAX_EXPIRY_TIME)` to avoid overflows when adding it to a
395
395
/// timestamp
396
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
396
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
397
397
pub struct ExpiryTime ( Duration ) ;
398
398
399
399
/// `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 ) ]
401
401
pub struct MinFinalCltvExpiry ( pub u64 ) ;
402
402
403
403
// TODO: better types instead onf byte arrays
404
404
/// Fallback address in case no LN payment is possible
405
405
#[ allow( missing_docs) ]
406
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
406
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
407
407
pub enum Fallback {
408
408
SegWitProgram {
409
409
version : u5 ,
@@ -414,15 +414,15 @@ pub enum Fallback {
414
414
}
415
415
416
416
/// Recoverable signature
417
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
417
+ #[ derive( Clone , Debug , Eq , PartialEq ) ]
418
418
pub struct InvoiceSignature ( pub RecoverableSignature ) ;
419
419
420
420
/// Private routing information
421
421
///
422
422
/// # Invariants
423
423
/// The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops)
424
424
///
425
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
425
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
426
426
pub struct PrivateRoute ( RouteHint ) ;
427
427
428
428
/// Tag constants as specified in BOLT11
0 commit comments