known

package
v0.0.0-...-977d577 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 6 Imported by: 0

README

Known Coins, Pools, and Markets in Aux

Documentation

Overview

Known coins, pools, markets included with the binary. User doesn't need to specify the full type name for those.

Index

Constants

View Source
const HippoCoinRegistryUrl = "https://raw.githubusercontent.com/hippospace/aptos-coin-list/main/typescript/src/defaultList.mainnet.json"

HippoCoinRegistryUrl is the default url for mainnet coins

Variables

This section is empty.

Functions

func GetAllCoins

func GetAllCoins() map[aptos.Network]*coinMap

func ReloadHippoCoinRegistry

func ReloadHippoCoinRegistry(url string)

ReloadHippoCoinRegistry reloads the data from hippo registry for mainnet. Can use HippoCoinRegistryUrl for the url.

Types

type HippoCoinRegistryEntry

type HippoCoinRegistryEntry struct {
	Name           string    `json:"name"`
	Symbol         string    `json:"symbol"`
	OfficialSymbol string    `json:"official_symbol"`
	CoingeckoId    string    `json:"coingecko_id"`
	Decimals       uint8     `json:"decimals"`
	LogoUrl        string    `json:"logo_url"`
	ProjectUrl     string    `json:"project_url"`
	TokenType      TokenType `json:"token_type"`
}

HippoCoinRegistryEntry is the information contained in the hippo coin registry for mainnet, and it is in Hippo's github repo. It should come from HippoCoinRegistryUrl.

func GetCoinInfo

func GetCoinInfo(network aptos.Network, typeTag *aptos.MoveStructTag) *HippoCoinRegistryEntry

GetCoinInfo returns the hippo coin registry information for a given type. If the coin is not in the registry, return nil.

func GetCoinInfoBySymbol

func GetCoinInfoBySymbol(network aptos.Network, symbol string) *HippoCoinRegistryEntry

GetCoinInfo returns the hippo coin registry information for a symbol. If the coin is not in the registry, return nil.

type TokenType

type TokenType struct {
	Type *aptos.MoveStructTag `json:"type"`
}

TokenType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL