Versions in this module Expand all Collapse all v0 v0.15.10001 Jan 16, 2023 v0.15.101 Jan 16, 2023 Changes in this version + var ErrChanAlreadyClosing = fmt.Errorf("channel shutdown already initiated") + var ErrChanCloseNotFinished = fmt.Errorf("close negotiation not finished") + var ErrInvalidShutdownScript = fmt.Errorf("invalid shutdown script") + var ErrInvalidState = fmt.Errorf("invalid state") + var ErrProposalExeceedsMaxFee = fmt.Errorf(...) + var ErrUpfrontShutdownScriptMismatch = fmt.Errorf(...) + func DisableLog() + func ParseUpfrontShutdownAddress(address string, params *chaincfg.Params) (lnwire.DeliveryAddress, error) + func UseLogger(logger btclog.Logger) + type ChanCloseCfg struct + BroadcastTx func(*wire.MsgTx, string) error + ChainParams *chaincfg.Params + Channel Channel + DisableChannel func(wire.OutPoint) error + Disconnect func() error + FeeEstimator CoopFeeEstimator + MaxFee chainfee.SatPerKWeight + Quit chan struct{} + type ChanCloser struct + func NewChanCloser(cfg ChanCloseCfg, deliveryScript []byte, idealFeePerKw chainfee.SatPerKWeight, ...) *ChanCloser + func (c *ChanCloser) Channel() *lnwallet.LightningChannel + func (c *ChanCloser) CloseRequest() *htlcswitch.ChanClose + func (c *ChanCloser) ClosingTx() (*wire.MsgTx, error) + func (c *ChanCloser) NegotiationHeight() uint32 + func (c *ChanCloser) ProcessCloseMsg(msg lnwire.Message) ([]lnwire.Message, bool, error) + func (c *ChanCloser) ShutdownChan() (*lnwire.Shutdown, error) + type Channel interface + AbsoluteThawHeight func() (uint32, error) + ChannelPoint func() *wire.OutPoint + CompleteCooperativeClose func(localSig, remoteSig input.Signature, ...) (*wire.MsgTx, btcutil.Amount, error) + CreateCloseProposal func(proposedFee btcutil.Amount, localDeliveryScript []byte, ...) (input.Signature, *chainhash.Hash, btcutil.Amount, error) + IsInitiator func() bool + LocalBalanceDust func() bool + MarkCoopBroadcasted func(*wire.MsgTx, bool) error + RemoteBalanceDust func() bool + RemoteUpfrontShutdownScript func() lnwire.DeliveryAddress + ShortChanID func() lnwire.ShortChannelID + type CoopFeeEstimator interface + EstimateFee func(chanType channeldb.ChannelType, localTxOut, remoteTxOut *wire.TxOut, ...) btcutil.Amount + type SimpleCoopFeeEstimator struct + func (d *SimpleCoopFeeEstimator) EstimateFee(chanType channeldb.ChannelType, localTxOut, remoteTxOut *wire.TxOut, ...) btcutil.Amount