chain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(bitcoindrpcClient *bitcoindrpc.Client, mempoolapisClient *mempoolapis.Client) *Client

func (*Client) EstimateFeeRate

func (c *Client) EstimateFeeRate(ctx context.Context, targetBlocks int) (float64, float64, error)

func (*Client) GetBestBlockHash added in v0.1.0

func (c *Client) GetBestBlockHash(ctx context.Context) (string, error)

获取最新区块的hash

func (*Client) GetBlock added in v0.1.0

func (c *Client) GetBlock(ctx context.Context, hash string) (*types.ChainBlock, error)

使用区块block hash 查询区块

func (*Client) GetBlockCount added in v0.1.0

func (c *Client) GetBlockCount(ctx context.Context) (int, error)

获取节点区块数量

func (*Client) GetBlockHash added in v0.1.0

func (c *Client) GetBlockHash(ctx context.Context, height int64) (string, error)

使用区块高度 查询区块哈希

func (*Client) GetBlockHeader added in v0.1.0

func (c *Client) GetBlockHeader(ctx context.Context, hash string) (*types.ChainBlock, error)

使用区块block hash 查询区块头

func (*Client) GetUTXO added in v0.1.0

func (c *Client) GetUTXO(ctx context.Context, hash [32]byte, index uint32) ([]byte, int64, error)

查询 UTXO

Jump to

Keyboard shortcuts

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