interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
511 lines (510 loc) • 19.9 kB
TypeScript
import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any";
import { Coin, CoinAmino } from "../../base/v1beta1/coin";
import { VoteOption, WeightedVoteOption, WeightedVoteOptionAmino, TextProposal, TextProposalProtoMsg } from "./gov";
import { CommunityPoolSpendProposal, CommunityPoolSpendProposalProtoMsg, CommunityPoolSpendProposalWithDeposit, CommunityPoolSpendProposalWithDepositProtoMsg } from "../../distribution/v1beta1/distribution";
import { ParameterChangeProposal, ParameterChangeProposalProtoMsg } from "../../params/v1beta1/params";
import { SoftwareUpgradeProposal, SoftwareUpgradeProposalProtoMsg, CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposalProtoMsg } from "../../upgrade/v1beta1/upgrade";
import { StoreCodeProposal, StoreCodeProposalProtoMsg, InstantiateContractProposal, InstantiateContractProposalProtoMsg, InstantiateContract2Proposal, InstantiateContract2ProposalProtoMsg, MigrateContractProposal, MigrateContractProposalProtoMsg, SudoContractProposal, SudoContractProposalProtoMsg, ExecuteContractProposal, ExecuteContractProposalProtoMsg, UpdateAdminProposal, UpdateAdminProposalProtoMsg, ClearAdminProposal, ClearAdminProposalProtoMsg, PinCodesProposal, PinCodesProposalProtoMsg, UnpinCodesProposal, UnpinCodesProposalProtoMsg, UpdateInstantiateConfigProposal, UpdateInstantiateConfigProposalProtoMsg, StoreAndInstantiateContractProposal, StoreAndInstantiateContractProposalProtoMsg } from "../../../cosmwasm/wasm/v1/proposal_legacy";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { DeepPartial } from "../../../helpers";
/**
* MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary
* proposal Content.
* @name MsgSubmitProposal
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgSubmitProposal
*/
export interface MsgSubmitProposal {
/**
* content is the proposal's content.
*/
content?: CommunityPoolSpendProposal | CommunityPoolSpendProposalWithDeposit | TextProposal | ParameterChangeProposal | SoftwareUpgradeProposal | CancelSoftwareUpgradeProposal | StoreCodeProposal | InstantiateContractProposal | InstantiateContract2Proposal | MigrateContractProposal | SudoContractProposal | ExecuteContractProposal | UpdateAdminProposal | ClearAdminProposal | PinCodesProposal | UnpinCodesProposal | UpdateInstantiateConfigProposal | StoreAndInstantiateContractProposal | Any | undefined;
/**
* initial_deposit is the deposit value that must be paid at proposal submission.
*/
initialDeposit: Coin[];
/**
* proposer is the account address of the proposer.
*/
proposer: string;
}
export interface MsgSubmitProposalProtoMsg {
typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal";
value: Uint8Array;
}
export type MsgSubmitProposalEncoded = Omit<MsgSubmitProposal, "content"> & {
/**
* content is the proposal's content.
*/
content?: CommunityPoolSpendProposalProtoMsg | CommunityPoolSpendProposalWithDepositProtoMsg | TextProposalProtoMsg | ParameterChangeProposalProtoMsg | SoftwareUpgradeProposalProtoMsg | CancelSoftwareUpgradeProposalProtoMsg | StoreCodeProposalProtoMsg | InstantiateContractProposalProtoMsg | InstantiateContract2ProposalProtoMsg | MigrateContractProposalProtoMsg | SudoContractProposalProtoMsg | ExecuteContractProposalProtoMsg | UpdateAdminProposalProtoMsg | ClearAdminProposalProtoMsg | PinCodesProposalProtoMsg | UnpinCodesProposalProtoMsg | UpdateInstantiateConfigProposalProtoMsg | StoreAndInstantiateContractProposalProtoMsg | AnyProtoMsg | undefined;
};
/**
* MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary
* proposal Content.
* @name MsgSubmitProposalAmino
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgSubmitProposal
*/
export interface MsgSubmitProposalAmino {
/**
* content is the proposal's content.
*/
content?: AnyAmino;
/**
* initial_deposit is the deposit value that must be paid at proposal submission.
*/
initial_deposit: CoinAmino[];
/**
* proposer is the account address of the proposer.
*/
proposer: string;
}
export interface MsgSubmitProposalAminoMsg {
type: "cosmos-sdk/MsgSubmitProposal";
value: MsgSubmitProposalAmino;
}
/**
* MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
* @name MsgSubmitProposalResponse
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgSubmitProposalResponse
*/
export interface MsgSubmitProposalResponse {
/**
* proposal_id defines the unique id of the proposal.
*/
proposalId: bigint;
}
export interface MsgSubmitProposalResponseProtoMsg {
typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposalResponse";
value: Uint8Array;
}
/**
* MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
* @name MsgSubmitProposalResponseAmino
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgSubmitProposalResponse
*/
export interface MsgSubmitProposalResponseAmino {
/**
* proposal_id defines the unique id of the proposal.
*/
proposal_id: string;
}
export interface MsgSubmitProposalResponseAminoMsg {
type: "cosmos-sdk/MsgSubmitProposalResponse";
value: MsgSubmitProposalResponseAmino;
}
/**
* MsgVote defines a message to cast a vote.
* @name MsgVote
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVote
*/
export interface MsgVote {
/**
* proposal_id defines the unique id of the proposal.
*/
proposalId: bigint;
/**
* voter is the voter address for the proposal.
*/
voter: string;
/**
* option defines the vote option.
*/
option: VoteOption;
}
export interface MsgVoteProtoMsg {
typeUrl: "/cosmos.gov.v1beta1.MsgVote";
value: Uint8Array;
}
/**
* MsgVote defines a message to cast a vote.
* @name MsgVoteAmino
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVote
*/
export interface MsgVoteAmino {
/**
* proposal_id defines the unique id of the proposal.
*/
proposal_id: string;
/**
* voter is the voter address for the proposal.
*/
voter: string;
/**
* option defines the vote option.
*/
option: VoteOption;
}
export interface MsgVoteAminoMsg {
type: "cosmos-sdk/MsgVote";
value: MsgVoteAmino;
}
/**
* MsgVoteResponse defines the Msg/Vote response type.
* @name MsgVoteResponse
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVoteResponse
*/
export interface MsgVoteResponse {
}
export interface MsgVoteResponseProtoMsg {
typeUrl: "/cosmos.gov.v1beta1.MsgVoteResponse";
value: Uint8Array;
}
/**
* MsgVoteResponse defines the Msg/Vote response type.
* @name MsgVoteResponseAmino
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVoteResponse
*/
export interface MsgVoteResponseAmino {
}
export interface MsgVoteResponseAminoMsg {
type: "cosmos-sdk/MsgVoteResponse";
value: MsgVoteResponseAmino;
}
/**
* MsgVoteWeighted defines a message to cast a vote.
*
* Since: cosmos-sdk 0.43
* @name MsgVoteWeighted
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVoteWeighted
*/
export interface MsgVoteWeighted {
/**
* proposal_id defines the unique id of the proposal.
*/
proposalId: bigint;
/**
* voter is the voter address for the proposal.
*/
voter: string;
/**
* options defines the weighted vote options.
*/
options: WeightedVoteOption[];
}
export interface MsgVoteWeightedProtoMsg {
typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted";
value: Uint8Array;
}
/**
* MsgVoteWeighted defines a message to cast a vote.
*
* Since: cosmos-sdk 0.43
* @name MsgVoteWeightedAmino
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVoteWeighted
*/
export interface MsgVoteWeightedAmino {
/**
* proposal_id defines the unique id of the proposal.
*/
proposal_id: string;
/**
* voter is the voter address for the proposal.
*/
voter: string;
/**
* options defines the weighted vote options.
*/
options: WeightedVoteOptionAmino[];
}
export interface MsgVoteWeightedAminoMsg {
type: "cosmos-sdk/MsgVoteWeighted";
value: MsgVoteWeightedAmino;
}
/**
* MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.
*
* Since: cosmos-sdk 0.43
* @name MsgVoteWeightedResponse
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVoteWeightedResponse
*/
export interface MsgVoteWeightedResponse {
}
export interface MsgVoteWeightedResponseProtoMsg {
typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeightedResponse";
value: Uint8Array;
}
/**
* MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.
*
* Since: cosmos-sdk 0.43
* @name MsgVoteWeightedResponseAmino
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVoteWeightedResponse
*/
export interface MsgVoteWeightedResponseAmino {
}
export interface MsgVoteWeightedResponseAminoMsg {
type: "cosmos-sdk/MsgVoteWeightedResponse";
value: MsgVoteWeightedResponseAmino;
}
/**
* MsgDeposit defines a message to submit a deposit to an existing proposal.
* @name MsgDeposit
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgDeposit
*/
export interface MsgDeposit {
/**
* proposal_id defines the unique id of the proposal.
*/
proposalId: bigint;
/**
* depositor defines the deposit addresses from the proposals.
*/
depositor: string;
/**
* amount to be deposited by depositor.
*/
amount: Coin[];
}
export interface MsgDepositProtoMsg {
typeUrl: "/cosmos.gov.v1beta1.MsgDeposit";
value: Uint8Array;
}
/**
* MsgDeposit defines a message to submit a deposit to an existing proposal.
* @name MsgDepositAmino
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgDeposit
*/
export interface MsgDepositAmino {
/**
* proposal_id defines the unique id of the proposal.
*/
proposal_id: string;
/**
* depositor defines the deposit addresses from the proposals.
*/
depositor: string;
/**
* amount to be deposited by depositor.
*/
amount: CoinAmino[];
}
export interface MsgDepositAminoMsg {
type: "cosmos-sdk/MsgDeposit";
value: MsgDepositAmino;
}
/**
* MsgDepositResponse defines the Msg/Deposit response type.
* @name MsgDepositResponse
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgDepositResponse
*/
export interface MsgDepositResponse {
}
export interface MsgDepositResponseProtoMsg {
typeUrl: "/cosmos.gov.v1beta1.MsgDepositResponse";
value: Uint8Array;
}
/**
* MsgDepositResponse defines the Msg/Deposit response type.
* @name MsgDepositResponseAmino
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgDepositResponse
*/
export interface MsgDepositResponseAmino {
}
export interface MsgDepositResponseAminoMsg {
type: "cosmos-sdk/MsgDepositResponse";
value: MsgDepositResponseAmino;
}
/**
* MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary
* proposal Content.
* @name MsgSubmitProposal
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgSubmitProposal
*/
export declare const MsgSubmitProposal: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgSubmitProposal;
isAmino(o: any): o is MsgSubmitProposalAmino;
encode(message: MsgSubmitProposal, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitProposal;
fromPartial(object: DeepPartial<MsgSubmitProposal>): MsgSubmitProposal;
fromAmino(object: MsgSubmitProposalAmino): MsgSubmitProposal;
toAmino(message: MsgSubmitProposal): MsgSubmitProposalAmino;
fromAminoMsg(object: MsgSubmitProposalAminoMsg): MsgSubmitProposal;
toAminoMsg(message: MsgSubmitProposal): MsgSubmitProposalAminoMsg;
fromProtoMsg(message: MsgSubmitProposalProtoMsg): MsgSubmitProposal;
toProto(message: MsgSubmitProposal): Uint8Array;
toProtoMsg(message: MsgSubmitProposal): MsgSubmitProposalProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
* @name MsgSubmitProposalResponse
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgSubmitProposalResponse
*/
export declare const MsgSubmitProposalResponse: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgSubmitProposalResponse;
isAmino(o: any): o is MsgSubmitProposalResponseAmino;
encode(message: MsgSubmitProposalResponse, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgSubmitProposalResponse;
fromPartial(object: DeepPartial<MsgSubmitProposalResponse>): MsgSubmitProposalResponse;
fromAmino(object: MsgSubmitProposalResponseAmino): MsgSubmitProposalResponse;
toAmino(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAmino;
fromAminoMsg(object: MsgSubmitProposalResponseAminoMsg): MsgSubmitProposalResponse;
toAminoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseAminoMsg;
fromProtoMsg(message: MsgSubmitProposalResponseProtoMsg): MsgSubmitProposalResponse;
toProto(message: MsgSubmitProposalResponse): Uint8Array;
toProtoMsg(message: MsgSubmitProposalResponse): MsgSubmitProposalResponseProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgVote defines a message to cast a vote.
* @name MsgVote
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVote
*/
export declare const MsgVote: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgVote;
isAmino(o: any): o is MsgVoteAmino;
encode(message: MsgVote, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgVote;
fromPartial(object: DeepPartial<MsgVote>): MsgVote;
fromAmino(object: MsgVoteAmino): MsgVote;
toAmino(message: MsgVote): MsgVoteAmino;
fromAminoMsg(object: MsgVoteAminoMsg): MsgVote;
toAminoMsg(message: MsgVote): MsgVoteAminoMsg;
fromProtoMsg(message: MsgVoteProtoMsg): MsgVote;
toProto(message: MsgVote): Uint8Array;
toProtoMsg(message: MsgVote): MsgVoteProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgVoteResponse defines the Msg/Vote response type.
* @name MsgVoteResponse
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVoteResponse
*/
export declare const MsgVoteResponse: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgVoteResponse;
isAmino(o: any): o is MsgVoteResponseAmino;
encode(_: MsgVoteResponse, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteResponse;
fromPartial(_: DeepPartial<MsgVoteResponse>): MsgVoteResponse;
fromAmino(_: MsgVoteResponseAmino): MsgVoteResponse;
toAmino(_: MsgVoteResponse): MsgVoteResponseAmino;
fromAminoMsg(object: MsgVoteResponseAminoMsg): MsgVoteResponse;
toAminoMsg(message: MsgVoteResponse): MsgVoteResponseAminoMsg;
fromProtoMsg(message: MsgVoteResponseProtoMsg): MsgVoteResponse;
toProto(message: MsgVoteResponse): Uint8Array;
toProtoMsg(message: MsgVoteResponse): MsgVoteResponseProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgVoteWeighted defines a message to cast a vote.
*
* Since: cosmos-sdk 0.43
* @name MsgVoteWeighted
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVoteWeighted
*/
export declare const MsgVoteWeighted: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgVoteWeighted;
isAmino(o: any): o is MsgVoteWeightedAmino;
encode(message: MsgVoteWeighted, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteWeighted;
fromPartial(object: DeepPartial<MsgVoteWeighted>): MsgVoteWeighted;
fromAmino(object: MsgVoteWeightedAmino): MsgVoteWeighted;
toAmino(message: MsgVoteWeighted): MsgVoteWeightedAmino;
fromAminoMsg(object: MsgVoteWeightedAminoMsg): MsgVoteWeighted;
toAminoMsg(message: MsgVoteWeighted): MsgVoteWeightedAminoMsg;
fromProtoMsg(message: MsgVoteWeightedProtoMsg): MsgVoteWeighted;
toProto(message: MsgVoteWeighted): Uint8Array;
toProtoMsg(message: MsgVoteWeighted): MsgVoteWeightedProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.
*
* Since: cosmos-sdk 0.43
* @name MsgVoteWeightedResponse
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgVoteWeightedResponse
*/
export declare const MsgVoteWeightedResponse: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgVoteWeightedResponse;
isAmino(o: any): o is MsgVoteWeightedResponseAmino;
encode(_: MsgVoteWeightedResponse, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgVoteWeightedResponse;
fromPartial(_: DeepPartial<MsgVoteWeightedResponse>): MsgVoteWeightedResponse;
fromAmino(_: MsgVoteWeightedResponseAmino): MsgVoteWeightedResponse;
toAmino(_: MsgVoteWeightedResponse): MsgVoteWeightedResponseAmino;
fromAminoMsg(object: MsgVoteWeightedResponseAminoMsg): MsgVoteWeightedResponse;
toAminoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseAminoMsg;
fromProtoMsg(message: MsgVoteWeightedResponseProtoMsg): MsgVoteWeightedResponse;
toProto(message: MsgVoteWeightedResponse): Uint8Array;
toProtoMsg(message: MsgVoteWeightedResponse): MsgVoteWeightedResponseProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgDeposit defines a message to submit a deposit to an existing proposal.
* @name MsgDeposit
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgDeposit
*/
export declare const MsgDeposit: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgDeposit;
isAmino(o: any): o is MsgDepositAmino;
encode(message: MsgDeposit, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgDeposit;
fromPartial(object: DeepPartial<MsgDeposit>): MsgDeposit;
fromAmino(object: MsgDepositAmino): MsgDeposit;
toAmino(message: MsgDeposit): MsgDepositAmino;
fromAminoMsg(object: MsgDepositAminoMsg): MsgDeposit;
toAminoMsg(message: MsgDeposit): MsgDepositAminoMsg;
fromProtoMsg(message: MsgDepositProtoMsg): MsgDeposit;
toProto(message: MsgDeposit): Uint8Array;
toProtoMsg(message: MsgDeposit): MsgDepositProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgDepositResponse defines the Msg/Deposit response type.
* @name MsgDepositResponse
* @package cosmos.gov.v1beta1
* @see proto type: cosmos.gov.v1beta1.MsgDepositResponse
*/
export declare const MsgDepositResponse: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgDepositResponse;
isAmino(o: any): o is MsgDepositResponseAmino;
encode(_: MsgDepositResponse, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgDepositResponse;
fromPartial(_: DeepPartial<MsgDepositResponse>): MsgDepositResponse;
fromAmino(_: MsgDepositResponseAmino): MsgDepositResponse;
toAmino(_: MsgDepositResponse): MsgDepositResponseAmino;
fromAminoMsg(object: MsgDepositResponseAminoMsg): MsgDepositResponse;
toAminoMsg(message: MsgDepositResponse): MsgDepositResponseAminoMsg;
fromProtoMsg(message: MsgDepositResponseProtoMsg): MsgDepositResponse;
toProto(message: MsgDepositResponse): Uint8Array;
toProtoMsg(message: MsgDepositResponse): MsgDepositResponseProtoMsg;
registerTypeUrl(): void;
};