# Protobuf Documentation

# Table of Contents

Top

# regen/group/v1alpha1/events.proto

# EventCreateGroup

EventCreateGroup is an event emitted when a group is created.

Field Type Label Description
group_id uint64 group_id is the unique ID of the group.

# EventCreateGroupAccount

EventCreateGroupAccount is an event emitted when a group account is created.

Field Type Label Description
address string address is the address of the group account.

# EventCreateProposal

EventCreateProposal is an event emitted when a proposal is created.

Field Type Label Description
proposal_id uint64 proposal_id is the unique ID of the proposal.

# EventExec

EventExec is an event emitted when a proposal is executed.

Field Type Label Description
proposal_id uint64 proposal_id is the unique ID of the proposal.

# EventUpdateGroup

EventUpdateGroup is an event emitted when a group is updated.

Field Type Label Description
group_id uint64 group_id is the unique ID of the group.

# EventUpdateGroupAccount

EventUpdateGroupAccount is an event emitted when a group account is updated.

Field Type Label Description
address string address is the address of the group account.

# EventVote

EventVote is an event emitted when a voter votes on a proposal.

Field Type Label Description
proposal_id uint64 proposal_id is the unique ID of the proposal.

Top

# regen/group/v1alpha1/types.proto

# GroupAccountInfo

GroupAccountInfo represents the high-level on-chain information for a group account.

Field Type Label Description
address string address is the group account address.
group_id uint64 group_id is the unique ID of the group.
admin string admin is the account address of the group admin.
metadata bytes metadata is any arbitrary metadata to attached to the group account.
version uint64 version is used to track changes to a group's GroupAccountInfo structure that would create a different result on a running proposal.
decision_policy google.protobuf.Any decision_policy specifies the group account's decision policy.
derivation_key bytes derivation_key is the "derivation" key of the group account, which is needed to derive the group root module key and execute proposals.

# GroupInfo

GroupInfo represents the high-level on-chain information for a group.

Field Type Label Description
group_id uint64 group_id is the unique ID of the group.
admin string admin is the account address of the group's admin.
metadata bytes metadata is any arbitrary metadata to attached to the group.
version uint64 version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail
total_weight string total_weight is the sum of the group members' weights.

# GroupMember

GroupMember represents the relationship between a group and a member.

Field Type Label Description
group_id uint64 group_id is the unique ID of the group.
member Member member is the member data.

# Member

Member represents a group member with an account address, non-zero weight and metadata.

Field Type Label Description
address string address is the member's account address.
weight string weight is the member's voting weight that should be greater than 0.
metadata bytes metadata is any arbitrary metadata to attached to the member.

# Members

Members defines a repeated slice of Member objects.

Field Type Label Description
members Member repeated members is the list of members.

# Proposal

Proposal defines a group proposal. Any member of a group can submit a proposal for a group account to decide upon. A proposal consists of a set of sdk.Msgs that will be executed if the proposal passes as well as some optional metadata associated with the proposal.

Field Type Label Description
proposal_id uint64 proposal_id is the unique id of the proposal.
address string address is the group account address.
metadata bytes metadata is any arbitrary metadata to attached to the proposal.
proposers string repeated proposers are the account addresses of the proposers.
submitted_at google.protobuf.Timestamp submitted_at is a timestamp specifying when a proposal was submitted.
group_version uint64 group_version tracks the version of the group that this proposal corresponds to. When group membership is changed, existing proposals from previous group versions will become invalid.
group_account_version uint64 group_account_version tracks the version of the group account that this proposal corresponds to. When a decision policy is changed, existing proposals from previous policy versions will become invalid.
status Proposal.Status Status represents the high level position in the life cycle of the proposal. Initial value is Submitted.
result Proposal.Result result is the final result based on the votes and election rule. Initial value is unfinalized. The result is persisted so that clients can always rely on this state and not have to replicate the logic.
vote_state Tally vote_state contains the sums of all weighted votes for this proposal.
timeout google.protobuf.Timestamp timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and execution messages must be before this end time to be included in the election. After the timeout timestamp the proposal can not be executed anymore and should be considered pending delete.
executor_result Proposal.ExecutorResult executor_result is the final result based on the votes and election rule. Initial value is NotRun.
msgs google.protobuf.Any repeated msgs is a list of Msgs that will be executed if the proposal passes.

