"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGroups = exports.getTallyResult = exports.getGroupsByMember = exports.getVotesByVoter = exports.getVotesByProposal = exports.getVoteByProposalVoter = exports.getProposalsByGroupPolicy = exports.getProposal = exports.getGroupPoliciesByAdmin = exports.getGroupPoliciesByGroup = exports.getGroupsByAdmin = exports.getGroupMembers = exports.getGroupPolicyInfo = exports.getGroupInfo = void 0;
const helper_func_types_1 = require("../../../helper-func-types");
const query_1 = require("./query");
/**
 * GroupInfo queries group info based on group id.
 * @name getGroupInfo
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.GroupInfo
 */
exports.getGroupInfo = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryGroupInfoRequest.encode,
    decode: query_1.QueryGroupInfoResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "GroupInfo",
    deps: [query_1.QueryGroupInfoRequest, query_1.QueryGroupInfoResponse]
});
/**
 * GroupPolicyInfo queries group policy info based on account address of group policy.
 * @name getGroupPolicyInfo
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.GroupPolicyInfo
 */
exports.getGroupPolicyInfo = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryGroupPolicyInfoRequest.encode,
    decode: query_1.QueryGroupPolicyInfoResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "GroupPolicyInfo",
    deps: [query_1.QueryGroupPolicyInfoRequest, query_1.QueryGroupPolicyInfoResponse]
});
/**
 * GroupMembers queries members of a group by group id.
 * @name getGroupMembers
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.GroupMembers
 */
exports.getGroupMembers = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryGroupMembersRequest.encode,
    decode: query_1.QueryGroupMembersResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "GroupMembers",
    deps: [query_1.QueryGroupMembersRequest, query_1.QueryGroupMembersResponse]
});
/**
 * GroupsByAdmin queries groups by admin address.
 * @name getGroupsByAdmin
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.GroupsByAdmin
 */
exports.getGroupsByAdmin = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryGroupsByAdminRequest.encode,
    decode: query_1.QueryGroupsByAdminResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "GroupsByAdmin",
    deps: [query_1.QueryGroupsByAdminRequest, query_1.QueryGroupsByAdminResponse]
});
/**
 * GroupPoliciesByGroup queries group policies by group id.
 * @name getGroupPoliciesByGroup
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.GroupPoliciesByGroup
 */
exports.getGroupPoliciesByGroup = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryGroupPoliciesByGroupRequest.encode,
    decode: query_1.QueryGroupPoliciesByGroupResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "GroupPoliciesByGroup",
    deps: [query_1.QueryGroupPoliciesByGroupRequest, query_1.QueryGroupPoliciesByGroupResponse]
});
/**
 * GroupPoliciesByAdmin queries group policies by admin address.
 * @name getGroupPoliciesByAdmin
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.GroupPoliciesByAdmin
 */
exports.getGroupPoliciesByAdmin = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryGroupPoliciesByAdminRequest.encode,
    decode: query_1.QueryGroupPoliciesByAdminResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "GroupPoliciesByAdmin",
    deps: [query_1.QueryGroupPoliciesByAdminRequest, query_1.QueryGroupPoliciesByAdminResponse]
});
/**
 * Proposal queries a proposal based on proposal id.
 * @name getProposal
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.Proposal
 */
exports.getProposal = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryProposalRequest.encode,
    decode: query_1.QueryProposalResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "Proposal",
    deps: [query_1.QueryProposalRequest, query_1.QueryProposalResponse]
});
/**
 * ProposalsByGroupPolicy queries proposals based on account address of group policy.
 * @name getProposalsByGroupPolicy
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.ProposalsByGroupPolicy
 */
exports.getProposalsByGroupPolicy = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryProposalsByGroupPolicyRequest.encode,
    decode: query_1.QueryProposalsByGroupPolicyResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "ProposalsByGroupPolicy",
    deps: [query_1.QueryProposalsByGroupPolicyRequest, query_1.QueryProposalsByGroupPolicyResponse]
});
/**
 * VoteByProposalVoter queries a vote by proposal id and voter.
 * @name getVoteByProposalVoter
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.VoteByProposalVoter
 */
exports.getVoteByProposalVoter = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryVoteByProposalVoterRequest.encode,
    decode: query_1.QueryVoteByProposalVoterResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "VoteByProposalVoter",
    deps: [query_1.QueryVoteByProposalVoterRequest, query_1.QueryVoteByProposalVoterResponse]
});
/**
 * VotesByProposal queries a vote by proposal id.
 * @name getVotesByProposal
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.VotesByProposal
 */
exports.getVotesByProposal = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryVotesByProposalRequest.encode,
    decode: query_1.QueryVotesByProposalResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "VotesByProposal",
    deps: [query_1.QueryVotesByProposalRequest, query_1.QueryVotesByProposalResponse]
});
/**
 * VotesByVoter queries a vote by voter.
 * @name getVotesByVoter
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.VotesByVoter
 */
exports.getVotesByVoter = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryVotesByVoterRequest.encode,
    decode: query_1.QueryVotesByVoterResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "VotesByVoter",
    deps: [query_1.QueryVotesByVoterRequest, query_1.QueryVotesByVoterResponse]
});
/**
 * GroupsByMember queries groups by member address.
 * @name getGroupsByMember
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.GroupsByMember
 */
exports.getGroupsByMember = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryGroupsByMemberRequest.encode,
    decode: query_1.QueryGroupsByMemberResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "GroupsByMember",
    deps: [query_1.QueryGroupsByMemberRequest, query_1.QueryGroupsByMemberResponse]
});
/**
 * 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.
 * @name getTallyResult
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.TallyResult
 */
exports.getTallyResult = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryTallyResultRequest.encode,
    decode: query_1.QueryTallyResultResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "TallyResult",
    deps: [query_1.QueryTallyResultRequest, query_1.QueryTallyResultResponse]
});
/**
 * Groups queries all groups in state.
 * @name getGroups
 * @package cosmos.group.v1
 * @see proto service: cosmos.group.v1.Groups
 */
exports.getGroups = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryGroupsRequest.encode,
    decode: query_1.QueryGroupsResponse.decode,
    service: "cosmos.group.v1.Query",
    method: "Groups",
    deps: [query_1.QueryGroupsRequest, query_1.QueryGroupsResponse]
});
