Documentation ¶
Index ¶
- func NormalizeTx(srcTx Transaction, address string) (tx blockatlas.Tx, ok bool)
- func NormalizeTxs(srcTxs []Transaction, address string) (txs []blockatlas.Tx)
- type Block
- type BlockResponse
- type Client
- type GenericResponse
- type NetworkStatus
- type Platform
- type StatusDetails
- type Transaction
- type TransactionsPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeTx ¶
func NormalizeTx(srcTx Transaction, address string) (tx blockatlas.Tx, ok bool)
NormalizeTx converts an Elrond transaction into the generic model
func NormalizeTxs ¶
func NormalizeTxs(srcTxs []Transaction, address string) (txs []blockatlas.Tx)
NormalizeTx converts an slice of Elrond transaction info a slice of generic model transaction
Types ¶
type Block ¶
type Block struct { Nonce uint64 `json:"nonce"` Hash string `json:"hash"` Transactions []Transaction `json:"transactions"` }
type BlockResponse ¶
type BlockResponse struct {
Block Block `json:"block"`
}
type Client ¶
type Client struct {
blockatlas.Request
}
func (*Client) CurrentBlockNumber ¶
func (*Client) GetBlockByNumber ¶
func (c *Client) GetBlockByNumber(height int64) (*blockatlas.Block, error)
func (*Client) GetTxsOfAddress ¶
func (c *Client) GetTxsOfAddress(address string) (blockatlas.TxPage, error)
type GenericResponse ¶ added in v1.1.6
type GenericResponse struct { Data json.RawMessage `json:"data"` Code string `json:"code"` Error string `json:"error"` }
type NetworkStatus ¶
type NetworkStatus struct {
Status StatusDetails `json:"status"`
}
type Platform ¶
type Platform struct { CoinIndex uint // contains filtered or unexported fields }
func (*Platform) CurrentBlockNumber ¶
func (*Platform) GetBlockByNumber ¶
func (p *Platform) GetBlockByNumber(num int64) (*blockatlas.Block, error)
func (*Platform) GetTxsByAddress ¶
func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)
type StatusDetails ¶
type Transaction ¶
type Transaction struct { Hash string `json:"hash"` Nonce uint64 `json:"nonce"` Value string `json:"value"` Receiver string `json:"receiver"` Sender string `json:"sender"` Data string `json:"data"` Timestamp time.Duration `json:"timestamp"` Status string `json:"status"` Fee string `json:"fee"` }
func (*Transaction) Direction ¶
func (tx *Transaction) Direction(address string) blockatlas.Direction
func (*Transaction) TxStatus ¶
func (tx *Transaction) TxStatus() blockatlas.Status
type TransactionsPage ¶
type TransactionsPage struct {
Transactions []Transaction `json:"transactions"`
}
Click to show internal directories.
Click to hide internal directories.