Documentation ¶
Index ¶
- func NormalizeTx(srcTx Transaction, address string, block Block) (tx types.Tx, ok bool)
- func NormalizeTxs(srcTxs []Transaction, address string, block Block) (txs types.Txs)
- 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 ¶
NormalizeTx converts an Elrond transaction into the generic model
func NormalizeTxs ¶
func NormalizeTxs(srcTxs []Transaction, address string, block Block) (txs types.Txs)
NormalizeTx converts an slice of Elrond transaction info a slice of generic model transaction
Types ¶
type Block ¶
type Block struct { Nonce uint64 `json:"nonce"` Round uint64 `json:"round"` Hash string `json:"hash"` Transactions []Transaction `json:"transactions"` }
type BlockResponse ¶
type BlockResponse struct {
Block Block `json:"hyperblock"`
}
type GenericResponse ¶
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 ¶
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"` GasPrice uint64 `json:"gasPrice,omitempty"` GasLimit uint64 `json:"gasLimit,omitempty"` }
func (*Transaction) HasNegativeValue ¶
func (tx *Transaction) HasNegativeValue() bool
func (*Transaction) TxFee ¶
func (tx *Transaction) TxFee() types.Amount
func (*Transaction) TxStatus ¶
func (tx *Transaction) TxStatus() types.Status
func (*Transaction) TxTimestamp ¶
func (tx *Transaction) TxTimestamp(blockRound uint64) time.Duration
type TransactionsPage ¶
type TransactionsPage struct {
Transactions []Transaction `json:"transactions"`
}
Click to show internal directories.
Click to hide internal directories.