@cosmjs/stargate
Advanced tools
Comparing version 0.26.0-rc1 to 0.26.0
@@ -103,3 +103,19 @@ import { AminoMsg, Coin } from "@cosmjs/amino"; | ||
readonly value: { | ||
readonly content: Any; | ||
/** | ||
* A proposal structure, e.g. | ||
* | ||
* ``` | ||
* { | ||
* type: 'cosmos-sdk/TextProposal', | ||
* value: { | ||
* description: 'This proposal proposes to test whether this proposal passes', | ||
* title: 'Test Proposal' | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
readonly content: { | ||
readonly type: string; | ||
readonly value: any; | ||
}; | ||
readonly initial_deposit: readonly Coin[]; | ||
@@ -111,9 +127,2 @@ /** Bech32 account address */ | ||
export declare function isAminoMsgSubmitProposal(msg: AminoMsg): msg is AminoMsgSubmitProposal; | ||
declare enum VoteOption { | ||
VoteOptionUnspecified = 0, | ||
VoteOptionYes = 1, | ||
VoteOptionAbstain = 2, | ||
VoteOptionNo = 3, | ||
VoteOptionNoWithVeto = 4 | ||
} | ||
/** Casts a vote */ | ||
@@ -126,3 +135,8 @@ export interface AminoMsgVote extends AminoMsg { | ||
readonly voter: string; | ||
readonly option: VoteOption; | ||
/** | ||
* VoteOption as integer from 0 to 4 🤷 | ||
* | ||
* @see https://github.com/cosmos/cosmos-sdk/blob/v0.42.9/x/gov/types/gov.pb.go#L38-L49 | ||
*/ | ||
readonly option: number; | ||
}; | ||
@@ -129,0 +143,0 @@ } |
@@ -42,10 +42,2 @@ "use strict"; | ||
exports.isAminoMsgSubmitProposal = isAminoMsgSubmitProposal; | ||
var VoteOption; | ||
(function (VoteOption) { | ||
VoteOption[VoteOption["VoteOptionUnspecified"] = 0] = "VoteOptionUnspecified"; | ||
VoteOption[VoteOption["VoteOptionYes"] = 1] = "VoteOptionYes"; | ||
VoteOption[VoteOption["VoteOptionAbstain"] = 2] = "VoteOptionAbstain"; | ||
VoteOption[VoteOption["VoteOptionNo"] = 3] = "VoteOptionNo"; | ||
VoteOption[VoteOption["VoteOptionNoWithVeto"] = 4] = "VoteOptionNoWithVeto"; | ||
})(VoteOption || (VoteOption = {})); | ||
function isAminoMsgVote(msg) { | ||
@@ -52,0 +44,0 @@ return msg.type === "cosmos-sdk/MsgVote"; |
@@ -11,2 +11,4 @@ "use strict"; | ||
const utils_1 = require("@cosmjs/utils"); | ||
const gov_1 = require("cosmjs-types/cosmos/gov/v1beta1/gov"); | ||
const any_1 = require("cosmjs-types/google/protobuf/any"); | ||
const long_1 = __importDefault(require("long")); | ||
@@ -27,2 +29,3 @@ function omitDefault(input) { | ||
return { | ||
// bank | ||
"/cosmos.bank.v1beta1.MsgSend": { | ||
@@ -64,2 +67,3 @@ aminoType: "cosmos-sdk/MsgSend", | ||
}, | ||
// distribution | ||
"/cosmos.distribution.v1beta1.MsgFundCommunityPool": { | ||
@@ -107,2 +111,92 @@ aminoType: "cosmos-sdk/MsgFundCommunityPool", | ||
}, | ||
// gov | ||
"/cosmos.gov.v1beta1.MsgDeposit": { | ||
aminoType: "cosmos-sdk/MsgDeposit", | ||
toAmino: ({ amount, depositor, proposalId }) => { | ||
return { | ||
amount, | ||
depositor, | ||
proposal_id: proposalId.toString(), | ||
}; | ||
}, | ||
fromAmino: ({ amount, depositor, proposal_id }) => { | ||
return { | ||
amount: Array.from(amount), | ||
depositor, | ||
proposalId: long_1.default.fromString(proposal_id), | ||
}; | ||
}, | ||
}, | ||
"/cosmos.gov.v1beta1.MsgVote": { | ||
aminoType: "cosmos-sdk/MsgVote", | ||
toAmino: ({ option, proposalId, voter }) => { | ||
return { | ||
option: option, | ||
proposal_id: proposalId.toString(), | ||
voter: voter, | ||
}; | ||
}, | ||
fromAmino: ({ option, proposal_id, voter }) => { | ||
return { | ||
option: gov_1.voteOptionFromJSON(option), | ||
proposalId: long_1.default.fromString(proposal_id), | ||
voter: voter, | ||
}; | ||
}, | ||
}, | ||
"/cosmos.gov.v1beta1.MsgSubmitProposal": { | ||
aminoType: "cosmos-sdk/MsgSubmitProposal", | ||
toAmino: ({ initialDeposit, proposer, content, }) => { | ||
utils_1.assertDefinedAndNotNull(content); | ||
let proposal; | ||
switch (content.typeUrl) { | ||
case "/cosmos.gov.v1beta1.TextProposal": { | ||
const textProposal = gov_1.TextProposal.decode(content.value); | ||
proposal = { | ||
type: "cosmos-sdk/TextProposal", | ||
value: { | ||
description: textProposal.description, | ||
title: textProposal.title, | ||
}, | ||
}; | ||
break; | ||
} | ||
default: | ||
throw new Error(`Unsupported proposal type: '${content.typeUrl}'`); | ||
} | ||
return { | ||
initial_deposit: initialDeposit, | ||
proposer: proposer, | ||
content: proposal, | ||
}; | ||
}, | ||
fromAmino: ({ initial_deposit, proposer, content, }) => { | ||
let any_content; | ||
switch (content.type) { | ||
case "cosmos-sdk/TextProposal": { | ||
const { value } = content; | ||
utils_1.assert(utils_1.isNonNullObject(value)); | ||
const { title, description } = value; | ||
utils_1.assert(typeof title === "string"); | ||
utils_1.assert(typeof description === "string"); | ||
any_content = any_1.Any.fromPartial({ | ||
typeUrl: "/cosmos.gov.v1beta1.TextProposal", | ||
value: gov_1.TextProposal.encode(gov_1.TextProposal.fromPartial({ | ||
title: title, | ||
description: description, | ||
})).finish(), | ||
}); | ||
break; | ||
} | ||
default: | ||
throw new Error(`Unsupported proposal type: '${content.type}'`); | ||
} | ||
return { | ||
initialDeposit: Array.from(initial_deposit), | ||
proposer: proposer, | ||
content: any_content, | ||
}; | ||
}, | ||
}, | ||
// staking | ||
"/cosmos.staking.v1beta1.MsgBeginRedelegate": { | ||
@@ -247,2 +341,3 @@ aminoType: "cosmos-sdk/MsgBeginRedelegate", | ||
}, | ||
// ibc | ||
"/ibc.applications.transfer.v1.MsgTransfer": { | ||
@@ -249,0 +344,0 @@ aminoType: "cosmos-sdk/MsgTransfer", |
@@ -10,2 +10,3 @@ "use strict"; | ||
const proto_signing_1 = require("@cosmjs/proto-signing"); | ||
const gov_1 = require("cosmjs-types/cosmos/gov/v1beta1/gov"); | ||
const long_1 = __importDefault(require("long")); | ||
@@ -15,2 +16,3 @@ const aminotypes_1 = require("./aminotypes"); | ||
describe("toAmino", () => { | ||
// bank | ||
it("works for MsgSend", () => { | ||
@@ -66,2 +68,76 @@ const msg = { | ||
}); | ||
// gov | ||
it("works for MsgDeposit", () => { | ||
const msg = { | ||
amount: [{ amount: "12300000", denom: "ustake" }], | ||
depositor: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", | ||
proposalId: long_1.default.fromNumber(5), | ||
}; | ||
const aminoMsg = new aminotypes_1.AminoTypes().toAmino({ | ||
typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", | ||
value: msg, | ||
}); | ||
const expected = { | ||
type: "cosmos-sdk/MsgDeposit", | ||
value: { | ||
amount: [{ amount: "12300000", denom: "ustake" }], | ||
depositor: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", | ||
proposal_id: "5", | ||
}, | ||
}; | ||
expect(aminoMsg).toEqual(expected); | ||
}); | ||
it("works for MsgSubmitProposal", () => { | ||
const msg = { | ||
initialDeposit: [{ amount: "12300000", denom: "ustake" }], | ||
proposer: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", | ||
content: { | ||
typeUrl: "/cosmos.gov.v1beta1.TextProposal", | ||
value: gov_1.TextProposal.encode({ | ||
description: "This proposal proposes to test whether this proposal passes", | ||
title: "Test Proposal", | ||
}).finish(), | ||
}, | ||
}; | ||
const aminoMsg = new aminotypes_1.AminoTypes().toAmino({ | ||
typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", | ||
value: msg, | ||
}); | ||
const expected = { | ||
type: "cosmos-sdk/MsgSubmitProposal", | ||
value: { | ||
initial_deposit: [{ amount: "12300000", denom: "ustake" }], | ||
proposer: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", | ||
content: { | ||
type: "cosmos-sdk/TextProposal", | ||
value: { | ||
description: "This proposal proposes to test whether this proposal passes", | ||
title: "Test Proposal", | ||
}, | ||
}, | ||
}, | ||
}; | ||
expect(aminoMsg).toEqual(expected); | ||
}); | ||
it("works for MsgVote", () => { | ||
const msg = { | ||
option: gov_1.VoteOption.VOTE_OPTION_NO_WITH_VETO, | ||
proposalId: long_1.default.fromNumber(5), | ||
voter: "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k", | ||
}; | ||
const aminoMsg = new aminotypes_1.AminoTypes().toAmino({ | ||
typeUrl: "/cosmos.gov.v1beta1.MsgVote", | ||
value: msg, | ||
}); | ||
const expected = { | ||
type: "cosmos-sdk/MsgVote", | ||
value: { | ||
option: 4, | ||
proposal_id: "5", | ||
voter: "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k", | ||
}, | ||
}; | ||
expect(aminoMsg).toEqual(expected); | ||
}); | ||
// distribution | ||
it("works for MsgFundCommunityPool", async () => { | ||
@@ -137,2 +213,3 @@ const msg = { | ||
}); | ||
// staking | ||
it("works for MsgBeginRedelegate", () => { | ||
@@ -285,2 +362,3 @@ const msg = { | ||
}); | ||
// ibc | ||
it("works for MsgTransfer", () => { | ||
@@ -382,2 +460,3 @@ const msg = { | ||
}); | ||
// other | ||
it("works with custom type url", () => { | ||
@@ -443,2 +522,3 @@ const msg = { | ||
describe("fromAmino", () => { | ||
// bank | ||
it("works for MsgSend", () => { | ||
@@ -494,2 +574,81 @@ const aminoMsg = { | ||
}); | ||
// gov | ||
it("works for MsgDeposit", () => { | ||
const aminoMsg = { | ||
type: "cosmos-sdk/MsgDeposit", | ||
value: { | ||
amount: [{ amount: "12300000", denom: "ustake" }], | ||
depositor: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", | ||
proposal_id: "5", | ||
}, | ||
}; | ||
const msg = new aminotypes_1.AminoTypes().fromAmino(aminoMsg); | ||
const expectedValue = { | ||
amount: [{ amount: "12300000", denom: "ustake" }], | ||
depositor: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", | ||
proposalId: long_1.default.fromNumber(5), | ||
}; | ||
expect(msg).toEqual({ | ||
typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", | ||
value: expectedValue, | ||
}); | ||
}); | ||
it("works for MsgSubmitProposal", () => { | ||
const aminoMsg = { | ||
type: "cosmos-sdk/MsgSubmitProposal", | ||
value: { | ||
initial_deposit: [{ amount: "12300000", denom: "ustake" }], | ||
proposer: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", | ||
content: { | ||
type: "cosmos-sdk/TextProposal", | ||
value: { | ||
description: "This proposal proposes to test whether this proposal passes", | ||
title: "Test Proposal", | ||
}, | ||
}, | ||
}, | ||
}; | ||
const msg = new aminotypes_1.AminoTypes().fromAmino(aminoMsg); | ||
const expectedValue = { | ||
initialDeposit: [{ amount: "12300000", denom: "ustake" }], | ||
proposer: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", | ||
content: { | ||
typeUrl: "/cosmos.gov.v1beta1.TextProposal", | ||
value: gov_1.TextProposal.encode({ | ||
description: "This proposal proposes to test whether this proposal passes", | ||
title: "Test Proposal", | ||
}).finish(), | ||
}, | ||
}; | ||
expect(msg).toEqual({ | ||
typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", | ||
value: expectedValue, | ||
}); | ||
}); | ||
it("works for MsgVote", () => { | ||
const aminoMsg = { | ||
type: "cosmos-sdk/MsgVote", | ||
value: { | ||
option: 4, | ||
proposal_id: "5", | ||
voter: "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k", | ||
}, | ||
}; | ||
const msg = new aminotypes_1.AminoTypes().fromAmino(aminoMsg); | ||
const expectedValue = { | ||
option: gov_1.VoteOption.VOTE_OPTION_NO_WITH_VETO, | ||
proposalId: long_1.default.fromNumber(5), | ||
voter: "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k", | ||
}; | ||
expect(msg).toEqual({ | ||
typeUrl: "/cosmos.gov.v1beta1.MsgVote", | ||
value: expectedValue, | ||
}); | ||
}); | ||
// distribution | ||
// TODO: MsgFundCommunityPool | ||
// TODO: MsgSetWithdrawAddress | ||
// TODO: MsgWithdrawDelegatorReward | ||
// TODO: MsgWithdrawValidatorCommission | ||
// staking | ||
it("works for MsgBeginRedelegate", () => { | ||
@@ -642,2 +801,3 @@ const aminoMsg = { | ||
}); | ||
// ibc | ||
it("works for MsgTransfer", () => { | ||
@@ -711,2 +871,3 @@ const aminoMsg = { | ||
}); | ||
// other | ||
it("works for custom type url", () => { | ||
@@ -713,0 +874,0 @@ const aminoMsg = { |
import { EncodeObject } from "@cosmjs/proto-signing"; | ||
import { MsgSend } from "cosmjs-types/cosmos/bank/v1beta1/tx"; | ||
import { MsgWithdrawDelegatorReward } from "cosmjs-types/cosmos/distribution/v1beta1/tx"; | ||
import { MsgSubmitProposal, MsgVote } from "cosmjs-types/cosmos/gov/v1beta1/tx"; | ||
import { MsgDeposit, MsgSubmitProposal, MsgVote } from "cosmjs-types/cosmos/gov/v1beta1/tx"; | ||
import { MsgDelegate, MsgUndelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; | ||
@@ -32,2 +32,7 @@ import { MsgTransfer } from "cosmjs-types/ibc/applications/transfer/v1/tx"; | ||
export declare function isMsgTransferEncodeObject(encodeObject: EncodeObject): encodeObject is MsgTransferEncodeObject; | ||
export interface MsgDepositEncodeObject extends EncodeObject { | ||
readonly typeUrl: "/cosmos.gov.v1beta1.MsgDeposit"; | ||
readonly value: Partial<MsgDeposit>; | ||
} | ||
export declare function isMsgDepositEncodeObject(encodeObject: EncodeObject): encodeObject is MsgSubmitProposalEncodeObject; | ||
export interface MsgSubmitProposalEncodeObject extends EncodeObject { | ||
@@ -34,0 +39,0 @@ readonly typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isMsgVoteEncodeObject = exports.isMsgSubmitProposalEncodeObject = exports.isMsgTransferEncodeObject = exports.isMsgWithdrawDelegatorRewardEncodeObject = exports.isMsgUndelegateEncodeObject = exports.isMsgDelegateEncodeObject = exports.isMsgSendEncodeObject = void 0; | ||
exports.isMsgVoteEncodeObject = exports.isMsgSubmitProposalEncodeObject = exports.isMsgDepositEncodeObject = exports.isMsgTransferEncodeObject = exports.isMsgWithdrawDelegatorRewardEncodeObject = exports.isMsgUndelegateEncodeObject = exports.isMsgDelegateEncodeObject = exports.isMsgSendEncodeObject = void 0; | ||
function isMsgSendEncodeObject(encodeObject) { | ||
@@ -25,2 +25,6 @@ return encodeObject.typeUrl === "/cosmos.bank.v1beta1.MsgSend"; | ||
exports.isMsgTransferEncodeObject = isMsgTransferEncodeObject; | ||
function isMsgDepositEncodeObject(encodeObject) { | ||
return encodeObject.typeUrl === "/cosmos.gov.v1beta1.MsgDeposit"; | ||
} | ||
exports.isMsgDepositEncodeObject = isMsgDepositEncodeObject; | ||
function isMsgSubmitProposalEncodeObject(encodeObject) { | ||
@@ -27,0 +31,0 @@ return encodeObject.typeUrl === "/cosmos.gov.v1beta1.MsgSubmitProposal"; |
@@ -6,3 +6,3 @@ export { StdFee } from "@cosmjs/amino"; | ||
export { AminoConverter, AminoTypes } from "./aminotypes"; | ||
export { isMsgDelegateEncodeObject, isMsgSendEncodeObject, isMsgSubmitProposalEncodeObject, isMsgTransferEncodeObject, isMsgUndelegateEncodeObject, isMsgVoteEncodeObject, isMsgWithdrawDelegatorRewardEncodeObject, MsgDelegateEncodeObject, MsgSendEncodeObject, MsgSubmitProposalEncodeObject, MsgTransferEncodeObject, MsgUndelegateEncodeObject, MsgVoteEncodeObject, MsgWithdrawDelegatorRewardEncodeObject, } from "./encodeobjects"; | ||
export { isMsgDelegateEncodeObject, isMsgDepositEncodeObject, isMsgSendEncodeObject, isMsgSubmitProposalEncodeObject, isMsgTransferEncodeObject, isMsgUndelegateEncodeObject, isMsgVoteEncodeObject, isMsgWithdrawDelegatorRewardEncodeObject, MsgDelegateEncodeObject, MsgDepositEncodeObject, MsgSendEncodeObject, MsgSubmitProposalEncodeObject, MsgTransferEncodeObject, MsgUndelegateEncodeObject, MsgVoteEncodeObject, MsgWithdrawDelegatorRewardEncodeObject, } from "./encodeobjects"; | ||
export { calculateFee, GasPrice } from "./fee"; | ||
@@ -9,0 +9,0 @@ export * as logs from "./logs"; |
@@ -22,4 +22,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StargateClient = exports.isBroadcastTxSuccess = exports.isBroadcastTxFailure = exports.assertIsBroadcastTxSuccess = exports.isSearchByTagsQuery = exports.isSearchBySentFromOrToQuery = exports.isSearchByHeightQuery = exports.setupStakingExtension = exports.setupIbcExtension = exports.setupGovExtension = exports.setupDistributionExtension = exports.setupBankExtension = exports.setupAuthExtension = exports.QueryClient = exports.createProtobufRpcClient = exports.createPagination = exports.makeMultisignedTx = exports.logs = exports.GasPrice = exports.calculateFee = exports.isMsgWithdrawDelegatorRewardEncodeObject = exports.isMsgVoteEncodeObject = exports.isMsgUndelegateEncodeObject = exports.isMsgTransferEncodeObject = exports.isMsgSubmitProposalEncodeObject = exports.isMsgSendEncodeObject = exports.isMsgDelegateEncodeObject = exports.AminoTypes = exports.isAminoMsgWithdrawValidatorCommission = exports.isAminoMsgWithdrawDelegatorReward = exports.isAminoMsgVote = exports.isAminoMsgVerifyInvariant = exports.isAminoMsgUnjail = exports.isAminoMsgUndelegate = exports.isAminoMsgSubmitProposal = exports.isAminoMsgSubmitEvidence = exports.isAminoMsgSetWithdrawAddress = exports.isAminoMsgSend = exports.isAminoMsgMultiSend = exports.isAminoMsgFundCommunityPool = exports.isAminoMsgEditValidator = exports.isAminoMsgDeposit = exports.isAminoMsgDelegate = exports.isAminoMsgCreateValidator = exports.isAminoMsgBeginRedelegate = exports.accountFromAny = exports.parseCoins = exports.makeCosmoshubPath = exports.coins = exports.coin = void 0; | ||
exports.SigningStargateClient = exports.defaultRegistryTypes = exports.TimeoutError = void 0; | ||
exports.isBroadcastTxSuccess = exports.isBroadcastTxFailure = exports.assertIsBroadcastTxSuccess = exports.isSearchByTagsQuery = exports.isSearchBySentFromOrToQuery = exports.isSearchByHeightQuery = exports.setupStakingExtension = exports.setupIbcExtension = exports.setupGovExtension = exports.setupDistributionExtension = exports.setupBankExtension = exports.setupAuthExtension = exports.QueryClient = exports.createProtobufRpcClient = exports.createPagination = exports.makeMultisignedTx = exports.logs = exports.GasPrice = exports.calculateFee = exports.isMsgWithdrawDelegatorRewardEncodeObject = exports.isMsgVoteEncodeObject = exports.isMsgUndelegateEncodeObject = exports.isMsgTransferEncodeObject = exports.isMsgSubmitProposalEncodeObject = exports.isMsgSendEncodeObject = exports.isMsgDepositEncodeObject = exports.isMsgDelegateEncodeObject = exports.AminoTypes = exports.isAminoMsgWithdrawValidatorCommission = exports.isAminoMsgWithdrawDelegatorReward = exports.isAminoMsgVote = exports.isAminoMsgVerifyInvariant = exports.isAminoMsgUnjail = exports.isAminoMsgUndelegate = exports.isAminoMsgSubmitProposal = exports.isAminoMsgSubmitEvidence = exports.isAminoMsgSetWithdrawAddress = exports.isAminoMsgSend = exports.isAminoMsgMultiSend = exports.isAminoMsgFundCommunityPool = exports.isAminoMsgEditValidator = exports.isAminoMsgDeposit = exports.isAminoMsgDelegate = exports.isAminoMsgCreateValidator = exports.isAminoMsgBeginRedelegate = exports.accountFromAny = exports.parseCoins = exports.makeCosmoshubPath = exports.coins = exports.coin = void 0; | ||
exports.SigningStargateClient = exports.defaultRegistryTypes = exports.TimeoutError = exports.StargateClient = void 0; | ||
var proto_signing_1 = require("@cosmjs/proto-signing"); | ||
@@ -54,2 +54,3 @@ Object.defineProperty(exports, "coin", { enumerable: true, get: function () { return proto_signing_1.coin; } }); | ||
Object.defineProperty(exports, "isMsgDelegateEncodeObject", { enumerable: true, get: function () { return encodeobjects_1.isMsgDelegateEncodeObject; } }); | ||
Object.defineProperty(exports, "isMsgDepositEncodeObject", { enumerable: true, get: function () { return encodeobjects_1.isMsgDepositEncodeObject; } }); | ||
Object.defineProperty(exports, "isMsgSendEncodeObject", { enumerable: true, get: function () { return encodeobjects_1.isMsgSendEncodeObject; } }); | ||
@@ -56,0 +57,0 @@ Object.defineProperty(exports, "isMsgSubmitProposalEncodeObject", { enumerable: true, get: function () { return encodeobjects_1.isMsgSubmitProposalEncodeObject; } }); |
@@ -64,2 +64,3 @@ "use strict"; | ||
.attributes.find(({ key }) => key === "proposal_id").value; | ||
utils_1.assert(proposalId, "Proposal ID not found in events"); | ||
utils_1.assert(proposalId.match(testutils_spec_1.nonNegativeIntegerMatcher)); | ||
@@ -170,2 +171,3 @@ // Voter 1 | ||
testutils_spec_1.pendingWithoutSimapp(); | ||
utils_1.assert(proposalId, "Missing proposal ID"); | ||
const [client, tmClient] = await makeClientWithGov(testutils_spec_1.simapp.tendermintUrl); | ||
@@ -194,2 +196,3 @@ const response = await client.gov.proposals(gov_1.ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD, voter1Address, voter1Address); | ||
testutils_spec_1.pendingWithoutSimapp(); | ||
utils_1.assert(proposalId, "Missing proposal ID"); | ||
const [client, tmClient] = await makeClientWithGov(testutils_spec_1.simapp.tendermintUrl); | ||
@@ -217,2 +220,3 @@ const response = await client.gov.proposal(proposalId); | ||
testutils_spec_1.pendingWithoutSimapp(); | ||
utils_1.assert(proposalId, "Missing proposal ID"); | ||
const [client, tmClient] = await makeClientWithGov(testutils_spec_1.simapp.tendermintUrl); | ||
@@ -233,2 +237,3 @@ const response = await client.gov.deposits(proposalId); | ||
testutils_spec_1.pendingWithoutSimapp(); | ||
utils_1.assert(proposalId, "Missing proposal ID"); | ||
const [client, tmClient] = await makeClientWithGov(testutils_spec_1.simapp.tendermintUrl); | ||
@@ -247,2 +252,3 @@ const response = await client.gov.deposit(proposalId, voter1Address); | ||
testutils_spec_1.pendingWithoutSimapp(); | ||
utils_1.assert(proposalId, "Missing proposal ID"); | ||
const [client, tmClient] = await makeClientWithGov(testutils_spec_1.simapp.tendermintUrl); | ||
@@ -262,2 +268,3 @@ const response = await client.gov.tally(proposalId); | ||
testutils_spec_1.pendingWithoutSimapp(); | ||
utils_1.assert(proposalId, "Missing proposal ID"); | ||
const [client, tmClient] = await makeClientWithGov(testutils_spec_1.simapp.tendermintUrl); | ||
@@ -284,2 +291,3 @@ const response = await client.gov.votes(proposalId); | ||
testutils_spec_1.pendingWithoutSimapp(); | ||
utils_1.assert(proposalId, "Missing proposal ID"); | ||
const [client, tmClient] = await makeClientWithGov(testutils_spec_1.simapp.tendermintUrl); | ||
@@ -286,0 +294,0 @@ const response = await client.gov.vote(proposalId, voter1Address); |
@@ -32,2 +32,3 @@ "use strict"; | ||
["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", tx_2.MsgWithdrawValidatorCommission], | ||
["/cosmos.gov.v1beta1.MsgDeposit", tx_3.MsgDeposit], | ||
["/cosmos.gov.v1beta1.MsgSubmitProposal", tx_3.MsgSubmitProposal], | ||
@@ -34,0 +35,0 @@ ["/cosmos.gov.v1beta1.MsgVote", tx_3.MsgVote], |
{ | ||
"name": "@cosmjs/stargate", | ||
"version": "0.26.0-rc1", | ||
"version": "0.26.0", | ||
"description": "Utilities for Cosmos SDK 0.40", | ||
@@ -42,9 +42,9 @@ "contributors": [ | ||
"@confio/ics23": "^0.6.3", | ||
"@cosmjs/amino": "0.26.0-rc1", | ||
"@cosmjs/encoding": "0.26.0-rc1", | ||
"@cosmjs/math": "0.26.0-rc1", | ||
"@cosmjs/proto-signing": "0.26.0-rc1", | ||
"@cosmjs/stream": "0.26.0-rc1", | ||
"@cosmjs/tendermint-rpc": "0.26.0-rc1", | ||
"@cosmjs/utils": "0.26.0-rc1", | ||
"@cosmjs/amino": "0.26.0", | ||
"@cosmjs/encoding": "0.26.0", | ||
"@cosmjs/math": "0.26.0", | ||
"@cosmjs/proto-signing": "0.26.0", | ||
"@cosmjs/stream": "0.26.0", | ||
"@cosmjs/tendermint-rpc": "0.26.0", | ||
"@cosmjs/utils": "0.26.0", | ||
"cosmjs-types": "^0.2.0", | ||
@@ -56,3 +56,3 @@ "long": "^4.0.0", | ||
"devDependencies": { | ||
"@cosmjs/crypto": "0.26.0-rc1", | ||
"@cosmjs/crypto": "0.26.0", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
@@ -59,0 +59,0 @@ "@types/eslint-plugin-prettier": "^3", |
@@ -11,2 +11,4 @@ # @cosmjs/stargate | ||
| ------------------------------- | ------------------------------- | | ||
| ^0.26.0 | 0.42.x | | ||
| ^0.25.0 | 0.42.x | | ||
| ^0.24.0 | 0.40.x, 0.41.x, 0.42.x | | ||
@@ -13,0 +15,0 @@ | ^0.24.0-alpha.14 | 0.40.0 | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
624899
7556
24
+ Added@cosmjs/amino@0.26.0(transitive)
+ Added@cosmjs/crypto@0.26.0(transitive)
+ Added@cosmjs/encoding@0.26.0(transitive)
+ Added@cosmjs/json-rpc@0.26.0(transitive)
+ Added@cosmjs/math@0.26.0(transitive)
+ Added@cosmjs/proto-signing@0.26.0(transitive)
+ Added@cosmjs/socket@0.26.0(transitive)
+ Added@cosmjs/stream@0.26.0(transitive)
+ Added@cosmjs/tendermint-rpc@0.26.0(transitive)
+ Added@cosmjs/utils@0.26.0(transitive)
- Removed@cosmjs/amino@0.26.0-rc1(transitive)
- Removed@cosmjs/crypto@0.26.0-rc1(transitive)
- Removed@cosmjs/encoding@0.26.0-rc1(transitive)
- Removed@cosmjs/json-rpc@0.26.0-rc1(transitive)
- Removed@cosmjs/math@0.26.0-rc1(transitive)
- Removed@cosmjs/proto-signing@0.26.0-rc1(transitive)
- Removed@cosmjs/socket@0.26.0-rc1(transitive)
- Removed@cosmjs/stream@0.26.0-rc1(transitive)
- Removed@cosmjs/tendermint-rpc@0.26.0-rc1(transitive)
- Removed@cosmjs/utils@0.26.0-rc1(transitive)
Updated@cosmjs/amino@0.26.0
Updated@cosmjs/encoding@0.26.0
Updated@cosmjs/math@0.26.0
Updated@cosmjs/proto-signing@0.26.0
Updated@cosmjs/stream@0.26.0
Updated@cosmjs/utils@0.26.0