cosmjs-util/packages/cli/examples/faucet_addresses.ts
2020-08-03 07:49:26 +02:00

10 lines
467 B
TypeScript

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 Secp256k1Wallet.fromMnemonic(mnemonic, makeCosmoshubPath(i), "cosmos");
const [{ address, pubkey }] = await wallet.getAccounts();
console.info(`Address ${i}: ${address}`);
console.info(`Pubkey ${i}: ${toBase64(pubkey)}`);
}