Documentation ¶
Index ¶
- Variables
- type ChainSyncNotifier
- type Config
- type Dcrlnd
- func (lndc *Dcrlnd) Create(ctx context.Context, pass string, existingSeed []string, ...) ([]byte, error)
- func (lndc *Dcrlnd) LogFullPath() string
- func (lndc *Dcrlnd) MacaroonPath() string
- func (lndc *Dcrlnd) NotifyInitialChainSync(ctx context.Context, ntf ChainSyncNotifier)
- func (lndc *Dcrlnd) RPCAddr() string
- func (lndc *Dcrlnd) Stop()
- func (lndc *Dcrlnd) TLSCertPath() string
- func (lndc *Dcrlnd) TryUnlock(ctx context.Context, pass string) error
- func (lndc *Dcrlnd) Wait(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
var ErrLNWalletNotFound = errors.New("wallet not found")
Functions ¶
This section is empty.
Types ¶
type ChainSyncNotifier ¶
type ChainSyncNotifier func(*initchainsyncrpc.ChainSyncUpdate, error)
type Config ¶
type Config struct { // RootDir is the root data dir where dcrlnd data is stored. RootDir string // Network is one of the supported dcrlnd networks. Network string // DebugLevel is the logging level to use. DebugLevel string // MaxLogFiles is the max number of log files to keep around. MaxLogFiles int // RPCAddresses are addresses to bind gRPC to. When non-empty, the // first address MUST be one accessible for the local host (e.g. // 127.0.0.1:<port>), otherwise initialization may hang forever. RPCAddresses []string // DialFunc can be set to specify a non standard dialer. DialFunc func(context.Context, string, string) (net.Conn, error) // TorAddr is the host:port the Tor's SOCKS5 proxy is listening on. TorAddr string // TorIsolation enables Tor stream isolation. TorIsolation bool // SyncFreeList sets the SyncFreeList flag in the DB. SyncFreeList bool // AutoCompact sets the AutoCompact flag in the DB. AutoCompact bool // AutoCompactMinAge sets the AutoCompactMinAge value in the DB. AutoCompactMinAge time.Duration // DisableRelayTx disables mempool transactions. DisableRelayTx bool }
Config are the config parameters of the dcrlnd instance.
type Dcrlnd ¶
type Dcrlnd struct {
// contains filtered or unexported fields
}
Dcrlnd is a running instance of an embedded dcrlnd instance.
func RunDcrlnd ¶
RunDcrlnd initializes and runs a new embedded dcrlnd instance. It returns with the (locked) instance if no errors are found.
The passed context is only used during the attempts to connect to the running node.
func (*Dcrlnd) Create ¶
func (lndc *Dcrlnd) Create(ctx context.Context, pass string, existingSeed []string, multiChanBackup []byte) ([]byte, error)
Create attempts to create a new wallet using a new seed and protects the wallet with the given passphrase. The seed for the wallet is returned.
func (*Dcrlnd) LogFullPath ¶ added in v0.2.0
LogFilename returns the full path to the log file.
func (*Dcrlnd) MacaroonPath ¶
MacaroonPath returns the path to the macaroon file of the dcrlnd instance.
func (*Dcrlnd) NotifyInitialChainSync ¶
func (lndc *Dcrlnd) NotifyInitialChainSync(ctx context.Context, ntf ChainSyncNotifier)
NotifyInitialChainSync calls the especified notifier while the chain is syncing. The notifier will be called at least once, either with a message with Synced = true or with an error.
func (*Dcrlnd) RPCAddr ¶
RPCAddr returns the address of the gRPC endpoint of the running dcrlnd instance.
func (*Dcrlnd) TLSCertPath ¶
TLSCertPath returns the path to the TLS cert of the dcrlnd instance.