package
0.18.4-beta.rc2
Repository: https://github.com/lightningnetwork/lnd.git
Documentation: pkg.go.dev

# Functions

DisableLog disables all library log output.
FetchBackupForChan attempts to create a plaintext static channel backup for the target channel identified by its channel point.
FetchStaticChanBackups will return a plaintext static channel back up for all known active/open channels within the passed channel source.
NewMultiFile create a new multi-file instance at the target location on the file system.
NewSingle creates a new static channel backup based on an existing open channel.
NewSubSwapper creates a new instance of the SubSwapper given the starting set of channels, and the required interfaces to be notified of new channel updates, pack a multi backup, and swap the current best backup from its storage location.
PackStaticChanBackups accepts a set of existing open channels, and a keychain.KeyRing, and returns a map of outpoints to the serialized+encrypted static channel backups.
Recover attempts to recover the static channel state from a set of static channel backups.
UnpackAndRecoverMulti is a one-shot method, that given a set of packed multi-channel backups, will restore the channel states to channel shells, and also reach out to connect to any of the known node addresses for that channel.
UnpackAndRecoverSingles is a one-shot method, that given a set of packed single channel backups, will restore the channel state to a channel shell, and also reach out to connect to any of the known node addresses for that channel.
UseLogger uses a specified Logger to output package logging info.

# Constants

AnchorsCommitVersion is the third SCB version.
AnchorsZeroFeeHtlcTxCommitVersion is a version that denotes this channel is using the zero-fee second-level anchor commitment format.
DefaultBackupFileName is the default name of the auto updated static channel backup fie.
DefaultMultiVersion is the default version of the multi channel backup.
DefaultSingleVersion is the default version of the single channel backup.
DefaultTempBackupFileName is the default name of the temporary SCB file that we'll use to atomically update the primary back up file when new channel are detected.
NilMultiSizePacked is the size of a "nil" packed Multi (45 bytes).
ScriptEnforcedLeaseVersion is a version that denotes this channel is using the zero-fee second-level anchor commitment format along with an additional CLTV requirement of the channel lease maturity on any commitment and HTLC outputs that pay directly to the channel initiator.
SimpleTaprootVersion is a version that denotes this channel is using the musig2 based taproot commitment format.
TweaklessCommitVersion is the second SCB version.

# Variables

ErrNoBackupFileExists is returned if caller attempts to call UpdateAndSwap with the file name not set.
ErrNoTempBackupFile is returned if caller attempts to call UpdateAndSwap with the temp back up file name not set.

# Structs

ChannelEvent packages a new update of new channels since subscription, and channels that have been opened since prior channel event.
ChannelSubscription represents an intent to be notified of any updates to the primary channel state.
ChannelWithAddrs bundles an open channel along with all the addresses for the channel peer.
Multi is a form of static channel backup that is amenable to being serialized in a single file.
MultiFile represents a file on disk that a caller can use to read the packed multi backup into an unpacked one, and also atomically update the contents on disk once new channels have been opened, and old ones closed.
Single is a static description of an existing channel that can be used for the purposes of backing up.
SubSwapper subscribes to new updates to the open channel state, and then swaps out the on-disk channel backup state in response.

# Interfaces

AddressSource is an interface that allows us to query for the set of addresses a node can be connected to.
ChannelNotifier represents a system that allows the chanbackup.SubSwapper to be notified of any changes to the primary channel state.
ChannelRestorer is an interface that allows the Recover method to map the set of single channel backups into a set of "channel shells" and store these persistently on disk.
LiveChannelSource is an interface that allows us to query for the set of live channels.
PeerConnector is an interface that allows the Recover method to connect to the target node given the set of possible addresses.
Swapper is an interface that allows the chanbackup.SubSwapper to update the main multi backup location once it learns of new channels or that prior channels have been closed.

# Type aliases

MultiBackupVersion denotes the version of the multi channel static channel backup.
PackedMulti represents a raw fully packed (serialized+encrypted) multi-channel static channel backup.
PackedSingles represents a series of fully packed SCBs.
SingleBackupVersion denotes the version of the single static channel backup.