currencies

package
v0.0.0-...-a9f1957 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedCurrencies = []Currency{
	{
		Name:           "Bitcoin",
		Code:           "BTC",
		IsAddressValid: validators.VerifyBTCAddress,
		Chain:          "main",
		ExplorerTxUrl: func(s string) string {
			return ""
		},
		ExplorerAddrUrl: func(s string) string {
			return ""
		},
	},
	{
		Name:           "Ethereum",
		Code:           "ETH",
		IsAddressValid: validators.VerifyETHAddress,
		Chain:          "main",
		ExplorerTxUrl: func(s string) string {
			return ""
		},
		ExplorerAddrUrl: func(s string) string {
			return ""
		},
	},
	{
		Name:           "Litecoin",
		Code:           "LTC",
		IsAddressValid: validators.VerifyLTCAddress,
		Chain:          "main",
		ExplorerTxUrl: func(s string) string {
			return ""
		},
		ExplorerAddrUrl: func(s string) string {
			return ""
		},
	},
	{
		Name:           "DogeCoin",
		Code:           "DOGE",
		IsAddressValid: validators.VerifyDOGEAddress,
		Chain:          "main",
		ExplorerTxUrl: func(s string) string {
			return ""
		},
		ExplorerAddrUrl: func(s string) string {
			return ""
		},
	},
	{
		Name:           "Dash",
		Code:           "DASH",
		IsAddressValid: validators.VerifyDASHAddress,
		Chain:          "main",
		ExplorerTxUrl: func(s string) string {
			return ""
		},
		ExplorerAddrUrl: func(s string) string {
			return ""
		},
	},
	TestCurrency,
}
View Source
var TestCurrency = Currency{
	Name:           "Bcy",
	Code:           "BCY",
	IsAddressValid: validators.VerifyTestAddress,
	Chain:          "test",
	ExplorerTxUrl: func(s string) string {
		return fmt.Sprintf("https://live.blockcypher.com/bcy/tx/%s", s)
	},
	ExplorerAddrUrl: func(s string) string {
		return fmt.Sprintf("https://live.blockcypher.com/bcy/address/%s", s)
	},
}

Functions

This section is empty.

Types

type Currency

type Currency struct {
	Name            string
	Code            string
	IsAddressValid  func(string) bool
	Chain           string
	ExplorerTxUrl   func(string) string
	ExplorerAddrUrl func(string) string
}

func GetCurrencyFromCode

func GetCurrencyFromCode(currency_code string) (Currency, error)

func (*Currency) CodeInLowerCase

func (c *Currency) CodeInLowerCase() string

Jump to

Keyboard shortcuts

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