Documentation ¶
Index ¶
- Variables
- type BlockBookClient
- func (i *BlockBookClient) BlockChannel() chan model.Block
- func (i *BlockBookClient) BlockNotify() <-chan model.Block
- func (i *BlockBookClient) Broadcast(tx []byte) (string, error)
- func (i *BlockBookClient) Close()
- func (i *BlockBookClient) EndpointURL() *url.URL
- func (i *BlockBookClient) EstimateFee(nbBlocks int) (int, error)
- func (i *BlockBookClient) GetBestBlock() (*model.Block, error)
- func (i *BlockBookClient) GetBlocksBefore(to time.Time, limit int) (*model.BlockList, error)
- func (i *BlockBookClient) GetInfo() (*model.Info, error)
- func (i *BlockBookClient) GetRawTransaction(txid string) ([]byte, error)
- func (i *BlockBookClient) GetTransaction(txid string) (*model.Transaction, error)
- func (i *BlockBookClient) GetTransactions(addrs []btcutil.Address) ([]model.Transaction, error)
- func (i *BlockBookClient) GetUtxos(addrs []btcutil.Address) ([]model.Utxo, error)
- func (i *BlockBookClient) ListenAddresses(addrs ...btcutil.Address)
- func (i *BlockBookClient) Start(closeChan chan<- error) error
- func (i *BlockBookClient) String() string
- func (i *BlockBookClient) TransactionNotify() <-chan model.Transaction
- func (i *BlockBookClient) TxChannel() chan model.Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var Log = logging.MustGetLogger("client")
Functions ¶
This section is empty.
Types ¶
type BlockBookClient ¶
type BlockBookClient struct { HTTPClient http.Client RequestFunc func(endpoint, method string, body []byte, query url.Values) (*http.Response, error) SocketClient model.SocketClient // contains filtered or unexported fields }
func NewBlockBookClient ¶
func NewBlockBookClient(apiUrl string, proxyDialer proxy.Dialer) (*BlockBookClient, error)
func (*BlockBookClient) BlockChannel ¶
func (i *BlockBookClient) BlockChannel() chan model.Block
func (*BlockBookClient) BlockNotify ¶
func (i *BlockBookClient) BlockNotify() <-chan model.Block
func (*BlockBookClient) Close ¶
func (i *BlockBookClient) Close()
func (*BlockBookClient) EndpointURL ¶
func (i *BlockBookClient) EndpointURL() *url.URL
func (*BlockBookClient) EstimateFee ¶
func (i *BlockBookClient) EstimateFee(nbBlocks int) (int, error)
func (*BlockBookClient) GetBestBlock ¶
func (i *BlockBookClient) GetBestBlock() (*model.Block, error)
func (*BlockBookClient) GetBlocksBefore ¶
func (*BlockBookClient) GetInfo ¶
func (i *BlockBookClient) GetInfo() (*model.Info, error)
GetInfo is unused for now so we will not implement it yet
func (*BlockBookClient) GetRawTransaction ¶
func (i *BlockBookClient) GetRawTransaction(txid string) ([]byte, error)
GetRawTransaction is unused for now so we will not implement it yet
func (*BlockBookClient) GetTransaction ¶
func (i *BlockBookClient) GetTransaction(txid string) (*model.Transaction, error)
func (*BlockBookClient) GetTransactions ¶
func (i *BlockBookClient) GetTransactions(addrs []btcutil.Address) ([]model.Transaction, error)
GetTransactions returns the transactions for a given address. If a single address query fails this method will not return an error. Instead it will log the error and returns the transactions for the other addresses.
func (*BlockBookClient) GetUtxos ¶
GetUtxos returns the utxos for a given address. If a single address query fails this method will not return an error. Instead it will log the error and returns the transactions for the other addresses.
func (*BlockBookClient) ListenAddresses ¶
func (i *BlockBookClient) ListenAddresses(addrs ...btcutil.Address)
func (*BlockBookClient) Start ¶
func (i *BlockBookClient) Start(closeChan chan<- error) error
func (*BlockBookClient) String ¶
func (i *BlockBookClient) String() string
func (*BlockBookClient) TransactionNotify ¶
func (i *BlockBookClient) TransactionNotify() <-chan model.Transaction
func (*BlockBookClient) TxChannel ¶
func (i *BlockBookClient) TxChannel() chan model.Transaction
Click to show internal directories.
Click to hide internal directories.