# Client

# CLI

A user can query and interact with the group module using the CLI.

# Query

The query commands allow users to query group state.

Copy simd query group --help

# group-info

The group-info command allows users to query for group info by given group id.

Copy simd query group group-info [id] [flags]

Example:

Copy simd query group group-info 1

Example Output:

Copy admin: cosmos1.. group_id: "1" metadata: AQ== total_weight: "3" version: "1"

# group-policy-info

The group-policy-info command allows users to query for group policy info by account address of group policy .

Copy simd query group group-policy-info [group-policy-account] [flags]

Example:

Copy simd query group group-policy-info cosmos1..

Example Output:

Copy address: cosmos1.. admin: cosmos1.. decision_policy: '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s voting_period: 432000s group_id: "1" metadata: AQ== version: "1"

# group-members

The group-members command allows users to query for group members by group id with pagination flags.

Copy simd query group group-members [id] [flags]

Example:

Copy simd query group group-members 1

Example Output:

Copy members: - group_id: "1" member: address: cosmos1.. metadata: AQ== weight: "2" - group_id: "1" member: address: cosmos1.. metadata: AQ== weight: "1" pagination: next_key: null total: "2"

# groups-by-admin

The groups-by-admin command allows users to query for groups by admin account address with pagination flags.

Copy simd query group groups-by-admin [admin] [flags]

Example:

Copy simd query group groups-by-admin cosmos1..

Example Output:

Copy groups: - admin: cosmos1.. group_id: "1" metadata: AQ== total_weight: "3" version: "1" - admin: cosmos1.. group_id: "2" metadata: AQ== total_weight: "3" version: "1" pagination: next_key: null total: "2"

# group-policies-by-group

The group-policies-by-group command allows users to query for group policies by group id with pagination flags.

Copy simd query group group-policies-by-group [group-id] [flags]

Example:

Copy simd query group group-policies-by-group 1

Example Output:

Copy group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s voting_period: 432000s group_id: "1" metadata: AQ== version: "1" - address: cosmos1.. admin: cosmos1.. decision_policy: '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s voting_period: 432000s group_id: "1" metadata: AQ== version: "1" pagination: next_key: null total: "2"

# group-policies-by-admin

The group-policies-by-admin command allows users to query for group policies by admin account address with pagination flags.

Copy simd query group group-policies-by-admin [admin] [flags]

Example:

Copy simd query group group-policies-by-admin cosmos1..

Example Output:

Copy group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s voting_period: 432000s group_id: "1" metadata: AQ== version: "1" - address: cosmos1.. admin: cosmos1.. decision_policy: '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s voting_period: 432000s group_id: "1" metadata: AQ== version: "1" pagination: next_key: null total: "2"

# proposal

The proposal command allows users to query for proposal by id.

Copy simd query group proposal [id] [flags]

Example:

Copy simd query group proposal 1

Example Output:

Copy proposal: address: cosmos1.. executor_result: EXECUTOR_RESULT_NOT_RUN group_policy_version: "1" group_version: "1" metadata: AQ== msgs: - '@type': /cosmos.bank.v1beta1.MsgSend amount: - amount: "100000000" denom: stake from_address: cosmos1.. to_address: cosmos1.. proposal_id: "1" proposers: - cosmos1.. result: RESULT_UNFINALIZED status: STATUS_SUBMITTED submitted_at: "2021-12-17T07:06:26.310638964Z" windows: min_execution_period: 0s voting_period: 432000s vote_state: abstain_count: "0" no_count: "0" veto_count: "0" yes_count: "0"

# proposals-by-group-policy

The proposals-by-group-policy command allows users to query for proposals by account address of group policy with pagination flags.

Copy simd query group proposals-by-group-policy [group-policy-account] [flags]

Example:

Copy simd query group proposals-by-group-policy cosmos1..

Example Output:

