Documentation ¶
Index ¶
- Variables
- type Cryptocurrency
- func (t Cryptocurrency) Balance(seed string) (amount float64, err error)
- func (t Cryptocurrency) BalanceUnits(seed string) (units *big.Int, err error)
- func (t Cryptocurrency) GenWallet() (seed, address string, err error)
- func (t Cryptocurrency) GetAddress(seed string) (address string, err error)
- func (t Cryptocurrency) MarshalText() (b []byte, err error)
- func (t Cryptocurrency) Send(seed, dest string, amount float64) (tx string, err error)
- func (t Cryptocurrency) SendAll(seed, dest string) (tx string, err error)
- func (t Cryptocurrency) SendUnits(seed, dest string, units *big.Int) (tx string, err error)
- func (t Cryptocurrency) Symbol() string
- func (t Cryptocurrency) Testnet(state bool) (err error)
- func (t *Cryptocurrency) UnmarshalText(data []byte) (err error)
- func (t Cryptocurrency) Validate(address string) (valid bool, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Cryptocurrencies = []Cryptocurrency{ Bitcoin, Ethereum, Cardano, }
Cryptocurrencies list
Functions ¶
This section is empty.
Types ¶
type Cryptocurrency ¶
type Cryptocurrency int
const ( Bitcoin Cryptocurrency = iota Ethereum Cardano )
func FromSymbol ¶ added in v1.4.0
func FromSymbol(symbol string) (cc Cryptocurrency, err error)
func (Cryptocurrency) Balance ¶
func (t Cryptocurrency) Balance(seed string) (amount float64, err error)
Balance of the wallet (not address!)
func (Cryptocurrency) BalanceUnits ¶
func (t Cryptocurrency) BalanceUnits(seed string) (units *big.Int, err error)
BalanceUnits returns the balance of the wallet (not address!) in Satoshi/Wei/etc.
func (Cryptocurrency) GenWallet ¶
func (t Cryptocurrency) GenWallet() (seed, address string, err error)
GenWallet for specified cryptocurrency
func (Cryptocurrency) GetAddress ¶ added in v1.4.0
func (t Cryptocurrency) GetAddress(seed string) (address string, err error)
GetAddress for the wallet (can be the same or different every time)
func (Cryptocurrency) MarshalText ¶ added in v1.4.0
func (t Cryptocurrency) MarshalText() (b []byte, err error)
func (Cryptocurrency) Send ¶
func (t Cryptocurrency) Send(seed, dest string, amount float64) (tx string, err error)
Send the amount of cryptocurrency to destination address
func (Cryptocurrency) SendAll ¶
func (t Cryptocurrency) SendAll(seed, dest string) (tx string, err error)
SendAll cryptocurrency to destination address
func (Cryptocurrency) Symbol ¶ added in v1.4.0
func (t Cryptocurrency) Symbol() string
Symbol of cryptocurrency (btc, eth, etc.)
func (Cryptocurrency) Testnet ¶
func (t Cryptocurrency) Testnet(state bool) (err error)
Testnet enable or disable
func (*Cryptocurrency) UnmarshalText ¶ added in v1.4.0
func (t *Cryptocurrency) UnmarshalText(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.