Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { Balance(chainCode int64, address string, tag string) (string, error) Token(chainCode int64, contractAddr string, abi string, eip string) (string, error) TokenBalance(chainCode int64, address string, contractAddr string, abi string) (string, error) Nonce(chainCode int64, address string, tag string) (string, error) LatestBlock(chainCode int64) (string, error) SendRawTransaction(chainCode int64, signedTx string) (string, error) GetBlockByHash(chainCode int64, hash string, flag bool) (string, error) GetBlockByNumber(chainCode int64, number string, flag bool) (string, error) GetTxByHash(chainCode int64, hash string) (string, error) SendJsonRpc(chainCode int64, req string) (string, error) GetBlockReceiptByBlockNumber(chainCode int64, number string) (string, error) GetBlockReceiptByBlockHash(chainCode int64, hash string) (string, error) GetTransactionReceiptByHash(chainCode int64, hash string) (string, error) SubscribePendingTx(chainCode int64, receiverCh chan string, sendCh chan string) (string, error) SubscribeLogs(chainCode int64, address string, topics []string, receiverCh chan string, sendCh chan string) (string, error) UnSubscribe(chainCode int64, subId string) (string, error) // GetAddressType 0x1:外部账户,0x2:合约地址 GetAddressType(chainCode int64, address string) (string, error) GetCode(chainCode int64, address string) (string, error) StartWDT() MonitorCluster() any }
type ChainCluster ¶
type ChainCluster interface {
BalanceCluster(trace bool) *config.NodeCluster
}
type ChainConn ¶ added in v0.5.1
type ChainConn interface { SendRequestToChain(host string, token string, query string) (string, error) SendRequestToChainByHttp(host string, token string, query string) (string, error) Subscribe(host string, token string) (string, error) UnSubscribe(host string, token string) (string, error) GetToken20(host string, token string, contractAddress string, userAddress string) (map[string]interface{}, error) GetToken20ByHttp(host string, token string, contractAddress string, userAddress string) (map[string]interface{}, error) GetToken721(host string, token string, contractAddress string, userAddress string) (map[string]interface{}, error) GetToken1155(host string, token string, contractAddress string, userAddress string) (map[string]interface{}, error) }
type ExApi ¶ added in v0.5.3
type ExApi interface { GasPrice(chainCode int64) (string, error) TraceTransaction(chainCode int64, hash string) (string, error) EstimateGas(chainCode int64, from, to, data string) (string, error) EstimateGasForTron(chainCode int64, from, to, functionSelector, parameter string) (string, error) GetAccountResourceForTron(chainCode int64, address string) (string, error) }
type InterTx ¶ added in v0.5.3
type InterTx struct { Result struct { Output string `json:"output" gorm:"column:output"` GasUsed string `json:"gasUsed" gorm:"column:gasUsed"` } `json:"-" gorm:"column:result"` BlockHash string `json:"blockHash" gorm:"column:blockHash"` TransactionPosition int `json:"-" gorm:"column:transactionPosition"` BlockNumber int `json:"blockNumber" gorm:"column:blockNumber"` TraceAddress []int `json:"-" gorm:"column:traceAddress"` Action struct { Input string `json:"-" gorm:"column:input"` Gas string `json:"gas" gorm:"column:gas"` From string `json:"from" gorm:"column:from"` To string `json:"to" gorm:"column:to"` Value string `json:"value" gorm:"column:value"` CallType string `json:"callType" gorm:"column:callType"` } `json:"action" gorm:"column:action"` Type string `json:"-" gorm:"column:type"` Subtraces int `json:"-" gorm:"column:subtraces"` TransactionHash string `json:"transactionHash" gorm:"column:transactionHash"` }
type NFT ¶ added in v0.5.1
type NFT interface { TokenURI(host string, key string, contractAddress string, tokenId string, eip int64) (string, error) BalanceOf(host string, key string, contractAddress string, address string, tokenId string, eip int64) (string, error) OwnerOf(host string, key string, contractAddress string, tokenId string, eip int64) (string, error) TotalSupply(host string, key string, contractAddress string, eip int64) (string, error) }
type NftApi ¶ added in v0.5.1
type NftApi interface { TokenURI(chainCode int64, contractAddress string, tokenId string, eip int64) (string, error) BalanceOf(chainCode int64, contractAddress string, address string, tokenId string, eip int64) (string, error) OwnerOf(chainCode int64, contractAddress string, tokenId string, eip int64) (string, error) TotalSupply(chainCode int64, contractAddress string, eip int64) (string, error) }
Click to show internal directories.
Click to hide internal directories.