Documentation
¶
Index ¶
- func BindFlagsLoadViper(cmd *cobra.Command, _ []string) error
- func ConvertValidatorAddressToBech32String(address types.Address) string
- func ConvertValidatorPubKeyToBech32String(pubKey tmcrypto.PubKey) (string, error)
- type Block
- type CobraCmdFunc
- type CommitSig
- type DoubleSignEvidence
- type DoubleSignVote
- type Genesis
- type HeightQueue
- type IBCTransfer
- type IBCTransferParams
- type InflationResponse
- type PageResponse
- type QueryAllBalancesResponse
- type StakingPool
- type Token
- type TokenPrice
- type TokenUnit
- type TxFee
- type TxMsg
- type TxMsgValue
- type TxResponse
- type TxSignatures
- type Validator
- type ValidatorCommission
- type ValidatorDescription
- type ValidatorInfo
- type ValidatorList
- type ValidatorStatus
- type ValidatorVotingPower
- type ValidatorsList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindFlagsLoadViper ¶
BindFlagsLoadViper binds all flags and read the config into viper
func ConvertValidatorAddressToBech32String ¶
ConvertValidatorAddressToBech32String converts the given validator address to its Bech32 string representation
Types ¶
type Block ¶
type Block struct {
Height int64
Hash string
TxNum int
TotalGas uint64
ProposerAddress string
Timestamp time.Time
}
Block contains the data of a single chain block
func NewBlock ¶
func NewBlock( height int64, hash string, txNum int, totalGas uint64, proposerAddress string, timestamp time.Time, ) *Block
NewBlock allows to build a new Block instance
func NewBlockFromTmBlock ¶
func NewBlockFromTmBlock(blk *tmctypes.ResultBlock, totalGas uint64) *Block
NewBlockFromTmBlock builds a new Block instance from a given ResultBlock object
type CobraCmdFunc ¶
CobraCmdFunc represents a cobra command function
func ConcatCobraCmdFuncs ¶
func ConcatCobraCmdFuncs(fs ...CobraCmdFunc) CobraCmdFunc
ConcatCobraCmdFuncs returns a single function that calls each argument function in sequence RunE, PreRunE, PersistentPreRunE, etc. all have this same signature
type CommitSig ¶
type CommitSig struct {
Height int64
ValidatorAddress string
VotingPower int64
ProposerPriority int64
Timestamp time.Time
}
CommitSig contains the data of a single validator commit signature
type DoubleSignEvidence ¶
type DoubleSignEvidence struct {
VoteA DoubleSignVote
VoteB DoubleSignVote
Height int64
}
DoubleSignEvidence represent a double sign evidence on each tendermint block
func NewDoubleSignEvidence ¶
func NewDoubleSignEvidence(height int64, voteA DoubleSignVote, voteB DoubleSignVote) DoubleSignEvidence
NewDoubleSignEvidence return a new DoubleSignEvidence object
type DoubleSignVote ¶
type DoubleSignVote struct {
BlockID string
ValidatorAddress string
Signature string
Type int
Height int64
Round int32
ValidatorIndex int32
}
DoubleSignVote represents a double vote which is included inside a DoubleSignEvidence
func NewDoubleSignVote ¶
func NewDoubleSignVote( roundType int, height int64, round int32, blockID string, validatorAddress string, validatorIndex int32, signature string, ) DoubleSignVote
NewDoubleSignVote allows to create a new DoubleSignVote instance
type HeightQueue ¶
type HeightQueue chan int64
HeightQueue is a simple type alias for a (buffered) channel of block heights.
func NewQueue ¶
func NewQueue(size int) HeightQueue
type IBCTransfer ¶
type IBCTransfer struct {
ReceiveEnabled bool `json:"receive_enabled" yaml:"receive_enabled"`
SendEnabled bool `json:"send_enabled" yaml:"send_enabled"`
}
IBCTransfer represents the x/ibc transfer parameters
type IBCTransferParams ¶
type IBCTransferParams struct {
Params IBCTransfer
Height int64
}
IBCTransferParams represents the x/ibc transfer parameters
func NewIBCTransferParams ¶
func NewIBCTransferParams(params IBCTransfer, height int64) *IBCTransferParams
NewIBCTransferParams allows to build a new IBCTransferParams instance
type InflationResponse ¶
type InflationResponse struct {
Inflation string `json:"inflation" yaml:"inflation"`
}
InflationResponse contains the data of the current inflation rate
type PageResponse ¶
type QueryAllBalancesResponse ¶
type QueryAllBalancesResponse struct {
Balances sdk.Coins `json:"balances"`
Pagination *PageResponse `json:"pagination,omitempty"`
}
QueryAllBalancesResponse contains the account balance data
type StakingPool ¶
StakingPool contains the data of the staking pool at the given height
func NewStakingPool ¶
NewStakingPool allows to build a new StakingPool instance
type TokenPrice ¶
TokenPrice represents the price at a given moment in time of a token unit
func NewTokenPrice ¶
NewTokenPrice returns a new TokenPrice instance containing the given data
type TokenUnit ¶
type TokenUnit struct {
Denom string `yaml:"denom"`
Exponent int `yaml:"exponent"`
Aliases []string `yaml:"aliases,omitempty"`
PriceID string `yaml:"price_id,omitempty"`
}
TokenUnit represents a unit of a token
type TxMsg ¶
type TxMsg struct {
Type string `json:"type" yaml:"type"`
Value TxMsgValue `json:"value" yaml:"value"`
}
type TxMsgValue ¶
type TxResponse ¶
type TxResponse struct {
Fee TxFee `json:"fee" yaml:"fee"`
Memo string `json:"memo" yaml:"memo"`
Msg []TxMsg `json:"msg" yaml:"msg"`
Signatures []TxSignatures `json:"signatures" yaml:"signatures"`
Hash string `json:"hash" yaml:"hash"`
Height int64 `json:"height" yaml:"height"`
}
TxResponse represents a valid transaction response
func NewTxResponse ¶
func NewTxResponse( fee TxFee, memo string, msg []TxMsg, sig []TxSignatures, hash string, height int64, ) TxResponse
NewTxResponse allows to build a new TxResponse instance
type TxSignatures ¶
type TxSignatures struct {
Signature string `json:"signature" yaml:"signature"`
}
type ValidatorCommission ¶
type ValidatorCommission struct {
ValAddress string
SelfDelegateAddress string
Commission string
MinSelfDelegation string
Height int64
}
ValidatorCommission contains the data of a validator commission at a given height
func NewValidatorCommission ¶
func NewValidatorCommission( valAddress, selfDelegateAddress, commission, minSelfDelegation string, height int64, ) ValidatorCommission
NewValidatorCommission return a new ValidatorCommission instance
type ValidatorDescription ¶
type ValidatorDescription struct {
OperatorAddress string
SelfDelegateAddress string
Description string
Identity string
Moniker string
Height int64
}
ValidatorDescription contains the description of a validator and timestamp do the description get changed
func NewValidatorDescription ¶
func NewValidatorDescription( opAddr, selfDelegateAddress, description, identity string, moniker string, height int64, ) ValidatorDescription
NewValidatorDescription returns a new ValidatorDescription object
type ValidatorInfo ¶
type ValidatorInfo struct {
Address string `yaml:"address"`
Commission string `yaml:"commission"`
Details string `yaml:"details"`
Identity string `yaml:"identity"`
Jailed string `yaml:"jailed"`
MinSelfDelegation string `yaml:"min_self_delegation"`
Moniker string `yaml:"moniker"`
Tombstoned string `yaml:"tombstoned"`
InActiveSet string `yaml:"in_active_set"`
VotingPower string `yaml:"voting_power"`
}
type ValidatorList ¶
type ValidatorList struct {
Validator ValidatorInfo `yaml:"validator"`
}
type ValidatorStatus ¶
type ValidatorStatus struct {
ConsensusAddress string
SelfDelegateAddress string
InActiveSet string
Jailed string
Tombstoned string
Height int64
}
ValidatorStatus represents the latest state of a validator
func NewValidatorStatus ¶
func NewValidatorStatus(valConsAddr, selfDelegateAddress, inActiveSet, jailed, tombstoned string, height int64) ValidatorStatus
NewValidatorStatus creates a new ValidatorVotingPower
type ValidatorVotingPower ¶
type ValidatorVotingPower struct {
ConsensusAddress string
SelfDelegateAddress string
VotingPower string
Height int64
}
ValidatorVotingPower represents the voting power of a validator at a specific block height
func NewValidatorVotingPower ¶
func NewValidatorVotingPower(address, selfDelegateAddress string, votingPower string, height int64) ValidatorVotingPower
NewValidatorVotingPower creates a new ValidatorVotingPower
type ValidatorsList ¶
type ValidatorsList struct {
Validators []ValidatorList `yaml:"validators"`
}
ValidatorsList represents validators list from a file