mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
cli: Update for hd wallet change
This commit is contained in:
parent
ae0d1a98a7
commit
6ace51decd
@ -5,7 +5,7 @@ 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";
|
||||
|
||||
for (let i of [0, 1, 2, 3, 4]) {
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, makeCosmoshubPath(i), "cosmos");
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, { hdPath: makeCosmoshubPath(i) });
|
||||
const [{ address, pubkey }] = await wallet.getAccounts();
|
||||
console.info(`Address ${i}: ${address}`);
|
||||
console.info(`Pubkey ${i}: ${toBase64(pubkey)}`);
|
||||
|
@ -111,7 +111,7 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
|
||||
assert(accounts[0].address == "cosmos1kxt5x5q2l57ma2d434pqpafxdm0mgeg9c8cvtx");
|
||||
|
||||
const mnemonic = Bip39.encode(Random.getBytes(16)).toString();
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, makeCosmoshubPath(0));
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, { hdPath: makeCosmoshubPath(0) });
|
||||
const [{ address }] = await wallet.getAccounts();
|
||||
const data = toAscii("foo bar");
|
||||
const fee: StdFee = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user