lnp/
lib.rs

1// LNP/BP Core Library implementing LNPBP specifications & standards
2// Written in 2019 by
3//     Dr. Maxim Orlovsky <orlovsky@pandoracore.com>
4//
5// To the extent possible under law, the author(s) have dedicated all
6// copyright and related and neighboring rights to this software to
7// the public domain worldwide. This software is distributed without
8// any warranty.
9//
10// You should have received a copy of the MIT License
11// along with this software.
12// If not, see <https://opensource.org/licenses/MIT>.
13
14// Coding conventions
15#![deny(
16    non_upper_case_globals,
17    non_camel_case_types,
18    non_snake_case,
19    unused_mut,
20    unused_imports,
21    dead_code,
22    //missing_docs
23)]
24#![allow(clippy::box_default)] // Required since otherwise we need very elaborate conversions
25#![cfg_attr(docsrs, feature(doc_auto_cfg))]
26
27#[macro_use]
28extern crate amplify;
29#[macro_use]
30extern crate strict_encoding;
31
32#[cfg(feature = "serde")]
33#[macro_use]
34extern crate serde_with;
35#[cfg(feature = "serde")]
36extern crate serde_crate as serde;
37
38pub extern crate lnp2p as p2p;
39
40macro_rules! dumb_pubkey {
41    () => {
42        secp256k1::PublicKey::from_secret_key(
43            secp256k1::SECP256K1,
44            &secp256k1::ONE_KEY,
45        )
46    };
47}
48
49pub mod addr;
50pub mod channel;
51pub mod extension;
52pub mod router;
53
54pub use channel::Channel;
55pub use extension::{
56    ChannelConstructor, ChannelExtension, Extension, RouterExtension,
57};