Move remaining Amino messages to module folders
This commit is contained in:
parent
fb5cc27c3b
commit
f98537cbc7
@ -1,63 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { AminoMsg } from "@cosmjs/amino";
|
||||
|
||||
// crisis - see https://github.com/cosmos/cosmos-sdk/blob/efa73c7/proto/cosmos/crisis/crisis.proto
|
||||
|
||||
/** Verifies a particular invariance */
|
||||
export interface AminoMsgVerifyInvariant extends AminoMsg {
|
||||
readonly type: "cosmos-sdk/MsgVerifyInvariant";
|
||||
readonly value: {
|
||||
/** Bech32 account address */
|
||||
readonly sender: string;
|
||||
readonly invariant_module_name: string;
|
||||
readonly invariant_route: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function isAminoMsgVerifyInvariant(msg: AminoMsg): msg is AminoMsgVerifyInvariant {
|
||||
return msg.type === "cosmos-sdk/MsgVerifyInvariant";
|
||||
}
|
||||
|
||||
// distribution - see https://github.com/cosmos/cosmos-sdk/blob/efa73c7/proto/cosmos/distribution/distribution.proto
|
||||
|
||||
// evidence - see https://github.com/cosmos/cosmos-sdk/blob/efa73c7/proto/cosmos/evidence/evidence.proto
|
||||
|
||||
interface Any {
|
||||
readonly type_url: string;
|
||||
readonly value: Uint8Array;
|
||||
}
|
||||
|
||||
/** Supports submitting arbitrary evidence */
|
||||
export interface AminoMsgSubmitEvidence extends AminoMsg {
|
||||
readonly type: "cosmos-sdk/MsgSubmitEvidence";
|
||||
readonly value: {
|
||||
/** Bech32 account address */
|
||||
readonly submitter: string;
|
||||
readonly evidence: Any;
|
||||
};
|
||||
}
|
||||
|
||||
export function isAminoMsgSubmitEvidence(msg: AminoMsg): msg is AminoMsgSubmitEvidence {
|
||||
return msg.type === "cosmos-sdk/MsgSubmitEvidence";
|
||||
}
|
||||
|
||||
// gov - https://github.com/cosmos/cosmos-sdk/blob/efa73c7edb31a7bd65786501da213b294f89267a/proto/cosmos/gov/gov.proto
|
||||
|
||||
// mint (no messages) - see https://github.com/cosmos/cosmos-sdk/blob/efa73c7/proto/cosmos/mint/mint.proto
|
||||
|
||||
// params (no messages) - see https://github.com/cosmos/cosmos-sdk/blob/efa73c7/proto/cosmos/params/params.proto
|
||||
|
||||
// slashing - see https://github.com/cosmos/cosmos-sdk/blob/efa73c7/proto/cosmos/slashing/slashing.proto
|
||||
|
||||
/** Unjails a jailed validator */
|
||||
export interface AminoMsgUnjail extends AminoMsg {
|
||||
readonly type: "cosmos-sdk/MsgUnjail";
|
||||
readonly value: {
|
||||
/** Bech32 account address */
|
||||
readonly validator_addr: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function isAminoMsgUnjail(msg: AminoMsg): msg is AminoMsgUnjail {
|
||||
return msg.type === "cosmos-sdk/MsgUnjail";
|
||||
}
|
||||
@ -1,13 +1,5 @@
|
||||
export { Account, accountFromAny } from "./accounts";
|
||||
export { AminoConverter } from "./aminoconverters";
|
||||
export {
|
||||
AminoMsgSubmitEvidence,
|
||||
AminoMsgUnjail,
|
||||
AminoMsgVerifyInvariant,
|
||||
isAminoMsgSubmitEvidence,
|
||||
isAminoMsgUnjail,
|
||||
isAminoMsgVerifyInvariant,
|
||||
} from "./aminomsgs";
|
||||
export { AminoTypes, AminoTypesOptions } from "./aminotypes";
|
||||
export { calculateFee, GasPrice } from "./fee";
|
||||
export * as logs from "./logs";
|
||||
@ -21,8 +13,11 @@ export {
|
||||
AminoMsgMultiSend,
|
||||
AminoMsgSend,
|
||||
AminoMsgSetWithdrawAddress,
|
||||
AminoMsgSubmitEvidence,
|
||||
AminoMsgSubmitProposal,
|
||||
AminoMsgUndelegate,
|
||||
AminoMsgUnjail,
|
||||
AminoMsgVerifyInvariant,
|
||||
AminoMsgVote,
|
||||
AminoMsgWithdrawDelegatorReward,
|
||||
AminoMsgWithdrawValidatorCommission,
|
||||
@ -42,8 +37,11 @@ export {
|
||||
isAminoMsgMultiSend,
|
||||
isAminoMsgSend,
|
||||
isAminoMsgSetWithdrawAddress,
|
||||
isAminoMsgSubmitEvidence,
|
||||
isAminoMsgSubmitProposal,
|
||||
isAminoMsgUndelegate,
|
||||
isAminoMsgUnjail,
|
||||
isAminoMsgVerifyInvariant,
|
||||
isAminoMsgVote,
|
||||
isAminoMsgWithdrawDelegatorReward,
|
||||
isAminoMsgWithdrawValidatorCommission,
|
||||
|
||||
25
packages/stargate/src/modules/crisis/aminomessages.ts
Normal file
25
packages/stargate/src/modules/crisis/aminomessages.ts
Normal file
@ -0,0 +1,25 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { AminoMsg } from "@cosmjs/amino";
|
||||
|
||||
import { AminoConverters } from "../../aminoconverters";
|
||||
|
||||
// See https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/proto/cosmos/crisis/v1beta1/tx.proto
|
||||
|
||||
/** Verifies a particular invariance */
|
||||
export interface AminoMsgVerifyInvariant extends AminoMsg {
|
||||
readonly type: "cosmos-sdk/MsgVerifyInvariant";
|
||||
readonly value: {
|
||||
/** Bech32 account address */
|
||||
readonly sender: string;
|
||||
readonly invariant_module_name: string;
|
||||
readonly invariant_route: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function isAminoMsgVerifyInvariant(msg: AminoMsg): msg is AminoMsgVerifyInvariant {
|
||||
return msg.type === "cosmos-sdk/MsgVerifyInvariant";
|
||||
}
|
||||
|
||||
export function createCrysisAminoConverters(): AminoConverters {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
29
packages/stargate/src/modules/evidence/aminomessages.ts
Normal file
29
packages/stargate/src/modules/evidence/aminomessages.ts
Normal file
@ -0,0 +1,29 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { AminoMsg } from "@cosmjs/amino";
|
||||
|
||||
import { AminoConverters } from "../../aminoconverters";
|
||||
|
||||
// See https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/proto/cosmos/evidence/v1beta1/tx.proto
|
||||
|
||||
interface Any {
|
||||
readonly type_url: string;
|
||||
readonly value: Uint8Array;
|
||||
}
|
||||
|
||||
/** Supports submitting arbitrary evidence */
|
||||
export interface AminoMsgSubmitEvidence extends AminoMsg {
|
||||
readonly type: "cosmos-sdk/MsgSubmitEvidence";
|
||||
readonly value: {
|
||||
/** Bech32 account address */
|
||||
readonly submitter: string;
|
||||
readonly evidence: Any;
|
||||
};
|
||||
}
|
||||
|
||||
export function isAminoMsgSubmitEvidence(msg: AminoMsg): msg is AminoMsgSubmitEvidence {
|
||||
return msg.type === "cosmos-sdk/MsgSubmitEvidence";
|
||||
}
|
||||
|
||||
export function createEvidenceAminoConverters(): AminoConverters {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
@ -10,6 +10,11 @@ export {
|
||||
} from "./bank/aminomessages";
|
||||
export { bankTypes, isMsgSendEncodeObject, MsgSendEncodeObject } from "./bank/messages";
|
||||
export { BankExtension, setupBankExtension } from "./bank/queries";
|
||||
export {
|
||||
AminoMsgVerifyInvariant,
|
||||
createCrysisAminoConverters,
|
||||
isAminoMsgVerifyInvariant,
|
||||
} from "./crisis/aminomessages";
|
||||
export {
|
||||
AminoMsgFundCommunityPool,
|
||||
AminoMsgSetWithdrawAddress,
|
||||
@ -27,6 +32,11 @@ export {
|
||||
MsgWithdrawDelegatorRewardEncodeObject,
|
||||
} from "./distribution/messages";
|
||||
export { DistributionExtension, setupDistributionExtension } from "./distribution/queries";
|
||||
export {
|
||||
AminoMsgSubmitEvidence,
|
||||
createEvidenceAminoConverters,
|
||||
isAminoMsgSubmitEvidence,
|
||||
} from "./evidence/aminomessages";
|
||||
export { createFreegrantAminoConverters } from "./feegrant/aminomessages";
|
||||
export { feegrantTypes } from "./feegrant/messages";
|
||||
export {
|
||||
@ -52,6 +62,7 @@ export { AminoMsgTransfer, createIbcAminoConverters, isAminoMsgTransfer } from "
|
||||
export { ibcTypes, isMsgTransferEncodeObject, MsgTransferEncodeObject } from "./ibc/messages";
|
||||
export { IbcExtension, setupIbcExtension } from "./ibc/queries";
|
||||
export { MintExtension, MintParams, setupMintExtension } from "./mint/queries";
|
||||
export { AminoMsgUnjail, createSlashingAminoConverters, isAminoMsgUnjail } from "./slashing/aminomessages";
|
||||
export { setupSlashingExtension, SlashingExtension } from "./slashing/queries";
|
||||
export {
|
||||
AminoMsgBeginRedelegate,
|
||||
|
||||
23
packages/stargate/src/modules/slashing/aminomessages.ts
Normal file
23
packages/stargate/src/modules/slashing/aminomessages.ts
Normal file
@ -0,0 +1,23 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { AminoMsg } from "@cosmjs/amino";
|
||||
|
||||
import { AminoConverters } from "../../aminoconverters";
|
||||
|
||||
// See https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/proto/cosmos/slashing/v1beta1/tx.proto
|
||||
|
||||
/** Unjails a jailed validator */
|
||||
export interface AminoMsgUnjail extends AminoMsg {
|
||||
readonly type: "cosmos-sdk/MsgUnjail";
|
||||
readonly value: {
|
||||
/** Bech32 account address */
|
||||
readonly validator_addr: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function isAminoMsgUnjail(msg: AminoMsg): msg is AminoMsgUnjail {
|
||||
return msg.type === "cosmos-sdk/MsgUnjail";
|
||||
}
|
||||
|
||||
export function createSlashingAminoConverters(): AminoConverters {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user