Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions types/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,12 @@ type ChannelResponse struct {
}

type StakingQuery struct {
AllValidators *AllValidatorsQuery `json:"all_validators,omitempty"`
Validator *ValidatorQuery `json:"validator,omitempty"`
AllDelegations *AllDelegationsQuery `json:"all_delegations,omitempty"`
Delegation *DelegationQuery `json:"delegation,omitempty"`
BondedDenom *struct{} `json:"bonded_denom,omitempty"`
AllValidators *AllValidatorsQuery `json:"all_validators,omitempty"`
Validator *ValidatorQuery `json:"validator,omitempty"`
AllDelegations *AllDelegationsQuery `json:"all_delegations,omitempty"`
Delegation *DelegationQuery `json:"delegation,omitempty"`
BondedDenom *struct{} `json:"bonded_denom,omitempty"`
UnbondingDelegation *UnbondingDelegationQuery `json:"unbonding_delegation,omitempty"`
}

type AllValidatorsQuery struct{}
Expand Down Expand Up @@ -433,6 +434,22 @@ type BondedDenomResponse struct {
Denom string `json:"denom"`
}

type UnbondingDelegationQuery struct {
Delegator string `json:"delegator"`
Validator string `json:"validator"`
}

type UnbondingDelegationResponse struct {
Entries []UnbondingDelegationEntry `json:"entries"`
}

type UnbondingDelegationEntry struct {
CreationHeight int64 `json:"creation_height"`
CompletionTime string `json:"completion_time"` // RFC3339 encoded
InitialBalance string `json:"initial_balance"`
Balance string `json:"balance"`
}

// StargateQuery is encoded the same way as abci_query, with path and protobuf encoded request data.
// The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md).
// The response is protobuf encoded data directly without a JSON response wrapper.
Expand Down
Loading