// @generated by protoc-gen-es v1.3.1 with parameter "target=ts" // @generated from file cosmos/gov/v1beta1/gov.proto (package cosmos.gov.v1beta1, syntax proto3) /* eslint-disable */ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Any, Duration, Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; import { Coin } from "../../base/v1beta1/coin_pb.js"; /** * VoteOption enumerates the valid vote options for a given governance proposal. * * @generated from enum cosmos.gov.v1beta1.VoteOption */ export enum VoteOption { /** * VOTE_OPTION_UNSPECIFIED defines a no-op vote option. * * @generated from enum value: VOTE_OPTION_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * VOTE_OPTION_YES defines a yes vote option. * * @generated from enum value: VOTE_OPTION_YES = 1; */ YES = 1, /** * VOTE_OPTION_ABSTAIN defines an abstain vote option. * * @generated from enum value: VOTE_OPTION_ABSTAIN = 2; */ ABSTAIN = 2, /** * VOTE_OPTION_NO defines a no vote option. * * @generated from enum value: VOTE_OPTION_NO = 3; */ NO = 3, /** * VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. * * @generated from enum value: VOTE_OPTION_NO_WITH_VETO = 4; */ NO_WITH_VETO = 4, } // Retrieve enum metadata with: proto3.getEnumType(VoteOption) proto3.util.setEnumType(VoteOption, "cosmos.gov.v1beta1.VoteOption", [ { no: 0, name: "VOTE_OPTION_UNSPECIFIED" }, { no: 1, name: "VOTE_OPTION_YES" }, { no: 2, name: "VOTE_OPTION_ABSTAIN" }, { no: 3, name: "VOTE_OPTION_NO" }, { no: 4, name: "VOTE_OPTION_NO_WITH_VETO" }, ]); /** * ProposalStatus enumerates the valid statuses of a proposal. * * @generated from enum cosmos.gov.v1beta1.ProposalStatus */ export enum ProposalStatus { /** * PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. * * @generated from enum value: PROPOSAL_STATUS_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit * period. * * @generated from enum value: PROPOSAL_STATUS_DEPOSIT_PERIOD = 1; */ DEPOSIT_PERIOD = 1, /** * PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting * period. * * @generated from enum value: PROPOSAL_STATUS_VOTING_PERIOD = 2; */ VOTING_PERIOD = 2, /** * PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has * passed. * * @generated from enum value: PROPOSAL_STATUS_PASSED = 3; */ PASSED = 3, /** * PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has * been rejected. * * @generated from enum value: PROPOSAL_STATUS_REJECTED = 4; */ REJECTED = 4, /** * PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has * failed. * * @generated from enum value: PROPOSAL_STATUS_FAILED = 5; */ FAILED = 5, } // Retrieve enum metadata with: proto3.getEnumType(ProposalStatus) proto3.util.setEnumType(ProposalStatus, "cosmos.gov.v1beta1.ProposalStatus", [ { no: 0, name: "PROPOSAL_STATUS_UNSPECIFIED" }, { no: 1, name: "PROPOSAL_STATUS_DEPOSIT_PERIOD" }, { no: 2, name: "PROPOSAL_STATUS_VOTING_PERIOD" }, { no: 3, name: "PROPOSAL_STATUS_PASSED" }, { no: 4, name: "PROPOSAL_STATUS_REJECTED" }, { no: 5, name: "PROPOSAL_STATUS_FAILED" }, ]); /** * WeightedVoteOption defines a unit of vote for vote split. * * Since: cosmos-sdk 0.43 * * @generated from message cosmos.gov.v1beta1.WeightedVoteOption */ export class WeightedVoteOption extends Message { /** * option defines the valid vote options, it must not contain duplicate vote options. * * @generated from field: cosmos.gov.v1beta1.VoteOption option = 1; */ option = VoteOption.UNSPECIFIED; /** * weight is the vote weight associated with the vote option. * * @generated from field: string weight = 2; */ weight = ""; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.gov.v1beta1.WeightedVoteOption"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "option", kind: "enum", T: proto3.getEnumType(VoteOption) }, { no: 2, name: "weight", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): WeightedVoteOption { return new WeightedVoteOption().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): WeightedVoteOption { return new WeightedVoteOption().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): WeightedVoteOption { return new WeightedVoteOption().fromJsonString(jsonString, options); } static equals(a: WeightedVoteOption | PlainMessage | undefined, b: WeightedVoteOption | PlainMessage | undefined): boolean { return proto3.util.equals(WeightedVoteOption, a, b); } } /** * TextProposal defines a standard text proposal whose changes need to be * manually updated in case of approval. * * @generated from message cosmos.gov.v1beta1.TextProposal */ export class TextProposal extends Message { /** * title of the proposal. * * @generated from field: string title = 1; */ title = ""; /** * description associated with the proposal. * * @generated from field: string description = 2; */ description = ""; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.gov.v1beta1.TextProposal"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TextProposal { return new TextProposal().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): TextProposal { return new TextProposal().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): TextProposal { return new TextProposal().fromJsonString(jsonString, options); } static equals(a: TextProposal | PlainMessage | undefined, b: TextProposal | PlainMessage | undefined): boolean { return proto3.util.equals(TextProposal, a, b); } } /** * Deposit defines an amount deposited by an account address to an active * proposal. * * @generated from message cosmos.gov.v1beta1.Deposit */ export class Deposit extends Message { /** * proposal_id defines the unique id of the proposal. * * @generated from field: uint64 proposal_id = 1; */ proposalId = protoInt64.zero; /** * depositor defines the deposit addresses from the proposals. * * @generated from field: string depositor = 2; */ depositor = ""; /** * amount to be deposited by depositor. * * @generated from field: repeated cosmos.base.v1beta1.Coin amount = 3; */ amount: Coin[] = []; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.gov.v1beta1.Deposit"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "proposal_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 2, name: "depositor", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "amount", kind: "message", T: Coin, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Deposit { return new Deposit().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): Deposit { return new Deposit().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): Deposit { return new Deposit().fromJsonString(jsonString, options); } static equals(a: Deposit | PlainMessage | undefined, b: Deposit | PlainMessage | undefined): boolean { return proto3.util.equals(Deposit, a, b); } } /** * Proposal defines the core field members of a governance proposal. * * @generated from message cosmos.gov.v1beta1.Proposal */ export class Proposal extends Message { /** * proposal_id defines the unique id of the proposal. * * @generated from field: uint64 proposal_id = 1; */ proposalId = protoInt64.zero; /** * content is the proposal's content. * * @generated from field: google.protobuf.Any content = 2; */ content?: Any; /** * status defines the proposal status. * * @generated from field: cosmos.gov.v1beta1.ProposalStatus status = 3; */ status = ProposalStatus.UNSPECIFIED; /** * final_tally_result is the final tally result of the proposal. When * querying a proposal via gRPC, this field is not populated until the * proposal's voting period has ended. * * @generated from field: cosmos.gov.v1beta1.TallyResult final_tally_result = 4; */ finalTallyResult?: TallyResult; /** * submit_time is the time of proposal submission. * * @generated from field: google.protobuf.Timestamp submit_time = 5; */ submitTime?: Timestamp; /** * deposit_end_time is the end time for deposition. * * @generated from field: google.protobuf.Timestamp deposit_end_time = 6; */ depositEndTime?: Timestamp; /** * total_deposit is the total deposit on the proposal. * * @generated from field: repeated cosmos.base.v1beta1.Coin total_deposit = 7; */ totalDeposit: Coin[] = []; /** * voting_start_time is the starting time to vote on a proposal. * * @generated from field: google.protobuf.Timestamp voting_start_time = 8; */ votingStartTime?: Timestamp; /** * voting_end_time is the end time of voting on a proposal. * * @generated from field: google.protobuf.Timestamp voting_end_time = 9; */ votingEndTime?: Timestamp; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.gov.v1beta1.Proposal"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "proposal_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 2, name: "content", kind: "message", T: Any }, { no: 3, name: "status", kind: "enum", T: proto3.getEnumType(ProposalStatus) }, { no: 4, name: "final_tally_result", kind: "message", T: TallyResult }, { no: 5, name: "submit_time", kind: "message", T: Timestamp }, { no: 6, name: "deposit_end_time", kind: "message", T: Timestamp }, { no: 7, name: "total_deposit", kind: "message", T: Coin, repeated: true }, { no: 8, name: "voting_start_time", kind: "message", T: Timestamp }, { no: 9, name: "voting_end_time", kind: "message", T: Timestamp }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Proposal { return new Proposal().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): Proposal { return new Proposal().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): Proposal { return new Proposal().fromJsonString(jsonString, options); } static equals(a: Proposal | PlainMessage | undefined, b: Proposal | PlainMessage | undefined): boolean { return proto3.util.equals(Proposal, a, b); } } /** * TallyResult defines a standard tally for a governance proposal. * * @generated from message cosmos.gov.v1beta1.TallyResult */ export class TallyResult extends Message { /** * yes is the number of yes votes on a proposal. * * @generated from field: string yes = 1; */ yes = ""; /** * abstain is the number of abstain votes on a proposal. * * @generated from field: string abstain = 2; */ abstain = ""; /** * no is the number of no votes on a proposal. * * @generated from field: string no = 3; */ no = ""; /** * no_with_veto is the number of no with veto votes on a proposal. * * @generated from field: string no_with_veto = 4; */ noWithVeto = ""; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.gov.v1beta1.TallyResult"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "yes", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "abstain", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "no", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 4, name: "no_with_veto", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TallyResult { return new TallyResult().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): TallyResult { return new TallyResult().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): TallyResult { return new TallyResult().fromJsonString(jsonString, options); } static equals(a: TallyResult | PlainMessage | undefined, b: TallyResult | PlainMessage | undefined): boolean { return proto3.util.equals(TallyResult, a, b); } } /** * Vote defines a vote on a governance proposal. * A Vote consists of a proposal ID, the voter, and the vote option. * * @generated from message cosmos.gov.v1beta1.Vote */ export class Vote extends Message { /** * proposal_id defines the unique id of the proposal. * * @generated from field: uint64 proposal_id = 1; */ proposalId = protoInt64.zero; /** * voter is the voter address of the proposal. * * @generated from field: string voter = 2; */ voter = ""; /** * Deprecated: Prefer to use `options` instead. This field is set in queries * if and only if `len(options) == 1` and that option has weight 1. In all * other cases, this field will default to VOTE_OPTION_UNSPECIFIED. * * @generated from field: cosmos.gov.v1beta1.VoteOption option = 3 [deprecated = true]; * @deprecated */ option = VoteOption.UNSPECIFIED; /** * options is the weighted vote options. * * Since: cosmos-sdk 0.43 * * @generated from field: repeated cosmos.gov.v1beta1.WeightedVoteOption options = 4; */ options: WeightedVoteOption[] = []; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.gov.v1beta1.Vote"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "proposal_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 2, name: "voter", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "option", kind: "enum", T: proto3.getEnumType(VoteOption) }, { no: 4, name: "options", kind: "message", T: WeightedVoteOption, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Vote { return new Vote().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): Vote { return new Vote().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): Vote { return new Vote().fromJsonString(jsonString, options); } static equals(a: Vote | PlainMessage | undefined, b: Vote | PlainMessage | undefined): boolean { return proto3.util.equals(Vote, a, b); } } /** * DepositParams defines the params for deposits on governance proposals. * * @generated from message cosmos.gov.v1beta1.DepositParams */ export class DepositParams extends Message { /** * Minimum deposit for a proposal to enter voting period. * * @generated from field: repeated cosmos.base.v1beta1.Coin min_deposit = 1; */ minDeposit: Coin[] = []; /** * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 * months. * * @generated from field: google.protobuf.Duration max_deposit_period = 2; */ maxDepositPeriod?: Duration; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.gov.v1beta1.DepositParams"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "min_deposit", kind: "message", T: Coin, repeated: true }, { no: 2, name: "max_deposit_period", kind: "message", T: Duration }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): DepositParams { return new DepositParams().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): DepositParams { return new DepositParams().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): DepositParams { return new DepositParams().fromJsonString(jsonString, options); } static equals(a: DepositParams | PlainMessage | undefined, b: DepositParams | PlainMessage | undefined): boolean { return proto3.util.equals(DepositParams, a, b); } } /** * VotingParams defines the params for voting on governance proposals. * * @generated from message cosmos.gov.v1beta1.VotingParams */ export class VotingParams extends Message { /** * Duration of the voting period. * * @generated from field: google.protobuf.Duration voting_period = 1; */ votingPeriod?: Duration; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.gov.v1beta1.VotingParams"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "voting_period", kind: "message", T: Duration }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): VotingParams { return new VotingParams().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): VotingParams { return new VotingParams().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): VotingParams { return new VotingParams().fromJsonString(jsonString, options); } static equals(a: VotingParams | PlainMessage | undefined, b: VotingParams | PlainMessage | undefined): boolean { return proto3.util.equals(VotingParams, a, b); } } /** * TallyParams defines the params for tallying votes on governance proposals. * * @generated from message cosmos.gov.v1beta1.TallyParams */ export class TallyParams extends Message { /** * Minimum percentage of total stake needed to vote for a result to be * considered valid. * * @generated from field: bytes quorum = 1; */ quorum = new Uint8Array(0); /** * Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. * * @generated from field: bytes threshold = 2; */ threshold = new Uint8Array(0); /** * Minimum value of Veto votes to Total votes ratio for proposal to be * vetoed. Default value: 1/3. * * @generated from field: bytes veto_threshold = 3; */ vetoThreshold = new Uint8Array(0); constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.gov.v1beta1.TallyParams"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "quorum", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 2, name: "threshold", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, { no: 3, name: "veto_threshold", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TallyParams { return new TallyParams().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): TallyParams { return new TallyParams().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): TallyParams { return new TallyParams().fromJsonString(jsonString, options); } static equals(a: TallyParams | PlainMessage | undefined, b: TallyParams | PlainMessage | undefined): boolean { return proto3.util.equals(TallyParams, a, b); } }