Documentation ¶
Index ¶
- Constants
- func StringToUint64(s string, defaultValue uint64) uint64
- type AddressBalanceMultiBalance
- type AddressBalanceMultiData
- type AddressSummaryData
- type AddressTokenBalanceData
- type AddressTokenBalanceMultiBalance
- type AddressTokenBalanceMultiData
- type AddressTokenBalanceToken
- type AddressUtxoData
- type AddressUtxoUtxo
- type ApiResponse
- type ChainExplorerAdaptor
- func (cea *ChainExplorerAdaptor) GetAccountBalance(request *account.AccountBalanceRequest) (*account.AccountBalanceResponse, error)
- func (cea *ChainExplorerAdaptor) GetAccountUtxo(request *account.AccountUtxoRequest) ([]account.AccountUtxoResponse, error)
- func (cea *ChainExplorerAdaptor) GetEstimateGasFee(request *gas_fee.GasEstimateFeeRequest) (*gas_fee.GasEstimateFeeResponse, error)
- func (cea *ChainExplorerAdaptor) GetMultiAccountBalance(request *account.AccountBalanceRequest) ([]*account.AccountBalanceResponse, error)
- func (cea *ChainExplorerAdaptor) GetTokenList(request *token.TokenRequest) ([]token.TokenResponse, error)
- func (cea *ChainExplorerAdaptor) GetTxByAddress(request *account.AccountTxRequest) (*account.TransactionResponse[account.AccountTxResponse], error)
- func (cea *ChainExplorerAdaptor) GetTxByHash(request *transaction.TxRequest) (*transaction.TxResponse, error)
- type TokenListData
- type TokenListInfo
Constants ¶
const ChainExplorerName = "oklink"
Variables ¶
This section is empty.
Functions ¶
func StringToUint64 ¶
Types ¶
type AddressBalanceMultiBalance ¶
type AddressBalanceMultiBalance struct { Address string `json:"address"` Balance string `json:"balance"` }
AddressBalanceMultiBalance The BalanceList field within the Data field within the Response structure of Fundamental blockchain data -> Address data -> Get native token balance in batches
type AddressBalanceMultiData ¶
type AddressBalanceMultiData struct { Symbol string `json:"symbol"` BalanceList []AddressBalanceMultiBalance `json:"balanceList"` }
AddressBalanceMultiData The Data field within the Response structure of Fundamental blockchain data -> Address data -> Get native token balance in batches
type AddressSummaryData ¶
type AddressSummaryData struct { ChainFullName string `json:"chainFullName"` ChainShortName string `json:"chainShortName"` Address string `json:"address"` ContractAddress string `json:"contractAddress"` Balance string `json:"balance"` BalanceSymbol string `json:"balanceSymbol"` TransactionCount string `json:"transactionCount"` Verifying string `json:"verifying"` SendAmount string `json:"sendAmount"` ReceiveAmount string `json:"receiveAmount"` TokenAmount string `json:"tokenAmount"` TotalTokenValue string `json:"totalTokenValue"` CreateContractAddress string `json:"createContractAddress"` CreateContractTransactionHash string `json:"createContractTransactionHash"` FirstTransactionTime string `json:"firstTransactionTime"` LastTransactionTime string `json:"lastTransactionTime"` Token string `json:"token"` Bandwidth string `json:"bandwidth"` Energy string `json:"energy"` VotingRights string `json:"votingRights"` UnclaimedVotingRewards string `json:"unclaimedVotingRewards"` IsAaAddress bool `json:"isAaAddress"` }
AddressSummaryData The Data field within the Response structure of Fundamental blockchain data -> Address Data -> Get basic address details
type AddressTokenBalanceData ¶
type AddressTokenBalanceData struct { Limit string `json:"limit"` Page string `json:"page"` TotalPage string `json:"totalPage"` TokenList []AddressTokenBalanceToken `json:"tokenList"` }
AddressTokenBalanceData The Data field within the Response structure of Fundamental blockchain data -> Address data -> Get token balance details by address
type AddressTokenBalanceMultiBalance ¶
type AddressTokenBalanceMultiBalance struct { Address string `json:"address"` HoldingAmount string `json:"holdingAmount"` TokenContractAddress string `json:"tokenContractAddress"` }
AddressTokenBalanceMultiBalance The BalanceList field within the Data field within the Response structure of Fundamental blockchain data -> Address data -> Get token balance in batches
type AddressTokenBalanceMultiData ¶
type AddressTokenBalanceMultiData struct { Page string `json:"page"` Limit string `json:"limit"` TotalPage string `json:"totalPage"` BalanceList []AddressTokenBalanceMultiBalance `json:"balanceList"` }
AddressTokenBalanceMultiData The Data field within the Response structure of Fundamental blockchain data -> Address data -> Get token balance in batches
type AddressTokenBalanceToken ¶
type AddressTokenBalanceToken struct { Symbol string `json:"symbol"` TokenContractAddress string `json:"tokenContractAddress"` HoldingAmount string `json:"holdingAmount"` PriceUsd string `json:"priceUsd"` ValueUsd string `json:"valueUsd"` TokenId string `json:"tokenId"` }
AddressTokenBalanceToken The TokenList field within the Data field within the Response structure of Fundamental blockchain data -> Address data -> Get token balance details by address
type AddressUtxoData ¶
type AddressUtxoData struct { Page string `json:"page"` Limit string `json:"limit"` TotalPage string `json:"totalPage"` UtxoList []AddressUtxoUtxo `json:"utxoList"` }
AddressUtxoData The Data field within the Response structure of UTXO-specific data -> Get remaining UTXO addresses
type AddressUtxoUtxo ¶
type AddressUtxoUtxo struct { TxId string `json:"txid"` Height string `json:"height"` BlockTime string `json:"blockTime"` Address string `json:"address"` UnspentAmount string `json:"unspentAmount"` Index string `json:"index"` }
AddressUtxoUtxo The UtxoList field within the Data field within the Response structure of UTXO-specific data -> Get remaining UTXO addresses
type ApiResponse ¶
type ChainExplorerAdaptor ¶
type ChainExplorerAdaptor struct { explorer.ChainExplorerAdaptor // contains filtered or unexported fields }
func NewChainExplorerAdaptor ¶
func (*ChainExplorerAdaptor) GetAccountBalance ¶
func (cea *ChainExplorerAdaptor) GetAccountBalance(request *account.AccountBalanceRequest) (*account.AccountBalanceResponse, error)
GET /api/v5/explorer/address/address-summary?chainShortName=eth&address=0x85c6627c4ed773cb7c32644b041f58a058b00d30
func (*ChainExplorerAdaptor) GetAccountUtxo ¶
func (cea *ChainExplorerAdaptor) GetAccountUtxo(request *account.AccountUtxoRequest) ([]account.AccountUtxoResponse, error)
func (*ChainExplorerAdaptor) GetEstimateGasFee ¶
func (cea *ChainExplorerAdaptor) GetEstimateGasFee(request *gas_fee.GasEstimateFeeRequest) (*gas_fee.GasEstimateFeeResponse, error)
func (*ChainExplorerAdaptor) GetMultiAccountBalance ¶
func (cea *ChainExplorerAdaptor) GetMultiAccountBalance(request *account.AccountBalanceRequest) ([]*account.AccountBalanceResponse, error)
func (*ChainExplorerAdaptor) GetTokenList ¶
func (cea *ChainExplorerAdaptor) GetTokenList(request *token.TokenRequest) ([]token.TokenResponse, error)
GET /api/v5/explorer/token/token-list
func (*ChainExplorerAdaptor) GetTxByAddress ¶
func (cea *ChainExplorerAdaptor) GetTxByAddress(request *account.AccountTxRequest) (*account.TransactionResponse[account.AccountTxResponse], error)
func (*ChainExplorerAdaptor) GetTxByHash ¶
func (cea *ChainExplorerAdaptor) GetTxByHash(request *transaction.TxRequest) (*transaction.TxResponse, error)
type TokenListData ¶
type TokenListData struct { Limit string `json:"limit"` Page string `json:"page"` TotalPage string `json:"totalPage"` TokenList []TokenListInfo `json:"tokenList"` }
type TokenListInfo ¶
type TokenListInfo struct { Symbol string `json:"symbol"` Token string `json:"token"` // 代币名字简称:USDC TokenId string `json:"tokenId"` // 默认为0 TotalSupply string `json:"totalSupply"` // 最大供应量 TokenFullName string `json:"tokenFullName"` // 代币名字全称:USDCoin Precision string `json:"precision"` // 精度 默认为1 TokenContractAddress string `json:"tokenContractAddress"` TokenInscriptionId string `json:"tokenInscriptionId"` // 铭文代币的铭文ID }