Documentation
¶
Index ¶
- Variables
- func AddWallet() (*client.Wallet, error)
- func CreateBlockchain(address core.Address, db storage.Storage, consensus core.Consensus, ...) (*core.Blockchain, error)
- func CreateWallet(path string, password string) (*client.Wallet, error)
- func CreateWalletWithpassphrase(password string) (*client.Wallet, error)
- func GetAllAddressesByPath(path string) ([]core.Address, error)
- func GetBalance(address core.Address, db storage.Storage) (*common.Amount, error)
- func GetMinerAddress() string
- func GetTestWalletPath() string
- func GetUnlockDuration() time.Duration
- func GetWallet() (*client.Wallet, error)
- func GetWalletManager(path string) (*client.WalletManager, error)
- func IsTestWalletEmpty() (bool, error)
- func IsWalletEmpty() (bool, error)
- func IsWalletLocked() (bool, error)
- func Send(senderWallet *client.Wallet, to core.Address, amount *common.Amount, ...) ([]byte, error)
- func SendFromMiner(address core.Address, amount *common.Amount, bc *core.Blockchain) error
- func SetLockWallet() error
- func SetMinerKeyPair(key string)
- func SetUnLockWallet() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidAmount = errors.New("ERROR: Amount is invalid (must be > 0)") ErrInvalidAddress = errors.New("ERROR: Address is invalid") ErrInvalidSenderAddress = errors.New("ERROR: Sender address is invalid") ErrInvalidRcverAddress = errors.New("ERROR: Receiver address is invalid") ErrPasswordNotMatch = errors.New("ERROR: Password not correct") ErrPathEmpty = errors.New("ERROR: Path empty") ErrPasswordEmpty = errors.New("ERROR: Password empty") )
Functions ¶
func CreateBlockchain ¶
func CreateBlockchain(address core.Address, db storage.Storage, consensus core.Consensus, transactionPoolLimit uint32) (*core.Blockchain, error)
create a blockchain
func CreateWallet ¶
create a wallet from path
func CreateWalletWithpassphrase ¶ added in v0.1.2
create a wallet with passphrase
func GetAllAddressesByPath ¶ added in v0.1.2
get all addresses
func GetBalance ¶
get balance
func GetMinerAddress ¶ added in v0.1.2
func GetMinerAddress() string
func GetTestWalletPath ¶ added in v0.1.2
func GetTestWalletPath() string
func GetWalletManager ¶ added in v0.1.2
func GetWalletManager(path string) (*client.WalletManager, error)
func IsTestWalletEmpty ¶ added in v0.1.2
func IsWalletEmpty ¶ added in v0.1.2
Tell if the file empty or not exist
func SendFromMiner ¶ added in v0.1.2
add balance
func SetMinerKeyPair ¶ added in v0.1.2
func SetMinerKeyPair(key string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.