0f8a1432d0887df2f2b5bf16c5693a94d2188ed3
[ldk-c-bindings] / lightning-c-bindings / src / lightning / mod.rs
1 // This file is Copyright its original authors, visible in version control
2 // history and in the source files from which this was generated.
3 //
4 // This file is licensed under the license available in the LICENSE or LICENSE.md
5 // file in the root of this repository or, if no such file exists, the same
6 // license as that which applies to the original source files from which this
7 // source was automatically generated.
8
9 //!lightning
10 //! Rust-Lightning, not Rusty's Lightning!
11 //!
12 //! A full-featured but also flexible lightning implementation, in library form. This allows the
13 //! user (you) to decide how they wish to use it instead of being a fully self-contained daemon.
14 //! This means there is no built-in threading/execution environment and it's up to the user to
15 //! figure out how best to make networking happen/timers fire/things get written to disk/keys get
16 //! generated/etc. This makes it a good candidate for tight integration into an existing wallet
17 //! instead of having a rather-separate lightning appendage to a wallet.
18 //!
19 //! `default` features are:
20 //!
21 //! * `std` - enables functionalities which require `std`, including `std::io` trait implementations and things which utilize time
22 //! * `grind_signatures` - enables generation of [low-r bitcoin signatures](https://bitcoin.stackexchange.com/questions/111660/what-is-signature-grinding),
23 //! which saves 1 byte per signature in 50% of the cases (see [bitcoin PR #13666](https://github.com/bitcoin/bitcoin/pull/13666))
24 //!
25 //! Available features are:
26 //!
27 //! * `std`
28 //! * `grind_signatures`
29 //! * `no-std ` - exposes write trait implementations from the `core2` crate (at least one of `no-std` or `std` are required)
30 //! * Skip logging of messages at levels below the given log level:
31 //!     * `max_level_off`
32 //!     * `max_level_error`
33 //!     * `max_level_warn`
34 //!     * `max_level_info`
35 //!     * `max_level_debug`
36 //!     * `max_level_trace`
37
38 use alloc::str::FromStr;
39 use core::ffi::c_void;
40 use core::convert::Infallible;
41 use bitcoin::hashes::Hash;
42 use crate::c_types::*;
43 #[cfg(feature="no-std")]
44 use alloc::{vec::Vec, boxed::Box};
45
46 pub mod util;
47 pub mod chain;
48 pub mod ln;
49 pub mod offers;
50 pub mod routing;
51 pub mod sign;
52 pub mod onion_message;
53 pub mod blinded_path;
54 pub mod events;
55 mod io_extras {
56
57 use alloc::str::FromStr;
58 use core::ffi::c_void;
59 use core::convert::Infallible;
60 use bitcoin::hashes::Hash;
61 use crate::c_types::*;
62 #[cfg(feature="no-std")]
63 use alloc::{vec::Vec, boxed::Box};
64
65 }
66 mod prelude {
67
68 use alloc::str::FromStr;
69 use core::ffi::c_void;
70 use core::convert::Infallible;
71 use bitcoin::hashes::Hash;
72 use crate::c_types::*;
73 #[cfg(feature="no-std")]
74 use alloc::{vec::Vec, boxed::Box};
75
76 }
77 mod sync {
78
79 use alloc::str::FromStr;
80 use core::ffi::c_void;
81 use core::convert::Infallible;
82 use bitcoin::hashes::Hash;
83 use crate::c_types::*;
84 #[cfg(feature="no-std")]
85 use alloc::{vec::Vec, boxed::Box};
86
87 mod fairrwlock {
88
89 use alloc::str::FromStr;
90 use core::ffi::c_void;
91 use core::convert::Infallible;
92 use bitcoin::hashes::Hash;
93 use crate::c_types::*;
94 #[cfg(feature="no-std")]
95 use alloc::{vec::Vec, boxed::Box};
96
97 }
98 mod ext_impl {
99
100 use alloc::str::FromStr;
101 use core::ffi::c_void;
102 use core::convert::Infallible;
103 use bitcoin::hashes::Hash;
104 use crate::c_types::*;
105 #[cfg(feature="no-std")]
106 use alloc::{vec::Vec, boxed::Box};
107
108 }
109 }