Documentation ¶
Index ¶
- Variables
- func Start(c Client)
- type Client
- type Mock
- func (Mock) AccountInfo(id string)
- func (Mock) CreateAccount(generatePassphrase bool, accountInfo string) error
- func (Mock) GetVariable(key string) string
- func (Mock) IsAccountUnLock(id string) bool
- func (Mock) LocalAccount() *accounts.Account
- func (Mock) Lock(passphrase string) error
- func (Mock) NeedRestartNode(params, flags []string) bool
- func (Mock) Restart(params, flags []string) error
- func (Mock) SetVariables(params, flags []string) error
- func (Mock) Setup(allocation string) error
- func (Mock) Transfer(from, to, amount, passphrase string) error
- func (Mock) Unlock(passphrase string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var TestMode = false
TestMode variable used for check if unit test is running
Functions ¶
Types ¶
type Client ¶
type Client interface { CreateAccount(alias string) *accounts.Account CurrentAccount() *accounts.Account SetCurrentAccount(a *accounts.Account) AccountInfo(address string) (*accounts.AccountInfo, error) NodeInfo() (*client.NodeInfo, error) Sanity() error Transfer(recipient address.Address, nonce, amount, gasPrice, gasLimit uint64, key ed25519.PrivateKey) (string, error) ListAccounts() []string GetAccount(name string) (*accounts.Account, error) StoreAccounts() error NodeURL() string Rebel(datadir string, space uint, coinbase string) error ListTxs(address string) ([]string, error) SetCoinbase(coinbase string) error }
Client interface to REPL clients.
type Mock ¶
type Mock struct{}
Mock struct created temporarily while node doesn't implement the methods.
func (Mock) CreateAccount ¶
CreateAccount creates accountInfo.
func (Mock) GetVariable ¶
GetVariable gets variable in node by key
func (Mock) IsAccountUnLock ¶
IsAccountUnLock checks if the accountInfo with id is unlock.
func (Mock) LocalAccount ¶
CurrentAccount returns local accountInfo.
func (Mock) NeedRestartNode ¶
NeedRestartNode checks if the params and flags that will be set need restart the node.
func (Mock) SetVariables ¶
SetVariables sets params or CLI flags values.
Click to show internal directories.
Click to hide internal directories.