staking

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: Apache-2.0 Imports: 6 Imported by: 1,855

Documentation

Index

Constants

View Source
const (
	// Staking errors reserve 300 - 399.
	CodeEmptyValidator sdk.CodeType = 300
	CodeInvalidUnbond  sdk.CodeType = 301
	CodeEmptyStake     sdk.CodeType = 302
)

Variables

This section is empty.

Functions

func ErrEmptyStake added in v0.12.0

func ErrEmptyStake() sdk.Error

func ErrEmptyValidator added in v0.12.0

func ErrEmptyValidator() sdk.Error

func ErrInvalidUnbond added in v0.12.0

func ErrInvalidUnbond() sdk.Error

func NewHandler

func NewHandler(sm StakingMapper, ck bank.CoinKeeper) sdk.Handler

Types

type BondMsg added in v0.12.0

type BondMsg struct {
	Address sdk.Address   `json:"address"`
	Stake   sdk.Coin      `json:"coins"`
	PubKey  crypto.PubKey `json:"pub_key"`
}

func NewBondMsg added in v0.12.0

func NewBondMsg(addr sdk.Address, stake sdk.Coin, pubKey crypto.PubKey) BondMsg

func (BondMsg) Get added in v0.12.0

func (msg BondMsg) Get(key interface{}) interface{}

func (BondMsg) GetSignBytes added in v0.12.0

func (msg BondMsg) GetSignBytes() []byte

func (BondMsg) GetSigners added in v0.12.0

func (msg BondMsg) GetSigners() []sdk.Address

func (BondMsg) Type added in v0.12.0

func (msg BondMsg) Type() string

func (BondMsg) ValidateBasic added in v0.12.0

func (msg BondMsg) ValidateBasic() sdk.Error

type StakingMapper added in v0.12.0

type StakingMapper struct {
	// contains filtered or unexported fields
}

func NewMapper added in v0.12.0

func NewMapper(key sdk.StoreKey) StakingMapper

func (StakingMapper) Bond added in v0.12.0

func (sm StakingMapper) Bond(ctx sdk.Context, addr sdk.Address, pubKey crypto.PubKey, power int64) (int64, sdk.Error)

func (StakingMapper) Unbond added in v0.12.0

func (sm StakingMapper) Unbond(ctx sdk.Context, addr sdk.Address) (crypto.PubKey, int64, sdk.Error)

type UnbondMsg added in v0.12.0

type UnbondMsg struct {
	Address sdk.Address `json:"address"`
}

func NewUnbondMsg added in v0.12.0

func NewUnbondMsg(addr sdk.Address) UnbondMsg

func (UnbondMsg) Get added in v0.12.0

func (msg UnbondMsg) Get(key interface{}) interface{}

func (UnbondMsg) GetSignBytes added in v0.12.0

func (msg UnbondMsg) GetSignBytes() []byte

func (UnbondMsg) GetSigners added in v0.12.0

func (msg UnbondMsg) GetSigners() []sdk.Address

func (UnbondMsg) Type added in v0.12.0

func (msg UnbondMsg) Type() string

func (UnbondMsg) ValidateBasic added in v0.12.0

func (msg UnbondMsg) ValidateBasic() sdk.Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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