Documentation ¶
Index ¶
- Constants
- func Normalize(srcTx *Tx, assetName AssetType) (tx types.Tx, ok bool)
- type AssetType
- type Balance
- type Balances
- type BalancesResult
- type BaseResponse
- type Block
- type BlockRecords
- type BlockResult
- type BlockResults
- type Client
- func (c *Client) CurrentBlockNumber() (blocks BlockResult, err error)
- func (c *Client) GetBalances(address string) (balances BalancesResult, err error)
- func (c *Client) GetBlockByNumber(num int64) (block BlockResults, err error)
- func (c *Client) GetTxDetailsByHash(hash string) (Tx, error)
- func (c *Client) GetTxsOfAddress(address string) (txPage TxsResult, err error)
- type Detail
- type MsgType
- 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) (*types.Block, error)
- func (p *Platform) GetDelegations(address string) (blockatlas.DelegationsPage, error)
- func (p *Platform) GetDetails() blockatlas.StakingDetails
- func (p *Platform) GetTokenTxsByAddress(address string, token string) (types.Txs, error)
- func (p *Platform) GetTxsByAddress(address string) (types.Txs, error)
- func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error)
- func (p *Platform) UndelegatedBalance(address string) (string, error)
- type Transfer
- type Transfers
- type Tx
- type TxResult
- type TxsResult
Constants ¶
View Source
const ( GovernanceContract = "AFmseVrdL9f9oyCzZefL9tG6UbviEH9ugK" ONGDecimals = 9 MsgSuccess MsgType = "SUCCESS" AssetONT AssetType = "ont" AssetONG AssetType = "ong" AssetAll AssetType = "all" )
View Source
const (
// The current value comes from https://cryptoslate.com/coins/ontology
Annual = 4.45
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BalancesResult ¶
type BalancesResult struct { BaseResponse Result Balances `json:"result"` }
type BaseResponse ¶
type BlockRecords ¶
type BlockResult ¶
type BlockResult struct { BaseResponse Result BlockRecords `json:"result"` }
type BlockResults ¶
type BlockResults struct { BaseResponse Result Block `json:"result"` }
type Client ¶
func (*Client) CurrentBlockNumber ¶
func (c *Client) CurrentBlockNumber() (blocks BlockResult, err error)
func (*Client) GetBalances ¶
func (c *Client) GetBalances(address string) (balances BalancesResult, err error)
func (*Client) GetBlockByNumber ¶
func (c *Client) GetBlockByNumber(num int64) (block BlockResults, err error)
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
func (*Platform) CurrentBlockNumber ¶
func (*Platform) GetActiveValidators ¶
func (p *Platform) GetActiveValidators() (blockatlas.StakeValidators, error)
func (*Platform) GetBlockByNumber ¶
func (*Platform) GetDelegations ¶
func (p *Platform) GetDelegations(address string) (blockatlas.DelegationsPage, error)
func (*Platform) GetDetails ¶
func (p *Platform) GetDetails() blockatlas.StakingDetails
func (*Platform) GetTokenTxsByAddress ¶
func (*Platform) GetTxsByAddress ¶
func (*Platform) GetValidators ¶
func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error)
type Tx ¶
type Tx struct { Hash string `json:"tx_hash"` ConfirmFlag uint64 `json:"confirm_flag"` Time int64 `json:"tx_time"` Height uint64 `json:"block_height"` Fee string `json:"fee"` BlockIndex uint64 `json:"block_index"` EventType uint64 `json:"event_type,omitempty"` Description string `json:"description,omitempty"` Details Detail `json:"detail,omitempty"` Transfers Transfers `json:"transfers,omitempty"` }
type TxResult ¶
type TxResult struct { BaseResponse Result Tx `json:"result"` }
type TxsResult ¶
type TxsResult struct { BaseResponse Result []Tx `json:"result"` }
Click to show internal directories.
Click to hide internal directories.