import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { GroupInfo, GroupPolicyInfo, GroupMember, Proposal, Vote, TallyResult } from "./types"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, Exact, Rpc } from "../../../helpers"; import { JsonSafe } from "../../../json-safe"; export declare const protobufPackage = "cosmos.group.v1"; /** QueryGroupInfoRequest is the Query/GroupInfo request type. */ export interface QueryGroupInfoRequest { /** group_id is the unique ID of the group. */ groupId: bigint; } /** QueryGroupInfoResponse is the Query/GroupInfo response type. */ export interface QueryGroupInfoResponse { /** info is the GroupInfo of the group. */ info?: GroupInfo; } /** QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. */ export interface QueryGroupPolicyInfoRequest { /** address is the account address of the group policy. */ address: string; } /** QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. */ export interface QueryGroupPolicyInfoResponse { /** info is the GroupPolicyInfo of the group policy. */ info?: GroupPolicyInfo; } /** QueryGroupMembersRequest is the Query/GroupMembers request type. */ export interface QueryGroupMembersRequest { /** group_id is the unique ID of the group. */ groupId: bigint; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } /** QueryGroupMembersResponse is the Query/GroupMembersResponse response type. */ export interface QueryGroupMembersResponse { /** members are the members of the group with given group_id. */ members: GroupMember[]; /** pagination defines the pagination in the response. */ pagination?: PageResponse; } /** QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. */ export interface QueryGroupsByAdminRequest { /** admin is the account address of a group's admin. */ admin: string; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } /** QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. */ export interface QueryGroupsByAdminResponse { /** groups are the groups info with the provided admin. */ groups: GroupInfo[]; /** pagination defines the pagination in the response. */ pagination?: PageResponse; } /** QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. */ export interface QueryGroupPoliciesByGroupRequest { /** group_id is the unique ID of the group policy's group. */ groupId: bigint; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } /** QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. */ export interface QueryGroupPoliciesByGroupResponse { /** group_policies are the group policies info associated with the provided group. */ groupPolicies: GroupPolicyInfo[]; /** pagination defines the pagination in the response. */ pagination?: PageResponse; } /** QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. */ export interface QueryGroupPoliciesByAdminRequest { /** admin is the admin address of the group policy. */ admin: string; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } /** QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. */ export interface QueryGroupPoliciesByAdminResponse { /** group_policies are the group policies info with provided admin. */ groupPolicies: GroupPolicyInfo[]; /** pagination defines the pagination in the response. */ pagination?: PageResponse; } /** QueryProposalRequest is the Query/Proposal request type. */ export interface QueryProposalRequest { /** proposal_id is the unique ID of a proposal. */ proposalId: bigint; } /** QueryProposalResponse is the Query/Proposal response type. */ export interface QueryProposalResponse { /** proposal is the proposal info. */ proposal?: Proposal; } /** QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. */ export interface QueryProposalsByGroupPolicyRequest { /** address is the account address of the group policy related to proposals. */ address: string; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } /** QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. */ export interface QueryProposalsByGroupPolicyResponse { /** proposals are the proposals with given group policy. */ proposals: Proposal[]; /** pagination defines the pagination in the response. */ pagination?: PageResponse; } /** QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. */ export interface QueryVoteByProposalVoterRequest { /** proposal_id is the unique ID of a proposal. */ proposalId: bigint; /** voter is a proposal voter account address. */ voter: string; } /** QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. */ export interface QueryVoteByProposalVoterResponse { /** vote is the vote with given proposal_id and voter. */ vote?: Vote; } /** QueryVotesByProposalRequest is the Query/VotesByProposal request type. */ export interface QueryVotesByProposalRequest { /** proposal_id is the unique ID of a proposal. */ proposalId: bigint; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } /** QueryVotesByProposalResponse is the Query/VotesByProposal response type. */ export interface QueryVotesByProposalResponse { /** votes are the list of votes for given proposal_id. */ votes: Vote[]; /** pagination defines the pagination in the response. */ pagination?: PageResponse; } /** QueryVotesByVoterRequest is the Query/VotesByVoter request type. */ export interface QueryVotesByVoterRequest { /** voter is a proposal voter account address. */ voter: string; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } /** QueryVotesByVoterResponse is the Query/VotesByVoter response type. */ export interface QueryVotesByVoterResponse { /** votes are the list of votes by given voter. */ votes: Vote[]; /** pagination defines the pagination in the response. */ pagination?: PageResponse; } /** QueryGroupsByMemberRequest is the Query/GroupsByMember request type. */ export interface QueryGroupsByMemberRequest { /** address is the group member address. */ address: string; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } /** QueryGroupsByMemberResponse is the Query/GroupsByMember response type. */ export interface QueryGroupsByMemberResponse { /** groups are the groups info with the provided group member. */ groups: GroupInfo[]; /** pagination defines the pagination in the response. */ pagination?: PageResponse; } /** QueryTallyResultRequest is the Query/TallyResult request type. */ export interface QueryTallyResultRequest { /** proposal_id is the unique id of a proposal. */ proposalId: bigint; } /** QueryTallyResultResponse is the Query/TallyResult response type. */ export interface QueryTallyResultResponse { /** tally defines the requested tally. */ tally: TallyResult; } /** QueryGroupsRequest is the Query/Groups request type. */ export interface QueryGroupsRequest { /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } /** QueryGroupsResponse is the Query/Groups response type. */ export interface QueryGroupsResponse { /** `groups` is all the groups present in state. */ groups: GroupInfo[]; /** pagination defines the pagination in the response. */ pagination?: PageResponse; } export declare const QueryGroupInfoRequest: { typeUrl: string; encode(message: QueryGroupInfoRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupInfoRequest; fromJSON(object: any): QueryGroupInfoRequest; toJSON(message: QueryGroupInfoRequest): JsonSafe; fromPartial, I>>(object: I): QueryGroupInfoRequest; }; export declare const QueryGroupInfoResponse: { typeUrl: string; encode(message: QueryGroupInfoResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupInfoResponse; fromJSON(object: any): QueryGroupInfoResponse; toJSON(message: QueryGroupInfoResponse): JsonSafe; fromPartial, I>>(object: I): QueryGroupInfoResponse; }; export declare const QueryGroupPolicyInfoRequest: { typeUrl: string; encode(message: QueryGroupPolicyInfoRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPolicyInfoRequest; fromJSON(object: any): QueryGroupPolicyInfoRequest; toJSON(message: QueryGroupPolicyInfoRequest): JsonSafe; fromPartial, I>>(object: I): QueryGroupPolicyInfoRequest; }; export declare const QueryGroupPolicyInfoResponse: { typeUrl: string; encode(message: QueryGroupPolicyInfoResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPolicyInfoResponse; fromJSON(object: any): QueryGroupPolicyInfoResponse; toJSON(message: QueryGroupPolicyInfoResponse): JsonSafe; fromPartial, I>>(object: I): QueryGroupPolicyInfoResponse; }; export declare const QueryGroupMembersRequest: { typeUrl: string; encode(message: QueryGroupMembersRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupMembersRequest; fromJSON(object: any): QueryGroupMembersRequest; toJSON(message: QueryGroupMembersRequest): JsonSafe; fromPartial, I>>(object: I): QueryGroupMembersRequest; }; export declare const QueryGroupMembersResponse: { typeUrl: string; encode(message: QueryGroupMembersResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupMembersResponse; fromJSON(object: any): QueryGroupMembersResponse; toJSON(message: QueryGroupMembersResponse): JsonSafe; fromPartial, I>>(object: I): QueryGroupMembersResponse; }; export declare const QueryGroupsByAdminRequest: { typeUrl: string; encode(message: QueryGroupsByAdminRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsByAdminRequest; fromJSON(object: any): QueryGroupsByAdminRequest; toJSON(message: QueryGroupsByAdminRequest): JsonSafe; fromPartial, I>>(object: I): QueryGroupsByAdminRequest; }; export declare const QueryGroupsByAdminResponse: { typeUrl: string; encode(message: QueryGroupsByAdminResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsByAdminResponse; fromJSON(object: any): QueryGroupsByAdminResponse; toJSON(message: QueryGroupsByAdminResponse): JsonSafe; fromPartial, I>>(object: I): QueryGroupsByAdminResponse; }; export declare const QueryGroupPoliciesByGroupRequest: { typeUrl: string; encode(message: QueryGroupPoliciesByGroupRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPoliciesByGroupRequest; fromJSON(object: any): QueryGroupPoliciesByGroupRequest; toJSON(message: QueryGroupPoliciesByGroupRequest): JsonSafe; fromPartial, I>>(object: I): QueryGroupPoliciesByGroupRequest; }; export declare const QueryGroupPoliciesByGroupResponse: { typeUrl: string; encode(message: QueryGroupPoliciesByGroupResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPoliciesByGroupResponse; fromJSON(object: any): QueryGroupPoliciesByGroupResponse; toJSON(message: QueryGroupPoliciesByGroupResponse): JsonSafe; fromPartial, I>>(object: I): QueryGroupPoliciesByGroupResponse; }; export declare const QueryGroupPoliciesByAdminRequest: { typeUrl: string; encode(message: QueryGroupPoliciesByAdminRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPoliciesByAdminRequest; fromJSON(object: any): QueryGroupPoliciesByAdminRequest; toJSON(message: QueryGroupPoliciesByAdminRequest): JsonSafe; fromPartial, I>>(object: I): QueryGroupPoliciesByAdminRequest; }; export declare const QueryGroupPoliciesByAdminResponse: { typeUrl: string; encode(message: QueryGroupPoliciesByAdminResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupPoliciesByAdminResponse; fromJSON(object: any): QueryGroupPoliciesByAdminResponse; toJSON(message: QueryGroupPoliciesByAdminResponse): JsonSafe; fromPartial, I>>(object: I): QueryGroupPoliciesByAdminResponse; }; export declare const QueryProposalRequest: { typeUrl: string; encode(message: QueryProposalRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalRequest; fromJSON(object: any): QueryProposalRequest; toJSON(message: QueryProposalRequest): JsonSafe; fromPartial, I>>(object: I): QueryProposalRequest; }; export declare const QueryProposalResponse: { typeUrl: string; encode(message: QueryProposalResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalResponse; fromJSON(object: any): QueryProposalResponse; toJSON(message: QueryProposalResponse): JsonSafe; fromPartial, I>>(object: I): QueryProposalResponse; }; export declare const QueryProposalsByGroupPolicyRequest: { typeUrl: string; encode(message: QueryProposalsByGroupPolicyRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalsByGroupPolicyRequest; fromJSON(object: any): QueryProposalsByGroupPolicyRequest; toJSON(message: QueryProposalsByGroupPolicyRequest): JsonSafe; fromPartial, I>>(object: I): QueryProposalsByGroupPolicyRequest; }; export declare const QueryProposalsByGroupPolicyResponse: { typeUrl: string; encode(message: QueryProposalsByGroupPolicyResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryProposalsByGroupPolicyResponse; fromJSON(object: any): QueryProposalsByGroupPolicyResponse; toJSON(message: QueryProposalsByGroupPolicyResponse): JsonSafe; fromPartial, I>>(object: I): QueryProposalsByGroupPolicyResponse; }; export declare const QueryVoteByProposalVoterRequest: { typeUrl: string; encode(message: QueryVoteByProposalVoterRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryVoteByProposalVoterRequest; fromJSON(object: any): QueryVoteByProposalVoterRequest; toJSON(message: QueryVoteByProposalVoterRequest): JsonSafe; fromPartial, I>>(object: I): QueryVoteByProposalVoterRequest; }; export declare const QueryVoteByProposalVoterResponse: { typeUrl: string; encode(message: QueryVoteByProposalVoterResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryVoteByProposalVoterResponse; fromJSON(object: any): QueryVoteByProposalVoterResponse; toJSON(message: QueryVoteByProposalVoterResponse): JsonSafe; fromPartial, I>>(object: I): QueryVoteByProposalVoterResponse; }; export declare const QueryVotesByProposalRequest: { typeUrl: string; encode(message: QueryVotesByProposalRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesByProposalRequest; fromJSON(object: any): QueryVotesByProposalRequest; toJSON(message: QueryVotesByProposalRequest): JsonSafe; fromPartial, I>>(object: I): QueryVotesByProposalRequest; }; export declare const QueryVotesByProposalResponse: { typeUrl: string; encode(message: QueryVotesByProposalResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesByProposalResponse; fromJSON(object: any): QueryVotesByProposalResponse; toJSON(message: QueryVotesByProposalResponse): JsonSafe; fromPartial, I>>(object: I): QueryVotesByProposalResponse; }; export declare const QueryVotesByVoterRequest: { typeUrl: string; encode(message: QueryVotesByVoterRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesByVoterRequest; fromJSON(object: any): QueryVotesByVoterRequest; toJSON(message: QueryVotesByVoterRequest): JsonSafe; fromPartial, I>>(object: I): QueryVotesByVoterRequest; }; export declare const QueryVotesByVoterResponse: { typeUrl: string; encode(message: QueryVotesByVoterResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryVotesByVoterResponse; fromJSON(object: any): QueryVotesByVoterResponse; toJSON(message: QueryVotesByVoterResponse): JsonSafe; fromPartial, I>>(object: I): QueryVotesByVoterResponse; }; export declare const QueryGroupsByMemberRequest: { typeUrl: string; encode(message: QueryGroupsByMemberRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsByMemberRequest; fromJSON(object: any): QueryGroupsByMemberRequest; toJSON(message: QueryGroupsByMemberRequest): JsonSafe; fromPartial, I>>(object: I): QueryGroupsByMemberRequest; }; export declare const QueryGroupsByMemberResponse: { typeUrl: string; encode(message: QueryGroupsByMemberResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsByMemberResponse; fromJSON(object: any): QueryGroupsByMemberResponse; toJSON(message: QueryGroupsByMemberResponse): JsonSafe; fromPartial, I>>(object: I): QueryGroupsByMemberResponse; }; export declare const QueryTallyResultRequest: { typeUrl: string; encode(message: QueryTallyResultRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryTallyResultRequest; fromJSON(object: any): QueryTallyResultRequest; toJSON(message: QueryTallyResultRequest): JsonSafe; fromPartial, I>>(object: I): QueryTallyResultRequest; }; export declare const QueryTallyResultResponse: { typeUrl: string; encode(message: QueryTallyResultResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryTallyResultResponse; fromJSON(object: any): QueryTallyResultResponse; toJSON(message: QueryTallyResultResponse): JsonSafe; fromPartial, I>>(object: I): QueryTallyResultResponse; }; export declare const QueryGroupsRequest: { typeUrl: string; encode(message: QueryGroupsRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsRequest; fromJSON(object: any): QueryGroupsRequest; toJSON(message: QueryGroupsRequest): JsonSafe; fromPartial, I>>(object: I): QueryGroupsRequest; }; export declare const QueryGroupsResponse: { typeUrl: string; encode(message: QueryGroupsResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsResponse; fromJSON(object: any): QueryGroupsResponse; toJSON(message: QueryGroupsResponse): JsonSafe; fromPartial, I>>(object: I): QueryGroupsResponse; }; /** Query is the cosmos.group.v1 Query service. */ export interface Query { /** GroupInfo queries group info based on group id. */ GroupInfo(request: QueryGroupInfoRequest): Promise; /** GroupPolicyInfo queries group policy info based on account address of group policy. */ GroupPolicyInfo(request: QueryGroupPolicyInfoRequest): Promise; /** GroupMembers queries members of a group by group id. */ GroupMembers(request: QueryGroupMembersRequest): Promise; /** GroupsByAdmin queries groups by admin address. */ GroupsByAdmin(request: QueryGroupsByAdminRequest): Promise; /** GroupPoliciesByGroup queries group policies by group id. */ GroupPoliciesByGroup(request: QueryGroupPoliciesByGroupRequest): Promise; /** GroupPoliciesByAdmin queries group policies by admin address. */ GroupPoliciesByAdmin(request: QueryGroupPoliciesByAdminRequest): Promise; /** Proposal queries a proposal based on proposal id. */ Proposal(request: QueryProposalRequest): Promise; /** ProposalsByGroupPolicy queries proposals based on account address of group policy. */ ProposalsByGroupPolicy(request: QueryProposalsByGroupPolicyRequest): Promise; /** VoteByProposalVoter queries a vote by proposal id and voter. */ VoteByProposalVoter(request: QueryVoteByProposalVoterRequest): Promise; /** VotesByProposal queries a vote by proposal id. */ VotesByProposal(request: QueryVotesByProposalRequest): Promise; /** VotesByVoter queries a vote by voter. */ VotesByVoter(request: QueryVotesByVoterRequest): Promise; /** GroupsByMember queries groups by member address. */ GroupsByMember(request: QueryGroupsByMemberRequest): Promise; /** * TallyResult returns the tally result of a proposal. If the proposal is * still in voting period, then this query computes the current tally state, * which might not be final. On the other hand, if the proposal is final, * then it simply returns the `final_tally_result` state stored in the * proposal itself. */ TallyResult(request: QueryTallyResultRequest): Promise; /** Groups queries all groups in state. */ Groups(request?: QueryGroupsRequest): Promise; } export declare class QueryClientImpl implements Query { private readonly rpc; constructor(rpc: Rpc); GroupInfo(request: QueryGroupInfoRequest): Promise; GroupPolicyInfo(request: QueryGroupPolicyInfoRequest): Promise; GroupMembers(request: QueryGroupMembersRequest): Promise; GroupsByAdmin(request: QueryGroupsByAdminRequest): Promise; GroupPoliciesByGroup(request: QueryGroupPoliciesByGroupRequest): Promise; GroupPoliciesByAdmin(request: QueryGroupPoliciesByAdminRequest): Promise; Proposal(request: QueryProposalRequest): Promise; ProposalsByGroupPolicy(request: QueryProposalsByGroupPolicyRequest): Promise; VoteByProposalVoter(request: QueryVoteByProposalVoterRequest): Promise; VotesByProposal(request: QueryVotesByProposalRequest): Promise; VotesByVoter(request: QueryVotesByVoterRequest): Promise; GroupsByMember(request: QueryGroupsByMemberRequest): Promise; TallyResult(request: QueryTallyResultRequest): Promise; Groups(request?: QueryGroupsRequest): Promise; }