Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wallet ¶
type Wallet struct {
PrivateKey ecdsa.PrivateKey
PublicKey []byte
}
Wallet stores private and public keys
func (*Wallet) Deserialize ¶
func (Wallet) GetPrivateKey ¶
func (w Wallet) GetPrivateKey() ecdsa.PrivateKey
Reurns private key of a wallet
func (*Wallet) MakeWallet ¶
func (w *Wallet) MakeWallet()
MakeWallet creates Wallet. It generates new keys pair and assign to the object
func (Wallet) ValidateAddress ¶
ValidateAddress check if address is valid, has valid format
type WalletBalance ¶
type WalletCLI ¶
type WalletCLI struct {
Input AppInput
Node net.NodeAddr
DataDir string
Nodes []net.NodeAddr
NodeCLI *nodeclient.NodeClient
WalletsObj *Wallets
NodeMode bool
Logger *utils.LoggerMan
}
func (*WalletCLI) ExecuteCommand ¶
Executes command based on input arguments
type Wallets ¶
type Wallets struct {
DataDir string
Wallets map[string]*Wallet
Logger *utils.LoggerMan
WalletsFile string
}
Wallets stores a collection of wallets
func (*Wallets) CreateWallet ¶
CreateWallet adds a Wallet to Wallets
func (*Wallets) GetAddresses ¶
GetAddresses returns an array of addresses stored in the wallet file
func (*Wallets) LoadFromFile ¶
LoadFromFile loads wallets from the file
type WalletsFile ¶
Click to show internal directories.
Click to hide internal directories.