[−][src]Module lnpbp::lnp
Module that systematizes all Lightning network-related APIs from the
lightning
library into layered & modular design
Re-exports
pub use application::channel; |
pub use application::factories; |
pub use application::message; |
pub use application::rpc_connection; |
pub use application::Messages; |
pub use application::OnionPacket; |
pub use application::PeerConnection; |
pub use application::PeerReceiver; |
pub use application::PeerSender; |
pub use application::RecvMessage; |
pub use application::RpcConnection; |
pub use application::SendMessage; |
pub use application::LNPWP_UNMARSHALLER; |
pub use application::LNPWP_UNMARSHALLER; |
pub use presentation::payload::TypeId; |
pub use presentation::payload::TypedEnum; |
pub use presentation::payload; |
pub use presentation::tlv; |
pub use presentation::Payload; |
pub use presentation::Unmarshaller; |
pub use session::NodeAddr; |
pub use session::PartialNodeAddr; |
pub use session::RemoteNodeAddr; |
pub use session::ToNodeAddr; |
pub use session::ToRemoteNodeAddr; |
pub use transport::ftcp; |
pub use transport::websocket; |
pub use transport::zmqsocket; |
pub use transport::Duplex; |
pub use transport::FramingProtocol; |
pub use transport::LocalSocketAddr; |
pub use transport::RemoteSocketAddr; |
pub use transport::RoutedFrame; |
pub use transport::ZmqSocketAddr; |
pub use transport::ZmqType; |
pub use transport::ZMQ_CONTEXT; |
pub use transport::ZMQ_CONTEXT; |
Modules
application | |
presentation | |
session | BOLT-8 related structures and functions covering Lightning network transport layer |
transport | LNP transport level works with framed messages of defined size. This messages can be put into different underlying transport protocols, including streaming protocols (like TCP), or overlaid over application-level protocols like HTTP, Websockets, SMTP (for high-latency communication networks). Current mod implements such overlays and provides TCP with the required framing functionality (this variant is called FTCP). It also integrates with ZMQ such that the upper level can abstract for a particular transport protocol used. |
Structs
ChannelId | Lightning network channel Id |
FeatureFlag | |
Features | Flags are numbered from the least-significant bit, at bit 0 (i.e. 0x1, an even bit). They are generally assigned in pairs so that features can be introduced as optional (odd bits) and later upgraded to be compulsory (even bits), which will be refused by outdated nodes: see BOLT #1: The init Message. |
LocalNode | Local node private keys |
NoiseDecryptor | |
NoiseEncryptor | |
NoiseTranscoder | Returned after a successful handshake to encrypt and decrypt communication
with peer nodes. It should not normally be manually instantiated.
Automatically handles key rotation.
For decryption, it is recommended to call |
PlainTranscoder | |
TempChannelId | Lightning network temporary channel Id |
UnknownTypeError | Error representing unknown LNP message type |
Enums
AddrError | Error extracting transport-level address types ( |
FeatureContext | Some features don't make sense on a per-channels or per-node basis, so each feature defines how it is presented in those contexts. Some features may be required for opening a channel, but not a requirement for use of the channel, so the presentation of those features depends on the feature itself. |
Constants
LIGHTNING_P2P_DEFAULT_PORT | |
LNP_MSG_MAX_LEN |
Traits
Accept | |
Connect | |
CreateUnmarshaller | |
Decrypt | |
Encrypt | |
Session | |
Split | |
Transcode | |
Unmarshall | |
UrlString | Trait used by different address types (transport-, session- and presentation-based) for getting scheme part of the URL |
Type Definitions
UnmarshallFn |