Documentation ¶
Index ¶
Constants ¶
View Source
const ( Stroop Amount = 1 Microlumen = 10 * Stroop Millilumen = 1000 * Microlumen Lumen = 1000 * Millilumen )
Common amounts.
To count the number of units in an Amount, divide:
lumen := xlm.Lumen fmt.Print(int64(lumen/xlm.Stroop)) // prints 10000000
To convert an integer number of units to an Amount, multiply:
lumens := 10 fmt.Print(xlm.Amount(lumens)*xlm.Lumen) // prints 10XLM
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Amount ¶
type Amount int64
Amount represents a quantity of XLM as an int64 count of stroops.
func (Amount) HorizonString ¶
HorizonString returns the Amount in decimal form in terms of Lumens, required for building transactions to be submitted to Horizon.
Click to show internal directories.
Click to hide internal directories.