You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The hash has to be either from the deserialized invoice or from the serialized `raw_invoice`.
263
-
#[derive(Eq,PartialEq,Debug,Clone)]
263
+
#[derive(Eq,PartialEq,Debug,Clone,Hash)]
264
264
pubstructSignedRawInvoice{
265
265
/// The rawInvoice that the signature belongs to
266
266
raw_invoice:RawInvoice,
@@ -283,7 +283,7 @@ pub struct SignedRawInvoice {
283
283
/// De- and encoding should not lead to information loss but may lead to different hashes.
284
284
///
285
285
/// For methods without docs see the corresponding methods in `Invoice`.
286
-
#[derive(Eq,PartialEq,Debug,Clone)]
286
+
#[derive(Eq,PartialEq,Debug,Clone,Hash)]
287
287
pubstructRawInvoice{
288
288
/// human readable part
289
289
pubhrp:RawHrp,
@@ -295,7 +295,7 @@ pub struct RawInvoice {
295
295
/// Data of the `RawInvoice` that is encoded in the human readable part
296
296
///
297
297
/// (C-not exported) As we don't yet support Option<Enum>
298
-
#[derive(Eq,PartialEq,Debug,Clone)]
298
+
#[derive(Eq,PartialEq,Debug,Clone,Hash)]
299
299
pubstructRawHrp{
300
300
/// The currency deferred from the 3rd and 4th character of the bech32 transaction
301
301
pubcurrency:Currency,
@@ -308,7 +308,7 @@ pub struct RawHrp {
308
308
}
309
309
310
310
/// Data of the `RawInvoice` that is encoded in the data part
311
-
#[derive(Eq,PartialEq,Debug,Clone)]
311
+
#[derive(Eq,PartialEq,Debug,Clone,Hash)]
312
312
pubstructRawDataPart{
313
313
/// generation time of the invoice
314
314
pubtimestamp:PositiveTimestamp,
@@ -323,11 +323,11 @@ pub struct RawDataPart {
323
323
///
324
324
/// The Unix timestamp representing the stored time has to be positive and no greater than
325
325
/// [`MAX_TIMESTAMP`].
326
-
#[derive(Eq,PartialEq,Debug,Clone)]
326
+
#[derive(Eq,PartialEq,Debug,Clone,Hash)]
327
327
pubstructPositiveTimestamp(Duration);
328
328
329
329
/// SI prefixes for the human readable part
330
-
#[derive(Eq,PartialEq,Debug,Clone,Copy)]
330
+
#[derive(Eq,PartialEq,Debug,Clone,Copy,Hash)]
331
331
pubenumSiPrefix{
332
332
/// 10^-3
333
333
Milli,
@@ -1415,6 +1415,16 @@ impl Deref for SignedRawInvoice {
1415
1415
}
1416
1416
}
1417
1417
1418
+
//TODO: If https://github.com/rust-bitcoin/rust-secp256k1/pull/462 is ready to use remove this implementation and just #[derive(Hash)] on InvoiceSignature
0 commit comments