Versions in this module Expand all Collapse all v0 v0.0.3 Sep 11, 2024 Changes in this version + const BitcoinChainName + const DefaultHTTPHeaderTimeout + const MaxTimeLockDelta + const UnassignedConnID + var DefaultConfigFile = filepath.Join(DefaultLndDir, lncfg.DefaultConfigFilename) + var DefaultLndDir = btcutil.AppDataDir("lnd", false) + var ErrCannotFail = errors.New("cannot fail in the on-chain flow") + var ErrCannotResume = errors.New("cannot resume in the on-chain flow") + var ErrPeerNotConnected = errors.New("peer is not connected") + var ErrPreimageMismatch = errors.New("preimage does not match hash") + var ErrServerNotActive = errors.New(...) + var ErrServerShuttingDown = errors.New("server is shutting down") + var MaxFundingAmount = funding.MaxBtcFundingAmount + func AddSubLogger(root *build.RotatingLogWriter, subsystem string, ...) + func AdminAuthOptions(cfg *Config, skipMacaroons bool) ([]grpc.DialOption, error) + func CleanAndExpandPath(path string) string + func GetAllPermissions() []bakery.Op + func Main(cfg *Config, lisCfg ListenerCfg, implCfg *ImplementationCfg, ...) error + func MainRPCServerPermissions() map[string][]bakery.Op + func SetSubLogger(root *build.RotatingLogWriter, subsystem string, logger btclog.Logger, ...) + func SetupLoggers(root *build.RotatingLogWriter, interceptor signal.Interceptor) + type ChainControlBuilder interface + BuildChainControl func(*chainreg.PartialChainControl, *btcwallet.Config) (*chainreg.ChainControl, func(), error) + type Config struct + AcceptAMP bool + AcceptKeySend bool + AcceptorTimeout time.Duration + ActiveNetParams chainreg.BitcoinNetParams + AddPeers []string + AdminMacPath string + Alias string + AllowCircularRoute bool + Autopilot *lncfg.AutoPilot + BackupFilePath string + Bitcoin *lncfg.Chain + BitcoindMode *lncfg.Bitcoind + BlockCacheSize uint64 + BlockingProfile int + BtcdMode *lncfg.Btcd + CPUProfile string + Caches *lncfg.Caches + ChanDisableTimeout time.Duration + ChanEnableTimeout time.Duration + ChanStatusSampleInterval time.Duration + ChannelCommitBatchSize uint32 + ChannelCommitInterval time.Duration + Cluster *lncfg.Cluster + CoinSelectionStrategy string + Color string + ConfigFile string + ConnectionTimeout time.Duration + CoopCloseTargetConfs uint32 + DB *lncfg.DB + DataDir string + DebugLevel string + DefaultRemoteMaxHtlcs uint16 + Dev *lncfg.DevConfig + DisableListen bool + DisableRest bool + DisableRestTLS bool + DryRunMigration bool + DustThreshold uint64 + EnableUpfrontShutdown bool + Estimator routing.Estimator + ExternalHosts []string + ExternalIPs []net.Addr + FeeURL string + GRPC *GRPCConfig + GcCanceledInvoicesOnStartup bool + GcCanceledInvoicesOnTheFly bool + Gossip *lncfg.Gossip + HTTPHeaderTimeout time.Duration + HealthChecks *lncfg.HealthCheckConfig + HeightHintCacheQueryDisable bool + HistoricalSyncInterval time.Duration + Hodl *hodl.Config + Htlcswitch *lncfg.Htlcswitch + IgnoreHistoricalGossipFilters bool + InvoiceMacPath string + Invoices *lncfg.Invoices + KeepFailedPaymentAttempts bool + KeysendHoldTime time.Duration + LetsEncryptDir string + LetsEncryptDomain string + LetsEncryptListen string + Listeners []net.Addr + LndDir string + LogDir string + LogWriter *build.RotatingLogWriter + MaxBackoff time.Duration + MaxChanSize int64 + MaxChannelFeeAllocation float64 + MaxCommitFeeRateAnchors uint64 + MaxLogFileSize int + MaxLogFiles int + MaxOutgoingCltvExpiry uint32 + MaxPendingChannels int + MinBackoff time.Duration + MinChanSize int64 + MutexProfile int + NAT bool + NeutrinoMode *lncfg.Neutrino + NoMacaroons bool + NoNetBootstrap bool + NoSeedBackup bool + NumGraphSyncPeers int + PaymentsExpirationGracePeriod time.Duration + PendingCommitInterval time.Duration + Profile string + Prometheus lncfg.Prometheus + ProtocolOptions *lncfg.ProtocolOptions + RESTListeners []net.Addr + RPCListeners []net.Addr + RPCMiddleware *lncfg.RPCMiddleware + RawExternalIPs []string + RawListeners []string + RawRESTListeners []string + RawRPCListeners []string + ReadMacPath string + RejectHTLC bool + RejectPush bool + RemoteSigner *lncfg.RemoteSigner + RequireInterceptor bool + ResetWalletTransactions bool + RestCORS []string + Routing *lncfg.Routing + ShowVersion bool + StaggerInitialReconnect bool + StoreFinalHtlcResolutions bool + SubRPCServers *subRPCServerConfigs + Sweeper *lncfg.Sweeper + SyncFreelist bool + TLSAutoRefresh bool + TLSCertDuration time.Duration + TLSCertPath string + TLSDisableAutofill bool + TLSEncryptKey bool + TLSExtraDomains []string + TLSExtraIPs []string + TLSKeyPath string + Tor *lncfg.Tor + TrickleDelay int + UnsafeDisconnect bool + UnsafeReplay bool + WSPingInterval time.Duration + WSPongWait time.Duration + WalletUnlockAllowCreate bool + WalletUnlockPasswordFile string + Watchtower *lncfg.Watchtower + Workers *lncfg.Workers + WtClient *lncfg.WtClient + func DefaultConfig() Config + func LoadConfig(interceptor signal.Interceptor) (*Config, error) + func ValidateConfig(cfg Config, interceptor signal.Interceptor, ...) (*Config, error) + func (c *Config) ImplementationConfig(interceptor signal.Interceptor) *ImplementationCfg + type CustomMessage struct + Msg *lnwire.Custom + Peer [33]byte + type DatabaseBuilder interface + BuildDatabase func(ctx context.Context) (*DatabaseInstances, func(), error) + type DatabaseInstances struct + ChanStateDB *channeldb.DB + DecayedLogDB kvdb.Backend + GraphDB *channeldb.DB + HeightHintDB kvdb.Backend + InvoiceDB invoices.InvoiceDB + MacaroonDB kvdb.Backend + NativeSQLStore *sqldb.BaseDB + TowerClientDB wtclient.DB + TowerServerDB watchtower.DB + WalletDB btcwallet.LoaderOption + type DefaultDatabaseBuilder struct + func NewDefaultDatabaseBuilder(cfg *Config, logger btclog.Logger) *DefaultDatabaseBuilder + func (d *DefaultDatabaseBuilder) BuildDatabase(ctx context.Context) (*DatabaseInstances, func(), error) + type DefaultWalletImpl struct + func NewDefaultWalletImpl(cfg *Config, logger btclog.Logger, interceptor signal.Interceptor, ...) *DefaultWalletImpl + func (d *DefaultWalletImpl) BuildChainControl(partialChainControl *chainreg.PartialChainControl, ...) (*chainreg.ChainControl, func(), error) + func (d *DefaultWalletImpl) BuildWalletConfig(ctx context.Context, dbs *DatabaseInstances, ...) (*chainreg.PartialChainControl, *btcwallet.Config, func(), error) + func (d *DefaultWalletImpl) Permissions() map[string][]bakery.Op + func (d *DefaultWalletImpl) RegisterGrpcSubserver(s *grpc.Server) error + func (d *DefaultWalletImpl) RegisterRestSubserver(ctx context.Context, mux *proxy.ServeMux, restProxyDest string, ...) error + func (d *DefaultWalletImpl) ValidateMacaroon(ctx context.Context, requiredPermissions []bakery.Op, fullMethod string) error + type ExternalValidator interface + Permissions func() map[string][]bakery.Op + type GRPCConfig struct + ClientAllowPingWithoutStream bool + ClientPingMinWait time.Duration + ServerPingTime time.Duration + ServerPingTimeout time.Duration + type GrpcRegistrar interface + RegisterGrpcSubserver func(*grpc.Server) error + type ImplementationCfg struct + type ListenerCfg struct + RPCListeners []*ListenerWithSignal + type ListenerWithSignal struct + MacChan chan []byte + Ready chan struct{} + type RPCSignerWalletImpl struct + func NewRPCSignerWalletImpl(cfg *Config, logger btclog.Logger, interceptor signal.Interceptor, ...) *RPCSignerWalletImpl + func (d *RPCSignerWalletImpl) BuildChainControl(partialChainControl *chainreg.PartialChainControl, ...) (*chainreg.ChainControl, func(), error) + type RestRegistrar interface + RegisterRestSubserver func(context.Context, *proxy.ServeMux, string, []grpc.DialOption) error + type TLSManager struct + func NewTLSManager(cfg *TLSManagerCfg) *TLSManager + func (t *TLSManager) IsCertExpired(keyRing keychain.SecretKeyRing) (bool, time.Time, error) + func (t *TLSManager) LoadPermanentCertificate(keyRing keychain.SecretKeyRing) error + func (t *TLSManager) SetCertificateBeforeUnlock() ([]grpc.ServerOption, []grpc.DialOption, func(net.Addr) (net.Listener, error), ...) + type TLSManagerCfg struct + DisableRestTLS bool + HTTPHeaderTimeout time.Duration + LetsEncryptDir string + LetsEncryptDomain string + LetsEncryptListen string + TLSAutoRefresh bool + TLSCertDuration time.Duration + TLSCertPath string + TLSDisableAutofill bool + TLSEncryptKey bool + TLSExtraDomains []string + TLSExtraIPs []string + TLSKeyPath string + type WalletConfigBuilder interface + BuildWalletConfig func(context.Context, *DatabaseInstances, *rpcperms.InterceptorChain, ...) (*chainreg.PartialChainControl, *btcwallet.Config, func(), error)