dump

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PubKeyToString

func PubKeyToString(pubkey *btcec.PublicKey) string

Types

type BackupMulti

type BackupMulti struct {
	Version       chanbackup.MultiBackupVersion
	StaticBackups []BackupSingle
}

BackupMulti is the information we want to dump from a lnd channel backup multi file. See `chanbackup.Multi` for information about the fields.

type BackupSingle

type BackupSingle struct {
	Version          chanbackup.SingleBackupVersion
	IsInitiator      bool
	ChainHash        string
	FundingOutpoint  string
	ShortChannelID   lnwire.ShortChannelID
	RemoteNodePub    string
	Addresses        []net.Addr
	Capacity         btcutil.Amount
	LocalChanCfg     ChannelConfig
	RemoteChanCfg    ChannelConfig
	ShaChainRootDesc KeyDescriptor
}

BackupSingle is the information we want to dump from a lnd channel backup. See `chanbackup.Single` for information about the fields.

func BackupDump

func BackupDump(multi *chanbackup.Multi,
	params *chaincfg.Params) []BackupSingle

BackupDump converts the given multi backup into a dumpable format.

type ChannelConfig

type ChannelConfig struct {
	channeldb.ChannelConstraints
	MultiSigKey         KeyDescriptor
	RevocationBasePoint KeyDescriptor
	PaymentBasePoint    KeyDescriptor
	DelayBasePoint      KeyDescriptor
	HtlcBasePoint       KeyDescriptor
}

ChannelConfig is the information we want to dump from a channel configuration. See `channeldb.ChannelConfig` for more information about the fields.

func ToChannelConfig

func ToChannelConfig(params *chaincfg.Params,
	cfg channeldb.ChannelConfig) ChannelConfig

type ChannelDebugInfo added in v0.12.0

type ChannelDebugInfo struct {
	ToLocalScript  string
	ToLocalAddr    string
	ToRemoteScript string
	ToRemoteAddr   string
}

ChannelDebugInfo is a struct that holds additional information about an open or pending channel that is useful for debugging.

func CollectDebugInfo added in v0.12.0

func CollectDebugInfo(channel *channeldb.OpenChannel,
	commitPoint *btcec.PublicKey, ourCommit, initiator bool,
	params *chaincfg.Params) (*ChannelDebugInfo, error)

CollectDebugInfo collects the additional debug information for the given channel.

type ClosedChannel

type ClosedChannel struct {
	ChanPoint                 string
	ShortChanID               lnwire.ShortChannelID
	ChainHash                 chainhash.Hash
	ClosingTXID               string
	RemotePub                 string
	Capacity                  btcutil.Amount
	CloseHeight               uint32
	SettledBalance            btcutil.Amount
	TimeLockedBalance         btcutil.Amount
	CloseType                 string
	IsPending                 bool
	RemoteCurrentRevocation   string
	RemoteNextRevocation      string
	LocalChanConfig           ChannelConfig
	NextLocalCommitHeight     uint64
	RemoteCommitTailHeight    uint64
	LastRemoteCommitSecret    string
	LocalUnrevokedCommitPoint string
	HistoricalChannel         *OpenChannel
}

ClosedChannel is the information we want to dump from a closed channel in lnd's channel DB. See `channeldb.ChannelCloseSummary` for information about the fields.

func ClosedChannelDump

func ClosedChannelDump(channels []*channeldb.ChannelCloseSummary,
	historicalChannels []*channeldb.OpenChannel,
	params *chaincfg.Params) ([]ClosedChannel, error)

ClosedChannelDump converts the closed channels in the given channel DB into a dumpable format.

type KeyDescriptor

type KeyDescriptor struct {
	Path   string
	PubKey string
}

KeyDescriptor is the information we want to dump from a key descriptor. See `keychain.KeyDescriptor` for more information about the fields.

func ToKeyDescriptor

func ToKeyDescriptor(params *chaincfg.Params,
	desc keychain.KeyDescriptor) KeyDescriptor

type OpenChannel

type OpenChannel struct {
	ChanType                channeldb.ChannelType
	ChainHash               chainhash.Hash
	FundingOutpoint         string
	ShortChannelID          lnwire.ShortChannelID
	IsPending               bool
	IsInitiator             bool
	ChanStatus              channeldb.ChannelStatus
	FundingBroadcastHeight  uint32
	NumConfsRequired        uint16
	ChannelFlags            lnwire.FundingFlag
	ThawHeight              uint32
	IdentityPub             string
	Capacity                btcutil.Amount
	TotalMSatSent           lnwire.MilliSatoshi
	TotalMSatReceived       lnwire.MilliSatoshi
	PerCommitPoint          string
	LocalChanCfg            ChannelConfig
	RemoteChanCfg           ChannelConfig
	LocalCommitment         channeldb.ChannelCommitment
	RemoteCommitment        channeldb.ChannelCommitment
	LocalCommitmentDebug    ChannelDebugInfo
	RemoteCommitmentDebug   ChannelDebugInfo
	RemoteCurrentRevocation string
	RemoteNextRevocation    string
	FundingTxn              string
	LocalShutdownScript     lnwire.DeliveryAddress
	RemoteShutdownScript    lnwire.DeliveryAddress
}

OpenChannel is the information we want to dump from an open channel in lnd's channel DB. See `channeldb.OpenChannel` for information about the fields.

func OpenChannelDump

func OpenChannelDump(channels []*channeldb.OpenChannel,
	params *chaincfg.Params) ([]OpenChannel, error)

OpenChannelDump converts the open channels in the given channel DB into a dumpable format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL