iotex

package
v1.1.16-0...-5f6d184 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 10 Imported by: 0

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

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

type Client

type Client struct {
	client.Request
}

func (*Client) GetAccount

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

func (*Client) GetAddressTotalTransactions

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

func (*Client) GetDelegations

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

func (*Client) GetLatestBlock

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

func (*Client) GetTxsInBlock

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

func (*Client) GetTxsOfAddress

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

func (*Client) GetValidators

func (c *Client) GetValidators() (blockatlas.ValidatorPage, 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) CurrentBlockNumber

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

func (*Platform) GetActiveValidators

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

func (*Platform) GetBlockByNumber

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

func (*Platform) GetDelegations

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

func (*Platform) GetDetails

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

func (*Platform) GetTxsByAddress

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

func (*Platform) GetValidators

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

func (*Platform) UndelegatedBalance

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