Do not auto-import @cosmjs/launchpad types

This commit is contained in:
Simon Warta 2021-02-10 16:05:48 +01:00
parent 6a32240185
commit 131928dfe5
8 changed files with 27 additions and 36 deletions

View File

@ -1,3 +1,5 @@
import { GasPrice, GasLimits, makeCosmoshubPath, Secp256k1HdWallet } from "@cosmjs/launchpad";
interface Options {
readonly httpUrl: string;
readonly bech32prefix: string;

View File

@ -1,3 +1,5 @@
import { coin, coins, makeSignDoc, makeStdTx, CosmosClient, MsgDelegate, Secp256k1HdWallet } from "@cosmjs/launchpad";
const wallet = await Secp256k1HdWallet.fromMnemonic(
"enlist hip relief stomach skate base shallow young switch frequent cry park",
);

View File

@ -1,3 +1,5 @@
import { makeCosmoshubPath, Secp256k1HdWallet } from "@cosmjs/launchpad";
const mnemonic =
"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone";

View File

@ -1,3 +1,5 @@
import { encodeSecp256k1Pubkey, Secp256k1HdWallet } from "@cosmjs/launchpad";
const mnemonic = Bip39.encode(Random.getBytes(16)).toString();
const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic);
const [{ address, pubkey }] = await wallet.getAccounts();

View File

@ -1,6 +1,8 @@
import axios from "axios";
import * as fs from "fs";
import { logs, GasPrice, Secp256k1HdWallet } from "@cosmjs/launchpad";
interface Options {
httpUrl: string;
networkId: string;

View File

@ -1,3 +1,5 @@
import { LcdClient, Secp256k1HdWallet, StdFee } from "@cosmjs/launchpad";
const defaultHttpUrl = "http://localhost:1317";
const defaultNetworkId = "testing";
const defaultFee: StdFee = {

View File

@ -1,3 +1,5 @@
import { Coin } from "@cosmjs/launchpad";
// types auto-generated by wasm.glass and cleaned up manually
export type HandleMsg =
| {

View File

@ -87,42 +87,6 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
["fromAscii", "fromBase64", "fromHex", "fromUtf8", "toAscii", "toBase64", "toHex", "toUtf8", "Bech32"],
],
["@cosmjs/faucet-client", ["FaucetClient"]],
[
"@cosmjs/launchpad",
[
"coin",
"coins",
"decodeAminoPubkey",
"decodeBech32Pubkey",
"encodeAminoPubkey",
"encodeBech32Pubkey",
"encodeSecp256k1Pubkey",
"encodeSecp256k1Signature",
"logs",
"makeCosmoshubPath",
"makeSignDoc",
"makeStdTx",
"IndexedTx",
"BroadcastTxResult",
"Coin",
"CosmosClient",
"GasLimits",
"GasPrice",
"Msg",
"MsgDelegate",
"MsgSend",
"LcdClient",
"OfflineSigner",
"PubKey",
"pubkeyToAddress",
"Secp256k1HdWallet",
"Secp256k1Wallet",
"SigningCosmosClient",
"StdFee",
"StdSignDoc",
"StdTx",
],
],
["@cosmjs/math", ["Decimal", "Int53", "Uint32", "Uint53", "Uint64"]],
["@cosmjs/utils", ["assert", "arrayContentEquals", "sleep"]],
]);
@ -144,6 +108,19 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
import axios from "axios";
import * as fs from "fs";
import {
coins,
encodeAminoPubkey,
encodeBech32Pubkey,
decodeBech32Pubkey,
decodeAminoPubkey,
makeCosmoshubPath,
makeSignDoc,
Secp256k1HdWallet,
Secp256k1Wallet,
StdFee,
} from "@cosmjs/launchpad";
await sleep(123);
const readmeContent = fs.readFileSync(process.cwd() + "/README.md");