iotex

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: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(trx *ActionInfo) *types.Tx

Normalize converts an Iotex transaction into the generic model

Types

type AccountInfo

type AccountInfo struct {
	AccountMeta *AccountMeta `json:"accountMeta"`
}

type AccountMeta

type AccountMeta struct {
	Address      string `json:"address"`
	Balance      string `json:"balance"`
	Nonce        string `json:"nonce"`
	PendingNonce string `json:"pendingNonce"`
	NumActions   string `json:"numActions"`
}

type Action

type Action struct {
	Core *ActionCore `json:"core"`
}

type ActionCore

type ActionCore struct {
	Nonce    string    `json:"nonce"`
	Transfer *Transfer `json:"transfer"`
}

type ActionInfo

type ActionInfo struct {
	Action    *Action `json:"action"`
	ActHash   string  `json:"actHash"`
	BlkHeight string  `json:"blkHeight"`
	Sender    string  `json:"sender"`
	GasFee    string  `json:"gasFee"`
	Timestamp string  `json:"timestamp"`
}

type ChainMeta added in v1.0.37

type ChainMeta struct {
	Height string `json:"height"`
}

type Client

type Client struct {
	client.Request
}

func (*Client) GetAccount added in v1.0.37

func (c *Client) GetAccount(address string) (*AccountInfo, error)

func (*Client) GetAddressTotalTransactions

func (c *Client) GetAddressTotalTransactions(address string) (int64, error)

func (*Client) GetDelegations added in v1.0.37

func (c *Client) GetDelegations(address string) (blockatlas.DelegationsPage, error)

func (*Client) GetLatestBlock added in v1.0.37

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

func (*Client) GetTxsInBlock added in v1.0.37

func (c *Client) GetTxsInBlock(number int64) ([]*ActionInfo, error)

func (*Client) GetTxsOfAddress

func (c *Client) GetTxsOfAddress(address string, start int64) (*Response, error)

func (*Client) GetValidators added in v1.0.37

func (c *Client) GetValidators() (blockatlas.ValidatorPage, error)

type Platform

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

func Init added in v1.1.0

func Init(api string) *Platform

func (*Platform) Coin

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

func (*Platform) CurrentBlockNumber added in v1.0.37

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

func (*Platform) GetActiveValidators added in v1.1.4

func (p *Platform) GetActiveValidators() (blockatlas.StakeValidators, error)

func (*Platform) GetBlockByNumber added in v1.0.37

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

func (*Platform) GetDelegations added in v1.0.37

func (p *Platform) GetDelegations(address string) (blockatlas.DelegationsPage, error)

func (*Platform) GetDetails added in v1.0.37

func (p *Platform) GetDetails() blockatlas.StakingDetails

func (*Platform) GetTxsByAddress

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

func (*Platform) GetValidators added in v1.0.37

func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error)

func (*Platform) UndelegatedBalance added in v1.0.37

func (p *Platform) UndelegatedBalance(address string) (string, error)

type Response

type Response struct {
	ActionInfo []*ActionInfo `json:"actionInfo"`
}

type Transfer

type Transfer struct {
	Amount    types.Amount `json:"amount"`
	Recipient string       `json:"recipient"`
}

Jump to

Keyboard shortcuts

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