cli

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCmdCandidate

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

GetCmdCandidate queries request info

func GetCmdCandidateDelegators added in v0.2.3

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

GetCmdCandidateDelegators queries request info TODO: support pagination

func GetCmdCandidates added in v0.2.5

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

func GetCmdDelegator

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

GetCmdDelegator queries request info

func GetCmdEditCandidateDescription added in v0.2.3

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

GetCmdEditCandidateDescription is the CLI command for sending a EditCandidateDescription transaction

func GetCmdQueryParams added in v0.2.3

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

GetCmdQueryParams implements the params query command.

func GetCmdReward

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

GetCmdReward queries reward info

func GetCmdRewardStats added in v0.2.5

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

func GetCmdSetTransactors added in v0.2.0

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

GetCmdSetTransactors is the CLI command for sending a SetTransactors transaction

func GetCmdSyncer added in v0.2.3

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

GetCmdSyncer queries syncer info

func GetCmdValidator added in v0.2.3

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

GetCmdValidator queries validator info

func GetCmdValidators added in v0.2.3

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

GetCmdValidator queries validator info

func GetCmdWithdrawReward

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

GetCmdWithdrawReward is the CLI command for sending a WithdrawReward transaction

func GetQueryCmd

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

func GetTxCmd

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

func QueryBondedValidators

func QueryBondedValidators(cliCtx context.CLIContext, storeName string) (validators stakingTypes.Validators, err error)

QueryBondedValidators is an interface for convenience to query bonded validators in staking module

func QueryCandidate

func QueryCandidate(cliCtx context.CLIContext, queryRoute, ethAddress string) (candidate types.Candidate, err error)

func QueryCandidateDelegators added in v0.2.3

func QueryCandidateDelegators(cliCtx context.CLIContext, queryRoute, ethAddress string) (delegators []types.Delegator, err error)

func QueryCandidates added in v0.2.5

func QueryCandidates(cliCtx context.CLIContext, queryRoute string) (candidates []types.Candidate, err error)

func QueryDelegator

func QueryDelegator(cliCtx context.CLIContext, queryRoute, candidateAddress, delegatorAddress string) (delegator types.Delegator, err error)

func QueryParams added in v0.2.4

func QueryParams(cliCtx context.CLIContext, queryRoute string) (params types.Params, err error)

Query params info

func QueryReward

func QueryReward(cliCtx context.CLIContext, queryRoute string, ethAddress string) (reward types.Reward, err error)

Query reward info

func QueryRewardStats added in v0.2.5

func QueryRewardStats(cliCtx context.CLIContext, queryRoute string) (stats types.RewardStats, err error)

func QuerySyncer added in v0.2.3

func QuerySyncer(cliCtx context.CLIContext, queryRoute string) (syncer types.Syncer, err error)

Query syncer info

func QueryValidator

func QueryValidator(cliCtx context.CLIContext, storeName string, addrStr string) (validator stakingTypes.Validator, err error)

addrStr should be bech32 sgn account address with prefix sgn

func QueryValidators

func QueryValidators(cliCtx context.CLIContext, storeName string) (validators stakingTypes.Validators, err error)

QueryValidators is an interface for convenience to query (all) validators in staking module

Types

type CandidateDelegatorsOutput added in v0.2.3

type CandidateDelegatorsOutput struct {
	Candidate  string            `json:"candidate"`
	Delegators []DelegatorOutput `json:"delegators"`
}

type CandidateOutput added in v0.2.5

type CandidateOutput struct {
	EthAddress     string         `json:"eth_address"`
	ValAccount     sdk.AccAddress `json:"val_account"`
	StakingPool    sdk.Int        `json:"staking_pool"`
	CommissionRate sdk.Dec        `json:"commission_rate"`
}

type DelegatorOutput added in v0.2.3

type DelegatorOutput struct {
	Delegator string  `json:"delegator"`
	Stake     sdk.Int `json:"stake"`
}

type RewardOutput added in v0.2.3

type RewardOutput struct {
	Receiver         string      `json:"receiver"`
	MiningReward     sdk.Int     `json:"mining_reward"`
	ServiceReward    sdk.Int     `json:"service_reward"`
	SignedReward     SigndReward `json:"signed_msg"`
	Signers          []string    `json:"signers"`
	LastWithdrawTime time.Time   `json:"last_withdraw_time"`
}

type SigndReward added in v0.2.3

type SigndReward struct {
	MiningReward  *big.Int `json:"mining_reward"`
	ServiceReward *big.Int `json:"service_reward"`
}

type ValidatorOutput added in v0.2.3

type ValidatorOutput struct {
	AccountAddress  sdk.AccAddress `json:"account_address" yaml:"account_address"`   // address of the validator's account; bech encoded in JSON
	OperatorAddress sdk.ValAddress `json:"operator_address" yaml:"operator_address"` // address of the validator's operator; bech encoded in JSON
	ConsPubKey      string         `json:"consensus_pubkey" yaml:"consensus_pubkey"` // the consensus public key of the validator; bech encoded in JSON
	Status          string         `json:"status" yaml:"status"`                     // validator status (bonded/unbonding/unbonded)
	Tokens          sdk.Int        `json:"tokens" yaml:"tokens"`                     // delegated tokens (incl. self-delegation)
	DelegatorShares sdk.Dec        `json:"delegator_shares" yaml:"delegator_shares"` // total shares issued to a validator's delegators
	CommissionRate  sdk.Dec        `json:"commission_rate" yaml:"commission_rate"`   // commission rate of the validator
	EthAddress      string         `json:"eth_address" yaml:"eth_address"`           // ETH address for the validator
}

Jump to

Keyboard shortcuts

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