Copy pagination: next_key: null total: "1" proposals: - address: cosmos1.. executor_result: EXECUTOR_RESULT_NOT_RUN group_policy_version: "1" group_version: "1" metadata: AQ== msgs: - '@type': /cosmos.bank.v1beta1.MsgSend amount: - amount: "100000000" denom: stake from_address: cosmos1.. to_address: cosmos1.. proposal_id: "1" proposers: - cosmos1.. result: RESULT_UNFINALIZED status: STATUS_SUBMITTED submitted_at: "2021-12-17T07:06:26.310638964Z" windows: min_execution_period: 0s voting_period: 432000s vote_state: abstain_count: "0" no_count: "0" veto_count: "0" yes_count: "0"

# vote

The vote command allows users to query for vote by proposal id and voter account address.

Copy simd query group vote [proposal-id] [voter] [flags]

Example:

Copy simd query group vote 1 cosmos1..

Example Output:

Copy vote: choice: CHOICE_YES metadata: AQ== proposal_id: "1" submitted_at: "2021-12-17T08:05:02.490164009Z" voter: cosmos1..

# votes-by-proposal

The votes-by-proposal command allows users to query for votes by proposal id with pagination flags.

Copy simd query group votes-by-proposal [proposal-id] [flags]

Example:

Copy simd query group votes-by-proposal 1

Example Output:

Copy pagination: next_key: null total: "1" votes: - choice: CHOICE_YES metadata: AQ== proposal_id: "1" submitted_at: "2021-12-17T08:05:02.490164009Z" voter: cosmos1..

# votes-by-voter

The votes-by-voter command allows users to query for votes by voter account address with pagination flags.

Copy simd query group votes-by-voter [voter] [flags]

Example:

Copy simd query group votes-by-voter cosmos1..

Example Output:

Copy pagination: next_key: null total: "1" votes: - choice: CHOICE_YES metadata: AQ== proposal_id: "1" submitted_at: "2021-12-17T08:05:02.490164009Z" voter: cosmos1..

# Transactions

The tx commands allow users to interact with the group module.

Copy simd tx group --help

# create-group

The create-group command allows users to create a group which is an aggregation of member accounts with associated weights and an administrator account.

Copy simd tx group create-group [admin] [metadata] [members-json-file]

Example:

Copy simd tx group create-group cosmos1.. "AQ==" members.json

# update-group-admin

The update-group-admin command allows users to update a group's admin.

Copy simd tx group update-group-admin [admin] [group-id] [new-admin] [flags]

Example:

Copy simd tx group update-group-admin cosmos1.. 1 cosmos1..

# update-group-members

The update-group-members command allows users to update a group's members.

Copy simd tx group update-group-members [admin] [group-id] [members-json-file] [flags]

Example:

Copy simd tx group update-group-members cosmos1.. 1 members.json

# update-group-metadata

The update-group-metadata command allows users to update a group's metadata.

Copy simd tx group update-group-metadata [admin] [group-id] [metadata] [flags]

Example:

Copy simd tx group update-group-metadata cosmos1.. 1 "AQ=="

# create-group-policy

The create-group-policy command allows users to create a group policy which is an account associated with a group and a decision policy.

Copy simd tx group create-group-policy [admin] [group-id] [metadata] [decision-policy] [flags]

Example:

Copy simd tx group create-group-policy cosmos1.. 1 "AQ==" '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}'

# create-group-with-policy

The create-group-with-policy command allows users to create a group which is an aggregation of member accounts with associated weights and an administrator account with decision policy. If the --group-policy-as-admin flag is set to true, the group policy address becomes the group and group policy admin.

Copy simd tx group create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] [decision-policy] [flags]

Example:

Copy simd tx group create-group-with-policy cosmos1.. "AQ==" "AQ==" members.json '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}'

# update-group-policy-admin

The update-group-policy-admin command allows users to update a group policy admin.

Copy simd tx group update-group-policy-admin [admin] [group-policy-account] [new-admin] [flags]

Example:

Copy simd tx group update-group-policy-admin cosmos1.. cosmos1.. cosmos1..

