Documentation ¶
Index ¶
- Constants
- func HexToAddress(hexAddr string) (b58 string, err error)
- func Normalize(srcTx Tx) (*blockatlas.Tx, error)
- func NormalizeDelegations(data *AccountData, validators blockatlas.ValidatorMap) []blockatlas.Delegation
- func NormalizeToken(info AssetInfo) blockatlas.Token
- type Account
- type AccountData
- type Asset
- type AssetInfo
- type AssetV2
- type Block
- type BlockData
- type BlockRequest
- type Blocks
- type Client
- func (c *Client) CurrentBlockNumber() (int64, error)
- func (c *Client) GetAccount(address string) (accounts *Account, err error)
- func (c *Client) GetAccountVotes(address string) (account *AccountData, err error)
- func (c *Client) GetBlockByNumber(num int64) (Block, error)
- func (c *Client) GetTokenInfo(id string) (asset Asset, err error)
- func (c *Client) GetTxsOfAddress(address, token string) ([]Tx, error)
- func (c *Client) GetValidators() (validators Validators, err error)
- type Contract
- type ContractType
- type Frozen
- type Page
- type Platform
- func (p *Platform) Coin() coin.Coin
- func (p *Platform) CurrentBlockNumber() (int64, 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) GetTokenListByAddress(address string) (blockatlas.TokenPage, error)
- func (p *Platform) GetTokenTxsByAddress(address, token string) (blockatlas.TxPage, error)
- func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)
- func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error)
- func (p *Platform) Init() error
- func (p *Platform) NormalizeBlockChannel(srcTx Tx, txChan chan blockatlas.Tx)
- func (p *Platform) NormalizeBlockTxs(srcTxs []Tx) chan blockatlas.Tx
- func (p *Platform) UndelegatedBalance(address string) (string, error)
- type TransferValue
- type Tx
- type TxData
- type Validator
- type Validators
- type Votes
- type VotesRequest
Constants ¶
View Source
const Annual = 0.74
Variables ¶
This section is empty.
Functions ¶
func HexToAddress ¶
HexToAddress converts a hex representation of a Tron address into a Base58 string with a 4 byte checksum.
func Normalize ¶
func Normalize(srcTx Tx) (*blockatlas.Tx, error)
/ Normalize converts a Tron transaction into the generic model
func NormalizeDelegations ¶ added in v1.0.37
func NormalizeDelegations(data *AccountData, validators blockatlas.ValidatorMap) []blockatlas.Delegation
func NormalizeToken ¶ added in v1.0.37
func NormalizeToken(info AssetInfo) blockatlas.Token
Types ¶
type Account ¶ added in v1.0.37
type Account struct {
Data []AccountData `json:"data"`
}
type AccountData ¶ added in v1.0.37
type BlockRequest ¶ added in v1.0.37
type Client ¶
type Client struct {
blockatlas.Request
}
func (*Client) CurrentBlockNumber ¶ added in v1.0.37
func (*Client) GetAccount ¶ added in v1.0.37
func (*Client) GetAccountVotes ¶ added in v1.0.37
func (c *Client) GetAccountVotes(address string) (account *AccountData, err error)
func (*Client) GetBlockByNumber ¶ added in v1.0.37
func (*Client) GetTokenInfo ¶ added in v1.0.37
func (*Client) GetTxsOfAddress ¶
func (*Client) GetValidators ¶ added in v1.0.37
func (c *Client) GetValidators() (validators Validators, err error)
type Contract ¶
type Contract struct { Type ContractType `json:"type"` Parameter struct { Value TransferValue `json:"value"` } `json:"parameter"` }
type ContractType ¶ added in v1.0.37
type ContractType string
const ( TransferContract ContractType = "TransferContract" TransferAssetContract ContractType = "TransferAssetContract" CreateSmartContract ContractType = "CreateSmartContract" TriggerSmartContract ContractType = "TriggerSmartContract" )
type Frozen ¶ added in v1.0.37
type Frozen struct { ExpireTime int64 `json:"expire_time"` FrozenBalance interface{} `json:"frozen_balance,string"` }
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
func (*Platform) CurrentBlockNumber ¶ added in v1.0.37
func (*Platform) GetBlockByNumber ¶ added in v1.0.37
func (p *Platform) GetBlockByNumber(num int64) (*blockatlas.Block, error)
func (*Platform) GetDelegations ¶ added in v1.0.37
func (p *Platform) GetDelegations(address string) (blockatlas.DelegationsPage, error)
func (*Platform) GetDetails ¶ added in v1.0.37
func (p *Platform) GetDetails() blockatlas.StakingDetails
func (*Platform) GetTokenListByAddress ¶ added in v1.0.37
func (p *Platform) GetTokenListByAddress(address string) (blockatlas.TokenPage, error)
func (*Platform) GetTokenTxsByAddress ¶ added in v1.0.37
func (p *Platform) GetTokenTxsByAddress(address, token string) (blockatlas.TxPage, error)
func (*Platform) GetTxsByAddress ¶ added in v1.0.37
func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)
func (*Platform) GetValidators ¶ added in v1.0.37
func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error)
func (*Platform) NormalizeBlockChannel ¶ added in v1.0.37
func (p *Platform) NormalizeBlockChannel(srcTx Tx, txChan chan blockatlas.Tx)
func (*Platform) NormalizeBlockTxs ¶ added in v1.0.37
func (p *Platform) NormalizeBlockTxs(srcTxs []Tx) chan blockatlas.Tx
type TransferValue ¶
type TransferValue struct { Amount blockatlas.Amount `json:"amount"` OwnerAddress string `json:"owner_address"` ToAddress string `json:"to_address"` AssetName string `json:"asset_name,omitempty"` }
type Validators ¶ added in v1.0.37
type Validators struct {
Witnesses []Validator `json:"witnesses"`
}
type VotesRequest ¶ added in v1.0.37
Click to show internal directories.
Click to hide internal directories.