Documentation ¶
Index ¶
- Constants
- func GetNormalizationError(err error) error
- func NormalizeDelegations(delegations []Delegation, validators blockatlas.ValidatorMap) []blockatlas.Delegation
- func NormalizeTx(trx *Transaction) (tx blockatlas.Tx, b bool, err error)
- func NormalizeTxs(txs []Transaction) blockatlas.TxPage
- type BlockInfo
- type Client
- func (c *Client) CurrentBlockNumber() (int64, error)
- func (c *Client) GetBalance(address string) (string, error)
- func (c *Client) GetBlockByNumber(num int64) (info BlockInfo, err error)
- func (c *Client) GetDelegations(address string) (delegations Delegations, err error)
- func (c *Client) GetTxsOfAddress(address string) (txPage *TxResult, err error)
- func (c *Client) GetValidators() (validators Validators, err error)
- type Delegation
- type Delegations
- type LifetimeInfo
- type Platform
- func (p *Platform) Coin() coin.Coin
- func (p *Platform) CurrentBlockNumber() (int64, error)
- func (p *Platform) GetActiveValidators() (blockatlas.StakeValidators, error)
- func (p *Platform) GetBlockByNumber(num int64) (*blockatlas.Block, error)
- func (p *Platform) GetDelegations(address string) (blockatlas.DelegationsPage, error)
- func (p *Platform) GetDetails() blockatlas.StakingDetails
- func (p *Platform) GetMaxAPR() float64
- func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)
- func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error)
- func (p *Platform) NormalizeBlock(block *BlockInfo) blockatlas.Block
- func (p *Platform) UndelegatedBalance(address string) (string, error)
- type Transaction
- type TxResponse
- type TxResult
- type Validator
- type ValidatorInfo
- type Validators
Constants ¶
View Source
const Annual = 10
Variables ¶
This section is empty.
Functions ¶
func GetNormalizationError ¶
func NormalizeDelegations ¶ added in v1.1.4
func NormalizeDelegations(delegations []Delegation, validators blockatlas.ValidatorMap) []blockatlas.Delegation
func NormalizeTx ¶
func NormalizeTx(trx *Transaction) (tx blockatlas.Tx, b bool, err error)
func NormalizeTxs ¶
func NormalizeTxs(txs []Transaction) blockatlas.TxPage
Types ¶
type BlockInfo ¶
type BlockInfo struct { Hash string `json:"hash"` Number string `json:"number"` Transactions []Transaction `json:"transactions"` }
type Client ¶
type Client struct {
blockatlas.Request
}
func (*Client) CurrentBlockNumber ¶
func (*Client) GetBalance ¶ added in v1.1.4
func (*Client) GetBlockByNumber ¶
func (*Client) GetDelegations ¶ added in v1.1.4
func (c *Client) GetDelegations(address string) (delegations Delegations, err error)
func (*Client) GetTxsOfAddress ¶
func (*Client) GetValidators ¶ added in v1.1.4
func (c *Client) GetValidators() (validators Validators, err error)
type Delegation ¶ added in v1.1.4
type Delegations ¶ added in v1.1.4
type Delegations struct {
List []Delegation `json:"result"`
}
type LifetimeInfo ¶ added in v1.1.4
type LifetimeInfo struct {
Apr string `json:"apr"`
}
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
func (*Platform) CurrentBlockNumber ¶
func (*Platform) GetActiveValidators ¶ added in v1.1.4
func (p *Platform) GetActiveValidators() (blockatlas.StakeValidators, error)
func (*Platform) GetBlockByNumber ¶
func (p *Platform) GetBlockByNumber(num int64) (*blockatlas.Block, error)
func (*Platform) GetDelegations ¶ added in v1.1.4
func (p *Platform) GetDelegations(address string) (blockatlas.DelegationsPage, error)
func (*Platform) GetDetails ¶ added in v1.1.4
func (p *Platform) GetDetails() blockatlas.StakingDetails
func (*Platform) GetTxsByAddress ¶
func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)
func (*Platform) GetValidators ¶ added in v1.1.4
func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error)
func (*Platform) NormalizeBlock ¶
func (p *Platform) NormalizeBlock(block *BlockInfo) blockatlas.Block
type Transaction ¶
type Transaction struct { BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` From string `json:"from"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` Hash string `json:"hash"` Nonce string `json:"nonce"` To string `json:"to"` Value string `json:"value"` Timestamp string `json:"timestamp"` }
type TxResponse ¶
type TxResponse struct {
Result TxResult `json:"result"`
}
type TxResult ¶
type TxResult struct {
Transactions []Transaction `json:"transactions"`
}
type Validator ¶ added in v1.1.4
type Validator struct { Info ValidatorInfo `json:"validator"` Active bool `json:"currently-in-committee"` Lifetime LifetimeInfo `json:"lifetime"` }
type ValidatorInfo ¶ added in v1.1.4
type ValidatorInfo struct {
Address string `json:"address"`
}
type Validators ¶ added in v1.1.4
type Validators struct {
Validators []Validator `json:"result"`
}
Click to show internal directories.
Click to hide internal directories.