stake

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: Apache-2.0 Imports: 10 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)

func GetShares added in v0.12.0

func GetShares(
	storeName string, cliCtx context.CLIContext, cdc *codec.Codec, sharesAmountStr,
	sharesPercentStr string, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress,
) (sharesAmount sdk.Dec, err error)

nolint: gocyclo TODO: Make this pass gocyclo linting

Types

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) String added in v0.14.0

func (d DelegationOutput) String() string

type DelegationsOutput added in v0.14.0

type DelegationsOutput []DelegationOutput

Delegations is a collection of delegations

func (DelegationsOutput) String added in v0.14.0

func (ds DelegationsOutput) String() (out string)

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.PoolStatus) PoolOutput

func (PoolOutput) String added in v0.14.0

func (p PoolOutput) String() 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) String added in v0.14.0

func (d RedelegationOutput) String() string

type RedelegationsOutput added in v0.14.0

type RedelegationsOutput []RedelegationOutput

Redelegations are a collection of Redelegation

func (RedelegationsOutput) String added in v0.14.0

func (reds RedelegationsOutput) String() (out string)

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) String added in v0.14.0

func (d UnbondingDelegationOutput) String() string

type UnbondingDelegationsOutput added in v0.14.0

type UnbondingDelegationsOutput []UnbondingDelegationOutput

Validators is a collection of Validator

func (UnbondingDelegationsOutput) String added in v0.14.0

func (ubds UnbondingDelegationsOutput) String() (out string)

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"`
	UnbondingHeight  int64             `json:"unbonding_height"`
	UnbondingMinTime time.Time         `json:"unbonding_time"`
	Commission       stake.Commission  `json:"commission"`
}

func ConvertValidatorToValidatorOutput

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

func (ValidatorOutput) String added in v0.14.0

func (v ValidatorOutput) String() string

type ValidatorsOutput added in v0.14.0

type ValidatorsOutput []ValidatorOutput

Validators is a collection of Validator

func (ValidatorsOutput) String added in v0.14.0

func (v ValidatorsOutput) String() (out string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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