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: 0

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

func ErrEmptyStake() sdk.Error

func ErrEmptyValidator

func ErrEmptyValidator() sdk.Error

func ErrInvalidUnbond

func ErrInvalidUnbond() sdk.Error

func NewHandler

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

Types

type BondMsg

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

func NewBondMsg

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

func (BondMsg) Get

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

func (BondMsg) GetSignBytes

func (msg BondMsg) GetSignBytes() []byte

func (BondMsg) GetSigners

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

func (BondMsg) Type

func (msg BondMsg) Type() string

func (BondMsg) ValidateBasic

func (msg BondMsg) ValidateBasic() sdk.Error

type StakingMapper

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

func NewMapper

func NewMapper(key sdk.StoreKey) StakingMapper

func (StakingMapper) Bond

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

func (StakingMapper) Unbond

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

type UnbondMsg

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

func NewUnbondMsg

func NewUnbondMsg(addr sdk.Address) UnbondMsg

func (UnbondMsg) Get

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

func (UnbondMsg) GetSignBytes

func (msg UnbondMsg) GetSignBytes() []byte

func (UnbondMsg) GetSigners

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

func (UnbondMsg) Type

func (msg UnbondMsg) Type() string

func (UnbondMsg) ValidateBasic

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