client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidatorAddressErrorPrompt = "validator address not valid. it must start with qosval1. current address: %s. err: %s"
	AccountAddressErrorPrompt   = "account address not valid. it must start with qosacc1.current address: %s. err: %s"
)
View Source
const (
	DefaultCommissionRate          = "0.1"
	DefaultCommissionMaxRate       = "0.2"
	DefaultCommissionMaxChangeRate = "0.01"
)

Variables

This section is empty.

Functions

func ActiveValidatorCmd

func ActiveValidatorCmd(cdc *amino.Codec) *cobra.Command

func ActiveValidatorHandleFn added in v0.0.8

func ActiveValidatorHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func BuildCommissionRates added in v0.0.6

func BuildCommissionRates() (*types.CommissionRates, error)

func CreateDelegationCommand

func CreateDelegationCommand(cdc *amino.Codec) *cobra.Command

func CreateDelegationHandleFn added in v0.0.8

func CreateDelegationHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func CreateModifyCompoundCommand

func CreateModifyCompoundCommand(cdc *amino.Codec) *cobra.Command

func CreateReDelegationCommand

func CreateReDelegationCommand(cdc *amino.Codec) *cobra.Command

func CreateUnbondDelegationCommand

func CreateUnbondDelegationCommand(cdc *amino.Codec) *cobra.Command

func CreateValidatorCmd

func CreateValidatorCmd(cdc *amino.Codec) *cobra.Command

func CreateValidatorHandleFn added in v0.0.8

func CreateValidatorHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func ModifyDelegationHandleFn added in v0.0.8

func ModifyDelegationHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func ModifyValidatorCmd added in v0.0.6

func ModifyValidatorCmd(cdc *amino.Codec) *cobra.Command

func ModifyValidatorHandleFn added in v0.0.8

func ModifyValidatorHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func MustParseAccountAddress added in v0.0.8

func MustParseAccountAddress(w http.ResponseWriter, addrStr string) (btypes.AccAddress, bool)

func MustParseValidatorAddress added in v0.0.8

func MustParseValidatorAddress(w http.ResponseWriter, addrStr string) (btypes.ValAddress, bool)

func QueryAllValidatorsHandleFn added in v0.0.8

func QueryAllValidatorsHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func QueryCommands

func QueryCommands(cdc *amino.Codec) []*cobra.Command

func QueryDelegationHandleFn added in v0.0.8

func QueryDelegationHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func QueryDelegationsHandleFn added in v0.0.8

func QueryDelegationsHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func QueryDelegationsToHandleFn added in v0.0.8

func QueryDelegationsToHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func QueryValidatorHandleFn added in v0.0.8

func QueryValidatorHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func RedelegationHandleFn added in v0.0.8

func RedelegationHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func RegisterRoutes added in v0.0.8

func RegisterRoutes(ctx context.CLIContext, r *mux.Router)

func RevokeValidatorCmd

func RevokeValidatorCmd(cdc *amino.Codec) *cobra.Command

func RevokeValidatorHandleFn added in v0.0.8

func RevokeValidatorHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

func TxCommands added in v0.0.6

func TxCommands(cdc *amino.Codec) []*cobra.Command

func TxCreateValidatorBuilder added in v0.0.6

func TxCreateValidatorBuilder(ctx context.CLIContext) (btxs.ITx, error)

func UnbondDelegationHandleFn added in v0.0.8

func UnbondDelegationHandleFn(cliContext context.CLIContext) func(http.ResponseWriter, *http.Request)

Types

type ActiveValidatorReq added in v0.0.8

type ActiveValidatorReq struct {
	rpc.BaseRequest `json:"base"`
	BondTokens      btypes.BigInt `json:"bond_tokens"`
}

type CreateDelegationReq added in v0.0.8

type CreateDelegationReq struct {
	rpc.BaseRequest `json:"base"`
	Amount          btypes.BigInt `json:"amount"`
	IsCompound      bool          `json:"is_compound"`
}

type CreateValidatorReq added in v0.0.8

type CreateValidatorReq struct {
	rpc.BaseRequest `json:"base"`
	ConsPubKey      string        `json:"cons_pub_key"`
	BondTokens      btypes.BigInt `json:"bond_tokens"`
	IsCompound      bool          `json:"is_compound"`
	Moniker         string        `json:"moniker"`
	Website         string        `json:"website"`
	Details         string        `json:"details"`
	Rate            qtypes.Dec    `json:"rate"`
	MaxRate         qtypes.Dec    `json:"max_rate"`
	MaxChangeRate   qtypes.Dec    `json:"max_change_rate"`
}

type ModifyDelegationReq added in v0.0.8

type ModifyDelegationReq struct {
	rpc.BaseRequest `json:"base"`
	IsCompound      bool `json:"is_compound"`
}

type ModifyValidatorReq added in v0.0.8

type ModifyValidatorReq struct {
	rpc.BaseRequest `json:"base"`
	Moniker         string     `json:"moniker"`
	Website         string     `json:"website"`
	Details         string     `json:"details"`
	CommissionRate  qtypes.Dec `json:"rate"`
}

type ReDelegationReq added in v0.0.8

type ReDelegationReq struct {
	rpc.BaseRequest `json:"base"`
	Amount          btypes.BigInt `json:"amount"`
	RedelegateAll   bool          `json:"redelegate_all"`
	Compound        bool          `json:"compound"`
}

type RevokeValidatorReq added in v0.0.8

type RevokeValidatorReq struct {
	rpc.BaseRequest `json:"base"`
}

type UnbondDelegationReq added in v0.0.8

type UnbondDelegationReq struct {
	rpc.BaseRequest `json:"base"`
	UnbondAmount    btypes.BigInt `json:"unbond_amount"`
	UnbondAll       bool          `json:"unbond_all"`
}

Jump to

Keyboard shortcuts

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