Documentation ¶
Index ¶
- func GetDirection(address, from, to string) types.Direction
- func NormalizePage(srcPage TransactionsList, address, token string, coinIndex uint) (txs types.Txs)
- func NormalizeToken(srcToken *Token, coinIndex uint) types.Token
- func NormalizeTokens(tokens []Token, coinIndex uint) []types.Token
- type Blockbook
- type Client
- func (c *Client) GetAddressesFromXpub(xpub string) (tokens []Token, err error)
- func (c *Client) GetAllTransactionsByBlockNumber(num int64) ([]Transaction, error)
- func (c *Client) GetBlockByNumber(num int64, coinIndex uint) (*types.Block, error)
- func (c *Client) GetCurrentBlockNumber() (int64, error)
- func (c *Client) GetTokenList(address string, coinIndex uint) ([]types.Token, error)
- func (c *Client) GetTokenTxs(address, token string, coinIndex uint) (types.Txs, error)
- func (c *Client) GetTokens(address string) ([]Token, error)
- func (c *Client) GetTransactions(address string, coinIndex uint) (types.Txs, error)
- func (c *Client) GetTransactionsByBlockNumber(number int64, page int64) (block TransactionsList, err error)
- func (c *Client) GetTransactionsByXpub(xpub string) (transactions TransactionsList, err error)
- func (c *Client) GetTxs(address string) (TransactionsList, error)
- func (c *Client) GetTxsWithContract(address, contract string) (TransactionsList, error)
- type ClientError
- type EthereumSpecific
- type NodeInfo
- type Output
- type ScriptPubKey
- type Token
- type TokenTransfer
- type Transaction
- func (transaction Transaction) Amount() string
- func (transaction *Transaction) FromAddress() string
- func (transaction Transaction) GetBlockHeight() uint64
- func (transaction *Transaction) GetFee() string
- func (transaction Transaction) GetStatus() types.Status
- func (transaction *Transaction) ToAddress() string
- type TransactionsList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDirection ¶
func NormalizePage ¶
func NormalizePage(srcPage TransactionsList, address, token string, coinIndex uint) (txs types.Txs)
Types ¶
type Client ¶
func (*Client) GetAddressesFromXpub ¶
func (*Client) GetAllTransactionsByBlockNumber ¶
func (c *Client) GetAllTransactionsByBlockNumber(num int64) ([]Transaction, error)
Transactions
func (*Client) GetBlockByNumber ¶
func (*Client) GetCurrentBlockNumber ¶
func (*Client) GetTokenList ¶
func (*Client) GetTokenTxs ¶
func (*Client) GetTransactions ¶
func (*Client) GetTransactionsByBlockNumber ¶
func (c *Client) GetTransactionsByBlockNumber(number int64, page int64) (block TransactionsList, err error)
func (*Client) GetTransactionsByXpub ¶
func (c *Client) GetTransactionsByXpub(xpub string) (transactions TransactionsList, err error)
func (*Client) GetTxsWithContract ¶
func (c *Client) GetTxsWithContract(address, contract string) (TransactionsList, error)
type ClientError ¶
type ClientError struct {
Err string `json:"error"`
}
func (*ClientError) Error ¶
func (c *ClientError) Error() string
type EthereumSpecific ¶
type EthereumSpecific struct { Status int `json:"status"` // -1 pending, 0 Fail, 1 OK Nonce uint64 `json:"nonce"` GasLimit *big.Int `json:"gasLimit"` GasUsed *big.Int `json:"gasUsed"` GasPrice string `json:"gasPrice"` Data string `json:"data,omitempty"` }
EthereumSpecific contains ethereum specific transaction data
type Output ¶
type Output struct { TxId string `json:"txid,omitempty"` Value string `json:"value,omitempty"` Addresses []string `json:"addresses,omitempty"` ScriptPubKey ScriptPubKey `json:"scriptPubKey,omitempty"` }
func (Output) OutputAddress ¶
type ScriptPubKey ¶
type ScriptPubKey struct {
Addresses []string `json:"addresses,omitempty"`
}
type Token ¶
type Token struct { Balance string `json:"balance,omitempty"` Contract string `json:"contract"` Decimals uint `json:"decimals"` Name string `json:"name"` Symbol string `json:"symbol"` Type types.TokenType `json:"type"` }
Token contains info about tokens held by an address
type TokenTransfer ¶
type Transaction ¶
type Transaction struct { ID string `json:"txid"` Version uint64 `json:"version"` Vin []Output `json:"vin"` Vout []Output `json:"vout"` BlockHash string `json:"blockHash"` BlockHeight int64 `json:"blockHeight"` Confirmations uint64 `json:"confirmations"` BlockTime int64 `json:"blockTime"` Value string `json:"value"` ValueOut string `json:"valueOut"` Fees string `json:"fees"` TokenTransfers []TokenTransfer `json:"tokenTransfers,omitempty"` EthereumSpecific *EthereumSpecific `json:"ethereumSpecific,omitempty"` }
func (Transaction) Amount ¶
func (transaction Transaction) Amount() string
func (*Transaction) FromAddress ¶
func (transaction *Transaction) FromAddress() string
func (Transaction) GetBlockHeight ¶
func (transaction Transaction) GetBlockHeight() uint64
func (*Transaction) GetFee ¶
func (transaction *Transaction) GetFee() string
func (Transaction) GetStatus ¶
func (transaction Transaction) GetStatus() types.Status
func (*Transaction) ToAddress ¶
func (transaction *Transaction) ToAddress() string
type TransactionsList ¶
type TransactionsList struct { Page int64 `json:"page"` TotalPages int64 `json:"totalPages"` ItemsOnPage int64 `json:"itemsOnPage"` Transactions []Transaction `json:"transactions,omitempty"` Txs interface{} `json:"txs,omitempty"` Tokens []Token `json:"tokens,omitempty"` TxCount int64 `json:"txCount,omitempty"` Hash string `json:"hash,omitempty"` }
func (*TransactionsList) TransactionList ¶
func (tl *TransactionsList) TransactionList() []Transaction
Click to show internal directories.
Click to hide internal directories.