Move QueryClient into subfolder

This commit is contained in:
Simon Warta 2020-08-13 11:59:08 +02:00
parent 0c5f72a55f
commit 5ccc71c261
8 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,5 @@
import { Client as TendermintClient } from "@cosmjs/tendermint-rpc";
import { QueryClient } from "../queryclient";
import {
nonExistentAddress,
nonNegativeIntegerMatcher,
@ -9,6 +8,7 @@ import {
unused,
} from "../testutils.spec";
import { BankExtension, setupBankExtension } from "./bank";
import { QueryClient } from "./queryclient";
async function makeBankClient(rpcUrl: string): Promise<QueryClient & BankExtension> {
// TODO: tmClient is not owned by QueryClient but should be disconnected somehow (once we use WebSockets)

View File

@ -2,7 +2,7 @@ import { toAscii } from "@cosmjs/encoding";
import { assert } from "@cosmjs/utils";
import { cosmos } from "../generated/codecimpl";
import { QueryClient } from "../queryclient";
import { QueryClient } from "./queryclient";
import { toAccAddress, toObject } from "./utils";
export interface BankExtension {

View File

@ -1 +1,7 @@
// Base symbols
export { QueryClient } from "./queryclient";
// Extensions
export { BankExtension, setupBankExtension } from "./bank";

View File

@ -17,8 +17,7 @@ import { assert, assertDefined } from "@cosmjs/utils";
import Long from "long";
import { cosmos } from "./generated/codecimpl";
import { BankExtension, setupBankExtension } from "./queries";
import { QueryClient } from "./queryclient";
import { BankExtension, QueryClient, setupBankExtension } from "./queries";
/** A transaction that is indexed as part of the transaction history */
export interface IndexedTx {

View File

@ -1,5 +1,5 @@
import { cosmos } from "../generated/codecimpl";
import { QueryClient } from "../queryclient";
import { QueryClient } from "./queryclient";
export interface BankExtension {
readonly bank: {
readonly balance: (address: string, denom: string) => Promise<cosmos.ICoin | null>;

View File

@ -1 +1,2 @@
export { QueryClient } from "./queryclient";
export { BankExtension, setupBankExtension } from "./bank";