From bfbb01c6bfe9f68dd9a21508e6854e7443ea9303 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 15 Sep 2020 13:33:58 +0200 Subject: [PATCH] cli: Use HdPath type --- packages/cli/examples/coralnet.ts | 12 ++++++------ packages/cli/src/cli.ts | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/cli/examples/coralnet.ts b/packages/cli/examples/coralnet.ts index 9a489f66..c6c9117c 100644 --- a/packages/cli/examples/coralnet.ts +++ b/packages/cli/examples/coralnet.ts @@ -1,20 +1,20 @@ interface Options { readonly httpUrl: string; readonly bech32prefix: string; - readonly hdPath: readonly Slip10RawIndex[]; + readonly hdPath: HdPath; readonly gasPrice: GasPrice; readonly gasLimits: Partial>; // only set the ones you want to override } const coralnetOptions: Options = { - httpUrl: 'https://lcd.coralnet.cosmwasm.com', + httpUrl: "https://lcd.coralnet.cosmwasm.com", gasPrice: GasPrice.fromString("0.025ushell"), - bech32prefix: 'coral', + bech32prefix: "coral", hdPath: makeCosmoshubPath(0), - gasLimits: { + gasLimits: { upload: 1500000, - } -} + }, +}; const wallet = await Secp256k1Wallet.generate(12, coralnetOptions.hdPath, coralnetOptions.bech32prefix); const [{ address }] = await wallet.getAccounts(); diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index e84a737e..b338bce1 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -71,6 +71,7 @@ export async function main(originalArgs: readonly string[]): Promise { "Ed25519", "Ed25519Keypair", "EnglishMnemonic", + "HdPath", "Random", "Secp256k1", "Sha256",