Copy JsonObject to cosmwasm-stargate
This commit is contained in:
parent
6ec6994a79
commit
77bd2e70a1
@ -1,5 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { Contract, ContractCodeHistoryEntry, JsonObject } from "@cosmjs/cosmwasm-launchpad";
|
||||
import { Contract, ContractCodeHistoryEntry } from "@cosmjs/cosmwasm-launchpad";
|
||||
import { fromAscii, toHex } from "@cosmjs/encoding";
|
||||
import { Uint53 } from "@cosmjs/math";
|
||||
import {
|
||||
@ -27,13 +27,17 @@ import { assert, sleep } from "@cosmjs/utils";
|
||||
import { CodeInfoResponse } from "cosmjs-types/cosmwasm/wasm/v1beta1/query";
|
||||
import { ContractCodeHistoryOperationType } from "cosmjs-types/cosmwasm/wasm/v1beta1/types";
|
||||
|
||||
import { setupWasmExtension, WasmExtension } from "./queries";
|
||||
import { JsonObject, setupWasmExtension, WasmExtension } from "./queries";
|
||||
|
||||
// Those types can be copied over to allow them to evolve independently of @cosmjs/cosmwasm-launchpad.
|
||||
// For now just re-export them such that they can be imported via @cosmjs/cosmwasm-stargate.
|
||||
export {
|
||||
Contract, // returned by CosmWasmClient.getContract
|
||||
ContractCodeHistoryEntry, // returned by CosmWasmClient.getContractCodeHistory
|
||||
};
|
||||
|
||||
// Re-exports that belong to public CosmWasmClient interfaces
|
||||
export {
|
||||
JsonObject, // returned by CosmWasmClient.queryContractSmart
|
||||
};
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
export { setupWasmExtension, WasmExtension } from "./wasm";
|
||||
export { setupWasmExtension, JsonObject, WasmExtension } from "./wasm";
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { JsonObject } from "@cosmjs/cosmwasm-launchpad";
|
||||
import { fromUtf8, toAscii } from "@cosmjs/encoding";
|
||||
import { createPagination, createProtobufRpcClient, QueryClient } from "@cosmjs/stargate";
|
||||
import {
|
||||
@ -14,6 +13,14 @@ import {
|
||||
} from "cosmjs-types/cosmwasm/wasm/v1beta1/query";
|
||||
import Long from "long";
|
||||
|
||||
/**
|
||||
* An object containing a parsed JSON document. The result of JSON.parse().
|
||||
* This doesn't provide any type safety over `any` but expresses intent in the code.
|
||||
*
|
||||
* This type is returned by `queryContractSmart`.
|
||||
*/
|
||||
export type JsonObject = any;
|
||||
|
||||
export interface WasmExtension {
|
||||
readonly wasm: {
|
||||
readonly listCodeInfo: (paginationKey?: Uint8Array) => Promise<QueryCodesResponse>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user