diff --git a/packages/cosmwasm/src/cw3cosmwasmclient.ts b/packages/cosmwasm/src/cw3cosmwasmclient.ts index 933c9574..15f74941 100644 --- a/packages/cosmwasm/src/cw3cosmwasmclient.ts +++ b/packages/cosmwasm/src/cw3cosmwasmclient.ts @@ -4,14 +4,7 @@ import { BroadcastMode, GasLimits, GasPrice, OfflineSigner } from "@cosmjs/launc import { CosmosMsg } from "./cosmosmsg"; import { Account } from "./cosmwasmclient"; import { CosmWasmFeeTable, ExecuteResult, SigningCosmWasmClient } from "./signingcosmwasmclient"; - -export type Expiration = - | { - readonly at_height: number; - } - | { - readonly at_time: number; - }; +import { Expiration } from "./types"; export enum Vote { Yes = "yes", diff --git a/packages/cosmwasm/src/index.ts b/packages/cosmwasm/src/index.ts index 88cc32d0..a9151c7d 100644 --- a/packages/cosmwasm/src/index.ts +++ b/packages/cosmwasm/src/index.ts @@ -20,7 +20,6 @@ export { export { Cw1CosmWasmClient } from "./cw1cosmwasmclient"; export { Cw3CosmWasmClient, - Expiration, ProposalResult, ProposalsResult, ThresholdResult, @@ -54,3 +53,4 @@ export { MsgUpdateAdmin, MsgStoreCode, } from "./msgs"; +export { Expiration } from "./types"; diff --git a/packages/cosmwasm/src/types.ts b/packages/cosmwasm/src/types.ts index bba7fc95..0d0ba0ba 100644 --- a/packages/cosmwasm/src/types.ts +++ b/packages/cosmwasm/src/types.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/naming-convention */ import { fromBase64, fromHex } from "@cosmjs/encoding"; export interface WasmData { @@ -25,3 +26,14 @@ export function parseWasmData({ key, val }: WasmData): Model { * This doen't privide any type safety over `any` but expresses intent in the code. */ export type JsonObject = any; + +export type Expiration = + | { + readonly at_height: number; + } + | { + readonly at_time: number; + } + | { + readonly never: Record; + }; diff --git a/packages/cosmwasm/types/cw3cosmwasmclient.d.ts b/packages/cosmwasm/types/cw3cosmwasmclient.d.ts index 80ff14fc..fdc96478 100644 --- a/packages/cosmwasm/types/cw3cosmwasmclient.d.ts +++ b/packages/cosmwasm/types/cw3cosmwasmclient.d.ts @@ -2,13 +2,7 @@ import { BroadcastMode, GasLimits, GasPrice, OfflineSigner } from "@cosmjs/launc import { CosmosMsg } from "./cosmosmsg"; import { Account } from "./cosmwasmclient"; import { CosmWasmFeeTable, ExecuteResult, SigningCosmWasmClient } from "./signingcosmwasmclient"; -export declare type Expiration = - | { - readonly at_height: number; - } - | { - readonly at_time: number; - }; +import { Expiration } from "./types"; export declare enum Vote { Yes = "yes", No = "no", diff --git a/packages/cosmwasm/types/index.d.ts b/packages/cosmwasm/types/index.d.ts index 88cc32d0..a9151c7d 100644 --- a/packages/cosmwasm/types/index.d.ts +++ b/packages/cosmwasm/types/index.d.ts @@ -20,7 +20,6 @@ export { export { Cw1CosmWasmClient } from "./cw1cosmwasmclient"; export { Cw3CosmWasmClient, - Expiration, ProposalResult, ProposalsResult, ThresholdResult, @@ -54,3 +53,4 @@ export { MsgUpdateAdmin, MsgStoreCode, } from "./msgs"; +export { Expiration } from "./types"; diff --git a/packages/cosmwasm/types/types.d.ts b/packages/cosmwasm/types/types.d.ts index 45d870c7..33928389 100644 --- a/packages/cosmwasm/types/types.d.ts +++ b/packages/cosmwasm/types/types.d.ts @@ -12,3 +12,13 @@ export declare function parseWasmData({ key, val }: WasmData): Model; * This doen't privide any type safety over `any` but expresses intent in the code. */ export declare type JsonObject = any; +export declare type Expiration = + | { + readonly at_height: number; + } + | { + readonly at_time: number; + } + | { + readonly never: Record; + };