simplestake

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func ErrEmptyStake

func ErrEmptyStake() sdk.Error

func ErrEmptyValidator

func ErrEmptyValidator() sdk.Error

func ErrIncorrectStakingToken

func ErrIncorrectStakingToken() sdk.Error

func ErrInvalidUnbond

func ErrInvalidUnbond() sdk.Error

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler returns a handler for "simplestake" type messages.

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 Keeper

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

func NewKeeper

func NewKeeper(key sdk.StoreKey, coinKeeper bank.CoinKeeper) Keeper

func (Keeper) Bond

func (k Keeper) Bond(ctx sdk.Context, addr sdk.Address, pubKey crypto.PubKey, stake sdk.Coin) (int64, sdk.Error)

func (Keeper) Unbond

func (k Keeper) 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