rpc

package
v0.0.0-...-1929ff6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlockHeightByHash

func GetBlockHeightByHash(
	rpcClient interfaces.BTCRPCClient,
	hash string,
) (int64, error)

GetBlockHeightByHash gets the block height by block hash

func GetRawTxByHash

func GetRawTxByHash(rpcClient interfaces.BTCRPCClient, txID string) (*btcutil.Tx, error)

GetTXRawResultByHash gets the raw transaction by hash

func GetRawTxResult

func GetRawTxResult(
	rpcClient interfaces.BTCRPCClient,
	hash *chainhash.Hash,
	res *btcjson.GetTransactionResult,
) (btcjson.TxRawResult, error)

GetRawTxResult gets the raw tx result

func GetTransactionFeeAndRate

func GetTransactionFeeAndRate(rpcClient interfaces.BTCRPCClient, rawResult *btcjson.TxRawResult) (int64, int64, error)

GetTransactionFeeAndRate gets the transaction fee and rate for a given tx result

func GetTxResultByHash

func GetTxResultByHash(
	rpcClient interfaces.BTCRPCClient,
	txID string,
) (*chainhash.Hash, *btcjson.GetTransactionResult, error)

GetTxResultByHash gets the transaction result by hash

func NewRPCClient

func NewRPCClient(btcConfig config.BTCConfig) (*rpcclient.Client, error)

NewRPCClient creates a new RPC client by the given config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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