313fa9bc8ac3cfdca96f47f5b3c2911902b5fde5
[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 alloc::string::String;
40 use core::ffi::c_void;
41 use core::convert::Infallible;
42 use bitcoin::hashes::Hash;
43 use crate::c_types::*;
44 #[cfg(feature="no-std")]
45 use alloc::{vec::Vec, boxed::Box};
46
47 pub mod util;
48 pub mod chain;
49 pub mod ln;
50 pub mod offers;
51 pub mod routing;
52 pub mod sign;
53 pub mod onion_message;
54 pub mod blinded_path;
55 pub mod events;
56 mod io_extras {
57
58 use alloc::str::FromStr;
59 use alloc::string::String;
60 use core::ffi::c_void;
61 use core::convert::Infallible;
62 use bitcoin::hashes::Hash;
63 use crate::c_types::*;
64 #[cfg(feature="no-std")]
65 use alloc::{vec::Vec, boxed::Box};
66
67 }
68 mod prelude {
69
70 use alloc::str::FromStr;
71 use alloc::string::String;
72 use core::ffi::c_void;
73 use core::convert::Infallible;
74 use bitcoin::hashes::Hash;
75 use crate::c_types::*;
76 #[cfg(feature="no-std")]
77 use alloc::{vec::Vec, boxed::Box};
78
79 }
80 mod sync {
81
82 use alloc::str::FromStr;
83 use alloc::string::String;
84 use core::ffi::c_void;
85 use core::convert::Infallible;
86 use bitcoin::hashes::Hash;
87 use crate::c_types::*;
88 #[cfg(feature="no-std")]
89 use alloc::{vec::Vec, boxed::Box};
90
91 mod fairrwlock {
92
93 use alloc::str::FromStr;
94 use alloc::string::String;
95 use core::ffi::c_void;
96 use core::convert::Infallible;
97 use bitcoin::hashes::Hash;
98 use crate::c_types::*;
99 #[cfg(feature="no-std")]
100 use alloc::{vec::Vec, boxed::Box};
101
102 }
103 mod ext_impl {
104
105 use alloc::str::FromStr;
106 use alloc::string::String;
107 use core::ffi::c_void;
108 use core::convert::Infallible;
109 use bitcoin::hashes::Hash;
110 use crate::c_types::*;
111 #[cfg(feature="no-std")]
112 use alloc::{vec::Vec, boxed::Box};
113
114 }
115 }