cli

package
v0.18.18 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

View Source
const (
	FlagPubKey = "pubkey"

	FlagMoniker  = "moniker"
	FlagIdentity = "identity"
	FlagWebsite  = "website"
	FlagDetails  = "details"

	FlagNodeID = "node-id"
	FlagIP     = "ip"
)

nolint

Variables

common flagsets to add to various functions

Functions

func BuildCreateValidatorMsg

func BuildCreateValidatorMsg(cliCtx context.CLIContext, txBldr auth.TxBuilder) (auth.TxBuilder, sdk.Msg, error)

BuildCreateValidatorMsg makes a new MsgCreateValidator.

func CreateValidatorMsgHelpers

func CreateValidatorMsgHelpers(ipDefault string) (fs *flag.FlagSet, nodeIDFlag, pubkeyFlag, amountFlag,
	defaultsDesc string)

CreateValidatorMsgHelpers returns the flagset, particular flags, and a description of defaults this is anticipated to be used with the gen-tx

func GetCmdAddShares

func GetCmdAddShares(cdc *codec.Codec) *cobra.Command

GetCmdAddShares gets command for multi voting

func GetCmdBindProxy

func GetCmdBindProxy(cdc *codec.Codec) *cobra.Command

GetCmdBindProxy gets command for binding proxy

func GetCmdCreateValidator

func GetCmdCreateValidator(cdc *codec.Codec) *cobra.Command

GetCmdCreateValidator gets the create validator command handler

func GetCmdDeposit

func GetCmdDeposit(cdc *codec.Codec) *cobra.Command

GetCmdDeposit gets command for deposit

func GetCmdDestroyValidator

func GetCmdDestroyValidator(cdc *codec.Codec) *cobra.Command

GetCmdDestroyValidator gets command for destroying a validator and unbonding the min-self-delegation

func GetCmdEditValidator

func GetCmdEditValidator(cdc *codec.Codec) *cobra.Command

GetCmdEditValidator gets the create edit validator command TODO: add full description

func GetCmdProxy

func GetCmdProxy(cdc *codec.Codec) *cobra.Command

GetCmdProxy gets subcommands for proxy voting

func GetCmdQueryDelegator

func GetCmdQueryDelegator(storeName string, cdc *codec.Codec) *cobra.Command

GetCmdQueryDelegator gets command for querying the info of delegator about delegation and shares

func GetCmdQueryParams

func GetCmdQueryParams(storeName string, cdc *codec.Codec) *cobra.Command

GetCmdQueryParams gets the params query command.

func GetCmdQueryPool

func GetCmdQueryPool(storeName string, cdc *codec.Codec) *cobra.Command

GetCmdQueryPool gets the pool query command.

func GetCmdQueryProxy

func GetCmdQueryProxy(storeName string, cdc *codec.Codec) *cobra.Command

GetCmdQueryProxy gets command for querying the delegators by a specific proxy

func GetCmdQueryValidator

func GetCmdQueryValidator(storeName string, cdc *codec.Codec) *cobra.Command

GetCmdQueryValidator gets the validator query command.

func GetCmdQueryValidatorShares

func GetCmdQueryValidatorShares(queryRoute string, cdc *codec.Codec) *cobra.Command

GetCmdQueryValidatorShares gets command for querying all shares added to a validator

func GetCmdQueryValidators

func GetCmdQueryValidators(storeName string, cdc *codec.Codec) *cobra.Command

GetCmdQueryValidators gets the query all validators command.

func GetCmdRegProxy

func GetCmdRegProxy(cdc *codec.Codec) *cobra.Command

GetCmdRegProxy gets command for proxy registering

func GetCmdUnbindProxy

func GetCmdUnbindProxy(cdc *codec.Codec) *cobra.Command

GetCmdUnbindProxy gets command for unbinding proxy

func GetCmdUnregProxy

func GetCmdUnregProxy(cdc *codec.Codec) *cobra.Command

GetCmdUnregProxy gets command for proxy unregistering

func GetCmdWithdraw

func GetCmdWithdraw(cdc *codec.Codec) *cobra.Command

GetCmdWithdraw gets command for withdrawing the deposit

func GetQueryCmd

func GetQueryCmd(queryRoute string, cdc *codec.Codec) *cobra.Command

GetQueryCmd returns the cli query commands for staking module

func GetTxCmd

func GetTxCmd(storeKey string, cdc *codec.Codec) *cobra.Command

GetTxCmd returns the transaction commands for this module

func PrepareFlagsForTxCreateValidator

func PrepareFlagsForTxCreateValidator(
	config *cfg.Config, nodeID, chainID string, valPubKey crypto.PubKey,
)

PrepareFlagsForTxCreateValidator prepares flags in config

Types

type DelegatorResponse

type DelegatorResponse struct {
	DelegatorAddress     sdk.AccAddress   `json:"delegator_address" yaml:"delegator_address"`
	ValidatorAddresses   []sdk.ValAddress `json:"validator_address" yaml:"validator_address"`
	Shares               sdk.Dec          `json:"shares" yaml:"shares"`
	Tokens               sdk.Dec          `json:"tokens" yaml:"tokens"`
	UnbondedTokens       sdk.Dec          `json:"unbonded_tokens" yaml:"unbonded_tokens"`
	CompletionTime       time.Time        `json:"completion_time" yaml:"completion_time"`
	IsProxy              bool             `json:"is_proxy" yaml:"is_proxy"`
	TotalDelegatedTokens sdk.Dec          `json:"total_delegated_tokens" yaml:"total_delegated_tokens"`
	ProxyAddress         sdk.AccAddress   `json:"proxy_address" yaml:"proxy_address"`
}

DelegatorResponse is designed for delegator info query

func (DelegatorResponse) String

func (dr DelegatorResponse) String() (output string)

String returns a human readable string representation of DelegatorResponse

type Delegators

type Delegators []sdk.AccAddress

Delegators is a type alias of sdk.AccAddress slice

func (Delegators) String

func (as Delegators) String() (strFormat string)

String returns a human readable string representation of Delegators

Jump to

Keyboard shortcuts

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