Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BitcoinCash = &Crypto{ Name: "bitcoin-cash", Short: "BCH", Decimals: 8, Type: UTXO, } Bitcoin = &Crypto{ Name: "bitcoin", Short: "BTC", Decimals: 8, Type: UTXO, } Decred = &Crypto{ Name: "decred", Short: "DCR", Decimals: 8, Type: UTXO, } Dogecoin = &Crypto{ Name: "dogecoin", Short: "DOGE", Decimals: 8, Type: UTXO, } Litecoin = &Crypto{ Name: "litecoin", Short: "LTC", Decimals: 8, Type: UTXO, } Cryptos = map[string]*Crypto{ "bitcoin-cash": BitcoinCash, "bitcoin": Bitcoin, "decred": Decred, "dogecoin": Dogecoin, "litecoin": Litecoin, } )
View Source
var CryptosShort map[string]*Crypto
CryptosShort contains all available cryptocurrencies
Functions ¶
This section is empty.
Types ¶
type Crypto ¶
type Crypto struct {
// Name of the crypto
Name string
// Short is the ticker
Short string
// Decimals used
Decimals int
// Type of crypto
Type Type
}
Crypto represents a cryptocurrency
func ParseShort ¶
ParseShort parses a cryptocurrency ticker
func (Crypto) MarshalYAML ¶
MarshalYAML implement yaml.Marshaler
func (*Crypto) UnmarshalYAML ¶
UnmarshalYAML implement yaml.Unmarshaler
type InvalidCryptoError ¶
type InvalidCryptoError string
InvalidCryptoError represents an error parsing a crypto name
type InvalidTypeError ¶
type InvalidTypeError string
func (InvalidTypeError) Error ¶
func (e InvalidTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.