Module util
Expand description
Some utility modules live here. See individual sub-modules for more info.
Modules§
- Various user-configurable channel limits and settings which ChannelManager applies for you.
- Error types live here.
- Generally LDK uses
std
’sHashMap
s, however when building for no-std, LDK useshashbrown
’sHashMap
s with thestd
SipHasher
and usesgetrandom
to opportunistically randomize it, if randomization is available. - This module has a map which can be iterated in a deterministic order. See the
IndexedMap
. - Log traits live here, which are called throughout the library to provide useful information for debugging purposes.
- 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.
- This module contains a simple key-value store trait
KVStore
that allows one to implement the persistence forChannelManager
,NetworkGraph
, andChannelMonitor
all in one place. - Utilities for creating and parsing short channel ids.
- A very simple serialization framework which is used to serialize/deserialize messages as well as
ChannelManager
s andChannelMonitor
s. - Utilities to wrap untrusted strings and handle them (more) safely
- This module contains an
OutputSweeper
utility that keeps track ofSpendableOutputDescriptor
s, i.e., persists them in a givenKVStore
and regularly retries sweeping them. - Utilities which allow users to block on some future notification from LDK. These are specifically used by
ChannelManager
to allow waiting until theChannelManager
needs to be re-persisted.