# Tally

Tally represents the sum of weighted votes.

Field Type Label Description
yes_count string yes_count is the weighted sum of yes votes.
no_count string no_count is the weighted sum of no votes.
abstain_count string abstain_count is the weighted sum of abstainers
veto_count string veto_count is the weighted sum of vetoes.

# ThresholdDecisionPolicy

ThresholdDecisionPolicy implements the DecisionPolicy interface

Field Type Label Description
threshold string threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed.
timeout google.protobuf.Duration timeout is the duration from submission of a proposal to the end of voting period Within this times votes and exec messages can be submitted.

# Vote

Vote represents a vote for a proposal.

Field Type Label Description
proposal_id uint64 proposal is the unique ID of the proposal.
voter string voter is the account address of the voter.
choice Choice choice is the voter's choice on the proposal.
metadata bytes metadata is any arbitrary metadata to attached to the vote.
submitted_at google.protobuf.Timestamp submitted_at is the timestamp when the vote was submitted.

# Choice

Choice defines available types of choices for voting.

Name Number Description
CHOICE_UNSPECIFIED 0 CHOICE_UNSPECIFIED defines a no-op voting choice.
CHOICE_NO 1 CHOICE_NO defines a no voting choice.
CHOICE_YES 2 CHOICE_YES defines a yes voting choice.
CHOICE_ABSTAIN 3 CHOICE_ABSTAIN defines an abstaining voting choice.
CHOICE_VETO 4 CHOICE_VETO defines a voting choice with veto.

# Proposal.ExecutorResult

ExecutorResult defines types of proposal executor results.

Name Number Description
EXECUTOR_RESULT_UNSPECIFIED 0 An empty value is not allowed.
EXECUTOR_RESULT_NOT_RUN 1 We have not yet run the executor.
EXECUTOR_RESULT_SUCCESS 2 The executor was successful and proposed action updated state.
EXECUTOR_RESULT_FAILURE 3 The executor returned an error and proposed action didn't update state.

# Proposal.Result

Result defines types of proposal results.

Name Number Description
RESULT_UNSPECIFIED 0 An empty value is invalid and not allowed
RESULT_UNFINALIZED 1 Until a final tally has happened the status is unfinalized
RESULT_ACCEPTED 2 Final result of the tally
RESULT_REJECTED 3 Final result of the tally

# Proposal.Status

Status defines proposal statuses.

Name Number Description
STATUS_UNSPECIFIED 0 An empty value is invalid and not allowed.
STATUS_SUBMITTED 1 Initial status of a proposal when persisted.
STATUS_CLOSED 2 Final status of a proposal when the final tally was executed.
STATUS_ABORTED 3 Final status of a proposal when the group was modified before the final tally.

Top

# regen/group/v1alpha1/genesis.proto

# GenesisState

GenesisState defines the group module's genesis state.

Field Type Label Description
group_seq uint64 group_seq is the group table orm.Sequence, it is used to get the next group ID.
groups GroupInfo repeated groups is the list of groups info.
group_members GroupMember repeated group_members is the list of groups members.
group_account_seq uint64 group_account_seq is the group account table orm.Sequence, it is used to generate the next group account address.
group_accounts GroupAccountInfo repeated group_accounts is the list of group accounts info.
proposal_seq uint64 proposal_seq is the proposal table orm.Sequence, it is used to get the next proposal ID.
proposals Proposal repeated proposals is the list of proposals.
votes Vote repeated votes is the list of votes.

Top

# regen/group/v1alpha1/query.proto

# QueryGroupAccountInfoRequest

QueryGroupAccountInfoRequest is the Query/GroupAccountInfo request type.

Field Type Label Description
address string address is the account address of the group account.

# QueryGroupAccountInfoResponse

QueryGroupAccountInfoResponse is the Query/GroupAccountInfo response type.

Field Type Label Description
info GroupAccountInfo info is the GroupAccountInfo for the group account.

# QueryGroupAccountsByAdminRequest

QueryGroupAccountsByAdminRequest is the Query/GroupAccountsByAdmin request type.

