Skip to content

Commit 1959422

Browse files
committed
Make invoice fields public
1 parent 3fbfde3 commit 1959422

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning-invoice/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ pub struct RawDataPart {
347347
/// The Unix timestamp representing the stored time has to be positive and no greater than
348348
/// [`MAX_TIMESTAMP`].
349349
#[derive(Eq, PartialEq, Debug, Clone, Hash, Ord, PartialOrd)]
350-
pub struct PositiveTimestamp(Duration);
350+
pub struct PositiveTimestamp(pub Duration);
351351

352352
/// SI prefixes for the human readable part
353353
#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash, Ord, PartialOrd)]
@@ -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)]
483483
pub 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)]

0 commit comments

Comments
 (0)