cmd

package
v0.0.0-...-589da53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: MIT Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const MaxConsentRequests = 100

Variables

View Source
var (
	ErrEnableAutomaticConsentFlagIsRequiredWithoutTTY = errors.New("--automatic-consent flag is required without TTY")
	ErrMsysUnsupported                                = errors.New("this command is not supported on msys, please use a standard windows terminal")
)
View Source
var (
	ErrForceFlagIsRequiredWithoutTTY = errors.New("--force is required without TTY")
)
View Source
var (
	ErrTokenStoreNotInitialized = errors.New("the token store is not initialized, call the `api-token init` command first")
)

Functions

func BuildCmdAnnotateKey

func BuildCmdAnnotateKey(w io.Writer, handler AnnotateKeyHandler, rf *RootFlags) *cobra.Command

func BuildCmdCheckSoftwareCompatibility

func BuildCmdCheckSoftwareCompatibility(w io.Writer, handler CheckSoftwareCompatibilityHandler, rf *RootFlags) *cobra.Command

func BuildCmdCheckTransaction

func BuildCmdCheckTransaction(w io.Writer, handler CheckTransactionHandler, rf *RootFlags) *cobra.Command

func BuildCmdCreateWallet

func BuildCmdCreateWallet(w io.Writer, handler CreateWalletHandler, rf *RootFlags) *cobra.Command

func BuildCmdDeleteAPIToken

func BuildCmdDeleteAPIToken(w io.Writer, preCheck APITokenPreCheck, handler DeleteAPITokenHandler, rf *RootFlags) *cobra.Command

func BuildCmdDeleteNetwork

func BuildCmdDeleteNetwork(w io.Writer, handler RemoveNetworkHandler, rf *RootFlags) *cobra.Command

func BuildCmdDeleteWallet

func BuildCmdDeleteWallet(w io.Writer, handler RemoveWalletHandler, rf *RootFlags) *cobra.Command

func BuildCmdDescribeAPIToken

func BuildCmdDescribeAPIToken(w io.Writer, preCheck APITokenPreCheck, handler DescribeAPITokenHandler, rf *RootFlags) *cobra.Command

func BuildCmdDescribeKey

func BuildCmdDescribeKey(w io.Writer, handler DescribeKeyHandler, rf *RootFlags) *cobra.Command

func BuildCmdDescribeNetwork

func BuildCmdDescribeNetwork(w io.Writer, handler DescribeNetworkHandler, rf *RootFlags) *cobra.Command

func BuildCmdDescribePermissions

func BuildCmdDescribePermissions(w io.Writer, handler DescribePermissionsHandler, rf *RootFlags) *cobra.Command

func BuildCmdDescribeServiceConfig

func BuildCmdDescribeServiceConfig(w io.Writer, handler DescribeServiceConfigHandler, rf *RootFlags) *cobra.Command

func BuildCmdDescribeWallet

func BuildCmdDescribeWallet(w io.Writer, handler DescribeWalletHandler, rf *RootFlags) *cobra.Command

func BuildCmdDisclaimer

func BuildCmdDisclaimer(w io.Writer, handler DisclaimerHandler, rf *RootFlags) *cobra.Command

func BuildCmdGenerateAPIToken

func BuildCmdGenerateAPIToken(w io.Writer, preCheck APITokenPreCheck, handler GenerateAPITokenHandler, rf *RootFlags) *cobra.Command

func BuildCmdGenerateKey

func BuildCmdGenerateKey(w io.Writer, handler GenerateKeyHandler, rf *RootFlags) *cobra.Command

func BuildCmdGetSoftwareVersion

func BuildCmdGetSoftwareVersion(w io.Writer, handler GetSoftwareVersionHandler, rf *RootFlags) *cobra.Command

func BuildCmdImportNetwork

func BuildCmdImportNetwork(w io.Writer, handler ImportNetworkFromSourceHandler, rf *RootFlags) *cobra.Command

func BuildCmdImportWallet

func BuildCmdImportWallet(w io.Writer, handler ImportWalletHandler, rf *RootFlags) *cobra.Command

func BuildCmdInit

func BuildCmdInit(w io.Writer, handler InitHandler, rf *RootFlags) *cobra.Command

func BuildCmdInitAPIToken

func BuildCmdInitAPIToken(w io.Writer, handler APITokenInitHandler, rf *RootFlags) *cobra.Command

func BuildCmdIsolateKey

