Documentation
¶
Overview ¶
nolint
Index ¶
- Constants
- func ErrBadRemoveValidator() error
- func ErrBadValidatorAddr() error
- func ErrBondNotNominated() error
- func ErrCandidateExistsAddr() error
- func ErrInsufficientFunds() error
- func ErrMissingSignature() error
- func ErrNoCandidateForAddress() error
- func ErrNoDelegatorForAddress() error
- func NewTxDeclareCandidacy(bond coin.Coin, pubKey crypto.PubKey, description Description) sdk.Tx
- func NewTxDelegate(bond coin.Coin, pubKey crypto.PubKey) sdk.Tx
- func NewTxEditCandidacy(pubKey crypto.PubKey, description Description) sdk.Tx
- func NewTxUnbond(shares uint64, pubKey crypto.PubKey) sdk.Tx
- type BondUpdate
- type Description
- type TxDeclareCandidacy
- type TxDelegate
- type TxEditCandidacy
- type TxUnbond
Constants ¶
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 ¶
NewTxDeclareCandidacy - new TxDeclareCandidacy
func NewTxDelegate ¶
NewTxDelegate - new TxDelegate
func NewTxEditCandidacy ¶
func NewTxEditCandidacy(pubKey crypto.PubKey, description Description) sdk.Tx
NewTxEditCandidacy - new TxEditCandidacy
Types ¶
type BondUpdate ¶
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 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 ¶
TxUnbond - struct for unbonding transactions
func (TxUnbond) ValidateBasic ¶
ValidateBasic - Check for non-empty candidate, positive shares