koinu

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 4 Imported by: 5

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

func ParseKoinu(amt string) (Koinu, error)

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 (val Koinu) MarshalJSON() ([]byte, error)

func (Koinu) String

func (val Koinu) String() string

String implements fmt.Stringer

func (*Koinu) UnmarshalJSON added in v0.0.15

func (val *Koinu) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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