Documentation
¶
Index ¶
Constants ¶
View Source
const ( CoinMarketCapCacheKey = "coinMarketCapInfo" CoinMarketCapIOSOfBTCTUrl = "https://api.coinmarketcap.com/v2/ticker/2405?convert=BTC" CoinMarketCapIOSOfETHTUrl = "https://api.coinmarketcap.com/v2/ticker/2405?convert=ETH" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockOutput ¶
type BlockOutput struct { Height int64 `json:"height"` ParentHash string `json:"parentHash"` BlockHash string `json:"blockHash"` Witness string `json:"witness"` Age string `json:"age"` UTCTime string `json:"utcTime"` Timestamp int64 `json:"timestamp"` TxList []string `json:"txList"` Txn int64 `json:"txn"` TotalGasLimit int64 `json:"totalGasLimit"` AvgGasPrice float64 `json:"avgGasPrice"` }
func GenerateBlockOutput ¶
func GenerateBlockOutput(bInfo *rpcpb.Block, pos int64) *BlockOutput
func GetBlock ¶
func GetBlock(page, eachPageNum int64) ([]*BlockOutput, error)
type MarketInfo ¶
type MarketInfo struct { Price string `json:"price"` Volume24h int64 `json:"volume24h"` PercentChange24h float64 `json:"percentChange24h"` MarketCap int64 `json:"marketCap"` BtcPrice string `json:"btcPrice"` EthPrice string `json:"ethPrice"` LastUpdate string `json:"lastUpdate"` }
func GetMarketInfo ¶
func GetMarketInfo() (*MarketInfo, error)
type TxJson ¶
type TxJson struct { Hash string `json:"hash"` BlockNumber int64 `json:"blockNumber"` From string `json:"from"` To string `json:"to"` Amount float64 `json:"amount"` GasLimit float64 `json:"gasLimit"` GasPrice float64 `json:"gasPrice"` Age string `json:"age"` UTCTime string `json:"utcTime"` }
func ConvertTxJsons ¶
type TxnDetail ¶
type TxnDetail struct { Hash string `json:"txHash"` BlockNumber int64 `json:"blockHeight"` From string `json:"from"` To string `json:"to"` Amount float64 `json:"amount"` GasLimit float64 `json:"gasLimit"` GasPrice float64 `json:"price"` Age string `json:"age"` UTCTime string `json:"utcTime"` Code string `json:"code"` StatusCode int32 `json:"statusCode"` StatusMessage string `json:"statusMessage"` Contract string `json:"contract"` ActionName string `json:"actionName"` Data string `json:"data"` Memo string `json:"memo"` }
/ this struct is used as json to return
func ConvertTxOutput ¶
/ convert FlatTx to TxnDetail
func ConvertTxsOutputs ¶
func GetDetailTxn ¶
func GetFlatTxnSlicePage ¶
/ get a list of transactions for a specific page using account and block
Click to show internal directories.
Click to hide internal directories.