# update-group-policy-metadata

The update-group-policy-metadata command allows users to update a group policy metadata.

Copy simd tx group update-group-policy-metadata [admin] [group-policy-account] [new-metadata] [flags]

Example:

Copy simd tx group update-group-policy-metadata cosmos1.. cosmos1.. "AQ=="

# update-group-policy-decision-policy

The update-group-policy-decision-policy command allows users to update a group policy's decision policy.

Copy simd tx group update-group-policy-decision-policy [admin] [group-policy-account] [decision-policy] [flags]

Example:

Copy simd tx group update-group-policy-decision-policy cosmos1.. cosmos1.. '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"2", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}'

# submit-proposal

The submit-proposal command allows users to submit a new proposal.

Copy simd tx group submit-proposal [group-policy-account] [proposer[,proposer]*] [msg_tx_json_file] [metadata] [flags]

Example:

Copy simd tx group submit-proposal cosmos1.. cosmos1.. msg_tx.json "AQ=="

# withdraw-proposal

The withdraw-proposal command allows users to withdraw a proposal.

Copy simd tx group withdraw-proposal [proposal-id] [group-policy-admin-or-proposer]

Example:

Copy simd tx group withdraw-proposal 1 cosmos1..

# vote

The vote command allows users to vote on a proposal.

Copy simd tx group vote proposal-id] [voter] [choice] [metadata] [flags]

Example:

Copy simd tx group vote 1 cosmos1.. CHOICE_YES "AQ=="

# exec

The exec command allows users to execute a proposal.

Copy simd tx group exec [proposal-id] [flags]

Example:

Copy simd tx group exec 1

# leave-group

The leave-group command allows group member to leave the group.

Copy simd tx group leave-group [member-address] [group-id]

Example:

Copy simd tx group leave-group cosmos1... 1

# gRPC

A user can query the group module using gRPC endpoints.

# GroupInfo

The GroupInfo endpoint allows users to query for group info by given group id.

Copy cosmos.group.v1.Query/GroupInfo

Example:

Copy grpcurl -plaintext \ -d '{"group_id":1}' localhost:9090 cosmos.group.v1.Query/GroupInfo

Example Output:

Copy { "info": { "groupId": "1", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "totalWeight": "3" } }

# GroupPolicyInfo

The GroupPolicyInfo endpoint allows users to query for group policy info by account address of group policy.

Copy cosmos.group.v1.Query/GroupPolicyInfo

Example:

Copy grpcurl -plaintext \ -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/GroupPolicyInfo

Example Output:

Copy { "info": { "address": "cosmos1..", "groupId": "1", "admin": "cosmos1..", "version": "1", "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows": {"voting_period": "120h", "min_execution_period": "0s"}}, } }

# GroupMembers

The GroupMembers endpoint allows users to query for group members by group id with pagination flags.

Copy cosmos.group.v1.Query/GroupMembers

Example:

Copy grpcurl -plaintext \ -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1.Query/GroupMembers

Example Output:

Copy { "members": [ { "groupId": "1", "member": { "address": "cosmos1..", "weight": "1" } }, { "groupId": "1", "member": { "address": "cosmos1..", "weight": "2" } } ], "pagination": { "total": "2" } }

# GroupsByAdmin

The GroupsByAdmin endpoint allows users to query for groups by admin account address with pagination flags.

Copy cosmos.group.v1.Query/GroupsByAdmin

Example:

Copy grpcurl -plaintext \ -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/GroupsByAdmin

Example Output:

Copy { "groups": [ { "groupId": "1", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "totalWeight": "3" }, { "groupId": "2", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "totalWeight": "3" } ], "pagination": { "total": "2" } }

# GroupPoliciesByGroup

The GroupPoliciesByGroup endpoint allows users to query for group policies by group id with pagination flags.

Copy cosmos.group.v1.Query/GroupPoliciesByGroup

Example:

Copy grpcurl -plaintext \ -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1.Query/GroupPoliciesByGroup