func BuildCmdIsolateKey(w io.Writer, handler IsolateKeyHandler, rf *RootFlags) *cobra.Command

func BuildCmdListAPITokens

func BuildCmdListAPITokens(w io.Writer, preCheck APITokenPreCheck, handler ListAPITokensHandler, rf *RootFlags) *cobra.Command

func BuildCmdListEndpoints

func BuildCmdListEndpoints(w io.Writer, handler ListEndpointsHandler, rf *RootFlags) *cobra.Command

func BuildCmdListKeys

func BuildCmdListKeys(w io.Writer, handler ListKeysHandler, rf *RootFlags) *cobra.Command

func BuildCmdListNetworks

func BuildCmdListNetworks(w io.Writer, handler ListNetworksHandler, rf *RootFlags) *cobra.Command

func BuildCmdListPermissions

func BuildCmdListPermissions(w io.Writer, handler ListPermissionsHandler, rf *RootFlags) *cobra.Command

func BuildCmdListSessions

func BuildCmdListSessions(w io.Writer, handler ListSessionsHandler, rf *RootFlags) *cobra.Command

func BuildCmdListWallets

func BuildCmdListWallets(w io.Writer, handler ListWalletsHandler, rf *RootFlags) *cobra.Command

func BuildCmdLocateNetworks

func BuildCmdLocateNetworks(w io.Writer, handler LocateNetworksHandler, rf *RootFlags) *cobra.Command

func BuildCmdLocateServiceConfigs

func BuildCmdLocateServiceConfigs(w io.Writer, handler LocateServiceConfigsHandler, rf *RootFlags) *cobra.Command

func BuildCmdLocateWallets

func BuildCmdLocateWallets(w io.Writer, handler LocateWalletsHandler, rf *RootFlags) *cobra.Command

func BuildCmdPurgePermissions

func BuildCmdPurgePermissions(w io.Writer, handler PurgePermissionsHandler, rf *RootFlags) *cobra.Command

func BuildCmdRawTransactionSend

func BuildCmdRawTransactionSend(w io.Writer, handler SendRawTransactionHandler, rf *RootFlags) *cobra.Command

func BuildCmdRenameNetwork

func BuildCmdRenameNetwork(w io.Writer, handler RenameNetworkHandler, rf *RootFlags) *cobra.Command

func BuildCmdRenameWallet

func BuildCmdRenameWallet(w io.Writer, handler RenameWalletHandler, rf *RootFlags) *cobra.Command

func BuildCmdResetServiceConfig

func BuildCmdResetServiceConfig(w io.Writer, handler ResetServiceConfigHandler, rf *RootFlags) *cobra.Command

func BuildCmdRevokePermissions

func BuildCmdRevokePermissions(w io.Writer, handler RevokePermissionsHandler, rf *RootFlags) *cobra.Command

func BuildCmdRoot

func BuildCmdRoot(w io.Writer) *cobra.Command

func BuildCmdRotateKey

func BuildCmdRotateKey(w io.Writer, handler RotateKeyHandler, rf *RootFlags) *cobra.Command

func BuildCmdRunService

func BuildCmdRunService(w io.Writer, handler RunServiceHandler, rf *RootFlags) *cobra.Command

func BuildCmdSendTransaction

func BuildCmdSendTransaction(w io.Writer, handler SendTransactionHandler, rf *RootFlags) *cobra.Command

func BuildCmdSignMessage

func BuildCmdSignMessage(w io.Writer, handler SignMessageHandler, rf *RootFlags) *cobra.Command

func BuildCmdSignTransaction

func BuildCmdSignTransaction(w io.Writer, handler SignTransactionHandler, rf *RootFlags) *cobra.Command

func BuildCmdTaintKey

func BuildCmdTaintKey(w io.Writer, handler TaintKeyHandler, rf *RootFlags) *cobra.Command

func BuildCmdUntaintKey

func BuildCmdUntaintKey(w io.Writer, handler UntaintKeyHandler, rf *RootFlags) *cobra.Command

func BuildCmdUpdatePassphrase

func BuildCmdUpdatePassphrase(w io.Writer, handler UpdatePassphraseHandler, rf *RootFlags) *cobra.Command

func BuildCmdVerifyMessage

func BuildCmdVerifyMessage(w io.Writer, handler VerifyMessageHandler, rf *RootFlags) *cobra.Command

func Disclaimer

