Documentation ¶
Overview ¶
Package currency - types and functions for converting currencies to/from enumeration values
Index ¶
- Constants
- func UnpackMap(buffer []byte, testnet bool) (Map, Set, error)
- type Currency
- func (currency Currency) ChainParam(chainName string) *chaincfg.Params
- func (currency Currency) GetFee() (uint64, error)
- func (currency Currency) GoString() string
- func (currency Currency) Index() int
- func (currency Currency) IsValid() bool
- func (currency Currency) MarshalText() ([]byte, error)
- func (currency *Currency) Scan(state fmt.ScanState, verb rune) error
- func (currency Currency) String() string
- func (currency Currency) Uint64() uint64
- func (currency *Currency) UnmarshalText(s []byte) error
- func (currency Currency) ValidateAddress(address string, testnet bool) error
- type Map
- type Set
Constants ¶
View Source
const ( Nothing Currency = iota // this must be the first value Bitcoin Currency = iota Litecoin Currency = iota First Currency = Nothing + 1 Last Currency = maximumValue - 1 Count int = int(Last) // count of currencies )
possible currency values
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Currency ¶
type Currency uint64
Currency - currency enumeration
func FromUint64 ¶
FromUint64 - convert a number to a currency
func (Currency) ChainParam ¶ added in v0.12.0
func (Currency) Index ¶ added in v0.5.0
Index - convert a valid currency to a zero based array index
func (Currency) IsValid ¶ added in v0.5.0
IsValid - valid currency if in range of First to Last None is not considered as valid
func (Currency) MarshalText ¶
MarshalText - convert a currency into JSON
func (*Currency) UnmarshalText ¶
UnmarshalText - convert currency string to a currency enumeration value from JSON
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package bitcoin - to validate bitcoin addresses
|
Package bitcoin - to validate bitcoin addresses |
Package litecoin - to validate litecoin addresses
|
Package litecoin - to validate litecoin addresses |
Package satoshi - to convert satoshi values to integers
|
Package satoshi - to convert satoshi values to integers |
Click to show internal directories.
Click to hide internal directories.