Skip to content

Commit

Permalink
Merge pull request #3253 from TheBlueMatt/2024-08-new-types-export
Browse files Browse the repository at this point in the history
Re-export `lightning_types` in top-level `lightning` modules
  • Loading branch information
tnull authored Aug 20, 2024
2 parents 61153f1 + 1e1b8ec commit 680d399
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lightning/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ compile_error!("Tests will always fail with cfg=fuzzing");
#[macro_use]
extern crate alloc;

extern crate lightning_types;
pub extern crate lightning_types as types;

pub extern crate bitcoin;
#[cfg(any(test, feature = "std"))]
Expand Down
4 changes: 4 additions & 0 deletions lightning/src/ln/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
//!
//! See [`lightning_types::features`] for the list of features currently supported.
//!
//! Note that the use of types via this module is deprecated and will be removed in a future
//! version. Instead, use feature objects via [`lightning::types::features`].
//!
//! [`lightning::types::features`]: crate::types::features
//! [BOLT #9]: https://github.com/lightning/bolts/blob/master/09-features.md

pub use lightning_types::features::Features;
Expand Down
6 changes: 6 additions & 0 deletions lightning/src/ln/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
// licenses.

//! Implementations of various parts of the Lightning protocol are in this module.
//!
//! Note that the re-exports of [`PaymentHash`], [`PaymentPreimage`], and [`PaymentSecret`] here
//! are deprecated and will be removed in a future version. Instead, use them via
//! [`lightning::types::payment`].
//!
//! [`lightning::types::payment`]: crate::types::payment

#[cfg(any(test, feature = "_test_utils"))]
#[macro_use]
Expand Down
6 changes: 6 additions & 0 deletions lightning/src/ln/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
// licenses.

//! Various wrapper types (most around 32-byte arrays) for use in lightning.
//!
//! Note that the re-exports of [`PaymentHash`], [`PaymentPreimage`], and [`PaymentSecret`] here
//! are deprecated and will be removed in a future version. Instead, use them via
//! [`lightning::types::payment`].
//!
//! [`lightning::types::payment`]: crate::types::payment

use crate::chain::transaction::OutPoint;
use crate::io;
Expand Down

0 comments on commit 680d399

Please sign in to comment.