stake

package
v0.0.0-...-d1f1add Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	ByteTxDeclareCandidacy = 0x55
	ByteTxEditCandidacy    = 0x56
	ByteTxDelegate         = 0x57
	ByteTxUnbond           = 0x58
	TypeTxDeclareCandidacy = stakingModuleName + "/declareCandidacy"
	TypeTxEditCandidacy    = stakingModuleName + "/editCandidacy"
	TypeTxDelegate         = stakingModuleName + "/delegate"
	TypeTxUnbond           = stakingModuleName + "/unbond"
)

register the tx type with its validation logic make sure to use the name of the handler as the prefix in the tx type, so it gets routed properly

Variables

This section is empty.

Functions

func ErrBadRemoveValidator

func ErrBadRemoveValidator() error

func ErrBadValidatorAddr

func ErrBadValidatorAddr() error

func ErrBondNotNominated

func ErrBondNotNominated() error

func ErrCandidateExistsAddr

func ErrCandidateExistsAddr() error

func ErrInsufficientFunds

func ErrInsufficientFunds() error

func ErrMissingSignature

func ErrMissingSignature() error

func ErrNoCandidateForAddress

func ErrNoCandidateForAddress() error

func ErrNoDelegatorForAddress

func ErrNoDelegatorForAddress() error

func NewTxDeclareCandidacy

func NewTxDeclareCandidacy(bond coin.Coin, pubKey crypto.PubKey, description Description) sdk.Tx

NewTxDeclareCandidacy - new TxDeclareCandidacy

func NewTxDelegate

func NewTxDelegate(bond coin.Coin, pubKey crypto.PubKey) sdk.Tx

NewTxDelegate - new TxDelegate

func NewTxEditCandidacy

func NewTxEditCandidacy(pubKey crypto.PubKey, description Description) sdk.Tx

NewTxEditCandidacy - new TxEditCandidacy

func NewTxUnbond

func NewTxUnbond(shares uint64, pubKey crypto.PubKey) sdk.Tx

NewTxUnbond - new TxUnbond

Types

type BondUpdate

type BondUpdate struct {
	PubKey crypto.PubKey `json:"pub_key"`
	Bond   coin.Coin     `json:"amount"`
}

BondUpdate - struct for bonding or unbonding transactions

func (BondUpdate) ValidateBasic

func (tx BondUpdate) ValidateBasic() error

ValidateBasic - Check for non-empty candidate, and valid coins

type Description

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

Description - description fields for a candidate

type TxDeclareCandidacy

type TxDeclareCandidacy struct {
	BondUpdate
	Description
}

TxDeclareCandidacy - struct for unbonding transactions

func (TxDeclareCandidacy) Wrap

func (tx TxDeclareCandidacy) Wrap() sdk.Tx

Wrap - Wrap a Tx as a Basecoin Tx

type TxDelegate

type TxDelegate struct{ BondUpdate }

TxDelegate - struct for bonding transactions

func (TxDelegate) Wrap

func (tx TxDelegate) Wrap() sdk.Tx

Wrap - Wrap a Tx as a Basecoin Tx

type TxEditCandidacy

type TxEditCandidacy struct {
	PubKey crypto.PubKey `json:"pub_key"`
	Description
}

TxEditCandidacy - struct for editing a candidate

func (TxEditCandidacy) ValidateBasic

func (tx TxEditCandidacy) ValidateBasic() error

ValidateBasic - Check for non-empty candidate,

func (TxEditCandidacy) Wrap

func (tx TxEditCandidacy) Wrap() sdk.Tx

Wrap - Wrap a Tx as a Basecoin Tx

type TxUnbond

type TxUnbond struct {
	PubKey crypto.PubKey `json:"pub_key"`
	Shares uint64        `json:"amount"`
}

TxUnbond - struct for unbonding transactions

func (TxUnbond) ValidateBasic

func (tx TxUnbond) ValidateBasic() error

ValidateBasic - Check for non-empty candidate, positive shares

func (TxUnbond) Wrap

func (tx TxUnbond) Wrap() sdk.Tx

Wrap - Wrap a Tx as a Basecoin Tx

Jump to

Keyboard shortcuts

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