Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
Types ¶
type BlockConnected ¶
BlockConnected is a notification for a newly-attached block to the best chain.
type BlockDisconnected ¶
BlockDisconnected is a notifcation that the block described by the BlockStamp was reorganized out of the best chain.
type ClientConnected ¶
type ClientConnected struct{}
ClientConnected is a notification for when a client connection is opened or reestablished to the chain server.
type RPCClient ¶
type RPCClient struct { *btcrpcclient.Client // contains filtered or unexported fields }
RPCClient represents a persistent client connection to a bitcoin RPC server for information regarding the current best block chain.
func NewRPCClient ¶
func NewRPCClient(chainParams *chaincfg.Params, connect, user, pass string, certs []byte, disableTLS bool, reconnectAttempts int) (*RPCClient, error)
NewRPCClient creates a client connection to the server described by the connect string. If disableTLS is false, the remote RPC certificate must be provided in the certs slice. The connection is not established immediately, but must be done using the Start method. If the remote server does not operate on the same bitcoin network as described by the passed chain parameters, the connection will be disconnected.
func (*RPCClient) BlockStamp ¶
func (c *RPCClient) BlockStamp() (*waddrmgr.BlockStamp, error)
BlockStamp returns the latest block notified by the client, or an error if the client has been shut down.
func (*RPCClient) Notifications ¶
func (c *RPCClient) Notifications() <-chan interface{}
Notifications returns a channel of parsed notifications sent by the remote bitcoin RPC server. This channel must be continually read or the process may abort for running out memory, as unread notifications are queued for later reads.
func (*RPCClient) POSTClient ¶
func (c *RPCClient) POSTClient() (*btcrpcclient.Client, error)
POSTClient creates the equivalent HTTP POST btcrpcclient.Client.
func (*RPCClient) Start ¶
Start attempts to establish a client connection with the remote server. If successful, handler goroutines are started to process notifications sent by the server. After a limited number of connection attempts, this function gives up, and therefore will not block forever waiting for the connection to be established to a server that may not exist.
func (*RPCClient) Stop ¶
func (c *RPCClient) Stop()
Stop disconnects the client and signals the shutdown of all goroutines started by Start.
func (*RPCClient) WaitForShutdown ¶
func (c *RPCClient) WaitForShutdown()
WaitForShutdown blocks until both the client has finished disconnecting and all handlers have exited.
type RelevantTx ¶
RelevantTx is a notification for a transaction which spends wallet inputs or pays to a watched address.
type RescanFinished ¶
RescanFinished is a notification that a previous rescan request has finished.