Move Expiration to cw0 module and add link to source
This commit is contained in:
parent
d8ed695ae5
commit
8e1cb34312
@ -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[];
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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";
|
||||
|
||||
15
packages/cosmwasm/src/interfaces/cw0.ts
Normal file
15
packages/cosmwasm/src/interfaces/cw0.ts
Normal 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>;
|
||||
};
|
||||
1
packages/cosmwasm/src/interfaces/index.ts
Normal file
1
packages/cosmwasm/src/interfaces/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export { Expiration } from "./cw0";
|
||||
@ -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>;
|
||||
};
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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",
|
||||
|
||||
2
packages/cosmwasm/types/index.d.ts
vendored
2
packages/cosmwasm/types/index.d.ts
vendored
@ -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";
|
||||
|
||||
13
packages/cosmwasm/types/interfaces/cw0.d.ts
vendored
Normal file
13
packages/cosmwasm/types/interfaces/cw0.d.ts
vendored
Normal 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>;
|
||||
};
|
||||
1
packages/cosmwasm/types/interfaces/index.d.ts
vendored
Normal file
1
packages/cosmwasm/types/interfaces/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export { Expiration } from "./cw0";
|
||||
10
packages/cosmwasm/types/types.d.ts
vendored
10
packages/cosmwasm/types/types.d.ts
vendored
@ -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>;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user