Example Output:

Copy { "GroupPolicies": [ { "address": "cosmos1..", "groupId": "1", "admin": "cosmos1..", "version": "1", "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, }, { "address": "cosmos1..", "groupId": "1", "admin": "cosmos1..", "version": "1", "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, } ], "pagination": { "total": "2" } }

# GroupPoliciesByAdmin

The GroupPoliciesByAdmin endpoint allows users to query for group policies by admin account address with pagination flags.

Copy cosmos.group.v1.Query/GroupPoliciesByAdmin

Example:

Copy grpcurl -plaintext \ -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/GroupPoliciesByAdmin

Example Output:

Copy { "GroupPolicies": [ { "address": "cosmos1..", "groupId": "1", "admin": "cosmos1..", "version": "1", "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, }, { "address": "cosmos1..", "groupId": "1", "admin": "cosmos1..", "version": "1", "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, } ], "pagination": { "total": "2" } }

# Proposal

The Proposal endpoint allows users to query for proposal by id.

Copy cosmos.group.v1.Query/Proposal

Example:

Copy grpcurl -plaintext \ -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1.Query/Proposal

Example Output:

Copy { "proposal": { "proposalId": "1", "address": "cosmos1..", "proposers": [ "cosmos1.." ], "submittedAt": "2021-12-17T07:06:26.310638964Z", "groupVersion": "1", "GroupPolicyVersion": "1", "status": "STATUS_SUBMITTED", "result": "RESULT_UNFINALIZED", "voteState": { "yesCount": "0", "noCount": "0", "abstainCount": "0", "vetoCount": "0" }, "windows": { "min_execution_period": "0s", "voting_period": "432000s" }, "executorResult": "EXECUTOR_RESULT_NOT_RUN", "msgs": [ {"@type":"/cosmos.bank.v1beta1.MsgSend","amount":[{"denom":"stake","amount":"100000000"}],"fromAddress":"cosmos1..","toAddress":"cosmos1.."} ] } }

# ProposalsByGroupPolicy

The ProposalsByGroupPolicy endpoint allows users to query for proposals by account address of group policy with pagination flags.

Copy cosmos.group.v1.Query/ProposalsByGroupPolicy

Example:

Copy grpcurl -plaintext \ -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/ProposalsByGroupPolicy

Example Output:

Copy { "proposals": [ { "proposalId": "1", "address": "cosmos1..", "proposers": [ "cosmos1.." ], "submittedAt": "2021-12-17T08:03:27.099649352Z", "groupVersion": "1", "GroupPolicyVersion": "1", "status": "STATUS_CLOSED", "result": "RESULT_ACCEPTED", "voteState": { "yesCount": "1", "noCount": "0", "abstainCount": "0", "vetoCount": "0" }, "windows": { "min_execution_period": "0s", "voting_period": "432000s" }, "executorResult": "EXECUTOR_RESULT_NOT_RUN", "msgs": [ {"@type":"/cosmos.bank.v1beta1.MsgSend","amount":[{"denom":"stake","amount":"100000000"}],"fromAddress":"cosmos1..","toAddress":"cosmos1.."} ] } ], "pagination": { "total": "1" } }

# VoteByProposalVoter

The VoteByProposalVoter endpoint allows users to query for vote by proposal id and voter account address.

Copy cosmos.group.v1.Query/VoteByProposalVoter

Example:

Copy grpcurl -plaintext \ -d '{"proposal_id":"1","voter":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/VoteByProposalVoter

Example Output:

Copy { "vote": { "proposalId": "1", "voter": "cosmos1..", "choice": "CHOICE_YES", "submittedAt": "2021-12-17T08:05:02.490164009Z" } }

# VotesByProposal

The VotesByProposal endpoint allows users to query for votes by proposal id with pagination flags.

Copy cosmos.group.v1.Query/VotesByProposal

Example:

Copy grpcurl -plaintext \ -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1.Query/VotesByProposal

Example Output:

Copy { "votes": [ { "proposalId": "1", "voter": "cosmos1..", "choice": "CHOICE_YES", "submittedAt": "2021-12-17T08:05:02.490164009Z" } ], "pagination": { "total": "1" } }

# VotesByVoter

The VotesByVoter endpoint allows users to query for votes by voter account address with pagination flags.

Copy cosmos.group.v1.Query/VotesByVoter

Example:

Copy grpcurl -plaintext \ -d '{"voter":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/VotesByVoter

Example Output:

Copy { "votes": [ { "proposalId": "1", "voter": "cosmos1..", "choice": "CHOICE_YES", "submittedAt": "2021-12-17T08:05:02.490164009Z" } ], "pagination": { "total": "1" } }

# REST

A user can query the group module using REST endpoints.

# GroupInfo

The GroupInfo endpoint allows users to query for group info by given group id.

Copy /cosmos/group/v1/group_info/{group_id}

Example:

Copy curl localhost:1317/cosmos/group/v1/group_info/1

Example Output:

Copy { "info": { "id": "1", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "total_weight": "3" } }

# GroupPolicyInfo

The GroupPolicyInfo endpoint allows users to query for group policy info by account address of group policy.

Copy /cosmos/group/v1/group_policy_info/{address}

Example:

Copy curl localhost:1317/cosmos/group/v1/group_policy_info/cosmos1..

Example Output:

Copy { "info": { "address": "cosmos1..", "group_id": "1", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "decision_policy": { "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", "min_execution_period": "0s" } }, } }

# GroupMembers

The GroupMembers endpoint allows users to query for group members by group id with pagination flags.

Copy /cosmos/group/v1/group_members/{group_id}

Example:

Copy curl localhost:1317/cosmos/group/v1/group_members/1

Example Output:

Copy { "members": [ { "group_id": "1", "member": { "address": "cosmos1..", "weight": "1", "metadata": "AQ==" } }, { "group_id": "1", "member": { "address": "cosmos1..", "weight": "2", "metadata": "AQ==" } ], "pagination": { "next_key": null, "total": "2" } }

# GroupsByAdmin

The GroupsByAdmin endpoint allows users to query for groups by admin account address with pagination flags.

Copy /cosmos/group/v1/groups_by_admin/{admin}

Example:

Copy curl localhost:1317/cosmos/group/v1/groups_by_admin/cosmos1..

Example Output:

Copy { "groups": [ { "id": "1", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "total_weight": "3" }, { "id": "2", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "total_weight": "3" } ], "pagination": { "next_key": null, "total": "2" } }

# GroupPoliciesByGroup

The GroupPoliciesByGroup endpoint allows users to query for group policies by group id with pagination flags.

Copy /cosmos/group/v1/group_policies_by_group/{group_id}

Example:

Copy curl localhost:1317/cosmos/group/v1/group_policies_by_group/1

Example Output:

Copy { "group_policies": [ { "address": "cosmos1..", "group_id": "1", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "decision_policy": { "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", "min_execution_period": "0s" } }, }, { "address": "cosmos1..", "group_id": "1", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "decision_policy": { "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", "min_execution_period": "0s" } }, } ], "pagination": { "next_key": null, "total": "2" } }

# GroupPoliciesByAdmin

The GroupPoliciesByAdmin endpoint allows users to query for group policies by admin account address with pagination flags.

Copy /cosmos/group/v1/group_policies_by_admin/{admin}

Example:

Copy curl localhost:1317/cosmos/group/v1/group_policies_by_admin/cosmos1..

Example Output:

Copy { "group_policies": [ { "address": "cosmos1..", "group_id": "1", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "decision_policy": { "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", "min_execution_period": "0s" } }, }, { "address": "cosmos1..", "group_id": "1", "admin": "cosmos1..", "metadata": "AQ==", "version": "1", "decision_policy": { "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", "min_execution_period": "0s" } }, } ], "pagination": { "next_key": null, "total": "2" }

