Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Exponent is the number of decimal places held by droplets Exponent = 6 // Multiplier is how much to multiply coins by to get droplets Multiplier = 1e6 )
Variables ¶
View Source
var ( // ErrNegativeValue is returned if a balance string is a negative number ErrNegativeValue = errors.New("Droplet string conversion failed: Negative balance") // ErrTooManyDecimals is returned if a balance string has more than 6 decimal places ErrTooManyDecimals = errors.New("Droplet string conversion failed: Too many decimal places") // ErrTooLarge is returned if a balance string is greater than math.MaxInt64 ErrTooLarge = errors.New("Droplet string conversion failed: Value is too large") )
Functions ¶
func FromString ¶
FromString converts a skycoin balance string with decimal places to uint64 droplets. For example, "123.000456" becomes 123000456
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.