Versions in this module Expand all Collapse all v0 v0.15.1 Dec 3, 2022 Changes in this version type BitcoindConfig + PollingConfig *PollingConfig + ZMQConfig *ZMQConfig + type BitcoindEvents interface + BlockNotifications func() <-chan *wire.MsgBlock + Start func() error + Stop func() error + TxNotifications func() <-chan *wire.MsgTx + func NewBitcoindEventSubscriber(cfg *BitcoindConfig, client *rpcclient.Client) (BitcoindEvents, error) + type PollingConfig struct + BlockPollingInterval time.Duration + TxPollingInterval time.Duration + type ZMQConfig struct + ZMQBlockHost string + ZMQReadDeadline time.Duration + ZMQTxHost string v0.13.0 May 9, 2022 Changes in this version + var ErrBitcoindClientShuttingDown = errors.New("client is shutting down") + func BackEnds() []string + func DisableLog() + func UseLogger(logger btclog.Logger) + type BitcoindClient struct + func (c *BitcoindClient) BackEnd() string + func (c *BitcoindClient) BlockStamp() (*waddrmgr.BlockStamp, error) + func (c *BitcoindClient) FilterBlocks(req *FilterBlocksRequest) (*FilterBlocksResponse, error) + func (c *BitcoindClient) GetBestBlock() (*chainhash.Hash, int32, error) + func (c *BitcoindClient) GetBlock(hash *chainhash.Hash) (*wire.MsgBlock, error) + func (c *BitcoindClient) GetBlockHash(height int64) (*chainhash.Hash, error) + func (c *BitcoindClient) GetBlockHeader(hash *chainhash.Hash) (*wire.BlockHeader, error) + func (c *BitcoindClient) GetBlockHeaderVerbose(hash *chainhash.Hash) (*btcjson.GetBlockHeaderVerboseResult, error) + func (c *BitcoindClient) GetBlockHeight(hash *chainhash.Hash) (int32, error) + func (c *BitcoindClient) GetBlockVerbose(hash *chainhash.Hash) (*btcjson.GetBlockVerboseResult, error) + func (c *BitcoindClient) GetRawTransactionVerbose(hash *chainhash.Hash) (*btcjson.TxRawResult, error) + func (c *BitcoindClient) GetTxOut(txHash *chainhash.Hash, index uint32, mempool bool) (*btcjson.GetTxOutResult, error) + func (c *BitcoindClient) IsCurrent() bool + func (c *BitcoindClient) LoadTxFilter(reset bool, filters ...interface{}) error + func (c *BitcoindClient) Notifications() <-chan interface{} + func (c *BitcoindClient) NotifyBlocks() error + func (c *BitcoindClient) NotifyReceived(addrs []btcutil.Address) error + func (c *BitcoindClient) NotifySpent(outPoints []*wire.OutPoint) error + func (c *BitcoindClient) NotifyTx(txids []chainhash.Hash) error + func (c *BitcoindClient) Rescan(blockHash *chainhash.Hash, addresses []btcutil.Address, ...) error + func (c *BitcoindClient) RescanBlocks(blockHashes []chainhash.Hash) ([]btcjson.RescannedBlock, error) + func (c *BitcoindClient) SendRawTransaction(tx *wire.MsgTx, allowHighFees bool) (*chainhash.Hash, error) + func (c *BitcoindClient) SetBirthday(t time.Time) + func (c *BitcoindClient) Start() error + func (c *BitcoindClient) Stop() + func (c *BitcoindClient) WaitForShutdown() + type BitcoindConfig struct + ChainParams *chaincfg.Params + Dialer Dialer + Host string + Pass string + PrunedModeMaxPeers int + User string + ZMQBlockHost string + ZMQReadDeadline time.Duration + ZMQTxHost string + type BitcoindConn struct + func NewBitcoindConn(cfg *BitcoindConfig) (*BitcoindConn, error) + func (c *BitcoindConn) AddClient(client *BitcoindClient) + func (c *BitcoindConn) GetBlock(hash *chainhash.Hash) (*wire.MsgBlock, error) + func (c *BitcoindConn) NewBitcoindClient() *BitcoindClient + func (c *BitcoindConn) RemoveClient(id uint64) + func (c *BitcoindConn) Start() error + func (c *BitcoindConn) Stop() + type BlockConnected wtxmgr.BlockMeta + type BlockDisconnected wtxmgr.BlockMeta + type BlockFilterer struct + ExReverseFilter map[string]waddrmgr.ScopedIndex + FoundExternal map[waddrmgr.KeyScope]map[uint32]struct{} + FoundInternal map[waddrmgr.KeyScope]map[uint32]struct{} + FoundOutPoints map[wire.OutPoint]btcutil.Address + InReverseFilter map[string]waddrmgr.ScopedIndex + Params *chaincfg.Params + RelevantTxns []*wire.MsgTx + WatchedOutPoints map[wire.OutPoint]btcutil.Address + func NewBlockFilterer(params *chaincfg.Params, req *FilterBlocksRequest) *BlockFilterer + func (bf *BlockFilterer) FilterBlock(block *wire.MsgBlock) bool + func (bf *BlockFilterer) FilterOutputAddrs(addrs []btcutil.Address) bool + func (bf *BlockFilterer) FilterTx(tx *wire.MsgTx) bool + type ClientConnected struct + type ConcurrentQueue struct + func NewConcurrentQueue(bufferSize int) *ConcurrentQueue + func (cq *ConcurrentQueue) ChanIn() chan<- interface{} + func (cq *ConcurrentQueue) ChanOut() <-chan interface{} + func (cq *ConcurrentQueue) Start() + func (cq *ConcurrentQueue) Stop() + type Dialer = func(string) (net.Conn, error) + type FilterBlocksRequest struct + Blocks []wtxmgr.BlockMeta + ExternalAddrs map[waddrmgr.ScopedIndex]btcutil.Address + InternalAddrs map[waddrmgr.ScopedIndex]btcutil.Address + WatchedOutPoints map[wire.OutPoint]btcutil.Address + type FilterBlocksResponse struct + BatchIndex uint32 + BlockMeta wtxmgr.BlockMeta + FoundExternalAddrs map[waddrmgr.KeyScope]map[uint32]struct{} + FoundInternalAddrs map[waddrmgr.KeyScope]map[uint32]struct{} + FoundOutPoints map[wire.OutPoint]btcutil.Address + RelevantTxns []*wire.MsgTx + type FilteredBlockConnected struct + Block *wtxmgr.BlockMeta + RelevantTxs []*wtxmgr.TxRecord + type Interface interface + BackEnd func() string + BlockStamp func() (*waddrmgr.BlockStamp, error) + FilterBlocks func(*FilterBlocksRequest) (*FilterBlocksResponse, error) + GetBestBlock func() (*chainhash.Hash, int32, error) + GetBlock func(*chainhash.Hash) (*wire.MsgBlock, error) + GetBlockHash func(int64) (*chainhash.Hash, error) + GetBlockHeader func(*chainhash.Hash) (*wire.BlockHeader, error) + IsCurrent func() bool + Notifications func() <-chan interface{} + NotifyBlocks func() error + NotifyReceived func([]btcutil.Address) error + Rescan func(*chainhash.Hash, []btcutil.Address, map[wire.OutPoint]btcutil.Address) error + SendRawTransaction func(*wire.MsgTx, bool) (*chainhash.Hash, error) + Start func() error + Stop func() + WaitForShutdown func() + type NeutrinoClient struct + CS *neutrino.ChainService + func NewNeutrinoClient(chainParams *chaincfg.Params, chainService *neutrino.ChainService) *NeutrinoClient + func (s *NeutrinoClient) BackEnd() string + func (s *NeutrinoClient) BlockStamp() (*waddrmgr.BlockStamp, error) + func (s *NeutrinoClient) FilterBlocks(req *FilterBlocksRequest) (*FilterBlocksResponse, error) + func (s *NeutrinoClient) GetBestBlock() (*chainhash.Hash, int32, error) + func (s *NeutrinoClient) GetBlock(hash *chainhash.Hash) (*wire.MsgBlock, error) + func (s *NeutrinoClient) GetBlockHash(height int64) (*chainhash.Hash, error) + func (s *NeutrinoClient) GetBlockHeader(blockHash *chainhash.Hash) (*wire.BlockHeader, error) + func (s *NeutrinoClient) GetBlockHeight(hash *chainhash.Hash) (int32, error) + func (s *NeutrinoClient) IsCurrent() bool + func (s *NeutrinoClient) Notifications() <-chan interface{} + func (s *NeutrinoClient) NotifyBlocks() error + func (s *NeutrinoClient) NotifyReceived(addrs []btcutil.Address) error + func (s *NeutrinoClient) Rescan(startHash *chainhash.Hash, addrs []btcutil.Address, ...) error + func (s *NeutrinoClient) SendRawTransaction(tx *wire.MsgTx, allowHighFees bool) (*chainhash.Hash, error) + func (s *NeutrinoClient) SetStartTime(startTime time.Time) + func (s *NeutrinoClient) Start() error + func (s *NeutrinoClient) Stop() + func (s *NeutrinoClient) WaitForShutdown() + type PrunedBlockDispatcher struct + func NewPrunedBlockDispatcher(cfg *PrunedBlockDispatcherConfig) (*PrunedBlockDispatcher, error) + func (d *PrunedBlockDispatcher) Query(blocks []*chainhash.Hash, opts ...query.QueryOption) (<-chan *wire.MsgBlock, <-chan error) + func (d *PrunedBlockDispatcher) Start() error + func (d *PrunedBlockDispatcher) Stop() + type PrunedBlockDispatcherConfig struct + AllowSelfPeerConns bool + ChainParams *chaincfg.Params + Dial func(string) (net.Conn, error) + GetNodeAddresses func(*int32) ([]btcjson.GetNodeAddressesResult, error) + GetPeers func() ([]btcjson.GetPeerInfoResult, error) + MaxRequestInvs int + NumTargetPeers int + PeerReadyTimeout time.Duration + RefreshPeersTicker ticker.Ticker + type RPCClient struct + func NewRPCClient(chainParams *chaincfg.Params, connect, user, pass string, certs []byte, ...) (*RPCClient, error) + func (c *RPCClient) BackEnd() string + func (c *RPCClient) BlockStamp() (*waddrmgr.BlockStamp, error) + func (c *RPCClient) FilterBlocks(req *FilterBlocksRequest) (*FilterBlocksResponse, error) + func (c *RPCClient) IsCurrent() bool + func (c *RPCClient) Notifications() <-chan interface{} + func (c *RPCClient) POSTClient() (*rpcclient.Client, error) + func (c *RPCClient) Rescan(startHash *chainhash.Hash, addrs []btcutil.Address, ...) error + func (c *RPCClient) Start() error + func (c *RPCClient) Stop() + func (c *RPCClient) WaitForShutdown() + type RelevantTx struct + Block *wtxmgr.BlockMeta + TxRecord *wtxmgr.TxRecord + type RescanFinished struct + Hash *chainhash.Hash + Height int32 + Time time.Time + type RescanProgress struct + Hash *chainhash.Hash + Height int32 + Time time.Time