Move Expiration to cw0 module and add link to source

This commit is contained in:
Simon Warta 2020-11-30 14:47:36 +01:00
parent d8ed695ae5
commit 8e1cb34312
12 changed files with 37 additions and 28 deletions

View File

@ -2,8 +2,8 @@
import { Coin } from "@cosmjs/launchpad";
import { Cw1CosmWasmClient } from "./cw1cosmwasmclient";
import { Expiration } from "./interfaces";
import { ExecuteResult } from "./signingcosmwasmclient";
import { Expiration } from "./types";
export interface AllowanceResult {
readonly balance: readonly Coin[];

View File

@ -3,8 +3,8 @@ import { BroadcastMode, GasLimits, GasPrice, OfflineSigner } from "@cosmjs/launc
import { CosmosMsg } from "./cosmosmsg";
import { Account } from "./cosmwasmclient";
import { Expiration } from "./interfaces";
import { CosmWasmFeeTable, ExecuteResult, SigningCosmWasmClient } from "./signingcosmwasmclient";
import { Expiration } from "./types";
export enum Vote {
Yes = "yes",

View File

@ -1,4 +1,6 @@
export { Expiration } from "./interfaces";
export { setupWasmExtension, WasmExtension } from "./lcdapi/wasm";
export { BankMsg, CosmosMsg, CustomMsg, StakingMsg, WasmMsg } from "./cosmosmsg";
export {
Account,
@ -53,4 +55,3 @@ export {
MsgUpdateAdmin,
MsgStoreCode,
} from "./msgs";
export { Expiration } from "./types";

View File

@ -0,0 +1,15 @@
/* eslint-disable @typescript-eslint/naming-convention */
/**
* @see https://github.com/CosmWasm/cosmwasm-plus/blob/v0.3.2/packages/cw0/src/expiration.rs#L14
*/
export type Expiration =
| {
readonly at_height: number;
}
| {
readonly at_time: number;
}
| {
readonly never: Record<any, never>;
};

View File

@ -0,0 +1 @@
export { Expiration } from "./cw0";

View File

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { fromBase64, fromHex } from "@cosmjs/encoding";
export interface WasmData {
@ -26,14 +25,3 @@ 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>;
};

View File

@ -1,7 +1,7 @@
import { Coin } from "@cosmjs/launchpad";
import { Cw1CosmWasmClient } from "./cw1cosmwasmclient";
import { Expiration } from "./interfaces";
import { ExecuteResult } from "./signingcosmwasmclient";
import { Expiration } from "./types";
export interface AllowanceResult {
readonly balance: readonly Coin[];
readonly expires: Expiration;

View File

@ -1,8 +1,8 @@
import { BroadcastMode, GasLimits, GasPrice, OfflineSigner } from "@cosmjs/launchpad";
import { CosmosMsg } from "./cosmosmsg";
import { Account } from "./cosmwasmclient";
import { Expiration } from "./interfaces";
import { CosmWasmFeeTable, ExecuteResult, SigningCosmWasmClient } from "./signingcosmwasmclient";
import { Expiration } from "./types";
export declare enum Vote {
Yes = "yes",
No = "no",

View File

@ -1,3 +1,4 @@
export { Expiration } from "./interfaces";
export { setupWasmExtension, WasmExtension } from "./lcdapi/wasm";
export { BankMsg, CosmosMsg, CustomMsg, StakingMsg, WasmMsg } from "./cosmosmsg";
export {
@ -53,4 +54,3 @@ export {
MsgUpdateAdmin,
MsgStoreCode,
} from "./msgs";
export { Expiration } from "./types";

View File

@ -0,0 +1,13 @@
/**
* @see https://github.com/CosmWasm/cosmwasm-plus/blob/v0.3.2/packages/cw0/src/expiration.rs#L14
*/
export declare type Expiration =
| {
readonly at_height: number;
}
| {
readonly at_time: number;
}
| {
readonly never: Record<any, never>;
};

View File

@ -0,0 +1 @@
export { Expiration } from "./cw0";

View File

@ -12,13 +12,3 @@ 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>;
};