# Proposal

The Proposal endpoint allows users to query for proposal by id.

Copy /cosmos/group/v1/proposal/{proposal_id}

Example:

Copy curl localhost:1317/cosmos/group/v1/proposal/1

Example Output:

Copy { "proposal": { "proposal_id": "1", "address": "cosmos1..", "metadata": "AQ==", "proposers": [ "cosmos1.." ], "submitted_at": "2021-12-17T07:06:26.310638964Z", "group_version": "1", "group_policy_version": "1", "status": "STATUS_SUBMITTED", "result": "RESULT_UNFINALIZED", "vote_state": { "yes_count": "0", "no_count": "0", "abstain_count": "0", "veto_count": "0" }, "windows": { "min_execution_period": "0s", "voting_period": "432000s" }, "executor_result": "EXECUTOR_RESULT_NOT_RUN", "msgs": [ { "@type": "/cosmos.bank.v1beta1.MsgSend", "from_address": "cosmos1..", "to_address": "cosmos1..", "amount": [ { "denom": "stake", "amount": "100000000" } ] } ] } }

# ProposalsByGroupPolicy

The ProposalsByGroupPolicy endpoint allows users to query for proposals by account address of group policy with pagination flags.

Copy /cosmos/group/v1/proposals_by_group_policy/{address}

Example:

Copy curl localhost:1317/cosmos/group/v1/proposals_by_group_policy/cosmos1..

Example Output:

Copy { "proposals": [ { "id": "1", "group_policy_address": "cosmos1..", "metadata": "AQ==", "proposers": [ "cosmos1.." ], "submit_time": "2021-12-17T08:03:27.099649352Z", "group_version": "1", "group_policy_version": "1", "status": "STATUS_CLOSED", "result": "RESULT_ACCEPTED", "vote_state": { "yes_count": "1", "no_count": "0", "abstain_count": "0", "veto_count": "0" }, "windows": { "min_execution_period": "0s", "voting_period": "432000s" }, "executor_result": "EXECUTOR_RESULT_NOT_RUN", "msgs": [ { "@type": "/cosmos.bank.v1beta1.MsgSend", "from_address": "cosmos1..", "to_address": "cosmos1..", "amount": [ { "denom": "stake", "amount": "100000000" } ] } ] } ], "pagination": { "next_key": null, "total": "1" } }

# VoteByProposalVoter

The VoteByProposalVoter endpoint allows users to query for vote by proposal id and voter account address.

Copy /cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}

Example:

Copy curl localhost:1317/cosmos/group/v1beta1/vote_by_proposal_voter/1/cosmos1..

Example Output:

Copy { "vote": { "proposal_id": "1", "voter": "cosmos1..", "choice": "CHOICE_YES", "metadata": "AQ==", "submitted_at": "2021-12-17T08:05:02.490164009Z" } }

# VotesByProposal

The VotesByProposal endpoint allows users to query for votes by proposal id with pagination flags.

Copy /cosmos/group/v1/votes_by_proposal/{proposal_id}

Example:

Copy curl localhost:1317/cosmos/group/v1/votes_by_proposal/1

Example Output:

Copy { "votes": [ { "proposal_id": "1", "voter": "cosmos1..", "option": "CHOICE_YES", "metadata": "AQ==", "submit_time": "2021-12-17T08:05:02.490164009Z" } ], "pagination": { "next_key": null, "total": "1" } }

# VotesByVoter

The VotesByVoter endpoint allows users to query for votes by voter account address with pagination flags.

Copy /cosmos/group/v1/votes_by_voter/{voter}

Example:

Copy curl localhost:1317/cosmos/group/v1/votes_by_voter/cosmos1..

Example Output:

Copy { "votes": [ { "proposal_id": "1", "voter": "cosmos1..", "choice": "CHOICE_YES", "metadata": "AQ==", "submitted_at": "2021-12-17T08:05:02.490164009Z" } ], "pagination": { "next_key": null, "total": "1" } }