func Disclaimer(home string, f *DisclaimerFlags) error

func Execute

func Execute(w *Writer)

func Init

func Init(home string, f *InitFlags) error

func InitAPIToken

func InitAPIToken(home string, f *InitAPITokenFlags) error

func ListEndpoints

func ListEndpoints(w io.Writer, rf *RootFlags, f *ListEndpointsFlags) error

func NewCmdAPIToken

func NewCmdAPIToken(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdAnnotateKey

func NewCmdAnnotateKey(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdCheckTransaction

func NewCmdCheckTransaction(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdCreateWallet

func NewCmdCreateWallet(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDeleteAPIToken

func NewCmdDeleteAPIToken(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDeleteNetwork

func NewCmdDeleteNetwork(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDeleteWallet

func NewCmdDeleteWallet(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDescribeAPIToken

func NewCmdDescribeAPIToken(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDescribeKey

func NewCmdDescribeKey(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDescribeNetwork

func NewCmdDescribeNetwork(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDescribePermissions

func NewCmdDescribePermissions(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDescribeServiceConfig

func NewCmdDescribeServiceConfig(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDescribeWallet

func NewCmdDescribeWallet(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdDisclaimer

func NewCmdDisclaimer(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdGenerateAPIToken

func NewCmdGenerateAPIToken(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdGenerateKey

func NewCmdGenerateKey(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdImportNetwork

func NewCmdImportNetwork(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdImportWallet

func NewCmdImportWallet(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdInit

func NewCmdInit(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdInitAPIToken

func NewCmdInitAPIToken(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdIsolateKey

func NewCmdIsolateKey(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdKey

func NewCmdKey(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdListAPITokens

func NewCmdListAPITokens(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdListEndpoints

func NewCmdListEndpoints(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdListKeys

func NewCmdListKeys(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdListNetworks

func NewCmdListNetworks(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdListPermissions

func NewCmdListPermissions(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdListSessions

func NewCmdListSessions(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdListWallets

func NewCmdListWallets(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdLocateNetworks

func NewCmdLocateNetworks(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdLocateServiceConfig

func NewCmdLocateServiceConfig(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdLocateWallets

func NewCmdLocateWallets(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdMessage

func NewCmdMessage(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdNetwork

func NewCmdNetwork(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdPassphrase

func NewCmdPassphrase(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdPermissions

func NewCmdPermissions(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdPurgePermissions

func NewCmdPurgePermissions(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdRawTransaction

func NewCmdRawTransaction(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdRawTransactionSend

func NewCmdRawTransactionSend(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdRenameNetwork

func NewCmdRenameNetwork(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdRenameWallet

func NewCmdRenameWallet(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdResetServiceConfig

func NewCmdResetServiceConfig(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdRevokePermissions

func NewCmdRevokePermissions(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdRoot

func NewCmdRoot(w io.Writer) *cobra.Command

func NewCmdRotateKey

func NewCmdRotateKey(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdRunService

func NewCmdRunService(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdSendTransaction

func NewCmdSendTransaction(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdService

func NewCmdService(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdServiceConfig

func NewCmdServiceConfig(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdSession

func NewCmdSession(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdShell

func NewCmdShell(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdShellCompletion

func NewCmdShellCompletion(w io.Writer) *cobra.Command

func NewCmdSignMessage

func NewCmdSignMessage(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdSignTransaction

func NewCmdSignTransaction(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdSoftware

func NewCmdSoftware(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdSoftwareCompatibility

func NewCmdSoftwareCompatibility(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdSoftwareVersion

func NewCmdSoftwareVersion(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdTaintKey

func NewCmdTaintKey(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdTransaction

func NewCmdTransaction(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdUntaintKey

func NewCmdUntaintKey(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdUpdatePassphrase

func NewCmdUpdatePassphrase(w io.Writer, rf *RootFlags) *cobra.Command

func NewCmdVerifyMessage

func NewCmdVerifyMessage(w io.Writer, rf *RootFlags) *cobra.Command

func PrintAPITokenInitResponse

func PrintAPITokenInitResponse(w io.Writer)

func PrintAnnotateKeyResponse

func PrintAnnotateKeyResponse(w io.Writer, f AnnotateKeyFlags, res api.AdminAnnotateKeyResult)

func PrintCheckSoftwareIncompatibilityResponse

func PrintCheckSoftwareIncompatibilityResponse(w io.Writer, resp *wversion.CheckSoftwareCompatibilityResponse)

func PrintCheckTransactionResponse

func PrintCheckTransactionResponse(w io.Writer, res api.AdminCheckTransactionResult, rf *RootFlags)

func PrintCreateWalletResponse

func PrintCreateWalletResponse(w io.Writer, resp createWalletResult)

func PrintDeleteNetworkResponse

func PrintDeleteNetworkResponse(w io.Writer, networkName string)

func PrintDeleteWalletResponse

func PrintDeleteWalletResponse(w io.Writer, walletName string)

func PrintDescribeKeyResponse

func PrintDescribeKeyResponse(w io.Writer, resp api.AdminDescribeKeyResult)

func PrintDescribeNetworkResponse

func PrintDescribeNetworkResponse(w io.Writer, resp api.AdminNetwork)

func PrintDescribeNetworkWithValueNotSet

func PrintDescribeNetworkWithValueNotSet(str *printer.FormattedString, value string)

func PrintDescribeNetworkWithValuesNotSet

func PrintDescribeNetworkWithValuesNotSet(str *printer.FormattedString, hosts []string)

func PrintDescribePermissionsResult

func PrintDescribePermissionsResult(w io.Writer, resp api.AdminDescribePermissionsResult)

func PrintDescribeServiceConfigResponse

func PrintDescribeServiceConfigResponse(w io.Writer, cfg *service.Config)

func PrintDescribeWalletResponse

func PrintDescribeWalletResponse(w io.Writer, resp api.AdminDescribeWalletResult)

func PrintGenerateKeyResponse

func PrintGenerateKeyResponse(w io.Writer, req api.AdminGenerateKeyParams, resp api.AdminGenerateKeyResult)

func PrintGetSoftwareVersionResponse

func PrintGetSoftwareVersionResponse(w io.Writer, resp *wversion.GetSoftwareVersionResponse)

func PrintImportNetworkResponse

func PrintImportNetworkResponse(w io.Writer, resp adminImportNetworkResult)

func PrintImportWalletResponse

func PrintImportWalletResponse(w io.Writer, resp importWalletResult)

func PrintInitResponse

func PrintInitResponse(w io.Writer)

func PrintIsolateKeyResponse

func PrintIsolateKeyResponse(w io.Writer, resp isolateKeyResult)

func PrintListKeysResponse

func PrintListKeysResponse(w io.Writer, resp api.AdminListKeysResult)

func PrintListNetworksResult

func PrintListNetworksResult(w io.Writer, resp api.AdminListNetworksResult)

func PrintListPermissionsResponse

func PrintListPermissionsResponse(w io.Writer, resp api.AdminListPermissionsResult)

func PrintListWalletsResult

func PrintListWalletsResult(w io.Writer, resp api.AdminListWalletsResult)

func PrintLocateNetworksResponse

func PrintLocateNetworksResponse(w io.Writer, resp *LocateNetworksResponse)

func PrintLocateServiceConfigsResponse

func PrintLocateServiceConfigsResponse(w io.Writer, resp *LocateServiceConfigsResponse)

func PrintLocateWalletsResponse

func PrintLocateWalletsResponse(w io.Writer, resp *LocateWalletsResponse)

func PrintPurgePermissionsResponse

func PrintPurgePermissionsResponse(w io.Writer, wallet string)

func PrintRenameNetworkResponse

func PrintRenameNetworkResponse(w io.Writer, f *RenameNetworkFlags)

func PrintRenameWalletResponse

func PrintRenameWalletResponse(w io.Writer, f *RenameWalletFlags)

func PrintResetServiceConfigResponse

func PrintResetServiceConfigResponse(w io.Writer, cfg *service.Config)

func PrintRevokePermissionsResponse

func PrintRevokePermissionsResponse(w io.Writer, req api.AdminRevokePermissionsParams)

func PrintRotateKeyResponse

func PrintRotateKeyResponse(w io.Writer, req api.AdminRotateKeyResult)

func PrintSendTransactionResponse

func PrintSendTransactionResponse(w io.Writer, res api.AdminSendTransactionResult, rf *RootFlags)

func PrintSignMessageResponse

func PrintSignMessageResponse(w io.Writer, req api.AdminSignMessageResult)

func PrintSignTransactionResponse

func PrintSignTransactionResponse(w io.Writer, req api.AdminSignTransactionResult, rf *RootFlags)

func PrintTXSendResponse

func PrintTXSendResponse(w io.Writer, res api.AdminSendRawTransactionResult)

func PrintTaintKeyResponse

func PrintTaintKeyResponse(w io.Writer)

func PrintUntaintKeyResponse

func PrintUntaintKeyResponse(w io.Writer)

func PrintUpdatePassphraseResponse

func PrintUpdatePassphraseResponse(w io.Writer)

func PrintVerifyMessageResponse

func PrintVerifyMessageResponse(w io.Writer, isValid bool)

func RunService

func RunService(w io.Writer, rf *RootFlags, f *RunServiceFlags) error

Types

type APITokenInitHandler

type APITokenInitHandler func(home string, f *InitAPITokenFlags) error

type APITokenPreCheck

type APITokenPreCheck func(rf *RootFlags) error

type AnnotateKeyFlags

type AnnotateKeyFlags struct {
	Wallet         string
	PubKey         string
	PassphraseFile string
	Clear          bool
	RawMetadata    []string
}

func (*AnnotateKeyFlags) Validate

type CheckSoftwareCompatibilityHandler

type CheckSoftwareCompatibilityHandler func() (*wversion.CheckSoftwareCompatibilityResponse, error)

type CheckTransactionFlags

type CheckTransactionFlags struct {
	Network                string
	NodeAddress            string
	Wallet                 string
	PubKey                 string
	PassphraseFile         string
	Retries                uint64
	LogLevel               string
	RawTransaction         string
	NoVersionCheck         bool
	MaximumRequestDuration time.Duration
}

func (*CheckTransactionFlags) Validate

type CreateWalletFlags

type CreateWalletFlags struct {
	Wallet         string
	PassphraseFile string
}

func (*CreateWalletFlags) Validate

type CreateWalletHandler

type CreateWalletHandler func(api.AdminCreateWalletParams) (createWalletResult, error)

type DeleteAPITokenFlags

type DeleteAPITokenFlags struct {
	Token          string
	PassphraseFile string
	Force          bool
	// contains filtered or unexported fields
}

func (*DeleteAPITokenFlags) Validate

func (f *DeleteAPITokenFlags) Validate() error

type DeleteAPITokenHandler

type DeleteAPITokenHandler func(f DeleteAPITokenFlags) error

type DeleteNetworkFlags

type DeleteNetworkFlags struct {
	Network string
	Force   bool
}

func (*DeleteNetworkFlags) Validate

type DeleteWalletFlags

type DeleteWalletFlags struct {
	Wallet string
	Force  bool
}

func (*DeleteWalletFlags) Validate

type DescribeAPITokenFlags

type DescribeAPITokenFlags struct {
	PassphraseFile string
	Token          string
	// contains filtered or unexported fields
}

func (*DescribeAPITokenFlags) Validate

func (f *DescribeAPITokenFlags) Validate() error

type DescribeAPITokenHandler

type DescribeAPITokenHandler func(f DescribeAPITokenFlags) (connections.TokenDescription, error)

type DescribeKeyFlags

type DescribeKeyFlags struct {
	Wallet         string
	PassphraseFile string
	PublicKey      string
}

func (*DescribeKeyFlags) Validate

type DescribeNetworkFlags

type DescribeNetworkFlags struct {
	Network string
}

func (*DescribeNetworkFlags) Validate

type DescribeNetworkHandler

type DescribeNetworkHandler func(api.AdminDescribeNetworkParams) (api.AdminNetwork, error)

type DescribePermissionsFlags

type DescribePermissionsFlags struct {
	Wallet         string
	Hostname       string
	PassphraseFile string
}

func (*DescribePermissionsFlags) Validate

type DescribeServiceConfigHandler

type DescribeServiceConfigHandler func() (*service.Config, error)

type DescribeWalletFlags

type DescribeWalletFlags struct {
	Wallet         string
	PassphraseFile string
}

func (*DescribeWalletFlags) Validate

type DisclaimerFlags

type DisclaimerFlags struct{}

type DisclaimerHandler

type DisclaimerHandler func(home string, f *DisclaimerFlags) error

type Error

type Error struct {
	Err string `json:"error"`
}

type GenerateAPITokenFlags

type GenerateAPITokenFlags struct {
	Description          string
	PassphraseFile       string
	WalletName           string
	WalletPassphraseFile string
	ExpiresIn            time.Duration
	// contains filtered or unexported fields
}

func (*GenerateAPITokenFlags) Validate

type GenerateKeyFlags

type GenerateKeyFlags struct {
	Wallet         string
	PassphraseFile string
	RawMetadata    []string
}

func (*GenerateKeyFlags) Validate

type GetSoftwareVersionHandler

type GetSoftwareVersionHandler func() *wversion.GetSoftwareVersionResponse

type ImportNetworkFlags

type ImportNetworkFlags struct {
	FilePath string
	URL      string
	Name     string
	Force    bool
}

func (*ImportNetworkFlags) Validate

type ImportNetworkFromSourceHandler

type ImportNetworkFromSourceHandler func(api.AdminImportNetworkParams) (adminImportNetworkResult, error)

type ImportWalletFlags

type ImportWalletFlags struct {
	Wallet             string
	PassphraseFile     string
	RecoveryPhraseFile string
	Version            uint32
}

func (*ImportWalletFlags) Validate

type ImportWalletHandler

type ImportWalletHandler func(api.AdminImportWalletParams) (importWalletResult, error)

type InitAPITokenFlags

type InitAPITokenFlags struct {
	PassphraseFile string
	Force          bool
}

type InitFlags

type InitFlags struct {
	Force                bool
	TokensPassphraseFile string
}

type InitHandler

type InitHandler func(home string, f *InitFlags) error

type IsolateKeyFlags

type IsolateKeyFlags struct {
	Wallet                       string
	PubKey                       string
	PassphraseFile               string
	IsolatedWalletPassphraseFile string
}

func (*IsolateKeyFlags) Validate

type IsolateKeyHandler

type IsolateKeyHandler func(api.AdminIsolateKeyParams, string) (isolateKeyResult, error)

type ListAPITokensFlags

type ListAPITokensFlags struct {
	PassphraseFile string
	// contains filtered or unexported fields
}

func (*ListAPITokensFlags) Validate

func (f *ListAPITokensFlags) Validate() error

type ListEndpointsFlags

type ListEndpointsFlags struct {
	Network string
}

func (*ListEndpointsFlags) Validate

func (f *ListEndpointsFlags) Validate() error

type ListEndpointsHandler

type ListEndpointsHandler func(io.Writer, *RootFlags, *ListEndpointsFlags) error

type ListKeysFlags

type ListKeysFlags struct {
	Wallet         string
	PassphraseFile string
}

func (*ListKeysFlags) Validate

func (f *ListKeysFlags) Validate() (api.AdminListKeysParams, string, error)

type ListNetworksHandler

type ListNetworksHandler func() (api.AdminListNetworksResult, error)

type ListPermissionsFlags

type ListPermissionsFlags struct {
	Wallet         string
	PassphraseFile string
}

func (*ListPermissionsFlags) Validate

type ListSessionsHandler

type ListSessionsHandler func() ([]connections.Session, error)

type ListWalletsHandler

type ListWalletsHandler func() (api.AdminListWalletsResult, error)

type LocateNetworksHandler

type LocateNetworksHandler func() (*LocateNetworksResponse, error)

type LocateNetworksResponse

type LocateNetworksResponse struct {
	Path string `json:"path"`
}

type LocateServiceConfigsHandler

type LocateServiceConfigsHandler func() (*LocateServiceConfigsResponse, error)

type LocateServiceConfigsResponse

type LocateServiceConfigsResponse struct {
	Path string `json:"path"`
}

type LocateWalletsHandler

type LocateWalletsHandler func() (*LocateWalletsResponse, error)

type LocateWalletsResponse

type LocateWalletsResponse struct {
	Path string `json:"path"`
}

type PurgePermissionsFlags

type PurgePermissionsFlags struct {
	Wallet         string
	PassphraseFile string
	Force          bool
}

func (*PurgePermissionsFlags) Validate

type PurgePermissionsHandler

type PurgePermissionsHandler func(api.AdminPurgePermissionsParams, string) error

type RemoveNetworkHandler

type RemoveNetworkHandler func(api.AdminRemoveNetworkParams) error

type RemoveWalletHandler

type RemoveWalletHandler func(api.AdminRemoveWalletParams) error

type RenameNetworkFlags

type RenameNetworkFlags struct {
	Network string
	NewName string
}

func (*RenameNetworkFlags) Validate

type RenameNetworkHandler

type RenameNetworkHandler func(api.AdminRenameNetworkParams) error

type RenameWalletFlags

type RenameWalletFlags struct {
	Wallet  string
	NewName string
}

func (*RenameWalletFlags) Validate

type RenameWalletHandler

type RenameWalletHandler func(api.AdminRenameWalletParams) error

type ResetServiceConfigFlags

type ResetServiceConfigFlags struct {
	Force bool
}

func (*ResetServiceConfigFlags) Validate

func (f *ResetServiceConfigFlags) Validate() error

type ResetServiceConfigHandler

type ResetServiceConfigHandler func() (*service.Config, error)

type RevokePermissionsFlags

type RevokePermissionsFlags struct {
	Wallet         string
	Hostname       string
	Force          bool
	PassphraseFile string
}

func (*RevokePermissionsFlags) Validate

type RevokePermissionsHandler

type RevokePermissionsHandler func(api.AdminRevokePermissionsParams, string) error

type RootFlags

type RootFlags struct {
	Output string
	Home   string
}

func (*RootFlags) Validate

func (f *RootFlags) Validate() error

type RotateKeyFlags

type RotateKeyFlags struct {
	Wallet                string
	PassphraseFile        string
	FromPublicKey         string
	ToPublicKey           string
	ChainID               string
	SubmissionBlockHeight uint64
	EnactmentBlockHeight  uint64
}

func (*RotateKeyFlags) Validate

type RunServiceFlags

type RunServiceFlags struct {
	Network                string
	EnableAutomaticConsent bool
	LoadTokens             bool
	TokensPassphraseFile   string
	NoVersionCheck         bool
	// contains filtered or unexported fields
}

func (*RunServiceFlags) Validate

func (f *RunServiceFlags) Validate(rf *RootFlags) error

type RunServiceHandler

type RunServiceHandler func(io.Writer, *RootFlags, *RunServiceFlags) error

type SendRawTransactionFlags

type SendRawTransactionFlags struct {
	Network                string
	NodeAddress            string
	Retries                uint64
	LogLevel               string
	RawTx                  string
	NoVersionCheck         bool
	MaximumRequestDuration time.Duration
}

func (*SendRawTransactionFlags) Validate

type SendTransactionFlags

type SendTransactionFlags struct {
	Network                string
	NodeAddress            string
	Wallet                 string
	PubKey                 string
	PassphraseFile         string
	Retries                uint64
	LogLevel               string
	RawTransaction         string
	NoVersionCheck         bool
	MaximumRequestDuration time.Duration
}

func (*SendTransactionFlags) Validate

type ServicePreCheck

type ServicePreCheck func(rf *RootFlags) error

type SignMessageFlags

type SignMessageFlags struct {
	Wallet         string
	PubKey         string
	Message        string
	PassphraseFile string
}

func (*SignMessageFlags) Validate

type SignTransactionFlags

type SignTransactionFlags struct {
	Wallet                 string
	PubKey                 string
	PassphraseFile         string
	RawTransaction         string
	TxBlockHeight          uint64
	ChainID                string
	TxBlockHash            string
	PowDifficulty          uint32
	PowHashFunction        string
	Network                string
	Retries                uint64
	MaximumRequestDuration time.Duration
}

func (*SignTransactionFlags) Validate

type TaintKeyFlags

type TaintKeyFlags struct {
	Wallet         string
	PublicKey      string
	PassphraseFile string
}

func (*TaintKeyFlags) Validate

func (f *TaintKeyFlags) Validate() (api.AdminTaintKeyParams, string, error)

type TaintKeyHandler

type TaintKeyHandler func(api.AdminTaintKeyParams, string) error

type UntaintKeyFlags

type UntaintKeyFlags struct {
	Wallet         string
	PublicKey      string
	PassphraseFile string
}

func (*UntaintKeyFlags) Validate

type UntaintKeyHandler

type UntaintKeyHandler func(api.AdminUntaintKeyParams, string) error

type UpdatePassphraseFlags

type UpdatePassphraseFlags struct {
	Wallet            string
	PassphraseFile    string
	NewPassphraseFile string
}

func (*UpdatePassphraseFlags) Validate

type UpdatePassphraseHandler

type UpdatePassphraseHandler func(api.AdminUpdatePassphraseParams, string) error

type VerifyMessageFlags

type VerifyMessageFlags struct {
	Signature string
	Message   string
	PubKey    string
}

func (*VerifyMessageFlags) Validate

type Writer

type Writer struct {
	Out io.Writer
	Err io.Writer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL