Documentation ¶
Index ¶
- Variables
- func BytesToAddress(key []byte) cryptotypes.Address
- func ConvertAddressToBech32String(address cryptotypes.Address) (string, error)
- func ConvertValidatorPubKeyToBech32String(pubKey tmcrypto.PubKey) (string, error)
- type Account
- type BeginBlockerHandler
- type Block
- type BlockHandler
- type BlockerEvents
- type Coin
- type Coins
- type EndBlockerHandler
- type GenesisHandler
- type MessageHandler
- type Module
- type PubKey
- type StakingValidator
- type TransactionHandler
- type Tx
- type Txs
- type Validator
- type Validators
- type ValidatorsHandler
Constants ¶
This section is empty.
Variables ¶
var (
ErrBlockNotFound = errors.New("block not found")
)
Functions ¶
func BytesToAddress ¶
func BytesToAddress(key []byte) cryptotypes.Address
func ConvertAddressToBech32String ¶
func ConvertAddressToBech32String(address cryptotypes.Address) (string, error)
Types ¶
type Account ¶
Account represents a chain account
func NewAccount ¶
NewAccount builds a new Account instance
type BeginBlockerHandler ¶
type Block ¶
type Block struct { Timestamp time.Time Hash string ProposerAddress string Evidence tmtypes.EvidenceData TxNum int TotalGas uint64 Height int64 }
func NewBlockFromTmBlock ¶
func NewBlockFromTmBlock(blk *tmctypes.ResultBlock, totalGas uint64) *Block
NewBlockFromTmBlock builds a new Block instance from a given ResultBlock object
type BlockHandler ¶
type BlockerEvents ¶
func NewBlockerEventsAttributes ¶
func NewBlockerEventsAttributes(events []abci.Event) BlockerEvents
type Coin ¶
func NewCoinFromCdk ¶
type EndBlockerHandler ¶
type GenesisHandler ¶
type GenesisHandler interface { Module // HandleGenesis handles a genesis state. HandleGenesis(ctx context.Context, doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error }
type MessageHandler ¶
type Module ¶
type Module interface { // Name base implementation of Module interface. Name() string }
type StakingValidator ¶
type StakingValidator interface { GetConsAddr() string GetConsPubKey() string GetOperator() string GetSelfDelegateAddress() string GetMaxChangeRate() *sdk.Dec GetMaxRate() *sdk.Dec GetHeight() int64 GetMinSelfDelegation() *sdkmath.Int GetDescription() stakingtypes.Description }
func NewStakingValidator ¶
func NewStakingValidator(consAddr, opAddr, consPubKey, selfDelegateAddress string, maxChangeRate, maxRate *sdk.Dec, description stakingtypes.Description, height int64) StakingValidator
NewStakingValidator allows to build a new Validator implementation having the given data
type TransactionHandler ¶
type Tx ¶
type Tx struct { *sdktx.Tx *sdk.TxResponse Signer string }
Tx represents an already existing blockchain transaction
func (Tx) FindAttributeByKey ¶
FindAttributeByKey searches inside the specified event of the given tx to find the attribute having the given key. If the specified event does not contain a such attribute, returns an error instead.
func (Tx) FindEventByType ¶
FindEventByType searches inside the given tx events for the message having the specified index, in order to find the event having the given type, and returns it. If no such event is found, returns an error instead.
func (Tx) Successful ¶
Successful tells whether this tx is successful or not
type Txs ¶
type Txs []*Tx
Txs - slice of transactions
func NewTxsFromTmTxs ¶
func NewTxsFromTmTxs(txs []*sdktx.GetTxResponse, cdc codec.Codec) Txs
type Validator ¶
func NewValidator ¶
NewValidator allows to build a new Validator instance
type Validators ¶
type Validators []*Validator
func NewValidatorsFromTmValidator ¶
func NewValidatorsFromTmValidator(tmVals *tmctypes.ResultValidators) Validators