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() common.LocalAccount
- 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 {
PrintWalletMnemonic()
WalletInfo()
IsOpen() bool
OpenWallet() bool
NewWallet() bool
CloseWallet()
CreateAccount(alias string) (*common.LocalAccount, error)
CurrentAccount() (*common.LocalAccount, error)
SetCurrentAccount(accountNumber int) error
ListAccounts() ([]string, error)
GetAccount(name string) (*common.LocalAccount, error)
StoreAccounts() error
ServerInfo() string
NodeStatus() (*apitypes.NodeStatus, error)
NodeInfo() (*common.NodeInfo, error)
Echo() error
GetMeshTransactions(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.MeshTransaction, uint32, error)
GetMeshActivations(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.Activation, uint32, error)
GetMeshInfo() (*common.NetInfo, error)
Transfer(recipient gosmtypes.Address, nonce, amount, gasPrice, gasLimit uint64, key ed25519.PrivateKey) (*apitypes.TransactionState, error)
TransactionState(txId []byte, includeTx bool) (*apitypes.TransactionState, *apitypes.Transaction, error)
IsSmeshing() (*apitypes.IsSmeshingResponse, error)
StartSmeshing(request *apitypes.StartSmeshingRequest) (*status.Status, error)
StopSmeshing(deleteFiles bool) (*status.Status, error)
GetPostComputeProviders(benchmark bool) ([]*apitypes.PostSetupComputeProvider, error)
GetSmesherId() ([]byte, error)
GetRewardsAddress() (*gosmtypes.Address, error)
SetRewardsAddress(coinbase gosmtypes.Address) (*status.Status, error)
Config() (*apitypes.PostConfigResponse, error)
PostStatus() (*apitypes.PostSetupStatusResponse, error)
PostDataCreationProgressStream() (apitypes.SmesherService_PostSetupStatusStreamClient, error)
DebugAllAccounts() ([]*apitypes.Account, error)
AccountState(address gosmtypes.Address) (*apitypes.Account, error)
AccountRewards(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.Reward, uint32, error)
AccountRewardsStream(address gosmtypes.Address) (apitypes.GlobalStateService_AccountDataStreamClient, error)
AccountUpdatesStream(address gosmtypes.Address) (apitypes.GlobalStateService_AccountDataStreamClient, error)
AccountTransactionsReceipts(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.TransactionReceipt, uint32, error)
GlobalStateHash() (*apitypes.GlobalStateHash, error)
SmesherRewards(smesherId []byte, offset uint32, maxResults uint32) ([]*apitypes.Reward, uint32, 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 ¶
func (Mock) LocalAccount() common.LocalAccount
LocalAccount 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.