client

package
v0.0.0-...-32c8a8c Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// https://github.com/blockstream/esplora/blob/master/API.md
	ClientURL = "https://blockstream.info"
)

Variables

This section is empty.

Functions

func RequestGet

func RequestGet[T any](client *Client, endpoint string) (T, error)

func RequestPost

func RequestPost[T any](client *Client, endpoint string, payload interface{}) (T, error)

Types

type Client

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

func NewClient

func NewClient(net types.Network) *Client

func (*Client) BestBlockHash

func (c *Client) BestBlockHash() (string, error)

func (*Client) BestBlockHeight

func (c *Client) BestBlockHeight() (uint64, error)

func (*Client) BroadcastTx

func (c *Client) BroadcastTx(rawTx string) (string, error)

func (*Client) Close

func (t *Client) Close()

func (*Client) FeeEstimate

func (c *Client) FeeEstimate() (types.FeeEstimate, error)

func (*Client) GetBlock

func (c *Client) GetBlock(hash string) (*types.Block, error)

func (*Client) GetBlockTx

func (c *Client) GetBlockTx(hash string, offset int) ([]*types.Transaction, error)

func (*Client) GetRawTx

func (c *Client) GetRawTx(txid string) (string, error)

func (*Client) GetTx

func (c *Client) GetTx(txid string) (*types.Transaction, error)

func (*Client) GetUTXO

func (c *Client) GetUTXO(address string) ([]*types.Utxo, error)

Jump to

Keyboard shortcuts

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