Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServiceConfig ¶
APIServiceConfig defines a config of APIServiceClient
type Client ¶
type Client interface {
// Start starts the client
Start(context.Context) error
// Stop stops the client
Stop(context.Context) error
// Config returns the config of the client
Config() config.Config
// APIServiceClient returns an API service client
APIServiceClient(APIServiceConfig) (iotexapi.APIServiceClient, error)
// SelectTranslation select a translation based on UILanguage
SelectTranslation(map[config.Language]string) (string, config.Language)
// AskToConfirm asks user to confirm from terminal, true to continue
AskToConfirm(string) bool
// ReadSecret reads password from terminal
ReadSecret() (string, error)
// Execute a bash command
Execute(string) error
// AddressWithDefaultIfNotExist returns default address if input empty
AddressWithDefaultIfNotExist(in string) (string, error)
// Address returns address if input address|alias
Address(in string) (string, error)
// NewKeyStore creates a keystore by default walletdir
NewKeyStore() *keystore.KeyStore
// DecryptPrivateKey returns privateKey from a json blob
DecryptPrivateKey(string, string) (*ecdsa.PrivateKey, error)
// AliasMap returns the alias map: accountAddr-aliasName
AliasMap() map[string]string
// SetAlias write alias and account address to the default config file
SetAlias(string, string) error
// DeleteAlias delete alias from the default config file
DeleteAlias(string) error
// PrintInfo print the command result or the question query
PrintInfo(string)
// IsCryptoSm2 return true if use sm2 cryptographic algorithm, false if not use
IsCryptoSm2() bool
}
Client defines the interface of an ioctl client
type ConfirmationMessage ¶ added in v1.7.1
ConfirmationMessage is the struct of an Confirmation output
func (*ConfirmationMessage) String ¶ added in v1.7.1
func (m *ConfirmationMessage) String() string
type Option ¶ added in v1.7.1
type Option func(*client)
Option sets client construction parameter
func EnableCryptoSm2 ¶ added in v1.7.1
func EnableCryptoSm2() Option
EnableCryptoSm2 enables to use sm2 cryptographic algorithm
Click to show internal directories.
Click to hide internal directories.