types

package
v1.0.1-rc0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BOND_STATUS_BONDED      = "BOND_STATUS_BONDED"
	BOND_STATUS_UNBONDING   = "BOND_STATUS_UNBONDING"
	BOND_STATUS_UNBONDED    = "BOND_STATUS_UNBONDED"
	BOND_STATUS_UNSPECIFIED = "BOND_STATUS_UNSPECIFIED"
)

Variables

View Source
var (
	CosmosSlashingLimitQueryPath  string = "/cosmos/slashing/v1beta1/signing_infos?pagination.limit=1"
	CosmosSlashingParamsQueryPath string = "/cosmos/slashing/v1beta1/params"
	CosmosSlashingQueryPath              = func(consensusAddress string) string {
		return fmt.Sprintf("/cosmos/slashing/v1beta1/signing_infos/%s", consensusAddress)
	}
)

slashing module

View Source
var ConsumerChainListQueryPath string = "/interchain_security/ccv/provider/consumer_chains/3"
View Source
var CosmosBlockQueryPath = func(height int64) string {
	return fmt.Sprintf("/block?height=%d", height)
}

query path for cosmos block by height

View Source
var CosmosStakingValidatorQueryPath = func(status string) string {
	return fmt.Sprintf("/cosmos/staking/v1beta1/validators?status=%s&pagination.count_total=true&pagination.limit=500", status)
}

ref; https://github.com/cosmos/cosmos-sdk/blob/v0.47.13/proto/cosmos/staking/v1beta1/staking.proto#L141

View Source
var CosmosStatusQueryPath = "/status"

query path for cosmos status to check chain id

View Source
var CosmosValidatorQueryPath = func(page int) string {
	return fmt.Sprintf("/validators?page=%d&per_page=100", page)
}

query path for cosmos validator by height and page

View Source
var CosmosValidatorQueryPathWithHeight = func(height int64, page int) string {
	return fmt.Sprintf("/validators?height=%d&page=%d&per_page=100", height, page)
}

query path for cosmos validator by height and page

View Source
var InitiaStakingValidatorQueryPath = func(status string) string {
	return fmt.Sprintf("/initia/mstaking/v1/validators?status=%s&pagination.count_total=true&pagination.limit=500", status)
}

ref; https://github.com/initia-labs/initia/blob/main/proto/initia/mstaking/v1/query.proto#L14

View Source
var (
	ProviderValidatorsQueryPath = func(consumerID string) string {
		return fmt.Sprintf("/interchain_security/ccv/provider/consumer_validators/%s", consumerID)
	}
)

ccv module

View Source
var StoryStakingValidatorQueryPath = func(status string) string {
	return fmt.Sprintf("/staking/validators?status=%s&pagination.count_total=true&pagination.limit=500", status)
}

ref; https://github.com/piplabs/story/blob/main/client/server/staking.go

Functions

This section is empty.

Types

type BlockSummary

type BlockSummary struct {
	BlockHeight           int64
	BlockTimeStamp        time.Time
	BlockProposerAddress  string
	Txs                   []Tx
	LastCommitBlockHeight int64
	BlockSignatures       []Signature
	CosmosValidators      []CosmosValidator
}

type ConsensusPubkey

type ConsensusPubkey struct {
	Type string `json:"@type"`
	Key  string `json:"key"`
}

type ConsumerChain

type ConsumerChain struct {
	ChainID    string `json:"chain_id"`
	ClientID   string `json:"client_id"`
	ConsumerID string `json:"consumer_id"`
}

type CosmosBlock

type CosmosBlock struct {
	BlockID interface{} `json:"-"`
	Block   struct {
		Header struct {
			ChainID         string    `json:"chain_id"`
			Height          string    `json:"height"`
			Time            time.Time `json:"time"`
			ProposerAddress string    `json:"proposer_address"`
		} `json:"header"`
		Data struct {
			Txs []Tx `json:"txs"`
		} `json:"data"`
		Evidence   interface{} `json:"-"`
		LastCommit struct {
			Height     string      `json:"height"`
			Round      uint64      `json:"-"`
			BlockID    interface{} `json:"-"`
			Signatures []Signature `json:"signatures"`
		} `json:"last_commit"`
	} `json:"block"`
}

response of cosmos-sdk based chain block

type CosmosConsumerChainsResponse

type CosmosConsumerChainsResponse struct {
	Chains []ConsumerChain `json:"chains"`
}

type CosmosProviderValidatorsResponse

type CosmosProviderValidatorsResponse struct {
	Validators []ProviderValidator `json:"validators"`
}

type CosmosSlashingParamsResponse

type CosmosSlashingParamsResponse struct {
	Params struct {
		SignedBlocksWindow      string `json:"signed_blocks_window"`
		MinSignedPerWindow      string `json:"min_signed_per_window"`
		DowntimeJailDuration    string `json:"downtime_jail_duration"`
		SlashFractionDoubleSign string `json:"slash_fraction_double_sign"`
		SlashFractionDowntime   string `json:"slash_fraction_downtime"`
	} `json:"params"`
}

type CosmosSlashingResponse

type CosmosSlashingResponse struct {
	ValidatorSigningInfo SigningInfo   `json:"val_signing_info"`
	Info                 []SigningInfo `json:"info"`
}

type CosmosStakingValidator

type CosmosStakingValidator struct {
	OperatorAddress string          `json:"operator_address"`
	ConsensusPubkey ConsensusPubkey `json:"consensus_pubkey"`
	Description     struct {
		Moniker string `json:"moniker"`
	} `json:"description"`
	Tokens string `json:"tokens"`
}

type CosmosStakingValidatorsQueryResponse