Field Type Label Description
admin string admin is the admin address of the group account.
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

# QueryGroupAccountsByAdminResponse

QueryGroupAccountsByAdminResponse is the Query/GroupAccountsByAdmin response type.

Field Type Label Description
group_accounts GroupAccountInfo repeated group_accounts are the group accounts info with provided admin.
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

# QueryGroupAccountsByGroupRequest

QueryGroupAccountsByGroupRequest is the Query/GroupAccountsByGroup request type.

Field Type Label Description
group_id uint64 group_id is the unique ID of the group account's group.
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

# QueryGroupAccountsByGroupResponse

QueryGroupAccountsByGroupResponse is the Query/GroupAccountsByGroup response type.

Field Type Label Description
group_accounts GroupAccountInfo repeated group_accounts are the group accounts info associated with the provided group.
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

# QueryGroupInfoRequest

QueryGroupInfoRequest is the Query/GroupInfo request type.

Field Type Label Description
group_id uint64 group_id is the unique ID of the group.

# QueryGroupInfoResponse

QueryGroupInfoResponse is the Query/GroupInfo response type.

Field Type Label Description
info GroupInfo info is the GroupInfo for the group.

# QueryGroupMembersRequest

QueryGroupMembersRequest is the Query/GroupMembersRequest request type.

Field Type Label Description
group_id uint64 group_id is the unique ID of the group.
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

# QueryGroupMembersResponse

QueryGroupMembersResponse is the Query/GroupMembersResponse response type.

Field Type Label Description
members GroupMember repeated members are the members of the group with given group_id.
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

# QueryGroupsByAdminRequest

QueryGroupsByAdminRequest is the Query/GroupsByAdminRequest request type.

Field Type Label Description
admin string admin is the account address of a group's admin.
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

# QueryGroupsByAdminResponse

QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type.

Field Type Label Description
groups GroupInfo repeated groups are the groups info with the provided admin.
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

# QueryProposalRequest

QueryProposalRequest is the Query/Proposal request type.

Field Type Label Description
proposal_id uint64 proposal_id is the unique ID of a proposal.

# QueryProposalResponse

QueryProposalResponse is the Query/Proposal response type.

Field Type Label Description
proposal Proposal proposal is the proposal info.

# QueryProposalsByGroupAccountRequest

QueryProposalsByGroupAccountRequest is the Query/ProposalByGroupAccount request type.

Field Type Label Description
address string address is the group account address related to proposals.
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

# QueryProposalsByGroupAccountResponse

QueryProposalsByGroupAccountResponse is the Query/ProposalByGroupAccount response type.

Field Type Label Description
proposals Proposal repeated proposals are the proposals with given group account.
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

# QueryVoteByProposalVoterRequest

QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter request type.

Field Type Label Description
proposal_id uint64 proposal_id is the unique ID of a proposal.
voter string voter is a proposal voter account address.

# QueryVoteByProposalVoterResponse

QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type.

Field Type Label Description
vote Vote vote is the vote with given proposal_id and voter.

# QueryVotesByProposalRequest

QueryVotesByProposalResponse is the Query/VotesByProposal request type.

Field Type Label Description
proposal_id uint64 proposal_id is the unique ID of a proposal.
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

# QueryVotesByProposalResponse

QueryVotesByProposalResponse is the Query/VotesByProposal response type.

Field Type Label Description
votes Vote repeated votes are the list of votes for given proposal_id.
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

# QueryVotesByVoterRequest

QueryVotesByVoterResponse is the Query/VotesByVoter request type.

Field Type Label Description
voter string voter is a proposal voter account address.
pagination cosmos.base.query.v1beta1.PageRequest pagination defines an optional pagination for the request.

# QueryVotesByVoterResponse

QueryVotesByVoterResponse is the Query/VotesByVoter response type.

Field Type Label Description
votes Vote repeated votes are the list of votes by given voter.
pagination cosmos.base.query.v1beta1.PageResponse pagination defines the pagination in the response.

# Query

Query is the regen.group.v1alpha1 Query service.

