blockbook

package
v0.0.0-...-250b327 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

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) Broadcast

func (i *BlockBookClient) Broadcast(tx []byte) (string, error)

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 (i *BlockBookClient) GetBlocksBefore(to time.Time, limit int) (*model.BlockList, error)

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

func (i *BlockBookClient) GetUtxos(addrs []btcutil.Address) ([]model.Utxo, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL