Documentation
¶
Index ¶
Constants ¶
View Source
const MaxMoney = 10_000_000_000 * OneDoge // max transaction is 10,000,000,000 Doge
MaxMoney is the maximum Koinu value that can be used in a transaction.
View Source
const OneDoge = 100_000_000 // 100 million Koinu (8 zeroes)
OneDoge is one Dogecoin represented in Koinu, the smallest unit of Dogecoin.
Variables ¶
View Source
var ErrInvalidNumber = errors.New("invalid number (unexpected character)")
View Source
var ErrMaxMoney = errors.New("greater than max-money (10,000,000,000 DOGE)")
Functions ¶
This section is empty.
Types ¶
type Koinu ¶
type Koinu int64
Koinu is the smallest unit of Dogecoin. This type is used to represent currency in transactions.
func ParseKoinu ¶
ParseKoinu parses a decimal string like "12.6251" to Koinu (1262510000) Dogecoin decimals are significant to 8 places at the protocol level and are encoded in transactions as 64-bit integers.
func (Koinu) MarshalJSON ¶ added in v0.0.15
func (*Koinu) UnmarshalJSON ¶ added in v0.0.15
Click to show internal directories.
Click to hide internal directories.