Method Name Request Type Response Type Description
GroupInfo QueryGroupInfoRequest QueryGroupInfoResponse GroupInfo queries group info based on group id.
GroupAccountInfo QueryGroupAccountInfoRequest QueryGroupAccountInfoResponse GroupAccountInfo queries group account info based on group account address.
GroupMembers QueryGroupMembersRequest QueryGroupMembersResponse GroupMembers queries members of a group
GroupsByAdmin QueryGroupsByAdminRequest QueryGroupsByAdminResponse GroupsByAdmin queries groups by admin address.
GroupAccountsByGroup QueryGroupAccountsByGroupRequest QueryGroupAccountsByGroupResponse GroupAccountsByGroup queries group accounts by group id.
GroupAccountsByAdmin QueryGroupAccountsByAdminRequest QueryGroupAccountsByAdminResponse GroupsByAdmin queries group accounts by admin address.
Proposal QueryProposalRequest QueryProposalResponse Proposal queries a proposal based on proposal id.
ProposalsByGroupAccount QueryProposalsByGroupAccountRequest QueryProposalsByGroupAccountResponse ProposalsByGroupAccount queries proposals based on group account address.
VoteByProposalVoter QueryVoteByProposalVoterRequest QueryVoteByProposalVoterResponse VoteByProposalVoter queries a vote by proposal id and voter.
VotesByProposal QueryVotesByProposalRequest QueryVotesByProposalResponse VotesByProposal queries a vote by proposal.
VotesByVoter QueryVotesByVoterRequest QueryVotesByVoterResponse VotesByVoter queries a vote by voter.

Top

# regen/group/v1alpha1/tx.proto

# MsgCreateGroup

MsgCreateGroup is the Msg/CreateGroup request type.

Field Type Label Description
admin string admin is the account address of the group admin.
members Member repeated members defines the group members.
metadata bytes metadata is any arbitrary metadata to attached to the group.

# MsgCreateGroupAccount

MsgCreateGroupAccount is the Msg/CreateGroupAccount request type.

Field Type Label Description
admin string admin is the account address of the group admin.
group_id uint64 group_id is the unique ID of the group.
metadata bytes metadata is any arbitrary metadata to attached to the group account.
decision_policy google.protobuf.Any decision_policy specifies the group account's decision policy.

# MsgCreateGroupAccountResponse

MsgCreateGroupAccountResponse is the Msg/CreateGroupAccount response type.

Field Type Label Description
address string address is the account address of the newly created group account.

# MsgCreateGroupResponse

MsgCreateGroupResponse is the Msg/CreateGroup response type.

Field Type Label Description
group_id uint64 group_id is the unique ID of the newly created group.

# MsgCreateProposal

MsgCreateProposal is the Msg/CreateProposal request type.

Field Type Label Description
address string address is the group account address.
proposers string repeated proposers are the account addresses of the proposers. Proposers signatures will be counted as yes votes.
metadata bytes metadata is any arbitrary metadata to attached to the proposal.
msgs google.protobuf.Any repeated msgs is a list of Msgs that will be executed if the proposal passes.
exec Exec exec defines the mode of execution of the proposal, whether it should be executed immediately on creation or not. If so, proposers signatures are considered as Yes votes.

# MsgCreateProposalResponse

MsgCreateProposalResponse is the Msg/CreateProposal response type.

Field Type Label Description
proposal_id uint64 proposal is the unique ID of the proposal.

# MsgExec

MsgExec is the Msg/Exec request type.

Field Type Label Description
proposal_id uint64 proposal is the unique ID of the proposal.
signer string signer is the account address used to execute the proposal.

# MsgExecResponse

MsgExecResponse is the Msg/Exec request type.

# MsgUpdateGroupAccountAdmin

MsgUpdateGroupAccountAdmin is the Msg/UpdateGroupAccountAdmin request type.

Field Type Label Description
admin string admin is the account address of the group admin.
address string address is the group account address.
new_admin string new_admin is the new group account admin.

# MsgUpdateGroupAccountAdminResponse

MsgUpdateGroupAccountAdminResponse is the Msg/UpdateGroupAccountAdmin response type.

# MsgUpdateGroupAccountDecisionPolicy

MsgUpdateGroupAccountDecisionPolicy is the Msg/UpdateGroupAccountDecisionPolicy request type.

