cosmwasm: Move Expiration type into types file
This commit is contained in:
parent
c274594935
commit
c9d5cc50d4
@ -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",
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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<any, never>;
|
||||
};
|
||||
|
||||
@ -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",
|
||||
|
||||
2
packages/cosmwasm/types/index.d.ts
vendored
2
packages/cosmwasm/types/index.d.ts
vendored
@ -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";
|
||||
|
||||
10
packages/cosmwasm/types/types.d.ts
vendored
10
packages/cosmwasm/types/types.d.ts
vendored
@ -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<any, never>;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user