aion

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeTx added in v1.0.0

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

NormalizeTx converts an Aion transaction into the generic model

func NormalizeTxs added in v1.0.0

func NormalizeTxs(srcTxs []Tx) []types.Tx

NormalizeTxs converts multiple Aion transactions

Types

type Client added in v1.0.0

type Client struct {
	client.Request
}

func (*Client) GetTxsOfAddress added in v1.0.0

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

type Platform added in v1.0.0

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

func Init added in v1.1.0

func Init(api string) *Platform

func (*Platform) Coin added in v1.0.0

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

func (*Platform) GetTxsByAddress added in v1.0.0

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

type Tx added in v1.0.0

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 added in v1.0.0

type TxPage struct {
	Content []Tx
}

Jump to

Keyboard shortcuts

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