[][src]Crate internet2

Re-exports

pub extern crate inet2_derive;
pub use application::rpc_connection;
pub use presentation::encoding as lightning_encoding;
pub use presentation::payload::TypeId;
pub use presentation::payload::TypedEnum;
pub use presentation::encoding;
pub use presentation::payload;
pub use presentation::tlv;
pub use presentation::CreateUnmarshaller;
pub use presentation::Payload;
pub use presentation::Unmarshall;
pub use presentation::UnmarshallFn;
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::zmqsocket;
pub use transport::ftcp;
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

addr
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

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 decrypt_message_stream for automatic buffering.

PlainTranscoder
UnknownTypeError

Error representing unknown LNP message type

Enums

AddrError

Error extracting transport-level address types (FramingProtocol, [LocalAddr], [RemoteAddr]) and session-level node types (NodeAddr, RemoteNodeAddr) from string, URLs and other data types

Constants

LIGHTNING_P2P_DEFAULT_PORT
LNP_MSG_MAX_LEN

Traits

Accept
Connect
Decrypt
Encrypt
Session
Split
Transcode
UrlString

Trait used by different address types (transport-, session- and presentation-based) for getting scheme part of the URL

Derive Macros

LightningDecode
LightningEncode
LnpApi