aion

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeTx

func NormalizeTx(srcTx *Tx) (tx types.Tx, ok bool)

NormalizeTx converts an Aion transaction into the generic model

func NormalizeTxs

func NormalizeTxs(srcTxs []Tx) types.Txs

NormalizeTxs converts multiple Aion transactions

Types

type Client

type Client struct {
	client.Request
}

func (*Client) GetTxsOfAddress

func (c *Client) GetTxsOfAddress(address string, num int) (txPage *TxPage, err error)

type Platform

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

func Init

func Init(api string) *Platform

func (*Platform) Coin

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

func (*Platform) GetTxsByAddress

func (p *Platform) GetTxsByAddress(address string) (types.Txs, error)

type Tx

type Tx struct {
	BlockHash            string      `json:"blockHash"`
	ToAddr               string      `json:"toAddr"`
	ContractAddr         string      `json:"contractAddr"`
	TransactionHash      string      `json:"transactionHash"`
	TransactionTimestamp int64       `json:"transactionTimestamp"`
	NrgConsumed          int         `json:"nrgConsumed"`
	BlockNumber          uint64      `json:"blockNumber"`
	BlockTimestamp       int64       `json:"blockTimestamp"`
	FromAddr             string      `json:"fromAddr"`
	Value                json.Number `json:"value"`
}

type TxPage

type TxPage struct {
	Content []Tx
}

Jump to

Keyboard shortcuts

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