type CosmosStakingValidatorsQueryResponse struct {
	Validators []CosmosStakingValidator `json:"validators"`
	Pagination struct {
		// NextKey interface{} `json:"-"`
		Total string `json:"total"`
	} `json:"pagination"`
}

type CosmosStatus

type CosmosStatus struct {
	NodeInfo map[string]any `json:"node_info"`
	SyncInfo struct {
		LatestBlockHash     string    `json:"latest_block_hash"`
		LatestAppHash       string    `json:"latest_app_hash"`
		LatestBlockHeight   string    `json:"latest_block_height"`
		LatestBlockTime     time.Time `json:"latest_block_time"`
		EarliestBlockHash   string    `json:"earliest_block_hash"`
		EarliestAppHash     string    `json:"earliest_app_hash"`
		EarliestBlcokHeight string    `json:"earliest_block_height"`
		EarliestBlockTime   time.Time `json:"earliest_block_time"`
		CatchingUp          bool      `json:"catching_up"`
	} `json:"sync_info" validate:"required"`
	ValidatorInfo map[string]any `json:"validator_info"`
}

response of cosmos-sdk based chain status

type CosmosV34BlockResponse

type CosmosV34BlockResponse struct {
	JsonRPC string      `json:"jsonrpc"`
	ID      int         `json:"id"`
	Result  CosmosBlock `json:"result"`
}

response type for v34 cosmos block

type CosmosV34StatusResponse

type CosmosV34StatusResponse struct {
	JsonRPC string       `json:"jsonrpc" validate:"required"`
	ID      int          `json:"id" validate:"required"`
	Result  CosmosStatus `json:"result" validate:"required"`
}

response type for v34 cosmos status

type CosmosV34ValidatorResponse

type CosmosV34ValidatorResponse struct {
	Result CosmosValidators `json:"result"`
}

response type for v34 cosmos validators

type CosmosV37BlockResponse

type CosmosV37BlockResponse CosmosBlock

response type for v37 cosmos block

type CosmosV37StatusResponse

type CosmosV37StatusResponse CosmosStatus

response type for upper than v37 cosmos status

type CosmosV37ValidatorResponse

type CosmosV37ValidatorResponse CosmosValidators

response type for v37 cosmos validators

type CosmosValidator

type CosmosValidator struct {
	Address string `json:"address"`
	Pubkey  struct {
		Type  string `json:"type"`
		Value string `json:"value"`
	} `json:"pub_key"`
	VotingPower      string `json:"voting_power"`
	ProposerPriority string `json:"proposer_priority"`
}

cosmos chain's validator type

type CosmosValidators

type CosmosValidators struct {
	BlockHeight string            `json:"block_height"`
	Validators  []CosmosValidator `json:"validators"`
	Total       string            `json:"total"`
}

response of cosmos-sdk based chain validators

type InitiaStakingValidator

type InitiaStakingValidator struct {
	OperatorAddress string          `json:"operator_address"`
	ConsensusPubkey ConsensusPubkey `json:"consensus_pubkey"`
	Description     struct {
		Moniker string `json:"moniker"`
	} `json:"description"`
	Tokens interface{} `json:"-"`
}

type InitiaStakingValidatorsQueryResponse

type InitiaStakingValidatorsQueryResponse struct {
	Validators []InitiaStakingValidator `json:"validators"`
	Pagination struct {
		// NextKey interface{} `json:"-"`
		Total string `json:"total"`
	} `json:"pagination"`
}

type ProviderValidator

type ProviderValidator struct {
	PrvodierValconsAddress string `json:"provider_address"`
	ConsumerKey            struct {
		Pubkey string `json:"ed25519"`
	} `json:"consumer_key"`
	Description struct {
		Moniker string `json:"moniker"`
	} `json:"description"`
	ProviderValoperAddress string `json:"provider_operator_address"`
	Jailed                 bool   `json:"jailed"`
}

type Signature

type Signature struct {
	BlockIDFlag      int64       `json:"block_id_flag"`
	ValidatorAddress string      `json:"validator_address"`
	Timestamp        time.Time   `json:"timestamp"`
	Signature        interface{} `json:"signature"`
}

cosmos chain's validator signature type

type SigningInfo

type SigningInfo struct {
	ConsensusAddress    string `json:"address"`
	StartHeight         string `json:"start_height"`
	IndexOffset         string `json:"index_offset"`
	JailedUntil         string `json:"jailed_until"`
	Tombstoned          bool   `json:"tombstoned"`
	MissedBlocksCounter string `json:"missed_blocks_counter"`
}

type StakingValidatorMetaInfo

type StakingValidatorMetaInfo struct {
	Moniker         string
	OperatorAddress string
}

staking module

type StoryStakingValidator

type StoryStakingValidator struct {
	OperatorAddress string `json:"operator_address"`
	ConsensusPubkey struct {
		Type  string `json:"type"`
		Value string `json:"value"`
	} `json:"consensus_pubkey"`
	Description struct {
		Moniker string `json:"moniker"`
	} `json:"description"`
}

type StoryStakingValidatorsQueryResponse

type StoryStakingValidatorsQueryResponse struct {
	Code int64 `json:"code"`
	Msg  struct {
		Validators []StoryStakingValidator `json:"validators"`
		Pagination struct {
			NextKey interface{} `json:"-"`
			Total   string      `json:"total"`
		} `json:"pagination"`
	}
	Error string `json:"error"`
}

type Tx

type Tx string

type VoteExtension

type VoteExtension struct {
	Address         string
	BlockCommitFlag int64
	VoteExtension   []byte
	Signature       []byte
}

Jump to

Keyboard shortcuts

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