Documentation ¶
Index ¶
- func NewClientConnection(cfg *config.Config) (*grpc.ClientConn, error)
- func TestTxSpentURL(URL string) error
- type API
- type BackupNeededEvent
- type ChainSyncedEvent
- type ChannelEvent
- type Daemon
- func (d *Daemon) APIClient() lnrpc.LightningClient
- func (d *Daemon) BreezBackupClient() breezbackuprpc.BreezBackuperClient
- func (d *Daemon) ChainNotifierClient() chainrpc.ChainNotifierClient
- func (d *Daemon) ClosedChannels() (int, error)
- func (d *Daemon) HasActiveChannel() bool
- func (d *Daemon) InvoicesClient() invoicesrpc.InvoicesClient
- func (d *Daemon) IsReadyForPayment() bool
- func (d *Daemon) NodePubkey() string
- func (a *Daemon) PopulateChannelsGraph() error
- func (d *Daemon) RestartDaemon() error
- func (d *Daemon) RouterClient() routerrpc.RouterClient
- func (d *Daemon) SignerClient() signrpc.SignerClient
- func (d *Daemon) Start() error
- func (d *Daemon) Stop() error
- func (d *Daemon) SubSwapClient() submarineswaprpc.SubmarineSwapperClient
- func (d *Daemon) SubscribeEvents() (*subscribe.Client, error)
- func (d *Daemon) WaitReadyForPayment(timeout time.Duration) error
- func (d *Daemon) WalletKitClient() walletrpc.WalletKitClient
- type DaemonDownEvent
- type DaemonReadyEvent
- type Dependencies
- type InvoiceEvent
- type PeerEvent
- type ResumeEvent
- type RoutingNodeChannelOpened
- type TransactionEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientConnection ¶
func NewClientConnection(cfg *config.Config) (*grpc.ClientConn, error)
func TestTxSpentURL ¶
Types ¶
type API ¶
type API interface { SubscribeEvents() (*subscribe.Client, error) HasActiveChannel() bool IsReadyForPayment() bool WaitReadyForPayment(timeout time.Duration) error NodePubkey() string APIClient() lnrpc.LightningClient SubSwapClient() submarineswaprpc.SubmarineSwapperClient BreezBackupClient() breezbackuprpc.BreezBackuperClient RouterClient() routerrpc.RouterClient WalletKitClient() walletrpc.WalletKitClient ChainNotifierClient() chainrpc.ChainNotifierClient InvoicesClient() invoicesrpc.InvoicesClient SignerClient() signrpc.SignerClient }
API represents the lnnode exposed functions that are accessible for breez services to use. It is mainly enable the service to subscribe to various daemon events and get an APIClient to query the daemon directly via RPC.
type BackupNeededEvent ¶
type BackupNeededEvent struct{}
BackupNeededEvent is sent when the node signals backup is needed.
type ChainSyncedEvent ¶
type ChainSyncedEvent struct{}
ChainSyncedEvent is sent when the chain gets into synced state.
type ChannelEvent ¶
type ChannelEvent struct {
*lnrpc.ChannelEventUpdate
}
ChannelEvent is sent whenever a channel is created/closed or active/inactive.
type Daemon ¶
type Daemon struct { sync.Mutex TorConfig *tor.TorConfig // contains filtered or unexported fields }
Daemon contains data regarding the lightning daemon.
func (*Daemon) APIClient ¶
func (d *Daemon) APIClient() lnrpc.LightningClient
APIClient returns the interface to query the daemon.
func (*Daemon) BreezBackupClient ¶
func (d *Daemon) BreezBackupClient() breezbackuprpc.BreezBackuperClient
func (*Daemon) ChainNotifierClient ¶
func (d *Daemon) ChainNotifierClient() chainrpc.ChainNotifierClient
func (*Daemon) ClosedChannels ¶
func (*Daemon) HasActiveChannel ¶
HasActiveChannel returns true if the node has at least one active channel.
func (*Daemon) InvoicesClient ¶
func (d *Daemon) InvoicesClient() invoicesrpc.InvoicesClient
func (*Daemon) IsReadyForPayment ¶
IsReadyForPayment returns true if we can pay
func (*Daemon) NodePubkey ¶
NodePubkey returns the identity public key of the lightning node.
func (*Daemon) PopulateChannelsGraph ¶
func (*Daemon) RestartDaemon ¶
RestartDaemon is used to restart a daemon that from some reason failed to start or was started and failed at some later point.
func (*Daemon) RouterClient ¶
func (d *Daemon) RouterClient() routerrpc.RouterClient
func (*Daemon) SignerClient ¶
func (d *Daemon) SignerClient() signrpc.SignerClient
func (*Daemon) SubSwapClient ¶
func (d *Daemon) SubSwapClient() submarineswaprpc.SubmarineSwapperClient
func (*Daemon) SubscribeEvents ¶
SubscribeEvents subscribe to various application events
func (*Daemon) WaitReadyForPayment ¶
WaitReadyForPayment is waiting untill we are ready to pay
func (*Daemon) WalletKitClient ¶
func (d *Daemon) WalletKitClient() walletrpc.WalletKitClient
type DaemonReadyEvent ¶
type DaemonReadyEvent struct {
IdentityPubkey string
}
DaemonReadyEvent is sent when the daemon is ready for RPC requests
type Dependencies ¶
type Dependencies struct {
// contains filtered or unexported fields
}
Dependencies is an implementation of interface daemon.Dependencies used for injecting breez deps int LND running as library
func (*Dependencies) ChainService ¶
func (d *Dependencies) ChainService() *neutrino.ChainService
ChainService returns a neutrino.ChainService to be used from both sync job and LND running daemon
func (*Dependencies) ChanDB ¶
func (d *Dependencies) ChanDB() *channeldb.DB
ChanDB returns the channel db for the daemon
func (*Dependencies) ReadyChan ¶
func (d *Dependencies) ReadyChan() chan interface{}
ReadyChan returns the channel passed to LND for getting ready signal
type InvoiceEvent ¶
InvoiceEvent is sent when a new invoice is created/settled.
type RoutingNodeChannelOpened ¶
type RoutingNodeChannelOpened struct{}
RoutingNodeChannelOpened is sent when a channel with the routing node is opened.
type TransactionEvent ¶
type TransactionEvent struct {
*lnrpc.Transaction
}
TransactionEvent is sent when a new transaction is received.