github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/staking/types/query.go (about) 1 package types 2 3 import ( 4 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types/query" 5 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/x/staking/types" 6 ) 7 8 // note: it should act like protobuf ,but for now ,we only need the `pure struct` 9 10 // QueryValidatorDelegationsResponse is response type for the 11 // Query/ValidatorDelegations RPC method 12 type QueryValidatorDelegationsResponse struct { 13 DelegationResponses types.DelegationResponses `json:"delegation_responses"` 14 Pagination *query.PageResponse `json:"pagination"` 15 } 16 17 type QueryUnbondingDelegationResponse struct { 18 // unbond defines the unbonding information of a delegation. 19 Unbond types.UnbondingDelegation `protobuf:"bytes,1,opt,name=unbond,proto3" json:"unbond"` 20 } 21 22 type QueryDelegatorUnbondingDelegationsResponse struct { 23 UnbondingResponses []types.UnbondingDelegation `protobuf:"bytes,1,rep,name=unbonding_responses,json=unbondingResponses,proto3" json:"unbonding_responses"` 24 // pagination defines the pagination in the response. 25 Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 26 } 27 28 type QueryDelegatorDelegationsResponse struct { 29 // delegation_responses defines all the delegations' info of a delegator. 30 DelegationResponses []types.DelegationResponse `protobuf:"bytes,1,rep,name=delegation_responses,json=delegationResponses,proto3" json:"delegation_responses"` 31 // pagination defines the pagination in the response. 32 Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 33 }