Documentation ¶
Index ¶
- Variables
- func BytesToAddress(key []byte) cryptotypes.Address
- func ConvertAddressToBech32String(address cryptotypes.Address) (string, error)
- func ConvertValidatorPubKeyToBech32String(pubKey cometbftcrypto.PubKey) (string, error)
- type BeginBlockerHandler
- type Block
- type BlockHandler
- type BlockerEvents
- type EndBlockerHandler
- type GenesisHandler
- type MessageHandler
- type Module
- type PubKey
- type RecursiveMessagesHandler
- type TransactionHandler
- type Tx
- type Txs
- type Validator
- type ValidatorPreCommit
- type Validators
- type ValidatorsHandler
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoEventFound = errors.New("no event found") ErrNoAttributeFound = errors.New("no event with attribute") )
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)
func ConvertValidatorPubKeyToBech32String ¶
func ConvertValidatorPubKeyToBech32String(pubKey cometbftcrypto.PubKey) (string, error)
ConvertValidatorPubKeyToBech32String converts the given pubKey to Bech32 string
Types ¶
type BeginBlockerHandler ¶
type Block ¶
type Block struct { Timestamp time.Time Hash string ProposerAddress string ValidatorPreCommits []ValidatorPreCommit Evidence cometbfttypes.EvidenceData TxNum int TotalGas uint64 Height int64 // contains filtered or unexported fields }
func NewBlock ¶
func NewBlock(height int64, hash, proposerAddress string, txNum int, totalGas uint64, timestamp time.Time, evidence cometbfttypes.EvidenceData) *Block
func NewBlockFromTmBlock ¶
func NewBlockFromTmBlock(blk *cometbftcoretypes.ResultBlock, totalGas uint64) *Block
NewBlockFromTmBlock builds a new Block instance from a given ResultBlock object
func (Block) Raw ¶
func (b Block) Raw() *cometbftcoretypes.ResultBlock
type BlockHandler ¶
type BlockerEvents ¶
func NewBlockerEventsAttributes ¶
func NewBlockerEventsAttributes(events []abci.Event) BlockerEvents
type EndBlockerHandler ¶
type GenesisHandler ¶
type GenesisHandler interface { Module // HandleGenesis handles a genesis state. HandleGenesis(ctx context.Context, doc *cometbfttypes.GenesisDoc, appState map[string]json.RawMessage) error }
type MessageHandler ¶
type Module ¶
type Module interface { // Name base implementation of Module interface. Name() string }
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 ValidatorPreCommit ¶
type ValidatorPreCommit struct { Timestamp time.Time ValidatorAddress string BlockIDFlag uint64 VotingPower int64 }
func NewValidatorPreCommitsFromTmSignatures ¶
func NewValidatorPreCommitsFromTmSignatures(sigs []cometbfttypes.CommitSig) []ValidatorPreCommit
type Validators ¶
type Validators []*Validator
func NewValidatorsFromTmValidator ¶
func NewValidatorsFromTmValidator(tmVals *cometbftcoretypes.ResultValidators) Validators
type ValidatorsHandler ¶
type ValidatorsHandler interface { Module // HandleValidators handles of all validators in blockchain. HandleValidators(ctx context.Context, vals *cometbftcoretypes.ResultValidators) error }