Field Type Label Description
admin string admin is the account address of the group admin.
address string address is the group account address.
decision_policy google.protobuf.Any decision_policy is the updated group account decision policy.

# MsgUpdateGroupAccountDecisionPolicyResponse

MsgUpdateGroupAccountDecisionPolicyResponse is the Msg/UpdateGroupAccountDecisionPolicy response type.

# MsgUpdateGroupAccountMetadata

MsgUpdateGroupAccountMetadata is the Msg/UpdateGroupAccountMetadata request type.

Field Type Label Description
admin string admin is the account address of the group admin.
address string address is the group account address.
metadata bytes metadata is the updated group account metadata.

# MsgUpdateGroupAccountMetadataResponse

MsgUpdateGroupAccountMetadataResponse is the Msg/UpdateGroupAccountMetadata response type.

# MsgUpdateGroupAdmin

MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type.

Field Type Label Description
admin string admin is the current account address of the group admin.
group_id uint64 group_id is the unique ID of the group.
new_admin string new_admin is the group new admin account address.

# MsgUpdateGroupAdminResponse

MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type.

# MsgUpdateGroupMembers

MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type.

Field Type Label Description
admin string admin is the account address of the group admin.
group_id uint64 group_id is the unique ID of the group.
member_updates Member repeated member_updates is the list of members to update, set weight to 0 to remove a member.

# MsgUpdateGroupMembersResponse

MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type.

# MsgUpdateGroupMetadata

MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type.

Field Type Label Description
admin string admin is the account address of the group admin.
group_id uint64 group_id is the unique ID of the group.
metadata bytes metadata is the updated group's metadata.

# MsgUpdateGroupMetadataResponse

MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type.

# MsgVote

MsgVote is the Msg/Vote request type.

Field Type Label Description
proposal_id uint64 proposal is the unique ID of the proposal.
voter string voter is the voter account address.
choice Choice choice is the voter's choice on the proposal.
metadata bytes metadata is any arbitrary metadata to attached to the vote.
exec Exec exec defines whether the proposal should be executed immediately after voting or not.

# MsgVoteResponse

MsgVoteResponse is the Msg/Vote response type.

# Exec

Exec defines modes of execution of a proposal on creation or on new vote.

Name Number Description
EXEC_UNSPECIFIED 0 An empty value means that there should be a separate MsgExec request for the proposal to execute.
EXEC_TRY 1 Try to execute the proposal immediately. If the proposal is not allowed per the DecisionPolicy, the proposal will still be open and could be executed at a later point.

# Msg

Msg is the regen.group.v1alpha1 Msg service.

Method Name Request Type Response Type Description
CreateGroup MsgCreateGroup MsgCreateGroupResponse CreateGroup creates a new group with an admin account address, a list of members and some optional metadata.
UpdateGroupMembers MsgUpdateGroupMembers MsgUpdateGroupMembersResponse UpdateGroupMembers updates the group members with given group id and admin address.
UpdateGroupAdmin MsgUpdateGroupAdmin MsgUpdateGroupAdminResponse UpdateGroupAdmin updates the group admin with given group id and previous admin address.
UpdateGroupMetadata MsgUpdateGroupMetadata MsgUpdateGroupMetadataResponse UpdateGroupMetadata updates the group metadata with given group id and admin address.
CreateGroupAccount MsgCreateGroupAccount MsgCreateGroupAccountResponse CreateGroupAccount creates a new group account using given DecisionPolicy.
UpdateGroupAccountAdmin MsgUpdateGroupAccountAdmin MsgUpdateGroupAccountAdminResponse UpdateGroupAccountAdmin updates a group account admin.
UpdateGroupAccountDecisionPolicy MsgUpdateGroupAccountDecisionPolicy MsgUpdateGroupAccountDecisionPolicyResponse UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated.
UpdateGroupAccountMetadata MsgUpdateGroupAccountMetadata MsgUpdateGroupAccountMetadataResponse UpdateGroupAccountMetadata updates a group account metadata.
CreateProposal MsgCreateProposal MsgCreateProposalResponse CreateProposal submits a new proposal.
Vote MsgVote MsgVoteResponse Vote allows a voter to vote on a proposal.
Exec MsgExec MsgExecResponse Exec executes a proposal.

# Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)