Documentation ¶
Index ¶
- Constants
- Variables
- func Build(output, level string) (*zap.Logger, error)
- func BuildCmdAnnotateKey(w io.Writer, handler AnnotateKeyHandler, rf *RootFlags) *cobra.Command
- func BuildCmdCommand(w io.Writer, handler SendCommandHandler, rf *RootFlags) *cobra.Command
- func BuildCmdDescribeKey(w io.Writer, handler DescribeKeyHandler, rf *RootFlags) *cobra.Command
- func BuildCmdDescribeNetwork(w io.Writer, handler DescribeNetworkHandler, rf *RootFlags) *cobra.Command
- func BuildCmdGenerateKey(w io.Writer, handler GenerateKeyHandler, rf *RootFlags) *cobra.Command
- func BuildCmdGetInfoWallet(w io.Writer, handler GetInfoWalletHandler, rf *RootFlags) *cobra.Command
- func BuildCmdGetVersion(w io.Writer, handler GetVersionHandler, rf *RootFlags) *cobra.Command
- func BuildCmdImportNetwork(w io.Writer, handler ImportNetworkFromSourceHandler, rf *RootFlags) *cobra.Command
- func BuildCmdImportWallet(w io.Writer, handler ImportWalletHandler, rf *RootFlags) *cobra.Command
- func BuildCmdInit(w io.Writer, handler InitHandler, rf *RootFlags) *cobra.Command
- func BuildCmdIsolateKey(w io.Writer, handler IsolateKeyHandler, rf *RootFlags) *cobra.Command
- func BuildCmdListKeys(w io.Writer, handler ListKeysHandler, rf *RootFlags) *cobra.Command
- func BuildCmdListNetworks(w io.Writer, handler ListNetworksHandler, rf *RootFlags) *cobra.Command
- func BuildCmdListWallets(w io.Writer, handler ListWalletsHandler, rf *RootFlags) *cobra.Command
- func BuildCmdRoot(w io.Writer, vh CheckVersionHandler) *cobra.Command
- func BuildCmdRunService(w io.Writer, handler RunServiceHandler, rf *RootFlags) *cobra.Command
- func BuildCmdSendCommand(w io.Writer, handler SendCommandHandler, rf *RootFlags) *cobra.Command
- func BuildCmdSendTx(w io.Writer, handler SendTxHandler, rf *RootFlags) *cobra.Command
- func BuildCmdSignMessage(w io.Writer, handler SignMessageHandler, rf *RootFlags) *cobra.Command
- func BuildCmdTaintKey(w io.Writer, handler TaintKeyHandler, rf *RootFlags) *cobra.Command
- func BuildCmdUntaintKey(w io.Writer, handler UntaintKeyHandler, rf *RootFlags) *cobra.Command
- func BuildCmdVerifyMessage(w io.Writer, handler VerifyMessageHandler, rf *RootFlags) *cobra.Command
- func DefaultConfig() zap.Config
- func Execute(w *Writer)
- func NewCmdAnnotateKey(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdCommand(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdDescribeKey(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdDescribeNetwork(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdGenerateKey(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdGetInfoWallet(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdImportNetwork(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdImportWallet(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdInit(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdIsolateKey(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdKey(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdListKeys(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdListNetworks(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdListWallets(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdNetwork(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdRoot(w io.Writer) *cobra.Command
- func NewCmdRunService(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdSend(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdSendCommand(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdSendTx(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdService(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdSignMessage(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdTaintKey(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdUntaintKey(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdVerifyMessage(w io.Writer, rf *RootFlags) *cobra.Command
- func NewCmdVersion(w io.Writer, rf *RootFlags) *cobra.Command
- func NewUnsupportedFlagValueError(level string) error
- func PrintAnnotateKeyResponse(w io.Writer, req *wallet.AnnotateKeyRequest)
- func PrintDescribeKeyResponse(w io.Writer, resp *wallet.DescribeKeyResponse)
- func PrintDescribeNetworkResponse(w io.Writer, resp *network.DescribeNetworkResponse)
- func PrintGenerateKeyResponse(w io.Writer, resp *wallet.GenerateKeyResponse)
- func PrintGetVersionResponse(w io.Writer, resp *version.GetVersionResponse)
- func PrintGetWalletInfoResponse(w io.Writer, resp *wallet.GetWalletInfoResponse)
- func PrintImportNetworkResponse(w io.Writer, resp *network.ImportNetworkFromSourceResponse)
- func PrintImportWalletResponse(w io.Writer, resp *wallet.ImportWalletResponse)
- func PrintInitResponse(w io.Writer, resp *InitResponse)
- func PrintIsolateKeyResponse(w io.Writer, resp *wallet.IsolateKeyResponse)
- func PrintListKeysResponse(w io.Writer, resp *wallet.ListKeysResponse)
- func PrintListNetworksResponse(w io.Writer, resp *network.ListNetworksResponse)
- func PrintListWalletsResponse(w io.Writer, resp *wallet.ListWalletsResponse)
- func PrintSignMessageResponse(w io.Writer, req *wallet.SignMessageResponse)
- func PrintTaintKeyResponse(w io.Writer)
- func PrintUntaintKeyResponse(w io.Writer)
- func PrintVerifyMessageResponse(w io.Writer, isValid bool)
- func RunService(w io.Writer, rf *RootFlags, f *RunServiceFlags) error
- func SendCommand(w io.Writer, rf *RootFlags, req *SendCommandRequest) error
- func SendTx(w io.Writer, rf *RootFlags, req *SendTxRequest) error
- func ValidateLogLevel(level string) error
- type AnnotateKeyFlags
- type AnnotateKeyHandler
- type CheckVersionHandler
- type DescribeKeyFlags
- type DescribeKeyHandler
- type DescribeNetworkFlags
- type DescribeNetworkHandler
- type Error
- type GenerateKeyFlags
- type GenerateKeyHandler
- type GetInfoWalletHandler
- type GetVersionHandler
- type GetWalletInfoFlags
- type ImportNetworkFlags
- type ImportNetworkFromSourceHandler
- type ImportWalletFlags
- type ImportWalletHandler
- type InitFlags
- type InitHandler
- type InitResponse
- type IsolateKeyFlags
- type IsolateKeyHandler
- type ListKeysFlags
- type ListKeysHandler
- type ListNetworksHandler
- type ListWalletsHandler
- type LoggerError
- type RootFlags
- type RunServiceFlags
- type RunServiceHandler
- type SendCommandFlags
- type SendCommandHandler
- type SendCommandRequest
- type SendTxFlags
- type SendTxHandler
- type SendTxRequest
- type SignMessageFlags
- type SignMessageHandler
- type TaintKeyFlags
- type TaintKeyHandler
- type UntaintKeyFlags
- type UntaintKeyHandler
- type VerifyMessageFlags
- type VerifyMessageHandler
- type Writer
Constants ¶
View Source
const ( DefaultForwarderRetryCount = 5 ForwarderRequestTimeout = 5 * time.Second )
Variables ¶
View Source
var (
ErrDoNotSetPubKeyInCommand = errors.New("do not set the public key through the command, use --pubkey flag instead")
)
View Source
var ErrNetworkDoesNotHaveGRPCHostConfigured = errors.New("network does not have gRPC hosts configured")
View Source
var SupportedLogLevels = []string{ zapcore.DebugLevel.String(), zapcore.InfoLevel.String(), zapcore.WarnLevel.String(), zapcore.ErrorLevel.String(), }
Functions ¶
func BuildCmdAnnotateKey ¶ added in v0.10.0
func BuildCmdCommand ¶ added in v0.10.0
func BuildCmdDescribeKey ¶ added in v0.10.0
func BuildCmdDescribeNetwork ¶ added in v0.10.0
func BuildCmdGenerateKey ¶ added in v0.10.0
func BuildCmdGetInfoWallet ¶ added in v0.10.0
func BuildCmdGetVersion ¶ added in v0.10.0
func BuildCmdImportNetwork ¶ added in v0.10.0
func BuildCmdImportWallet ¶ added in v0.10.0
func BuildCmdInit ¶ added in v0.10.0
func BuildCmdIsolateKey ¶ added in v0.10.0
func BuildCmdListKeys ¶ added in v0.10.0
func BuildCmdListNetworks ¶ added in v0.10.0
func BuildCmdListWallets ¶ added in v0.10.0
func BuildCmdRoot ¶ added in v0.10.0
func BuildCmdRoot(w io.Writer, vh CheckVersionHandler) *cobra.Command
func BuildCmdRunService ¶ added in v0.10.0
func BuildCmdSendCommand ¶ added in v0.10.0
func BuildCmdSendTx ¶ added in v0.10.0
func BuildCmdSignMessage ¶ added in v0.10.0
func BuildCmdTaintKey ¶ added in v0.10.0
func BuildCmdUntaintKey ¶ added in v0.10.0
func BuildCmdVerifyMessage ¶ added in v0.10.0
func DefaultConfig ¶ added in v0.10.0
func NewCmdAnnotateKey ¶ added in v0.10.0
func NewCmdDescribeKey ¶ added in v0.10.0
func NewCmdDescribeNetwork ¶ added in v0.10.0
func NewCmdGenerateKey ¶ added in v0.10.0
func NewCmdGetInfoWallet ¶ added in v0.10.0
func NewCmdImportNetwork ¶ added in v0.10.0
func NewCmdImportWallet ¶ added in v0.10.0
func NewCmdIsolateKey ¶ added in v0.10.0
func NewCmdListKeys ¶ added in v0.10.0
func NewCmdListNetworks ¶ added in v0.10.0
func NewCmdListWallets ¶ added in v0.10.0
func NewCmdRunService ¶ added in v0.10.0
func NewCmdSendCommand ¶ added in v0.10.0
func NewCmdSignMessage ¶ added in v0.10.0
func NewCmdTaintKey ¶ added in v0.10.0
func NewCmdUntaintKey ¶ added in v0.10.0
func NewCmdVerifyMessage ¶ added in v0.10.0
func NewUnsupportedFlagValueError ¶ added in v0.10.0
func PrintAnnotateKeyResponse ¶ added in v0.10.0
func PrintAnnotateKeyResponse(w io.Writer, req *wallet.AnnotateKeyRequest)
func PrintDescribeKeyResponse ¶ added in v0.10.0
func PrintDescribeKeyResponse(w io.Writer, resp *wallet.DescribeKeyResponse)
func PrintDescribeNetworkResponse ¶ added in v0.10.0
func PrintDescribeNetworkResponse(w io.Writer, resp *network.DescribeNetworkResponse)
func PrintGenerateKeyResponse ¶ added in v0.10.0
func PrintGenerateKeyResponse(w io.Writer, resp *wallet.GenerateKeyResponse)
func PrintGetVersionResponse ¶ added in v0.10.0
func PrintGetVersionResponse(w io.Writer, resp *version.GetVersionResponse)
func PrintGetWalletInfoResponse ¶ added in v0.10.0
func PrintGetWalletInfoResponse(w io.Writer, resp *wallet.GetWalletInfoResponse)
func PrintImportNetworkResponse ¶ added in v0.10.0
func PrintImportNetworkResponse(w io.Writer, resp *network.ImportNetworkFromSourceResponse)
func PrintImportWalletResponse ¶ added in v0.10.0
func PrintImportWalletResponse(w io.Writer, resp *wallet.ImportWalletResponse)
func PrintInitResponse ¶ added in v0.10.0
func PrintInitResponse(w io.Writer, resp *InitResponse)
func PrintIsolateKeyResponse ¶ added in v0.10.0
func PrintIsolateKeyResponse(w io.Writer, resp *wallet.IsolateKeyResponse)
func PrintListKeysResponse ¶ added in v0.10.0
func PrintListKeysResponse(w io.Writer, resp *wallet.ListKeysResponse)
func PrintListNetworksResponse ¶ added in v0.10.0
func PrintListNetworksResponse(w io.Writer, resp *network.ListNetworksResponse)
func PrintListWalletsResponse ¶ added in v0.10.0
func PrintListWalletsResponse(w io.Writer, resp *wallet.ListWalletsResponse)
func PrintSignMessageResponse ¶ added in v0.10.0
func PrintSignMessageResponse(w io.Writer, req *wallet.SignMessageResponse)
func PrintTaintKeyResponse ¶ added in v0.10.0
func PrintUntaintKeyResponse ¶ added in v0.10.0
func PrintVerifyMessageResponse ¶ added in v0.10.0
func RunService ¶ added in v0.10.0
func RunService(w io.Writer, rf *RootFlags, f *RunServiceFlags) error
func SendCommand ¶ added in v0.10.0
func SendCommand(w io.Writer, rf *RootFlags, req *SendCommandRequest) error
func ValidateLogLevel ¶ added in v0.10.0
Types ¶
type AnnotateKeyFlags ¶ added in v0.10.0
type AnnotateKeyFlags struct { Wallet string PubKey string PassphraseFile string Clear bool RawMetadata []string }
func (*AnnotateKeyFlags) Validate ¶ added in v0.10.0
func (f *AnnotateKeyFlags) Validate() (*wallet.AnnotateKeyRequest, error)
type AnnotateKeyHandler ¶ added in v0.10.0
type AnnotateKeyHandler func(*wallet.AnnotateKeyRequest) error
type CheckVersionHandler ¶ added in v0.10.0
type CheckVersionHandler func() (*semver.Version, error)
type DescribeKeyFlags ¶ added in v0.10.0
func (*DescribeKeyFlags) Validate ¶ added in v0.10.0
func (f *DescribeKeyFlags) Validate() (*wallet.DescribeKeyRequest, error)
type DescribeKeyHandler ¶ added in v0.10.0
type DescribeKeyHandler func(*wallet.DescribeKeyRequest) (*wallet.DescribeKeyResponse, error)
type DescribeNetworkFlags ¶ added in v0.10.0
type DescribeNetworkFlags struct {
Network string
}
func (*DescribeNetworkFlags) Validate ¶ added in v0.10.0
func (f *DescribeNetworkFlags) Validate() (*network.DescribeNetworkRequest, error)
type DescribeNetworkHandler ¶ added in v0.10.0
type DescribeNetworkHandler func(*network.DescribeNetworkRequest) (*network.DescribeNetworkResponse, error)
type GenerateKeyFlags ¶ added in v0.10.0
func (*GenerateKeyFlags) Validate ¶ added in v0.10.0
func (f *GenerateKeyFlags) Validate() (*wallet.GenerateKeyRequest, error)
type GenerateKeyHandler ¶ added in v0.10.0
type GenerateKeyHandler func(flags.PassphraseGetterWithOps, *wallet.GenerateKeyRequest) (*wallet.GenerateKeyResponse, error)
type GetInfoWalletHandler ¶ added in v0.10.0
type GetInfoWalletHandler func(*wallet.GetWalletInfoRequest) (*wallet.GetWalletInfoResponse, error)
type GetVersionHandler ¶ added in v0.10.0
type GetVersionHandler func() *version.GetVersionResponse
type GetWalletInfoFlags ¶ added in v0.10.0
func (*GetWalletInfoFlags) Validate ¶ added in v0.10.0
func (f *GetWalletInfoFlags) Validate() (*wallet.GetWalletInfoRequest, error)
type ImportNetworkFlags ¶ added in v0.10.0
func (*ImportNetworkFlags) Validate ¶ added in v0.10.0
func (f *ImportNetworkFlags) Validate() (*network.ImportNetworkFromSourceRequest, error)
type ImportNetworkFromSourceHandler ¶ added in v0.10.0
type ImportNetworkFromSourceHandler func(*network.ImportNetworkFromSourceRequest) (*network.ImportNetworkFromSourceResponse, error)
type ImportWalletFlags ¶ added in v0.10.0
type ImportWalletFlags struct { Wallet string PassphraseFile string MnemonicFile string Version uint32 }
func (*ImportWalletFlags) Validate ¶ added in v0.10.0
func (f *ImportWalletFlags) Validate() (*wallet.ImportWalletRequest, error)
type ImportWalletHandler ¶ added in v0.10.0
type ImportWalletHandler func(*wallet.ImportWalletRequest) (*wallet.ImportWalletResponse, error)
type InitHandler ¶ added in v0.10.0
type InitHandler func(home string, f *InitFlags) (*InitResponse, error)
type InitResponse ¶ added in v0.10.0
type IsolateKeyFlags ¶ added in v0.10.0
func (*IsolateKeyFlags) Validate ¶ added in v0.10.0
func (f *IsolateKeyFlags) Validate() (*wallet.IsolateKeyRequest, error)
type IsolateKeyHandler ¶ added in v0.10.0
type IsolateKeyHandler func(*wallet.IsolateKeyRequest) (*wallet.IsolateKeyResponse, error)
type ListKeysFlags ¶ added in v0.10.0
func (*ListKeysFlags) Validate ¶ added in v0.10.0
func (f *ListKeysFlags) Validate() (*wallet.ListKeysRequest, error)
type ListKeysHandler ¶ added in v0.10.0
type ListKeysHandler func(*wallet.ListKeysRequest) (*wallet.ListKeysResponse, error)
type ListNetworksHandler ¶ added in v0.10.0
type ListNetworksHandler func() (*network.ListNetworksResponse, error)
type ListWalletsHandler ¶ added in v0.10.0
type ListWalletsHandler func() (*wallet.ListWalletsResponse, error)
type LoggerError ¶ added in v0.10.0
type LoggerError struct {
// contains filtered or unexported fields
}
func UnsupportedLoggerLevelError ¶ added in v0.10.0
func UnsupportedLoggerLevelError(l string) LoggerError
func (LoggerError) Error ¶ added in v0.10.0
func (e LoggerError) Error() string
type RunServiceFlags ¶ added in v0.10.0
func (*RunServiceFlags) Validate ¶ added in v0.10.0
func (f *RunServiceFlags) Validate() error
type RunServiceHandler ¶ added in v0.10.0
type RunServiceHandler func(io.Writer, *RootFlags, *RunServiceFlags) error
type SendCommandFlags ¶ added in v0.10.0
type SendCommandFlags struct { Network string NodeAddress string Wallet string PubKey string PassphraseFile string Retries uint64 LogLevel string RawCommand string }
func (*SendCommandFlags) Validate ¶ added in v0.10.0
func (f *SendCommandFlags) Validate() (*SendCommandRequest, error)
type SendCommandHandler ¶ added in v0.10.0
type SendCommandHandler func(io.Writer, *RootFlags, *SendCommandRequest) error
type SendCommandRequest ¶ added in v0.10.0
type SendTxFlags ¶ added in v0.10.0
type SendTxFlags struct { Network string NodeAddress string Retries uint64 LogLevel string RawTx string }
func (*SendTxFlags) Validate ¶ added in v0.10.0
func (f *SendTxFlags) Validate() (*SendTxRequest, error)
type SendTxHandler ¶ added in v0.10.0
type SendTxHandler func(io.Writer, *RootFlags, *SendTxRequest) error
type SendTxRequest ¶ added in v0.10.0
type SendTxRequest struct { Network string NodeAddress string Retries uint64 LogLevel string Tx *commandspb.Transaction }
type SignMessageFlags ¶ added in v0.10.0
func (*SignMessageFlags) Validate ¶ added in v0.10.0
func (f *SignMessageFlags) Validate() (*wallet.SignMessageRequest, error)
type SignMessageHandler ¶ added in v0.10.0
type SignMessageHandler func(*wallet.SignMessageRequest) (*wallet.SignMessageResponse, error)
type TaintKeyFlags ¶ added in v0.10.0
func (*TaintKeyFlags) Validate ¶ added in v0.10.0
func (f *TaintKeyFlags) Validate() (*wallet.TaintKeyRequest, error)
type TaintKeyHandler ¶ added in v0.10.0
type TaintKeyHandler func(*wallet.TaintKeyRequest) error
type UntaintKeyFlags ¶ added in v0.10.0
func (*UntaintKeyFlags) Validate ¶ added in v0.10.0
func (f *UntaintKeyFlags) Validate() (*wallet.UntaintKeyRequest, error)
type UntaintKeyHandler ¶ added in v0.10.0
type UntaintKeyHandler func(*wallet.UntaintKeyRequest) error
type VerifyMessageFlags ¶ added in v0.10.0
func (*VerifyMessageFlags) Validate ¶ added in v0.10.0
func (f *VerifyMessageFlags) Validate() (*crypto.VerifyMessageRequest, error)
type VerifyMessageHandler ¶ added in v0.10.0
type VerifyMessageHandler func(*crypto.VerifyMessageRequest) (bool, error)
Source Files ¶
- cmd.go
- command.go
- init.go
- key.go
- key_annotate.go
- key_describe.go
- key_generate.go
- key_isolate.go
- key_list.go
- key_taint.go
- key_untaint.go
- logger.go
- network.go
- network_describe.go
- network_import.go
- network_list.go
- root.go
- send.go
- send_command.go
- send_tx.go
- service.go
- service_run.go
- sign.go
- verify.go
- version.go
- wallet_import.go
- wallet_info.go
- wallet_list.go
Click to show internal directories.
Click to hide internal directories.