interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
1,120 lines (1,119 loc) • 40.9 kB
TypeScript
import { Duration, DurationAmino } from "../../../google/protobuf/duration";
import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { DeepPartial } from "../../../helpers";
/** VoteOption enumerates the valid vote options for a given proposal. */
export declare enum VoteOption {
/**
* VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will
* return an error.
*/
VOTE_OPTION_UNSPECIFIED = 0,
/** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */
VOTE_OPTION_YES = 1,
/** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */
VOTE_OPTION_ABSTAIN = 2,
/** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */
VOTE_OPTION_NO = 3,
/** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */
VOTE_OPTION_NO_WITH_VETO = 4,
UNRECOGNIZED = -1
}
export declare const VoteOptionAmino: typeof VoteOption;
export declare function voteOptionFromJSON(object: any): VoteOption;
export declare function voteOptionToJSON(object: VoteOption): string;
/** ProposalStatus defines proposal statuses. */
export declare enum ProposalStatus {
/** PROPOSAL_STATUS_UNSPECIFIED - An empty value is invalid and not allowed. */
PROPOSAL_STATUS_UNSPECIFIED = 0,
/** PROPOSAL_STATUS_SUBMITTED - Initial status of a proposal when submitted. */
PROPOSAL_STATUS_SUBMITTED = 1,
/**
* PROPOSAL_STATUS_ACCEPTED - Final status of a proposal when the final tally is done and the outcome
* passes the group policy's decision policy.
*/
PROPOSAL_STATUS_ACCEPTED = 2,
/**
* PROPOSAL_STATUS_REJECTED - Final status of a proposal when the final tally is done and the outcome
* is rejected by the group policy's decision policy.
*/
PROPOSAL_STATUS_REJECTED = 3,
/**
* PROPOSAL_STATUS_ABORTED - Final status of a proposal when the group policy is modified before the
* final tally.
*/
PROPOSAL_STATUS_ABORTED = 4,
/**
* PROPOSAL_STATUS_WITHDRAWN - A proposal can be withdrawn before the voting start time by the owner.
* When this happens the final status is Withdrawn.
*/
PROPOSAL_STATUS_WITHDRAWN = 5,
UNRECOGNIZED = -1
}
export declare const ProposalStatusAmino: typeof ProposalStatus;
export declare function proposalStatusFromJSON(object: any): ProposalStatus;
export declare function proposalStatusToJSON(object: ProposalStatus): string;
/** ProposalExecutorResult defines types of proposal executor results. */
export declare enum ProposalExecutorResult {
/** PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - An empty value is not allowed. */
PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = 0,
/** PROPOSAL_EXECUTOR_RESULT_NOT_RUN - We have not yet run the executor. */
PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1,
/** PROPOSAL_EXECUTOR_RESULT_SUCCESS - The executor was successful and proposed action updated state. */
PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2,
/** PROPOSAL_EXECUTOR_RESULT_FAILURE - The executor returned an error and proposed action didn't update state. */
PROPOSAL_EXECUTOR_RESULT_FAILURE = 3,
UNRECOGNIZED = -1
}
export declare const ProposalExecutorResultAmino: typeof ProposalExecutorResult;
export declare function proposalExecutorResultFromJSON(object: any): ProposalExecutorResult;
export declare function proposalExecutorResultToJSON(object: ProposalExecutorResult): string;
/**
* Member represents a group member with an account address,
* non-zero weight, metadata and added_at timestamp.
* @name Member
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.Member
*/
export interface Member {
/**
* address is the member's account address.
*/
address: string;
/**
* weight is the member's voting weight that should be greater than 0.
*/
weight: string;
/**
* metadata is any arbitrary metadata attached to the member.
*/
metadata: string;
/**
* added_at is a timestamp specifying when a member was added.
*/
addedAt: Date;
}
export interface MemberProtoMsg {
typeUrl: "/cosmos.group.v1.Member";
value: Uint8Array;
}
/**
* Member represents a group member with an account address,
* non-zero weight, metadata and added_at timestamp.
* @name MemberAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.Member
*/
export interface MemberAmino {
/**
* address is the member's account address.
*/
address: string;
/**
* weight is the member's voting weight that should be greater than 0.
*/
weight: string;
/**
* metadata is any arbitrary metadata attached to the member.
*/
metadata: string;
/**
* added_at is a timestamp specifying when a member was added.
*/
added_at: string;
}
export interface MemberAminoMsg {
type: "cosmos-sdk/Member";
value: MemberAmino;
}
/**
* MemberRequest represents a group member to be used in Msg server requests.
* Contrary to `Member`, it doesn't have any `added_at` field
* since this field cannot be set as part of requests.
* @name MemberRequest
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.MemberRequest
*/
export interface MemberRequest {
/**
* address is the member's account address.
*/
address: string;
/**
* weight is the member's voting weight that should be greater than 0.
*/
weight: string;
/**
* metadata is any arbitrary metadata attached to the member.
*/
metadata: string;
}
export interface MemberRequestProtoMsg {
typeUrl: "/cosmos.group.v1.MemberRequest";
value: Uint8Array;
}
/**
* MemberRequest represents a group member to be used in Msg server requests.
* Contrary to `Member`, it doesn't have any `added_at` field
* since this field cannot be set as part of requests.
* @name MemberRequestAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.MemberRequest
*/
export interface MemberRequestAmino {
/**
* address is the member's account address.
*/
address: string;
/**
* weight is the member's voting weight that should be greater than 0.
*/
weight: string;
/**
* metadata is any arbitrary metadata attached to the member.
*/
metadata: string;
}
export interface MemberRequestAminoMsg {
type: "cosmos-sdk/MemberRequest";
value: MemberRequestAmino;
}
/**
* ThresholdDecisionPolicy is a decision policy where a proposal passes when it
* satisfies the two following conditions:
* 1. The sum of all `YES` voter's weights is greater or equal than the defined
* `threshold`.
* 2. The voting and execution periods of the proposal respect the parameters
* given by `windows`.
* @name ThresholdDecisionPolicy
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.ThresholdDecisionPolicy
*/
export interface ThresholdDecisionPolicy {
$typeUrl?: "/cosmos.group.v1.ThresholdDecisionPolicy";
/**
* threshold is the minimum weighted sum of `YES` votes that must be met or
* exceeded for a proposal to succeed.
*/
threshold: string;
/**
* windows defines the different windows for voting and execution.
*/
windows?: DecisionPolicyWindows;
}
export interface ThresholdDecisionPolicyProtoMsg {
typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy";
value: Uint8Array;
}
/**
* ThresholdDecisionPolicy is a decision policy where a proposal passes when it
* satisfies the two following conditions:
* 1. The sum of all `YES` voter's weights is greater or equal than the defined
* `threshold`.
* 2. The voting and execution periods of the proposal respect the parameters
* given by `windows`.
* @name ThresholdDecisionPolicyAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.ThresholdDecisionPolicy
*/
export interface ThresholdDecisionPolicyAmino {
/**
* threshold is the minimum weighted sum of `YES` votes that must be met or
* exceeded for a proposal to succeed.
*/
threshold: string;
/**
* windows defines the different windows for voting and execution.
*/
windows?: DecisionPolicyWindowsAmino;
}
export interface ThresholdDecisionPolicyAminoMsg {
type: "cosmos-sdk/ThresholdDecisionPolicy";
value: ThresholdDecisionPolicyAmino;
}
/**
* PercentageDecisionPolicy is a decision policy where a proposal passes when
* it satisfies the two following conditions:
* 1. The percentage of all `YES` voters' weights out of the total group weight
* is greater or equal than the given `percentage`.
* 2. The voting and execution periods of the proposal respect the parameters
* given by `windows`.
* @name PercentageDecisionPolicy
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.PercentageDecisionPolicy
*/
export interface PercentageDecisionPolicy {
$typeUrl?: "/cosmos.group.v1.PercentageDecisionPolicy";
/**
* percentage is the minimum percentage of the weighted sum of `YES` votes must
* meet for a proposal to succeed.
*/
percentage: string;
/**
* windows defines the different windows for voting and execution.
*/
windows?: DecisionPolicyWindows;
}
export interface PercentageDecisionPolicyProtoMsg {
typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy";
value: Uint8Array;
}
/**
* PercentageDecisionPolicy is a decision policy where a proposal passes when
* it satisfies the two following conditions:
* 1. The percentage of all `YES` voters' weights out of the total group weight
* is greater or equal than the given `percentage`.
* 2. The voting and execution periods of the proposal respect the parameters
* given by `windows`.
* @name PercentageDecisionPolicyAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.PercentageDecisionPolicy
*/
export interface PercentageDecisionPolicyAmino {
/**
* percentage is the minimum percentage of the weighted sum of `YES` votes must
* meet for a proposal to succeed.
*/
percentage: string;
/**
* windows defines the different windows for voting and execution.
*/
windows?: DecisionPolicyWindowsAmino;
}
export interface PercentageDecisionPolicyAminoMsg {
type: "cosmos-sdk/PercentageDecisionPolicy";
value: PercentageDecisionPolicyAmino;
}
/**
* DecisionPolicyWindows defines the different windows for voting and execution.
* @name DecisionPolicyWindows
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.DecisionPolicyWindows
*/
export interface DecisionPolicyWindows {
/**
* voting_period is the duration from submission of a proposal to the end of voting period
* Within this times votes can be submitted with MsgVote.
*/
votingPeriod: Duration;
/**
* min_execution_period is the minimum duration after the proposal submission
* where members can start sending MsgExec. This means that the window for
* sending a MsgExec transaction is:
* `[ submission + min_execution_period ; submission + voting_period + max_execution_period]`
* where max_execution_period is a app-specific config, defined in the keeper.
* If not set, min_execution_period will default to 0.
*
* Please make sure to set a `min_execution_period` that is smaller than
* `voting_period + max_execution_period`, or else the above execution window
* is empty, meaning that all proposals created with this decision policy
* won't be able to be executed.
*/
minExecutionPeriod: Duration;
}
export interface DecisionPolicyWindowsProtoMsg {
typeUrl: "/cosmos.group.v1.DecisionPolicyWindows";
value: Uint8Array;
}
/**
* DecisionPolicyWindows defines the different windows for voting and execution.
* @name DecisionPolicyWindowsAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.DecisionPolicyWindows
*/
export interface DecisionPolicyWindowsAmino {
/**
* voting_period is the duration from submission of a proposal to the end of voting period
* Within this times votes can be submitted with MsgVote.
*/
voting_period: DurationAmino;
/**
* min_execution_period is the minimum duration after the proposal submission
* where members can start sending MsgExec. This means that the window for
* sending a MsgExec transaction is:
* `[ submission + min_execution_period ; submission + voting_period + max_execution_period]`
* where max_execution_period is a app-specific config, defined in the keeper.
* If not set, min_execution_period will default to 0.
*
* Please make sure to set a `min_execution_period` that is smaller than
* `voting_period + max_execution_period`, or else the above execution window
* is empty, meaning that all proposals created with this decision policy
* won't be able to be executed.
*/
min_execution_period: DurationAmino;
}
export interface DecisionPolicyWindowsAminoMsg {
type: "cosmos-sdk/DecisionPolicyWindows";
value: DecisionPolicyWindowsAmino;
}
/**
* GroupInfo represents the high-level on-chain information for a group.
* @name GroupInfo
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.GroupInfo
*/
export interface GroupInfo {
/**
* id is the unique ID of the group.
*/
id: bigint;
/**
* admin is the account address of the group's admin.
*/
admin: string;
/**
* metadata is any arbitrary metadata to attached to the group.
* the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1
*/
metadata: string;
/**
* 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
*/
version: bigint;
/**
* total_weight is the sum of the group members' weights.
*/
totalWeight: string;
/**
* created_at is a timestamp specifying when a group was created.
*/
createdAt: Date;
}
export interface GroupInfoProtoMsg {
typeUrl: "/cosmos.group.v1.GroupInfo";
value: Uint8Array;
}
/**
* GroupInfo represents the high-level on-chain information for a group.
* @name GroupInfoAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.GroupInfo
*/
export interface GroupInfoAmino {
/**
* id is the unique ID of the group.
*/
id: string;
/**
* admin is the account address of the group's admin.
*/
admin: string;
/**
* metadata is any arbitrary metadata to attached to the group.
* the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1
*/
metadata: string;
/**
* 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
*/
version: string;
/**
* total_weight is the sum of the group members' weights.
*/
total_weight: string;
/**
* created_at is a timestamp specifying when a group was created.
*/
created_at: string;
}
export interface GroupInfoAminoMsg {
type: "cosmos-sdk/GroupInfo";
value: GroupInfoAmino;
}
/**
* GroupMember represents the relationship between a group and a member.
* @name GroupMember
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.GroupMember
*/
export interface GroupMember {
/**
* group_id is the unique ID of the group.
*/
groupId: bigint;
/**
* member is the member data.
*/
member?: Member;
}
export interface GroupMemberProtoMsg {
typeUrl: "/cosmos.group.v1.GroupMember";
value: Uint8Array;
}
/**
* GroupMember represents the relationship between a group and a member.
* @name GroupMemberAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.GroupMember
*/
export interface GroupMemberAmino {
/**
* group_id is the unique ID of the group.
*/
group_id: string;
/**
* member is the member data.
*/
member?: MemberAmino;
}
export interface GroupMemberAminoMsg {
type: "cosmos-sdk/GroupMember";
value: GroupMemberAmino;
}
/**
* GroupPolicyInfo represents the high-level on-chain information for a group policy.
* @name GroupPolicyInfo
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.GroupPolicyInfo
*/
export interface GroupPolicyInfo {
/**
* address is the account address of group policy.
*/
address: string;
/**
* group_id is the unique ID of the group.
*/
groupId: bigint;
/**
* admin is the account address of the group admin.
*/
admin: string;
/**
* metadata is any arbitrary metadata attached to the group policy.
* the recommended format of the metadata is to be found here:
* https://docs.cosmos.network/v0.47/modules/group#decision-policy-1
*/
metadata: string;
/**
* version is used to track changes to a group's GroupPolicyInfo structure that
* would create a different result on a running proposal.
*/
version: bigint;
/**
* decision_policy specifies the group policy's decision policy.
*/
decisionPolicy?: ThresholdDecisionPolicy | PercentageDecisionPolicy | Any | undefined;
/**
* created_at is a timestamp specifying when a group policy was created.
*/
createdAt: Date;
}
export interface GroupPolicyInfoProtoMsg {
typeUrl: "/cosmos.group.v1.GroupPolicyInfo";
value: Uint8Array;
}
export type GroupPolicyInfoEncoded = Omit<GroupPolicyInfo, "decisionPolicy"> & {
/**
* decision_policy specifies the group policy's decision policy.
*/
decisionPolicy?: ThresholdDecisionPolicyProtoMsg | PercentageDecisionPolicyProtoMsg | AnyProtoMsg | undefined;
};
/**
* GroupPolicyInfo represents the high-level on-chain information for a group policy.
* @name GroupPolicyInfoAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.GroupPolicyInfo
*/
export interface GroupPolicyInfoAmino {
/**
* address is the account address of group policy.
*/
address: string;
/**
* group_id is the unique ID of the group.
*/
group_id: string;
/**
* admin is the account address of the group admin.
*/
admin: string;
/**
* metadata is any arbitrary metadata attached to the group policy.
* the recommended format of the metadata is to be found here:
* https://docs.cosmos.network/v0.47/modules/group#decision-policy-1
*/
metadata: string;
/**
* version is used to track changes to a group's GroupPolicyInfo structure that
* would create a different result on a running proposal.
*/
version: string;
/**
* decision_policy specifies the group policy's decision policy.
*/
decision_policy?: AnyAmino;
/**
* created_at is a timestamp specifying when a group policy was created.
*/
created_at: string;
}
export interface GroupPolicyInfoAminoMsg {
type: "cosmos-sdk/GroupPolicyInfo";
value: GroupPolicyInfoAmino;
}
/**
* Proposal defines a group proposal. Any member of a group can submit a proposal
* for a group policy to decide upon.
* A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal
* passes as well as some optional metadata associated with the proposal.
* @name Proposal
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.Proposal
*/
export interface Proposal {
/**
* id is the unique id of the proposal.
*/
id: bigint;
/**
* group_policy_address is the account address of group policy.
*/
groupPolicyAddress: string;
/**
* metadata is any arbitrary metadata attached to the proposal.
* the recommended format of the metadata is to be found here:
* https://docs.cosmos.network/v0.47/modules/group#proposal-4
*/
metadata: string;
/**
* proposers are the account addresses of the proposers.
*/
proposers: string[];
/**
* submit_time is a timestamp specifying when a proposal was submitted.
*/
submitTime: Date;
/**
* group_version tracks the version of the group at proposal submission.
* This field is here for informational purposes only.
*/
groupVersion: bigint;
/**
* group_policy_version tracks the version of the group policy at proposal submission.
* When a decision policy is changed, existing proposals from previous policy
* versions will become invalid with the `ABORTED` status.
* This field is here for informational purposes only.
*/
groupPolicyVersion: bigint;
/**
* status represents the high level position in the life cycle of the proposal. Initial value is Submitted.
*/
status: ProposalStatus;
/**
* final_tally_result contains the sums of all weighted votes for this
* proposal for each vote option. It is empty at submission, and only
* populated after tallying, at voting period end or at proposal execution,
* whichever happens first.
*/
finalTallyResult: TallyResult;
/**
* voting_period_end is the timestamp before which voting must be done.
* Unless a successful MsgExec is called before (to execute a proposal whose
* tally is successful before the voting period ends), tallying will be done
* at this point, and the `final_tally_result`and `status` fields will be
* accordingly updated.
*/
votingPeriodEnd: Date;
/**
* executor_result is the final result of the proposal execution. Initial value is NotRun.
*/
executorResult: ProposalExecutorResult;
/**
* messages is a list of `sdk.Msg`s that will be executed if the proposal passes.
*/
messages: Any[];
/**
* title is the title of the proposal
*/
title: string;
/**
* summary is a short summary of the proposal
*/
summary: string;
}
export interface ProposalProtoMsg {
typeUrl: "/cosmos.group.v1.Proposal";
value: Uint8Array;
}
/**
* Proposal defines a group proposal. Any member of a group can submit a proposal
* for a group policy to decide upon.
* A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal
* passes as well as some optional metadata associated with the proposal.
* @name ProposalAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.Proposal
*/
export interface ProposalAmino {
/**
* id is the unique id of the proposal.
*/
id: string;
/**
* group_policy_address is the account address of group policy.
*/
group_policy_address: string;
/**
* metadata is any arbitrary metadata attached to the proposal.
* the recommended format of the metadata is to be found here:
* https://docs.cosmos.network/v0.47/modules/group#proposal-4
*/
metadata: string;
/**
* proposers are the account addresses of the proposers.
*/
proposers: string[];
/**
* submit_time is a timestamp specifying when a proposal was submitted.
*/
submit_time: string;
/**
* group_version tracks the version of the group at proposal submission.
* This field is here for informational purposes only.
*/
group_version: string;
/**
* group_policy_version tracks the version of the group policy at proposal submission.
* When a decision policy is changed, existing proposals from previous policy
* versions will become invalid with the `ABORTED` status.
* This field is here for informational purposes only.
*/
group_policy_version: string;
/**
* status represents the high level position in the life cycle of the proposal. Initial value is Submitted.
*/
status: ProposalStatus;
/**
* final_tally_result contains the sums of all weighted votes for this
* proposal for each vote option. It is empty at submission, and only
* populated after tallying, at voting period end or at proposal execution,
* whichever happens first.
*/
final_tally_result: TallyResultAmino;
/**
* voting_period_end is the timestamp before which voting must be done.
* Unless a successful MsgExec is called before (to execute a proposal whose
* tally is successful before the voting period ends), tallying will be done
* at this point, and the `final_tally_result`and `status` fields will be
* accordingly updated.
*/
voting_period_end: string;
/**
* executor_result is the final result of the proposal execution. Initial value is NotRun.
*/
executor_result: ProposalExecutorResult;
/**
* messages is a list of `sdk.Msg`s that will be executed if the proposal passes.
*/
messages: AnyAmino[];
/**
* title is the title of the proposal
*/
title: string;
/**
* summary is a short summary of the proposal
*/
summary: string;
}
export interface ProposalAminoMsg {
type: "cosmos-sdk/Proposal";
value: ProposalAmino;
}
/**
* TallyResult represents the sum of weighted votes for each vote option.
* @name TallyResult
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.TallyResult
*/
export interface TallyResult {
/**
* yes_count is the weighted sum of yes votes.
*/
yesCount: string;
/**
* abstain_count is the weighted sum of abstainers.
*/
abstainCount: string;
/**
* no_count is the weighted sum of no votes.
*/
noCount: string;
/**
* no_with_veto_count is the weighted sum of veto.
*/
noWithVetoCount: string;
}
export interface TallyResultProtoMsg {
typeUrl: "/cosmos.group.v1.TallyResult";
value: Uint8Array;
}
/**
* TallyResult represents the sum of weighted votes for each vote option.
* @name TallyResultAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.TallyResult
*/
export interface TallyResultAmino {
/**
* yes_count is the weighted sum of yes votes.
*/
yes_count: string;
/**
* abstain_count is the weighted sum of abstainers.
*/
abstain_count: string;
/**
* no_count is the weighted sum of no votes.
*/
no_count: string;
/**
* no_with_veto_count is the weighted sum of veto.
*/
no_with_veto_count: string;
}
export interface TallyResultAminoMsg {
type: "cosmos-sdk/TallyResult";
value: TallyResultAmino;
}
/**
* Vote represents a vote for a proposal.string metadata
* @name Vote
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.Vote
*/
export interface Vote {
/**
* proposal is the unique ID of the proposal.
*/
proposalId: bigint;
/**
* voter is the account address of the voter.
*/
voter: string;
/**
* option is the voter's choice on the proposal.
*/
option: VoteOption;
/**
* metadata is any arbitrary metadata attached to the vote.
* the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2
*/
metadata: string;
/**
* submit_time is the timestamp when the vote was submitted.
*/
submitTime: Date;
}
export interface VoteProtoMsg {
typeUrl: "/cosmos.group.v1.Vote";
value: Uint8Array;
}
/**
* Vote represents a vote for a proposal.string metadata
* @name VoteAmino
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.Vote
*/
export interface VoteAmino {
/**
* proposal is the unique ID of the proposal.
*/
proposal_id: string;
/**
* voter is the account address of the voter.
*/
voter: string;
/**
* option is the voter's choice on the proposal.
*/
option: VoteOption;
/**
* metadata is any arbitrary metadata attached to the vote.
* the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2
*/
metadata: string;
/**
* submit_time is the timestamp when the vote was submitted.
*/
submit_time: string;
}
export interface VoteAminoMsg {
type: "cosmos-sdk/Vote";
value: VoteAmino;
}
/**
* Member represents a group member with an account address,
* non-zero weight, metadata and added_at timestamp.
* @name Member
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.Member
*/
export declare const Member: {
typeUrl: string;
aminoType: string;
is(o: any): o is Member;
isAmino(o: any): o is MemberAmino;
encode(message: Member, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Member;
fromPartial(object: DeepPartial<Member>): Member;
fromAmino(object: MemberAmino): Member;
toAmino(message: Member): MemberAmino;
fromAminoMsg(object: MemberAminoMsg): Member;
toAminoMsg(message: Member): MemberAminoMsg;
fromProtoMsg(message: MemberProtoMsg): Member;
toProto(message: Member): Uint8Array;
toProtoMsg(message: Member): MemberProtoMsg;
registerTypeUrl(): void;
};
/**
* MemberRequest represents a group member to be used in Msg server requests.
* Contrary to `Member`, it doesn't have any `added_at` field
* since this field cannot be set as part of requests.
* @name MemberRequest
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.MemberRequest
*/
export declare const MemberRequest: {
typeUrl: string;
aminoType: string;
is(o: any): o is MemberRequest;
isAmino(o: any): o is MemberRequestAmino;
encode(message: MemberRequest, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MemberRequest;
fromPartial(object: DeepPartial<MemberRequest>): MemberRequest;
fromAmino(object: MemberRequestAmino): MemberRequest;
toAmino(message: MemberRequest): MemberRequestAmino;
fromAminoMsg(object: MemberRequestAminoMsg): MemberRequest;
toAminoMsg(message: MemberRequest): MemberRequestAminoMsg;
fromProtoMsg(message: MemberRequestProtoMsg): MemberRequest;
toProto(message: MemberRequest): Uint8Array;
toProtoMsg(message: MemberRequest): MemberRequestProtoMsg;
registerTypeUrl(): void;
};
/**
* ThresholdDecisionPolicy is a decision policy where a proposal passes when it
* satisfies the two following conditions:
* 1. The sum of all `YES` voter's weights is greater or equal than the defined
* `threshold`.
* 2. The voting and execution periods of the proposal respect the parameters
* given by `windows`.
* @name ThresholdDecisionPolicy
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.ThresholdDecisionPolicy
*/
export declare const ThresholdDecisionPolicy: {
typeUrl: string;
aminoType: string;
is(o: any): o is ThresholdDecisionPolicy;
isAmino(o: any): o is ThresholdDecisionPolicyAmino;
encode(message: ThresholdDecisionPolicy, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): ThresholdDecisionPolicy;
fromPartial(object: DeepPartial<ThresholdDecisionPolicy>): ThresholdDecisionPolicy;
fromAmino(object: ThresholdDecisionPolicyAmino): ThresholdDecisionPolicy;
toAmino(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyAmino;
fromAminoMsg(object: ThresholdDecisionPolicyAminoMsg): ThresholdDecisionPolicy;
toAminoMsg(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyAminoMsg;
fromProtoMsg(message: ThresholdDecisionPolicyProtoMsg): ThresholdDecisionPolicy;
toProto(message: ThresholdDecisionPolicy): Uint8Array;
toProtoMsg(message: ThresholdDecisionPolicy): ThresholdDecisionPolicyProtoMsg;
registerTypeUrl(): void;
};
/**
* PercentageDecisionPolicy is a decision policy where a proposal passes when
* it satisfies the two following conditions:
* 1. The percentage of all `YES` voters' weights out of the total group weight
* is greater or equal than the given `percentage`.
* 2. The voting and execution periods of the proposal respect the parameters
* given by `windows`.
* @name PercentageDecisionPolicy
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.PercentageDecisionPolicy
*/
export declare const PercentageDecisionPolicy: {
typeUrl: string;
aminoType: string;
is(o: any): o is PercentageDecisionPolicy;
isAmino(o: any): o is PercentageDecisionPolicyAmino;
encode(message: PercentageDecisionPolicy, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): PercentageDecisionPolicy;
fromPartial(object: DeepPartial<PercentageDecisionPolicy>): PercentageDecisionPolicy;
fromAmino(object: PercentageDecisionPolicyAmino): PercentageDecisionPolicy;
toAmino(message: PercentageDecisionPolicy): PercentageDecisionPolicyAmino;
fromAminoMsg(object: PercentageDecisionPolicyAminoMsg): PercentageDecisionPolicy;
toAminoMsg(message: PercentageDecisionPolicy): PercentageDecisionPolicyAminoMsg;
fromProtoMsg(message: PercentageDecisionPolicyProtoMsg): PercentageDecisionPolicy;
toProto(message: PercentageDecisionPolicy): Uint8Array;
toProtoMsg(message: PercentageDecisionPolicy): PercentageDecisionPolicyProtoMsg;
registerTypeUrl(): void;
};
/**
* DecisionPolicyWindows defines the different windows for voting and execution.
* @name DecisionPolicyWindows
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.DecisionPolicyWindows
*/
export declare const DecisionPolicyWindows: {
typeUrl: string;
aminoType: string;
is(o: any): o is DecisionPolicyWindows;
isAmino(o: any): o is DecisionPolicyWindowsAmino;
encode(message: DecisionPolicyWindows, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): DecisionPolicyWindows;
fromPartial(object: DeepPartial<DecisionPolicyWindows>): DecisionPolicyWindows;
fromAmino(object: DecisionPolicyWindowsAmino): DecisionPolicyWindows;
toAmino(message: DecisionPolicyWindows): DecisionPolicyWindowsAmino;
fromAminoMsg(object: DecisionPolicyWindowsAminoMsg): DecisionPolicyWindows;
toAminoMsg(message: DecisionPolicyWindows): DecisionPolicyWindowsAminoMsg;
fromProtoMsg(message: DecisionPolicyWindowsProtoMsg): DecisionPolicyWindows;
toProto(message: DecisionPolicyWindows): Uint8Array;
toProtoMsg(message: DecisionPolicyWindows): DecisionPolicyWindowsProtoMsg;
registerTypeUrl(): void;
};
/**
* GroupInfo represents the high-level on-chain information for a group.
* @name GroupInfo
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.GroupInfo
*/
export declare const GroupInfo: {
typeUrl: string;
aminoType: string;
is(o: any): o is GroupInfo;
isAmino(o: any): o is GroupInfoAmino;
encode(message: GroupInfo, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): GroupInfo;
fromPartial(object: DeepPartial<GroupInfo>): GroupInfo;
fromAmino(object: GroupInfoAmino): GroupInfo;
toAmino(message: GroupInfo): GroupInfoAmino;
fromAminoMsg(object: GroupInfoAminoMsg): GroupInfo;
toAminoMsg(message: GroupInfo): GroupInfoAminoMsg;
fromProtoMsg(message: GroupInfoProtoMsg): GroupInfo;
toProto(message: GroupInfo): Uint8Array;
toProtoMsg(message: GroupInfo): GroupInfoProtoMsg;
registerTypeUrl(): void;
};
/**
* GroupMember represents the relationship between a group and a member.
* @name GroupMember
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.GroupMember
*/
export declare const GroupMember: {
typeUrl: string;
aminoType: string;
is(o: any): o is GroupMember;
isAmino(o: any): o is GroupMemberAmino;
encode(message: GroupMember, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): GroupMember;
fromPartial(object: DeepPartial<GroupMember>): GroupMember;
fromAmino(object: GroupMemberAmino): GroupMember;
toAmino(message: GroupMember): GroupMemberAmino;
fromAminoMsg(object: GroupMemberAminoMsg): GroupMember;
toAminoMsg(message: GroupMember): GroupMemberAminoMsg;
fromProtoMsg(message: GroupMemberProtoMsg): GroupMember;
toProto(message: GroupMember): Uint8Array;
toProtoMsg(message: GroupMember): GroupMemberProtoMsg;
registerTypeUrl(): void;
};
/**
* GroupPolicyInfo represents the high-level on-chain information for a group policy.
* @name GroupPolicyInfo
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.GroupPolicyInfo
*/
export declare const GroupPolicyInfo: {
typeUrl: string;
aminoType: string;
is(o: any): o is GroupPolicyInfo;
isAmino(o: any): o is GroupPolicyInfoAmino;
encode(message: GroupPolicyInfo, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): GroupPolicyInfo;
fromPartial(object: DeepPartial<GroupPolicyInfo>): GroupPolicyInfo;
fromAmino(object: GroupPolicyInfoAmino): GroupPolicyInfo;
toAmino(message: GroupPolicyInfo): GroupPolicyInfoAmino;
fromAminoMsg(object: GroupPolicyInfoAminoMsg): GroupPolicyInfo;
toAminoMsg(message: GroupPolicyInfo): GroupPolicyInfoAminoMsg;
fromProtoMsg(message: GroupPolicyInfoProtoMsg): GroupPolicyInfo;
toProto(message: GroupPolicyInfo): Uint8Array;
toProtoMsg(message: GroupPolicyInfo): GroupPolicyInfoProtoMsg;
registerTypeUrl(): void;
};
/**
* Proposal defines a group proposal. Any member of a group can submit a proposal
* for a group policy to decide upon.
* A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal
* passes as well as some optional metadata associated with the proposal.
* @name Proposal
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.Proposal
*/
export declare const Proposal: {
typeUrl: string;
aminoType: string;
is(o: any): o is Proposal;
isAmino(o: any): o is ProposalAmino;
encode(message: Proposal, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Proposal;
fromPartial(object: DeepPartial<Proposal>): Proposal;
fromAmino(object: ProposalAmino): Proposal;
toAmino(message: Proposal): ProposalAmino;
fromAminoMsg(object: ProposalAminoMsg): Proposal;
toAminoMsg(message: Proposal): ProposalAminoMsg;
fromProtoMsg(message: ProposalProtoMsg): Proposal;
toProto(message: Proposal): Uint8Array;
toProtoMsg(message: Proposal): ProposalProtoMsg;
registerTypeUrl(): void;
};
/**
* TallyResult represents the sum of weighted votes for each vote option.
* @name TallyResult
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.TallyResult
*/
export declare const TallyResult: {
typeUrl: string;
aminoType: string;
is(o: any): o is TallyResult;
isAmino(o: any): o is TallyResultAmino;
encode(message: TallyResult, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): TallyResult;
fromPartial(object: DeepPartial<TallyResult>): TallyResult;
fromAmino(object: TallyResultAmino): TallyResult;
toAmino(message: TallyResult): TallyResultAmino;
fromAminoMsg(object: TallyResultAminoMsg): TallyResult;
toAminoMsg(message: TallyResult): TallyResultAminoMsg;
fromProtoMsg(message: TallyResultProtoMsg): TallyResult;
toProto(message: TallyResult): Uint8Array;
toProtoMsg(message: TallyResult): TallyResultProtoMsg;
registerTypeUrl(): void;
};
/**
* Vote represents a vote for a proposal.string metadata
* @name Vote
* @package cosmos.group.v1
* @see proto type: cosmos.group.v1.Vote
*/
export declare const Vote: {
typeUrl: string;
aminoType: string;
is(o: any): o is Vote;
isAmino(o: any): o is VoteAmino;
encode(message: Vote, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Vote;
fromPartial(object: DeepPartial<Vote>): Vote;
fromAmino(object: VoteAmino): Vote;
toAmino(message: Vote): VoteAmino;
fromAminoMsg(object: VoteAminoMsg): Vote;
toAminoMsg(message: Vote): VoteAminoMsg;
fromProtoMsg(message: VoteProtoMsg): Vote;
toProto(message: Vote): Uint8Array;
toProtoMsg(message: Vote): VoteProtoMsg;
registerTypeUrl(): void;
};