Skip to content

Commit 680d399

Browse files
authored
Merge pull request #3253 from TheBlueMatt/2024-08-new-types-export
Re-export `lightning_types` in top-level `lightning` modules
2 parents 61153f1 + 1e1b8ec commit 680d399

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

lightning/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ compile_error!("Tests will always fail with cfg=fuzzing");
6262
#[macro_use]
6363
extern crate alloc;
6464

65-
extern crate lightning_types;
65+
pub extern crate lightning_types as types;
6666

6767
pub extern crate bitcoin;
6868
#[cfg(any(test, feature = "std"))]

lightning/src/ln/features.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
//!
1212
//! See [`lightning_types::features`] for the list of features currently supported.
1313
//!
14+
//! Note that the use of types via this module is deprecated and will be removed in a future
15+
//! version. Instead, use feature objects via [`lightning::types::features`].
16+
//!
17+
//! [`lightning::types::features`]: crate::types::features
1418
//! [BOLT #9]: https://github.com/lightning/bolts/blob/master/09-features.md
1519
1620
pub use lightning_types::features::Features;

lightning/src/ln/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
// licenses.
99

1010
//! Implementations of various parts of the Lightning protocol are in this module.
11+
//!
12+
//! Note that the re-exports of [`PaymentHash`], [`PaymentPreimage`], and [`PaymentSecret`] here
13+
//! are deprecated and will be removed in a future version. Instead, use them via
14+
//! [`lightning::types::payment`].
15+
//!
16+
//! [`lightning::types::payment`]: crate::types::payment
1117
1218
#[cfg(any(test, feature = "_test_utils"))]
1319
#[macro_use]

lightning/src/ln/types.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
// licenses.
99

1010
//! Various wrapper types (most around 32-byte arrays) for use in lightning.
11+
//!
12+
//! Note that the re-exports of [`PaymentHash`], [`PaymentPreimage`], and [`PaymentSecret`] here
13+
//! are deprecated and will be removed in a future version. Instead, use them via
14+
//! [`lightning::types::payment`].
15+
//!
16+
//! [`lightning::types::payment`]: crate::types::payment
1117
1218
use crate::chain::transaction::OutPoint;
1319
use crate::io;

0 commit comments

Comments
 (0)