harmony

package
v1.0.37 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNormalizationError

func GetNormalizationError(err error) error

func NormalizeTx

func NormalizeTx(trx *Transaction) (tx blockatlas.Tx, b bool, err error)

func NormalizeTxs

func NormalizeTxs(txs []Transaction) blockatlas.TxPage

Types

type BlockInfo

type BlockInfo struct {
	Hash         string        `json:"hash"`
	Number       string        `json:"number"`
	Transactions []Transaction `json:"transactions"`
}

type Client

type Client struct {
	blockatlas.Request
}

func (*Client) CurrentBlockNumber

func (c *Client) CurrentBlockNumber() (int64, error)

func (*Client) GetBlockByNumber

func (c *Client) GetBlockByNumber(num int64) (info BlockInfo, err error)

func (*Client) GetTxsOfAddress

func (c *Client) GetTxsOfAddress(address string) (txPage *TxResult, err error)

type Platform

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

func (*Platform) Coin

func (p *Platform) Coin() coin.Coin

func (*Platform) CurrentBlockNumber

func (p *Platform) CurrentBlockNumber() (int64, error)

func (*Platform) GetBlockByNumber

func (p *Platform) GetBlockByNumber(num int64) (*blockatlas.Block, error)

func (*Platform) GetTxsByAddress

func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)

func (*Platform) Init

func (p *Platform) Init() error

func (*Platform) NormalizeBlock

func (p *Platform) NormalizeBlock(block *BlockInfo) blockatlas.Block

type Transaction

type Transaction struct {
	BlockHash   string `json:"blockHash"`
	BlockNumber string `json:"blockNumber"`
	From        string `json:"from"`
	Gas         string `json:"gas"`
	GasPrice    string `json:"gasPrice"`
	Hash        string `json:"hash"`
	Nonce       string `json:"nonce"`
	To          string `json:"to"`
	Value       string `json:"value"`
	Timestamp   string `json:"timestamp"`
}

type TxResponse

type TxResponse struct {
	Result TxResult `json:"result"`
}

type TxResult

type TxResult struct {
	Transactions []Transaction `json:"transactions"`
}

Jump to

Keyboard shortcuts

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