Documentation
¶
Index ¶
- Constants
- Variables
- type Attribute
- type BTCDelegationStatus
- type BTCDelegationsResponse
- type BabylonBTCLightClientParams
- type BlockEvent
- type BlockParams
- type BlockSummary
- type BondStatus
- type CelestiaUpgradeResponse
- type ConsensusParamUpdates
- type ConsensusPubkey
- type ConsumerChain
- type CosmosBlock
- type CosmosBlockAndTxsResponse
- type CosmosBlockData
- type CosmosBlockResultResponse
- type CosmosConsensusParams
- type CosmosConsumerChainsResponse
- type CosmosErrorResponse
- type CosmosProviderValidatorsResponse
- type CosmosSlashingParamsResponse
- type CosmosSlashingResponse
- type CosmosStakingValidator
- type CosmosStakingValidatorsQueryResponse
- type CosmosStatus
- type CosmosTx
- type CosmosUpgradeResponse
- type CosmosV34BlockResponse
- type CosmosV34StatusResponse
- type CosmosV34ValidatorResponse
- type CosmosV37BlockResponse
- type CosmosV37StatusResponse
- type CosmosV37ValidatorResponse
- type CosmosValidator
- type CosmosValidators
- type CovenantCommitteeParams
- type FinalityParams
- type FinalityProvider
- type FinalityProviderInfo
- type FinalityProviderInfosResponse
- type FinalityProviderSigningInfo
- type FinalityProviderSigningInfoResponse
- type FinalityProvidersResponse
- type FinalityVotesResponse
- type InitiaStakingValidator
- type InitiaStakingValidatorsQueryResponse
- type LastFinalityBlockResponse
- type Pagination
- type ProviderValidator
- type Signature
- type SigningInfo
- type SlashingParam
- type StakingValidatorMetaInfo
- type StorySlashingParamsResponse
- type StorySlashingResponse
- type StoryStakingValidator
- type StoryStakingValidatorsQueryResponse
- type StoryUpgradeResponse
- type Tx
- type TxResult
- type VoteExtension
Constants ¶
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" )
const CelestiaUpgradeQueryPath = "/signal/v1/upgrade"
const CosmosUpgradeQueryPath = "/cosmos/upgrade/v1beta1/current_plan"
Variables ¶
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
var ( CosmosLimitedBlockTxsQueryPath = func(blockHeight int64) string { return fmt.Sprintf("/cosmos/tx/v1beta1/txs/block/%d?pagination.limit=1", blockHeight) } // This query suffers from a bug in the cosmos-sdk // that prevents the ‘next_key’ from being checked. // Therefore, it tries to lookup the entire tx at once using pagination.limit=1000. CosmosBlockTxsQueryPath = func(blockHeight int64) string { return fmt.Sprintf("/cosmos/tx/v1beta1/txs/block/%d?pagination.limit=1000", blockHeight) } )
var BabylonBTCDelegationQuery = func(status BTCDelegationStatus) string { return fmt.Sprintf("/babylon/btcstaking/v1/btc_delegations/%d?pagination.limit=1&pagination.count_total=true", status) }
ref; https://lcd-dapp.testnet.babylonlabs.io
var BabylonBTCLightClientParamsQueryPath string = "/babylon/btclightclient/v1/params"
var BabylonCovenantCommitteeParamsQueryPath string = "/babylon/btcstaking/v1/params"
var BabylonFinalityParamsQueryPath string = "/babylon/finality/v1/params"
var BabylonFinalityProviderInfosQueryPath = func(key string) string { return fmt.Sprintf("/babylon/btcstaking/v1/finality_providers?pagination.key=%s", key) }
var BabylonFinalityProviderSigninInfoQueryPath = func(BTCPK string) string { return fmt.Sprintf("/babylon/finality/v1/signing_infos/%s", BTCPK) }
var BabylonFinalityProvidersQueryPath = func(height int64) string { return fmt.Sprintf("/babylon/finality/v1/finality_providers/%d", height) }
var BabylonFinalityVotesQueryPath = func(height int64) string { return fmt.Sprintf("/babylon/finality/v1/votes/%d", height) }
var BabylonLastFinalizedBlockLimitQueryPath = "/babylon/finality/v1/blocks?status=1&pagination.limit=1&pagination.reverse=true"
var ConsumerChainListQueryPath string = "/interchain_security/ccv/provider/consumer_chains/3"
see https://buf.build/cosmos/interchain-security/docs/main:interchain_security.ccv.provider.v1#interchain_security.ccv.provider.v1.QueryConsumerChainsRequest The phase of the consumer chains returned (optional) Registered=1|Initialized=2|Launched=3|Stopped=4|Deleted=5
var CosmosBlockQueryPath = func(height int64) string { return fmt.Sprintf("/block?height=%d", height) }
query path for cosmos block by height
var CosmosBlockResultsQueryPath = func(height int64) string { return fmt.Sprintf("/block_results?height=%d", height) }
var CosmosConsensusParamsQueryPath = "/consensus_params"
var CosmosStakingValidatorQueryPath = func(status string) string { return fmt.Sprintf("/cosmos/staking/v1beta1/validators?status=%s&pagination.count_total=true&pagination.limit=500", status) }
var CosmosStatusQueryPath = "/status"
query path for cosmos status to check chain id
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
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
var InitiaStakingValidatorQueryPath = func(status string) string { return fmt.Sprintf("/initia/mstaking/v1/validators?status=%s&pagination.count_total=true&pagination.limit=500", status) }
var ( ProviderValidatorsQueryPath = func(consumerID string) string { return fmt.Sprintf("/interchain_security/ccv/provider/consumer_validators/%s", consumerID) } )
ccv module Returns the list of validators of a specific consumer chain
var StorySlashingParamsQueryPath = "/slashing/params"
var StorySlashingQueryPath = func(consensusAddress string) string { return fmt.Sprintf("/slashing/signing_infos/%s", consensusAddress) }
var StoryStakingValidatorQueryPath = func(status string) string { return fmt.Sprintf("/staking/validators?status=%s&pagination.count_total=true&pagination.limit=500", status) }
var StoryUpgradeQueryPath = "/upgrade/current_plan"
Functions ¶
This section is empty.
Types ¶
type BTCDelegationStatus ¶ added in v1.1.0
type BTCDelegationStatus int
const ( // PENDING defines a delegation that is waiting for covenant signatures. // PENDING = 0; PENDING BTCDelegationStatus = iota // VERIFIED defines a delegation that has covenant signatures but is not yet // included in the BTC chain. VERIFIED // ACTIVE defines a delegation that has voting power ACTIVE // UNBONDED defines a delegation no longer has voting power // by receiving unbonding tx with signatures from staker and covenant // committee UNBONDED // EXPIRED defines a delegation no longer has voting power // for reaching the end of staking transaction timelock EXPIRED )
func (BTCDelegationStatus) String ¶ added in v1.1.0
func (s BTCDelegationStatus) String() string
type BTCDelegationsResponse ¶ added in v1.1.0
type BTCDelegationsResponse struct {
BTCDelegations []interface{} `json:"btc_delegations"`
Pagination Pagination `json:"pagination"`
}
type BabylonBTCLightClientParams ¶ added in v1.1.0
type BabylonBTCLightClientParams struct {
Params struct {
InsertHeadersAllowList []string `json:"insert_headers_allow_list"`
} `json:"params"`
}
type BlockEvent ¶ added in v1.1.0
type BlockParams ¶ added in v1.1.0
type BlockSummary ¶
type BondStatus ¶
type BondStatus string
var ( Bonded BondStatus = BOND_STATUS_BONDED Unbonding BondStatus = BOND_STATUS_UNBONDING Unbonded BondStatus = BOND_STATUS_UNBONDED Unspecfied BondStatus = BOND_STATUS_UNSPECIFIED )
type CelestiaUpgradeResponse ¶ added in v1.0.1
type ConsensusParamUpdates ¶ added in v1.1.0
type ConsensusPubkey ¶
type ConsumerChain ¶
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 CosmosBlockAndTxsResponse ¶ added in v1.1.0
type CosmosBlockAndTxsResponse struct {
Txs []CosmosTx `json:"txs"`
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"`
} `json:"block"`
Pagination struct {
NextKey string `json:"next_key"`
Total string `json:"total"`
} `json:"pagination"`
}
type CosmosBlockData ¶ added in v1.1.0
type CosmosBlockData struct {
TxResults []TxResult
ConsensusParamUpdates
}
type CosmosBlockResultResponse ¶ added in v1.1.0
type CosmosBlockResultResponse struct {
JsonRPC string `json:"jsonrpc" validate:"required"`
ID int `json:"id" validate:"required"`
Result struct {
Height string `json:"height"`
TxsResults []TxResult `json:"txs_results"`
// case1)
// https://github.com/cometbft/cometbft/blob/v0.37.0/rpc/core/types/responses.go#L54
BeginBlockEvents []BlockEvent `json:"begin_block_events"`
EndBlockEvents []BlockEvent `json:"end_block_events"`
// case2)
// https://github.com/cometbft/cometbft/blob/v0.38.0/rpc/core/types/responses.go#L54
FinalizeBlockEvents []BlockEvent `json:"finalize_block_events"`
//
ValidatorUpdate interface{} `json:"-"`
ConsensusParamUpdates ConsensusParamUpdates `json:"consensus_param_updates"`
} `json:"result" validate:"required"`
}
type CosmosConsensusParams ¶ added in v1.1.0
type CosmosConsensusParams struct {
Result struct {
ConsensusParams struct {
Block BlockParams `json:"block"`
} `json:"consensus_params"`
} `json:"result"`
}
type CosmosConsumerChainsResponse ¶
type CosmosConsumerChainsResponse struct {
Chains []ConsumerChain `json:"chains"`
}
type CosmosErrorResponse ¶ added in v1.1.0
type CosmosProviderValidatorsResponse ¶
type CosmosProviderValidatorsResponse struct {
Validators []ProviderValidator `json:"validators"`
}
type CosmosSlashingParamsResponse ¶
type CosmosSlashingParamsResponse struct {
Params SlashingParam `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"`
Status string `json:"status"`
}
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 CosmosTx ¶ added in v1.1.0
type CosmosTx struct {
Body struct {
Messages []json.RawMessage `json:"messages"`
} `json:"body"`
AuthInfo interface{} `json:"-"`
Signatures []string `json:"-"`
}
type CosmosUpgradeResponse ¶ added in v1.0.1
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 CovenantCommitteeParams ¶ added in v1.1.0
type CovenantCommitteeParams struct {
Params struct {
CovenantPks []string `json:"covenant_pks"`
CovenantQuorum int `json:"covenant_quorum"`
MinStakingValueSat string `json:"min_staking_value_sat"`
MaxStakingValueSat string `json:"max_staking_value_sat"`
MinStakingTimeBlocks int `json:"min_staking_time_blocks"`
MaxStakingTimeBlocks int `json:"max_staking_time_blocks"`
SlashingPkScript string `json:"slashing_pk_script"`
MinSlashingTxFeeSat string `json:"min_slashing_tx_fee_sat"`
SlashingRate string `json:"slashing_rate"`
UnbondingTimeBlocks int `json:"unbonding_time_blocks"`
UnbondingFeeSat string `json:"unbonding_fee_sat"`
MinCommissionRate string `json:"min_commission_rate"`
DelegationCreationBaseGasFee string `json:"delegation_creation_base_gas_fee"`
AllowListExpirationHeight string `json:"allow_list_expiration_height"`
BtcActivationHeight int `json:"btc_activation_height"`
} `json:"params"`
}
type FinalityParams ¶ added in v1.1.0
type FinalityParams struct {
Params struct {
MaxActiveFinalityProviders int64 `json:"max_active_finality_providers"`
SignedBlocksWindow string `json:"signed_blocks_window"`
FinalitySigTimeout string `json:"finality_sig_timeout"`
MinSignedPerWindow string `json:"min_signed_per_window"`
MinPubRand string `json:"min_pub_rand"`
JailDuration string `json:"jail_duration"`
FinalityActivationHeight string `json:"finality_activation_height"`
} `json:"params"`
}
type FinalityProvider ¶ added in v1.1.0
type FinalityProvider struct {
BtcPkHex string `json:"btc_pk_hex"`
Height string `json:"height"`
VotingPower string `json:"voting_power"`
SlashedBabylonHeight string `json:"slashed_babylon_height"`
SlashedBtcHeight int `json:"slashed_btc_height"`
Jailed bool `json:"jailed"`
HighestVotedHeight int `json:"highest_voted_height"`
}
type FinalityProviderInfo ¶ added in v1.1.0
type FinalityProviderInfo struct {
Description struct {
Moniker string `json:"moniker"`
} `json:"description"`
Address string `json:"addr"`
BTCPK string `json:"btc_pk"`
Jailed bool `json:"jailed"`
SlashedBabylonHeight string `json:"slashed_babylon_height"`
SlashedBTCHeight int `json:"slashed_btc_height"`
// injected
Slashed bool
Active bool
VotingPower float64
}
type FinalityProviderInfosResponse ¶ added in v1.1.0
type FinalityProviderInfosResponse struct {
FinalityProviders []FinalityProviderInfo `json:"finality_providers"`
Pagination Pagination `json:"pagination"`
}
type FinalityProviderSigningInfo ¶ added in v1.1.0
type FinalityProviderSigningInfoResponse ¶ added in v1.1.0
type FinalityProviderSigningInfoResponse struct {
SigningInfo FinalityProviderSigningInfo `json:"signing_info"`
}
type FinalityProvidersResponse ¶ added in v1.1.0
type FinalityProvidersResponse struct {
FinalityProviders []FinalityProvider `json:"finality_providers"`
Pagination Pagination `json:"pagination"`
}
type FinalityVotesResponse ¶ added in v1.1.0
type FinalityVotesResponse struct {
BTCPKs []string `json:"btc_pks"`
}
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:"-"`
Status string `json:"status"`
}
type InitiaStakingValidatorsQueryResponse ¶
type InitiaStakingValidatorsQueryResponse struct {
Validators []InitiaStakingValidator `json:"validators"`
Pagination struct {
// NextKey interface{} `json:"-"`
Total string `json:"total"`
} `json:"pagination"`
}
type LastFinalityBlockResponse ¶ added in v1.1.0
type LastFinalityBlockResponse struct {
Blocks []struct {
Height string `json:"height"`
AppHash string `json:"app_hash"`
Finalized bool `json:"finalized"`
} `json:"blocks"`
Pagination Pagination `json:"pagination"`
}
type Pagination ¶ added in v1.1.0
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 SlashingParam ¶ added in v1.0.1
type SlashingParam 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"`
}
type StakingValidatorMetaInfo ¶
staking module
type StorySlashingParamsResponse ¶ added in v1.0.1
type StorySlashingParamsResponse struct {
Code int64 `json:"code"`
Msg struct {
Params SlashingParam `json:"params"`
} `json:"msg"`
Error string `json:"error"`
}
type StorySlashingResponse ¶ added in v1.0.1
type StorySlashingResponse struct {
Code int64 `json:"code"`
Msg struct {
ValidatorSigningInfo SigningInfo `json:"val_signing_info"`
} `json:"msg"`
Error string `json:"error"`
}
type StoryStakingValidator ¶
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"`
}