Merge pull request #569 from cosmos/491-cosmwasm-preparation

Prepare CosmWasm package for CosmWasm Stargate support
This commit is contained in:
mergify[bot] 2020-12-10 16:31:02 +00:00 committed by GitHub
commit 360bd6b56c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 6 deletions

View File

@ -4,6 +4,8 @@
- @cosmjs/cosmwasm: `logs` is no longer exported. Use `logs` from
@cosmjs/launchpad instead.
- @cosmjs/cosmwasm: Export `JsonObject`, `ChangeAdminResult` and `WasmData`
types as well as `isValidBuilder` and `parseWasmData` functions.
- @cosmjs/launchpad: Add `Secp256k1Wallet` to manage a single raw secp256k1
keypair.
- @cosmjs/launchpad: `OfflineSigner` types `sign` method renamed `signAmino`

View File

@ -1,3 +1,4 @@
export { isValidBuilder } from "./builder";
export { Expiration } from "./interfaces";
export { setupWasmExtension, WasmExtension } from "./lcdapi/wasm";
@ -32,6 +33,7 @@ export {
VotersResult,
} from "./cw3cosmwasmclient";
export {
ChangeAdminResult,
ExecuteResult,
CosmWasmFeeTable,
InstantiateOptions,
@ -55,3 +57,4 @@ export {
MsgUpdateAdmin,
MsgStoreCode,
} from "./msgs";
export { JsonObject, parseWasmData, WasmData } from "./types";

View File

@ -45,12 +45,12 @@ export interface CosmWasmFeeTable extends CosmosFeeTable {
readonly changeAdmin: StdFee;
}
function prepareBuilder(buider: string | undefined): string {
if (buider === undefined) {
function prepareBuilder(builder: string | undefined): string {
if (builder === undefined) {
return ""; // normalization needed by backend
} else {
if (!isValidBuilder(buider)) throw new Error("The builder (Docker Hub image with tag) is not valid");
return buider;
if (!isValidBuilder(builder)) throw new Error("The builder (Docker Hub image with tag) is not valid");
return builder;
}
}

View File

@ -22,6 +22,6 @@ export function parseWasmData({ key, val }: WasmData): Model {
/**
* An object containing a parsed JSON document. The result of JSON.parse().
* This doen't privide any type safety over `any` but expresses intent in the code.
* This doesn't provide any type safety over `any` but expresses intent in the code.
*/
export type JsonObject = any;

View File

@ -1,3 +1,4 @@
export { isValidBuilder } from "./builder";
export { Expiration } from "./interfaces";
export { setupWasmExtension, WasmExtension } from "./lcdapi/wasm";
export { BankMsg, CosmosMsg, CustomMsg, StakingMsg, WasmMsg } from "./cosmosmsg";
@ -31,6 +32,7 @@ export {
VotersResult,
} from "./cw3cosmwasmclient";
export {
ChangeAdminResult,
ExecuteResult,
CosmWasmFeeTable,
InstantiateOptions,
@ -54,3 +56,4 @@ export {
MsgUpdateAdmin,
MsgStoreCode,
} from "./msgs";
export { JsonObject, parseWasmData, WasmData } from "./types";

View File

@ -9,6 +9,6 @@ export interface Model {
export declare function parseWasmData({ key, val }: WasmData): Model;
/**
* An object containing a parsed JSON document. The result of JSON.parse().
* This doen't privide any type safety over `any` but expresses intent in the code.
* This doesn't provide any type safety over `any` but expresses intent in the code.
*/
export declare type JsonObject = any;