Documentation
¶
Index ¶
Constants ¶
View Source
const ( ChainTypeBsc = 1 ChainTypeMetis = 2 ChainTypePolygon = 3 ChainTypeKlaytn = 4 ChainTypeOkc = 5 ChainTypeEvmos = 6 ChainTypeCronos = 7 ChainTypeAurora = 8 ChainTypeArbitrum = 9 ChainTypeConflux = 10 ChainTypeEthereum = 100 )
View Source
const ( NetworkTypeMainNet = iota + 1 NetworkTypeTestNet )
Variables ¶
This section is empty.
Functions ¶
func GetExplorerTargetUrl ¶ added in v0.0.4
func GetExplorerTargetUrl(chainId uint64, txHash string, targetType ExplorerTargetType) string
func GetSupportChainTypeList ¶
func GetSupportChainTypeList() []uint32
Types ¶
type Chain ¶
type Chain struct { ChainType uint32 `json:"chain_type"` Name string `json:"name"` Remark string `json:"remark"` Icon string `json:"icon"` Symbol string `json:"coin_symbol"` CoinDecimals uint8 `json:"coin_decimals"` Type uint8 `json:"type"` }
func GetChainInfo ¶
func GetSupportChainList ¶
func GetSupportChainList() []*Chain
type ExplorerTargetType ¶ added in v0.0.4
type ExplorerTargetType int
const ( ExplorerTargetTransaction ExplorerTargetType = 1 ExplorerTargetAddress ExplorerTargetType = 2 )
type Net ¶
type Net struct { ChainType uint32 `json:"chain_type"` ChainId uint64 `json:"chain_id"` NetworkName string `json:"network_name"` Symbol string `json:"symbol"` Decimals uint8 `json:"decimals"` RpcUrl string `json:"rpc_url"` OriginRpcUrl string `json:"origin_rpc_url"` WssUrl string `json:"-"` BlockExplorer string `json:"block_explorer"` ExplorerApiUrl string `json:"-"` ExplorerApiKey string `json:"-"` Type uint8 `json:"type"` PollingInterval int64 `json:"polling_interval"` AverageBlockTime int64 `json:"average_block_time"` }
func GetNetByChainId ¶
func GetNetByChainType ¶ added in v0.0.8
func GetSupportNetList ¶
func GetSupportNetList() []*Net
func (*Net) GetAverageBlockTime ¶
func (*Net) GetPollingInterval ¶
func (*Net) IsAvailable ¶
func (*Net) UseWssSubscribe ¶
Click to show internal directories.
Click to hide internal directories.