Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlchemyRequest ¶ added in v0.0.3
type EthereumAddress ¶
type Meta ¶
type Meta struct { Name string `json:"name"` Symbol string `json:"symbol"` Decimals int `json:"decimals"` Logo string `json:"logo"` }
Meta this struct is the same as the metadata in the resp of Alchemy
type MetaSource ¶ added in v0.0.7
type MetaSource string
const ( MetaSourceAlchemy MetaSource = "alchemy" // query from Alchemy API MetaSourceCustom MetaSource = "custom" // defined in Customizers )
type MetadataResponse ¶ added in v0.0.3
type Token ¶
type Token struct { Address string `json:"address"` CoingeckoID string `json:"coinGeckoId"` Denom string `json:"denom,omitempty"` MetaSource MetaSource `json:"metaSource"` Meta *Meta `json:"meta"` }
func GetTokenByAddress ¶
GetTokenByAddress no case sensitivity, and it's safe to pass address with prefix "peggy" for unknown address, request metadata from alchemy
func GetTokenByDenom ¶ added in v0.0.7
GetTokenByDenom no case sensitivity
func GetTokenBySymbol ¶
GetTokenBySymbol no case sensitivity, USD/usd/Usd are all fine
Click to show internal directories.
Click to hide internal directories.