Module util

Source
Expand description

Some utility modules live here. See individual sub-modules for more info.

Modules§

anchor_channel_reserves
Defines anchor channel reserve requirements.
async_poll
Some utilities to make working with the standard library’s Futures easier
config
Various user-configurable channel limits and settings which ChannelManager applies for you.
errors
Error types live here.
hash_tables
Generally LDK uses hashbrown’s HashMaps with the std SipHasher and uses getrandom to opportunistically randomize it, if randomization is available.
indexed_map
This module has a map which can be iterated in a deterministic order. See the IndexedMap.
logger
Log traits live here, which are called throughout the library to provide useful information for debugging purposes.
message_signing
Lightning message signing and verification lives here. These tools can be used to sign messages using the node’s secret so receivers are sure that they come from you. You can also use this to verify that a given message comes from a specific node. Furthermore, these tools can be used to sign / verify messages using ephemeral keys not tied to node’s identities.
native_async
This module contains a few public utility which are used to run LDK in a native Rust async environment.
persist
This module contains a simple key-value store trait KVStoreSync that allows one to implement the persistence for ChannelManager, NetworkGraph, and ChannelMonitor all in one place.
scid_utils
Utilities for creating and parsing short channel ids.
ser
A very simple serialization framework which is used to serialize/deserialize messages as well as ChannelManagers and ChannelMonitors.
ser_macros
Some macros that implement Readable/Writeable traits for lightning messages. They also handle serialization and deserialization of TLVs.
sweep
This module contains an OutputSweeper utility that keeps track of SpendableOutputDescriptors, i.e., persists them in a given KVStoreSync and regularly retries sweeping them.
wakers
Utilities which allow users to block on some future notification from LDK. These are specifically used by ChannelManager to allow waiting until the ChannelManager needs to be re-persisted.