Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnkrSDK ¶
type AnkrSDK struct {
// contains filtered or unexported fields
}
func NewAnkrSDK ¶
func (AnkrSDK) GetBlockchainStats ¶
func (AnkrSDK) GetTransactionsByAddress ¶
func (s AnkrSDK) GetTransactionsByAddress(ctx context.Context, request TransactionsByAddressRequest) (*TransactionsByAddressResponse, error)
type BlockchainStatsResponse ¶
type BlockchainStatsResponse struct { ID int64 `json:"id"` Jsonrpc string `json:"jsonrpc"` Result struct { Stats []struct { BlockTimeMs int64 `json:"blockTimeMs"` Blockchain string `json:"blockchain"` LatestBlockNumber int64 `json:"latestBlockNumber"` NativeCoinUsdPrice string `json:"nativeCoinUsdPrice"` TotalEventsCount int64 `json:"totalEventsCount"` TotalTransactionsCount int64 `json:"totalTransactionsCount"` } `json:"stats"` } `json:"result"` }
type MaultichainOption ¶
type MaultichainOption func(*TransactionsByAddressRequest)
func WithBlochchain ¶
func WithBlochchain(blockchain string) MaultichainOption
func WithBlocks ¶
func WithBlocks(fromBlock int64, toBlock int64) MaultichainOption
func WithContract ¶
func WithContract(address []string) MaultichainOption
func WithPageToken ¶
func WithPageToken(pageToken string) MaultichainOption
type RequestParams ¶
type RequestParams struct { Address []string `json:"address"` Blockchain string `json:"blockchain"` FromBlock int64 `json:"fromBlock,omitempty"` ToBlock int64 `json:"toBlock,omitempty"` FromTimestamp int64 `json:"fromTimestamp,omitempty"` ToTimestamp int64 `json:"toTimestamp,omitempty"` IncludeLogs bool `json:"includeLogs,omitempty"` DescOrder bool `json:"descOrder,omitempty"` PageSize int64 `json:"pageSize,omitempty"` PageToken string `json:"pageToken,omitempty"` }
type TransactionsByAddressRequest ¶
type TransactionsByAddressRequest struct { ID int64 `json:"id"` Jsonrpc string `json:"jsonrpc"` Method string `json:"method"` RequestParams RequestParams `json:"params"` }
func NewTransactionsByAddressRequest ¶
func NewTransactionsByAddressRequest(opts ...MaultichainOption) *TransactionsByAddressRequest
type TransactionsByAddressResponse ¶
type TransactionsByAddressResponse struct { ID int64 `json:"id"` Jsonrpc string `json:"jsonrpc"` Result struct { NextPageToken string `json:"nextPageToken"` Transactions []struct { BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` Blockchain string `json:"blockchain"` CumulativeGasUsed string `json:"cumulativeGasUsed"` From string `json:"from"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` GasUsed string `json:"gasUsed"` Hash string `json:"hash"` Input string `json:"input"` Logs []struct { Address string `json:"address"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` Blockchain string `json:"blockchain"` Data string `json:"data"` LogIndex string `json:"logIndex"` Removed bool `json:"removed"` Topics []string `json:"topics"` TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` } `json:"logs"` Nonce string `json:"nonce"` R string `json:"r"` S string `json:"s"` Status string `json:"status"` Timestamp string `json:"timestamp"` To string `json:"to"` TransactionIndex string `json:"transactionIndex"` Type string `json:"type"` V string `json:"v"` Value string `json:"value"` } `json:"transactions"` } `json:"result"` }
Click to show internal directories.
Click to hide internal directories.