Documentation ¶
Index ¶
- Constants
- func NormalizeDelegation(account Account, validators blockatlas.ValidatorMap) (blockatlas.DelegationsPage, error)
- func NormalizeTx(srcTx Transaction, address string) (blockatlas.Tx, bool)
- func NormalizeTxs(srcTxs []Transaction, address string) (txs []blockatlas.Tx)
- type Account
- type Client
- type Error
- type ExplorerAccount
- type PeriodType
- 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) GetTxsByAddress(address string) (blockatlas.TxPage, error)
- func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error)
- func (p *Platform) UndelegatedBalance(address string) (string, error)
- type RpcClient
- type Status
- type Transaction
- func (t *Transaction) BlockTimestamp() int64
- func (t *Transaction) Direction(address string) blockatlas.Direction
- func (t *Transaction) ErrorMsg() string
- func (t *Transaction) GetReceiver() string
- func (t *Transaction) Status() blockatlas.Status
- func (t *Transaction) Title(address string) (blockatlas.KeyTitle, bool)
- func (t *Transaction) TransferType() (blockatlas.TransactionType, bool)
- type Validator
Constants ¶
View Source
const ( TxTypeTransaction string = "transaction" TxTypeDelegation string = "delegation" TxStatusApplied string = "applied" )
View Source
const ( Annual = 6.09 LockTime = 0 MinimumStakeAmount = "0" )
Variables ¶
This section is empty.
Functions ¶
func NormalizeDelegation ¶ added in v1.0.37
func NormalizeDelegation(account Account, validators blockatlas.ValidatorMap) (blockatlas.DelegationsPage, error)
func NormalizeTx ¶ added in v1.0.37
func NormalizeTx(srcTx Transaction, address string) (blockatlas.Tx, bool)
NormalizeTx converts a Tezos transaction into the generic model
func NormalizeTxs ¶ added in v1.0.37
func NormalizeTxs(srcTxs []Transaction, address string) (txs []blockatlas.Tx)
Types ¶
type Client ¶ added in v1.0.0
type Client struct {
blockatlas.Request
}
func (*Client) GetBlockByNumber ¶ added in v1.0.37
func (c *Client) GetBlockByNumber(num int64, txType []string) ([]Transaction, error)
func (*Client) GetCurrentBlock ¶ added in v1.0.37
Get last indexed block by explorer
func (*Client) GetTxsOfAddress ¶ added in v1.0.0
func (c *Client) GetTxsOfAddress(address string, txType []string) (txs ExplorerAccount, err error)
type ExplorerAccount ¶ added in v1.1.0
type ExplorerAccount struct {
Transactions []Transaction `json:"ops"`
}
type PeriodType ¶ added in v1.1.0
type PeriodType string
const (
TestingPeriodType PeriodType = "testing"
)
type Platform ¶ added in v1.0.0
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) GetTxsByAddress ¶ added in v1.0.0
func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)
func (*Platform) GetValidators ¶ added in v1.0.37
func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error)
type RpcClient ¶ added in v1.0.37
type RpcClient struct {
blockatlas.Request
}
func (*RpcClient) GetAccount ¶ added in v1.0.37
func (*RpcClient) GetPeriodType ¶ added in v1.1.0
func (c *RpcClient) GetPeriodType() (periodType PeriodType, err error)
type Transaction ¶ added in v1.0.37
type Transaction struct { Delegate string `json:"delegate"` // Current delegate (may be self when registered as delegate). Errors []Error `json:"errors"` // Operation status applied, failed, backtracked, skipped. Fee float64 `json:"fee"` // Total fee paid (and frozen) by all operations. Hash string `json:"hash"` // Operation hash. Height uint64 `json:"height"` IsSuccess bool `json:"is_success"` // Flag indicating operation was successfully applied. Receiver string `json:"receiver"` Sender string `json:"sender"` Stat string `json:"status"` // Operation status applied, failed, backtracked, skipped. Time string `json:"time"` // Block time at which the operation was included on-chain e.g: 2019-09-28T13:10:51Z Type string `json:"type"` // Operation type, one of activate_account, double_baking_evidence, double_endorsement_evidence, seed_nonce_revelation, transaction, origination, delegation, reveal, endorsement, proposals, ballot. Volume float64 `json:"volume"` }
func (*Transaction) BlockTimestamp ¶ added in v1.1.0
func (t *Transaction) BlockTimestamp() int64
func (*Transaction) Direction ¶ added in v1.1.0
func (t *Transaction) Direction(address string) blockatlas.Direction
func (*Transaction) ErrorMsg ¶ added in v1.1.0
func (t *Transaction) ErrorMsg() string
func (*Transaction) GetReceiver ¶ added in v1.1.0
func (t *Transaction) GetReceiver() string
func (*Transaction) Status ¶ added in v1.0.37
func (t *Transaction) Status() blockatlas.Status
func (*Transaction) Title ¶ added in v1.1.0
func (t *Transaction) Title(address string) (blockatlas.KeyTitle, bool)
func (*Transaction) TransferType ¶ added in v1.1.0
func (t *Transaction) TransferType() (blockatlas.TransactionType, bool)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.