Skip to content

Commit 05d3689

Browse files
committed
Make invoice fields public
1 parent 2e18505 commit 05d3689

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lightning-invoice/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ pub struct RawDataPart {
353353
/// The Unix timestamp representing the stored time has to be positive and no greater than
354354
/// [`MAX_TIMESTAMP`].
355355
#[derive(Eq, PartialEq, Debug, Clone, Hash, Ord, PartialOrd)]
356-
pub struct PositiveTimestamp(Duration);
356+
pub struct PositiveTimestamp(pub Duration);
357357

358358
/// SI prefixes for the human readable part
359359
#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash, Ord, PartialOrd)]
@@ -485,8 +485,8 @@ impl Sha256 {
485485
///
486486
/// # Invariants
487487
/// The description can be at most 639 __bytes__ long
488-
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
489-
pub struct Description(String);
488+
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd, Default)]
489+
pub struct Description(pub String);
490490

491491
/// Payee public key
492492
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
@@ -495,7 +495,7 @@ pub struct PayeePubKey(pub PublicKey);
495495
/// Positive duration that defines when (relatively to the timestamp) in the future the invoice
496496
/// expires
497497
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
498-
pub struct ExpiryTime(Duration);
498+
pub struct ExpiryTime(pub Duration);
499499

500500
/// `min_final_cltv_expiry_delta` to use for the last HTLC in the route
501501
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
@@ -535,7 +535,7 @@ impl Ord for Bolt11InvoiceSignature {
535535
/// The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops)
536536
///
537537
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
538-
pub struct PrivateRoute(RouteHint);
538+
pub struct PrivateRoute(pub RouteHint);
539539

540540
/// Tag constants as specified in BOLT11
541541
#[allow(missing_docs)]

0 commit comments

Comments
 (0)