v0_34

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

DONTCOVER nolint

Index

Constants

View Source
const (
	ModuleName = "staking"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Commission

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

type Delegation

type Delegation struct {
	DelegatorAddress sdk.AccAddress `json:"delegator_address"`
	ValidatorAddress sdk.ValAddress `json:"validator_address"`
	Shares           sdk.Dec        `json:"shares"`
}

type Delegations

type Delegations []Delegation

type Description

type Description struct {
	Moniker  string `json:"moniker"`
	Identity string `json:"identity"`
	Website  string `json:"website"`
	Details  string `json:"details"`
}

type GenesisState

type GenesisState struct {
	Pool                 Pool                  `json:"pool"`
	Params               Params                `json:"params"`
	LastTotalPower       sdk.Int               `json:"last_total_power"`
	LastValidatorPowers  []LastValidatorPower  `json:"last_validator_powers"`
	Validators           Validators            `json:"validators"`
	Delegations          Delegations           `json:"delegations"`
	UnbondingDelegations []UnbondingDelegation `json:"unbonding_delegations"`
	Redelegations        []Redelegation        `json:"redelegations"`
	Exported             bool                  `json:"exported"`
}

type LastValidatorPower

type LastValidatorPower struct {
	Address sdk.ValAddress
	Power   int64
}

type Params

type Params struct {
	UnbondingTime time.Duration `json:"unbonding_time"`
	MaxValidators uint16        `json:"max_validators"`
	MaxEntries    uint16        `json:"max_entries"`
	BondDenom     string        `json:"bond_denom"`
}

type Pool

type Pool struct {
	NotBondedTokens sdk.Int `json:"not_bonded_tokens"`
	BondedTokens    sdk.Int `json:"bonded_tokens"`
}

type Redelegation

type Redelegation struct {
	DelegatorAddress    sdk.AccAddress      `json:"delegator_address"`
	ValidatorSrcAddress sdk.ValAddress      `json:"validator_src_address"`
	ValidatorDstAddress sdk.ValAddress      `json:"validator_dst_address"`
	Entries             []RedelegationEntry `json:"entries"`
}

type RedelegationEntry

type RedelegationEntry struct {
	CreationHeight int64     `json:"creation_height"`
	CompletionTime time.Time `json:"completion_time"`
	InitialBalance sdk.Int   `json:"initial_balance"`
	SharesDst      sdk.Dec   `json:"shares_dst"`
}

type UnbondingDelegation

type UnbondingDelegation struct {
	DelegatorAddress sdk.AccAddress             `json:"delegator_address"`
	ValidatorAddress sdk.ValAddress             `json:"validator_address"`
	Entries          []UnbondingDelegationEntry `json:"entries"`
}

type UnbondingDelegationEntry

type UnbondingDelegationEntry struct {
	CreationHeight int64     `json:"creation_height"`
	CompletionTime time.Time `json:"completion_time"`
	InitialBalance sdk.Int   `json:"initial_balance"`
	Balance        sdk.Int   `json:"balance"`
}

type Validator

type Validator struct {
	OperatorAddress         sdk.ValAddress `json:"operator_address"`
	ConsPubKey              crypto.PubKey  `json:"consensus_pubkey"`
	Jailed                  bool           `json:"jailed"`
	Status                  sdk.BondStatus `json:"status"`
	Tokens                  sdk.Int        `json:"tokens"`
	DelegatorShares         sdk.Dec        `json:"delegator_shares"`
	Description             Description    `json:"description"`
	UnbondingHeight         int64          `json:"unbonding_height"`
	UnbondingCompletionTime time.Time      `json:"unbonding_time"`
	Commission              Commission     `json:"commission"`
	MinSelfDelegation       sdk.Int        `json:"min_self_delegation"`
}

func (Validator) MarshalJSON

func (v Validator) MarshalJSON() ([]byte, error)

func (*Validator) UnmarshalJSON

func (v *Validator) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals the validator from JSON using Bech32

type Validators

type Validators []Validator

Jump to

Keyboard shortcuts

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