Documentation ¶
Index ¶
- func BuildBlockHeaderVerbose(header *wire.BlockHeader, params *chaincfg.Params, currentHeight int64, ...) *hcjson.GetBlockHeaderVerboseResult
- func ConnectNodeRPC(host, user, pass, cert string, disableTLS bool, ...) (*hcrpcclient.Client, semver.Semver, error)
- func DisableLog()
- func GetBlock(ind int64, client *hcrpcclient.Client) (*hcutil.Block, *chainhash.Hash, error)
- func GetBlockHeaderVerbose(client *hcrpcclient.Client, params *chaincfg.Params, idx int64) *hcjson.GetBlockHeaderVerboseResult
- func GetBlockVerbose(client *hcrpcclient.Client, params *chaincfg.Params, idx int64, verboseTx bool) *hcjson.GetBlockVerboseResult
- func GetBlockVerboseByHash(client *hcrpcclient.Client, params *chaincfg.Params, hash string, ...) *hcjson.GetBlockVerboseResult
- func GetMempoolInfo(client *hcrpcclient.Client) (size, bytes int64, err error)
- func GetStakeDiffEstimates(client *hcrpcclient.Client) *apitypes.StakeDiff
- func UseLogger(logger btclog.Logger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBlockHeaderVerbose ¶
func BuildBlockHeaderVerbose(header *wire.BlockHeader, params *chaincfg.Params, currentHeight int64, nextHash ...string) *hcjson.GetBlockHeaderVerboseResult
BuildBlockHeaderVerbose creates a *hcjson.GetBlockHeaderVerboseResult from an input *wire.BlockHeader and current best block height, which is used to compute confirmations. The next block hash may optionally be provided.
func ConnectNodeRPC ¶
func ConnectNodeRPC(host, user, pass, cert string, disableTLS bool, ntfnHandlers ...*hcrpcclient.NotificationHandlers) (*hcrpcclient.Client, semver.Semver, error)
ConnectNodeRPC attempts to create a new websocket connection to a hcd node, with the given credentials and optional notification handlers.
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
func GetBlockHeaderVerbose ¶
func GetBlockHeaderVerbose(client *hcrpcclient.Client, params *chaincfg.Params, idx int64) *hcjson.GetBlockHeaderVerboseResult
GetBlockHeaderVerbose creates a *hcjson.GetBlockHeaderVerboseResult for the block index specified by idx via an RPC connection to a chain server.
func GetBlockVerbose ¶
func GetBlockVerbose(client *hcrpcclient.Client, params *chaincfg.Params, idx int64, verboseTx bool) *hcjson.GetBlockVerboseResult
GetBlockVerbose creates a *hcjson.GetBlockVerboseResult for the block index specified by idx via an RPC connection to a chain server.
func GetBlockVerboseByHash ¶
func GetBlockVerboseByHash(client *hcrpcclient.Client, params *chaincfg.Params, hash string, verboseTx bool) *hcjson.GetBlockVerboseResult
GetBlockVerboseByHash creates a *hcjson.GetBlockVerboseResult for the specified block hash via an RPC connection to a chain server.
func GetMempoolInfo ¶
func GetMempoolInfo(client *hcrpcclient.Client) (size, bytes int64, err error)
GetMempoolInfo get memory pool info
func GetStakeDiffEstimates ¶
func GetStakeDiffEstimates(client *hcrpcclient.Client) *apitypes.StakeDiff
GetStakeDiffEstimates combines the results of EstimateStakeDiff and GetStakeDifficulty into a *apitypes.StakeDiff.
Types ¶
This section is empty.