coin

package
v0.0.0-...-db5ea55 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SEPARATOR = "|"
)

Add new coins here, all capital symbol Base | Target : to buy target use base, to sell target and get base

Variables

View Source
var LastID int

Functions

func AddCoin

func AddCoin(coin *Coin) error

func DeleteCoin

func DeleteCoin(coin *Coin)

func ExistID

func ExistID(id int) bool

func GenerateCoinID

func GenerateCoinID() int

func GetCoinID

func GetCoinID(code string) int

func Init

func Init()

Types

type Coin

type Coin struct {
	ID         int
	Code       string `json:"code"`
	Name       string `json:"name"`
	Website    string `json:"website"`
	Explorer   string `json:"explorer"`
	Health     string // the health of the chain
	Blockheigh int
	Blocktime  int // in seconds

}

func GetCoin

func GetCoin(code string) *Coin

func GetCoinByID

func GetCoinByID(id int) *Coin

func GetCoins

func GetCoins() []*Coin

Jump to

Keyboard shortcuts

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