stake

package
v0.8.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCommissionMsg added in v0.7.0

func BuildCommissionMsg(rateStr, maxRateStr, maxChangeRateStr string) (commission types.CommissionMsg, err error)

Types

type Commission added in v0.7.0

type Commission struct {
	Rate          string    `json:"rate"`
	MaxRate       string    `json:"max_rate"`
	MaxChangeRate string    `json:"max_change_rate"`
	UpdateTime    time.Time `json:"update_time"`
}

type DelegationOutput

type DelegationOutput struct {
	DelegatorAddr sdk.AccAddress `json:"delegator_addr"`
	ValidatorAddr sdk.ValAddress `json:"validator_addr"`
	Shares        string         `json:"shares"`
	Height        int64          `json:"height"`
}

defines a delegation without type Rat for shares

func ConvertDelegationToDelegationOutput

func ConvertDelegationToDelegationOutput(cliCtx context.CLIContext, delegation stake.Delegation) DelegationOutput

func (DelegationOutput) HumanReadableString

func (d DelegationOutput) HumanReadableString() (string, error)

type PoolOutput added in v0.7.0

type PoolOutput struct {
	LooseTokens  string `json:"loose_tokens"`
	BondedTokens string `json:"bonded_tokens"`
	TokenSupply  string `json:"total_supply"`
	BondedRatio  string `json:"bonded_ratio"`
}

func ConvertPoolToPoolOutput added in v0.7.0

func ConvertPoolToPoolOutput(cliCtx context.CLIContext, pool stake.Pool) PoolOutput

func (PoolOutput) HumanReadableString added in v0.7.0

func (p PoolOutput) HumanReadableString() string

type RedelegationOutput

type RedelegationOutput struct {
	DelegatorAddr    sdk.AccAddress `json:"delegator_addr"`     // delegator
	ValidatorSrcAddr sdk.ValAddress `json:"validator_src_addr"` // validator redelegation source owner addr
	ValidatorDstAddr sdk.ValAddress `json:"validator_dst_addr"` // validator redelegation destination owner addr
	CreationHeight   int64          `json:"creation_height"`    // height which the redelegation took place
	MinTime          time.Time      `json:"min_time"`           // unix time for redelegation completion
	InitialBalance   string         `json:"initial_balance"`    // initial balance when redelegation started
	Balance          string         `json:"balance"`            // current balance
	SharesSrc        string         `json:"shares_src"`         // amount of source shares redelegating
	SharesDst        string         `json:"shares_dst"`         // amount of destination shares redelegating
}

func ConvertREDToREDOutput

func ConvertREDToREDOutput(cliCtx context.CLIContext, red stake.Redelegation) RedelegationOutput

func (RedelegationOutput) HumanReadableString

func (d RedelegationOutput) HumanReadableString() (string, error)

type UnbondingDelegationOutput

type UnbondingDelegationOutput struct {
	DelegatorAddr  sdk.AccAddress `json:"delegator_addr"`  // delegator
	ValidatorAddr  sdk.ValAddress `json:"validator_addr"`  // validator unbonding from owner addr
	CreationHeight int64          `json:"creation_height"` // height which the unbonding took place
	MinTime        time.Time      `json:"min_time"`        // unix time for unbonding completion
	InitialBalance string         `json:"initial_balance"` // atoms initially scheduled to receive at completion
	Balance        string         `json:"balance"`         // atoms to receive at completion
}

UnbondingDelegation reflects a delegation's passive unbonding queue.

func (UnbondingDelegationOutput) HumanReadableString

func (d UnbondingDelegationOutput) HumanReadableString() (string, error)

type ValidatorOutput

type ValidatorOutput struct {
	OperatorAddr       sdk.ValAddress    `json:"operator_address"`
	ConsPubKey         string            `json:"consensus_pubkey"`
	Jailed             bool              `json:"jailed"`
	Status             sdk.BondStatus    `json:"status"`
	Tokens             string            `json:"tokens"`
	DelegatorShares    string            `json:"delegator_shares"`
	Description        stake.Description `json:"description"`
	BondHeight         int64             `json:"bond_height"`
	BondIntraTxCounter int16             `json:"bond_intra_tx_counter"`
	UnbondingHeight    int64             `json:"unbonding_height"`
	UnbondingMinTime   time.Time         `json:"unbonding_time"`
	Commission         Commission        `json:"commission"`
}

func ConvertValidatorToValidatorOutput

func ConvertValidatorToValidatorOutput(cliCtx context.CLIContext, v stake.Validator) ValidatorOutput

func (ValidatorOutput) HumanReadableString

func (v ValidatorOutput) HumanReadableString() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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