diff --git a/packages/cosmwasm-stargate/src/testutils.spec.ts b/packages/cosmwasm-stargate/src/testutils.spec.ts index 4e9b59e9d8..a8b7e5384e 100644 --- a/packages/cosmwasm-stargate/src/testutils.spec.ts +++ b/packages/cosmwasm-stargate/src/testutils.spec.ts @@ -18,7 +18,7 @@ import { setupAuthExtension, setupBankExtension, } from "@cosmjs/stargate"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { connectComet } from "@cosmjs/tendermint-rpc"; import { assertDefinedAndNotNull } from "@cosmjs/utils"; import { SignMode } from "cosmjs-types/cosmos/tx/signing/v1beta1/signing"; import { AuthInfo, SignDoc, TxBody } from "cosmjs-types/cosmos/tx/v1beta1/tx"; @@ -170,7 +170,7 @@ export function fromOneElementArray(elements: ArrayLike): T { export async function makeWasmClient( endpoint: string, ): Promise { - const cometClient = await Tendermint34Client.connect(endpoint); + const cometClient = await connectComet(endpoint); return QueryClient.withExtensions(cometClient, setupAuthExtension, setupBankExtension, setupWasmExtension); } diff --git a/packages/stargate/src/modules/auth/queries.spec.ts b/packages/stargate/src/modules/auth/queries.spec.ts index 2ba101dc23..e5cc357f6e 100644 --- a/packages/stargate/src/modules/auth/queries.spec.ts +++ b/packages/stargate/src/modules/auth/queries.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { encodePubkey } from "@cosmjs/proto-signing"; -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { assert } from "@cosmjs/utils"; import { BaseAccount } from "cosmjs-types/cosmos/auth/v1beta1/auth"; import { Any } from "cosmjs-types/google/protobuf/any"; @@ -10,7 +10,7 @@ import { nonExistentAddress, pendingWithoutSimapp, simapp, unused, validator } f import { AuthExtension, setupAuthExtension } from "./queries"; async function makeClientWithAuth(rpcUrl: string): Promise<[QueryClient & AuthExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupAuthExtension), cometClient]; } diff --git a/packages/stargate/src/modules/authz/queries.spec.ts b/packages/stargate/src/modules/authz/queries.spec.ts index 839d0a61ec..8aecd7d4e8 100644 --- a/packages/stargate/src/modules/authz/queries.spec.ts +++ b/packages/stargate/src/modules/authz/queries.spec.ts @@ -1,6 +1,6 @@ import { makeCosmoshubPath } from "@cosmjs/amino"; import { coins, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { assertDefined, sleep } from "@cosmjs/utils"; import { GenericAuthorization } from "cosmjs-types/cosmos/authz/v1beta1/authz"; @@ -19,7 +19,7 @@ import { import { AuthzExtension, setupAuthzExtension } from "./queries"; async function makeClientWithAuthz(rpcUrl: string): Promise<[QueryClient & AuthzExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupAuthzExtension), cometClient]; } diff --git a/packages/stargate/src/modules/bank/queries.spec.ts b/packages/stargate/src/modules/bank/queries.spec.ts index 040ff7aa6d..f11f308fcb 100644 --- a/packages/stargate/src/modules/bank/queries.spec.ts +++ b/packages/stargate/src/modules/bank/queries.spec.ts @@ -1,4 +1,4 @@ -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { @@ -11,7 +11,7 @@ import { import { BankExtension, setupBankExtension } from "./queries"; async function makeClientWithBank(rpcUrl: string): Promise<[QueryClient & BankExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupBankExtension), cometClient]; } diff --git a/packages/stargate/src/modules/distribution/queries.spec.ts b/packages/stargate/src/modules/distribution/queries.spec.ts index 0453659f03..aba6ab5577 100644 --- a/packages/stargate/src/modules/distribution/queries.spec.ts +++ b/packages/stargate/src/modules/distribution/queries.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { coin, coins, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { sleep } from "@cosmjs/utils"; import { MsgDelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; @@ -21,7 +21,7 @@ import { DistributionExtension, setupDistributionExtension } from "./queries"; async function makeClientWithDistribution( rpcUrl: string, ): Promise<[QueryClient & DistributionExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupDistributionExtension), cometClient]; } diff --git a/packages/stargate/src/modules/gov/queries.spec.ts b/packages/stargate/src/modules/gov/queries.spec.ts index 9cfb7e10e7..1c5fc52ec0 100644 --- a/packages/stargate/src/modules/gov/queries.spec.ts +++ b/packages/stargate/src/modules/gov/queries.spec.ts @@ -1,7 +1,7 @@ import { coin, coins, makeCosmoshubPath } from "@cosmjs/amino"; import { toAscii } from "@cosmjs/encoding"; import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { assert, sleep } from "@cosmjs/utils"; import { ProposalStatus, @@ -29,7 +29,7 @@ import { MsgDelegateEncodeObject, MsgSubmitProposalEncodeObject, MsgVoteEncodeOb import { GovExtension, setupGovExtension } from "./queries"; async function makeClientWithGov(rpcUrl: string): Promise<[QueryClient & GovExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupGovExtension), cometClient]; } diff --git a/packages/stargate/src/modules/ibc/queries.spec.ts b/packages/stargate/src/modules/ibc/queries.spec.ts index fe50174377..0ceee1f9f7 100644 --- a/packages/stargate/src/modules/ibc/queries.spec.ts +++ b/packages/stargate/src/modules/ibc/queries.spec.ts @@ -1,4 +1,4 @@ -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { simapp } from "../../testutils.spec"; @@ -6,7 +6,7 @@ import * as ibcTest from "./ibctestdata.spec"; import { IbcExtension, setupIbcExtension } from "./queries"; async function makeClientWithIbc(rpcUrl: string): Promise<[QueryClient & IbcExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupIbcExtension), cometClient]; } diff --git a/packages/stargate/src/modules/mint/queries.spec.ts b/packages/stargate/src/modules/mint/queries.spec.ts index 43c1ebbc05..be7ef16eda 100644 --- a/packages/stargate/src/modules/mint/queries.spec.ts +++ b/packages/stargate/src/modules/mint/queries.spec.ts @@ -1,11 +1,11 @@ -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { pendingWithoutSimapp, simapp } from "../../testutils.spec"; import { MintExtension, setupMintExtension } from "./queries"; async function makeClientWithMint(rpcUrl: string): Promise<[QueryClient & MintExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupMintExtension), cometClient]; } diff --git a/packages/stargate/src/modules/slashing/queries.spec.ts b/packages/stargate/src/modules/slashing/queries.spec.ts index c2575db524..625cf01b4f 100644 --- a/packages/stargate/src/modules/slashing/queries.spec.ts +++ b/packages/stargate/src/modules/slashing/queries.spec.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { pendingWithoutSimapp, simapp } from "../../testutils.spec"; @@ -8,7 +8,7 @@ import { setupSlashingExtension, SlashingExtension } from "./queries"; async function makeClientWithSlashing( rpcUrl: string, ): Promise<[QueryClient & SlashingExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupSlashingExtension), cometClient]; } diff --git a/packages/stargate/src/modules/staking/queries.spec.ts b/packages/stargate/src/modules/staking/queries.spec.ts index a8d989d8da..4445690394 100644 --- a/packages/stargate/src/modules/staking/queries.spec.ts +++ b/packages/stargate/src/modules/staking/queries.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { coin, coins, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { sleep } from "@cosmjs/utils"; import { MsgDelegate, MsgUndelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; @@ -19,7 +19,7 @@ import { MsgDelegateEncodeObject, MsgUndelegateEncodeObject } from "./messages"; import { setupStakingExtension, StakingExtension } from "./queries"; async function makeClientWithStaking(rpcUrl: string): Promise<[QueryClient & StakingExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupStakingExtension), cometClient]; } diff --git a/packages/stargate/src/modules/tx/queries.spec.ts b/packages/stargate/src/modules/tx/queries.spec.ts index 73f0752ef8..5a8b4c13d3 100644 --- a/packages/stargate/src/modules/tx/queries.spec.ts +++ b/packages/stargate/src/modules/tx/queries.spec.ts @@ -1,5 +1,5 @@ import { coin, coins, DirectSecp256k1HdWallet, Registry } from "@cosmjs/proto-signing"; -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { assertDefined, sleep } from "@cosmjs/utils"; import { MsgDelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; @@ -19,7 +19,7 @@ import { import { setupTxExtension, TxExtension } from "./queries"; async function makeClientWithTx(rpcUrl: string): Promise<[QueryClient & TxExtension, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient, setupTxExtension), cometClient]; } diff --git a/packages/stargate/src/queryclient/queryclient.spec.ts b/packages/stargate/src/queryclient/queryclient.spec.ts index cfbf318521..5f9f5d6417 100644 --- a/packages/stargate/src/queryclient/queryclient.spec.ts +++ b/packages/stargate/src/queryclient/queryclient.spec.ts @@ -2,7 +2,7 @@ import { coin } from "@cosmjs/amino"; import { toAscii } from "@cosmjs/encoding"; import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { CometClient, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { CometClient, connectComet } from "@cosmjs/tendermint-rpc"; import { assert } from "@cosmjs/utils"; import { Metadata } from "cosmjs-types/cosmos/bank/v1beta1/bank"; import { @@ -25,7 +25,7 @@ import { import { QueryClient } from "./queryclient"; async function makeClient(rpcUrl: string): Promise<[QueryClient, CometClient]> { - const cometClient = await Tendermint34Client.connect(rpcUrl); + const cometClient = await connectComet(rpcUrl); return [QueryClient.withExtensions(cometClient), cometClient]; } diff --git a/packages/stargate/src/signingstargateclient.spec.ts b/packages/stargate/src/signingstargateclient.spec.ts index 643aa651df..b940ea4b70 100644 --- a/packages/stargate/src/signingstargateclient.spec.ts +++ b/packages/stargate/src/signingstargateclient.spec.ts @@ -8,7 +8,7 @@ import { makeCosmoshubPath, Registry, } from "@cosmjs/proto-signing"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { connectComet } from "@cosmjs/tendermint-rpc"; import { assert, sleep } from "@cosmjs/utils"; import { DeepPartial } from "cosmjs-types"; import { BinaryWriter } from "cosmjs-types/binary"; @@ -174,7 +174,7 @@ describe("SigningStargateClient", () => { defaultSigningClientOptions, ); - const cometClient = await Tendermint34Client.connect(simapp.tendermintUrl); + const cometClient = await connectComet(simapp.tendermintUrl); const queryClient = QueryClient.withExtensions(cometClient, setupFeegrantExtension); let allowanceExists: boolean; try {