Documentation ¶
Index ¶
- func AppendTxs(in []blockatlas.Tx, srcTx *Doc, coinIndex uint) (out []blockatlas.Tx)
- func GetTokenTypeByIndex(coinIndex uint) blockatlas.TokenType
- func NormalizeToken(srcToken *Contract, coinIndex uint) blockatlas.Token
- func NormalizeTokens(srcTokens []Contract, coinIndex uint) []blockatlas.Token
- type Client
- func (c *Client) GetBlock(num int64) (page []Doc, err error)
- func (c *Client) GetBlockByNumber(num int64, coinIndex uint) (*blockatlas.Block, error)
- func (c *Client) GetCurrentBlockNumber() (int64, error)
- func (c *Client) GetTokenList(address string, coinIndex uint) (blockatlas.TokenPage, error)
- func (c *Client) GetTokenTxs(address, token string, coinIndex uint) (blockatlas.TxPage, error)
- func (c *Client) GetTokens(address string) (tp *TokenPage, err error)
- func (c *Client) GetTransactions(address string, coinIndex uint) (blockatlas.TxPage, error)
- func (c *Client) GetTxs(address string) (*Page, error)
- func (c *Client) GetTxsWithContract(address, contract string) (*Page, error)
- type Contract
- type Doc
- type NodeInfo
- type Op
- type Page
- type TokenPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendTxs ¶
func AppendTxs(in []blockatlas.Tx, srcTx *Doc, coinIndex uint) (out []blockatlas.Tx)
func GetTokenTypeByIndex ¶
func GetTokenTypeByIndex(coinIndex uint) blockatlas.TokenType
func NormalizeToken ¶
func NormalizeToken(srcToken *Contract, coinIndex uint) blockatlas.Token
NormalizeToken converts a Ethereum token into the generic model
func NormalizeTokens ¶
func NormalizeTokens(srcTokens []Contract, coinIndex uint) []blockatlas.Token
NormalizeTxs converts multiple Ethereum tokens
Types ¶
type Client ¶
type Client struct {
blockatlas.Request
}
func (*Client) GetBlockByNumber ¶
func (*Client) GetCurrentBlockNumber ¶
func (*Client) GetTokenList ¶
func (*Client) GetTokenTxs ¶
func (*Client) GetTransactions ¶
type Doc ¶
type Doc struct { Ops []Op `json:"operations"` Contract string `json:"contract"` ID string `json:"id"` BlockNumber uint64 `json:"blockNumber"` Timestamp int64 `json:"time"` Nonce uint64 `json:"nonce"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` GasUsed string `json:"gasUsed"` Input string `json:"input"` Error string `json:"error"` Coin uint `json:"coin"` }
type Op ¶
type Op struct { TxID string `json:"transactionId"` Contract *Contract `json:"contract"` From string `json:"from"` To string `json:"to"` Type blockatlas.TransactionType `json:"type"` Value string `json:"value"` Coin uint `json:"coin"` }
Click to show internal directories.
Click to hide internal directories.