blockchair

package
v0.0.0-...-cc9b5da Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0, MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockchairClient

type BlockchairClient struct {
	Asset    xc.ITask
	Chaincfg *chaincfg.Params
	Url      string
	ApiKey   string
	// contains filtered or unexported fields
}

Client for Bitcoin

func NewBlockchairClient

func NewBlockchairClient(cfgI xc.ITask) (*BlockchairClient, error)

NewClient returns a new Bitcoin Client

func (*BlockchairClient) EstimateGas

func (client *BlockchairClient) EstimateGas(ctx context.Context) (xc.AmountBlockchain, error)

func (*BlockchairClient) EstimateGasFee

func (client *BlockchairClient) EstimateGasFee(ctx context.Context, numBlocks int64) (float64, error)

func (*BlockchairClient) FetchBalance

func (client *BlockchairClient) FetchBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, error)

func (*BlockchairClient) FetchDecimals

func (client *BlockchairClient) FetchDecimals(ctx context.Context, contract xc.ContractAddress) (int, error)

func (*BlockchairClient) FetchLegacyTxInfo

func (client *BlockchairClient) FetchLegacyTxInfo(ctx context.Context, txHash xc.TxHash) (xc.LegacyTxInfo, error)

func (*BlockchairClient) FetchLegacyTxInput

func (client *BlockchairClient) FetchLegacyTxInput(ctx context.Context, from xc.Address, to xc.Address) (xc.TxInput, error)

func (*BlockchairClient) FetchNativeBalance

func (client *BlockchairClient) FetchNativeBalance(ctx context.Context, address xc.Address) (xc.AmountBlockchain, error)

func (*BlockchairClient) FetchTransferInput

func (client *BlockchairClient) FetchTransferInput(ctx context.Context, args xcbuilder.TransferArgs) (xc.TxInput, error)

func (*BlockchairClient) FetchTxInfo

func (client *BlockchairClient) FetchTxInfo(ctx context.Context, txHashStr xc.TxHash) (xclient.TxInfo, error)

func (*BlockchairClient) LatestBlock

func (client *BlockchairClient) LatestBlock(ctx context.Context) (uint64, error)

func (*BlockchairClient) SubmitTx

func (client *BlockchairClient) SubmitTx(ctx context.Context, tx xc.Tx) error

func (*BlockchairClient) UnspentOutputs

func (client *BlockchairClient) UnspentOutputs(ctx context.Context, addr xc.Address) ([]tx_input.Output, error)

func (*BlockchairClient) WithAddressDecoder

func (txBuilder *BlockchairClient) WithAddressDecoder(decoder address.AddressDecoder) address.WithAddressDecoder

type BlockchairContext

type BlockchairContext struct {
	Code  int32  `json:"code"` // 200 = ok
	Error string `json:"error,omitempty"`
	State int64  `json:"state"` // to count confirmations
}

Jump to

Keyboard shortcuts

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