mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
scripts: Fix wasmd/generate_addresses.js
This commit is contained in:
parent
47568bbe41
commit
69f996a1f1
@ -35,18 +35,11 @@ const accountsToCreate = [
|
||||
|
||||
async function main() {
|
||||
for (const { mnemonic, accountNumbers } of accountsToCreate) {
|
||||
const wallets = await Promise.all(
|
||||
accountNumbers.map((accountNumber) =>
|
||||
Secp256k1HdWallet.fromMnemonic(mnemonic, {
|
||||
hdPath: makeCosmoshubPath(accountNumber),
|
||||
prefix: prefix,
|
||||
}),
|
||||
),
|
||||
);
|
||||
const accounts = (await Promise.all(wallets.map((wallet) => wallet.getAccounts()))).map(
|
||||
(accountsForWallet) => accountsForWallet[0],
|
||||
);
|
||||
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, {
|
||||
prefix: prefix,
|
||||
hdPaths: accountNumbers.map(makeCosmoshubPath),
|
||||
});
|
||||
const accounts = await wallet.getAccounts();
|
||||
console.info("=".repeat(process.stdout.columns));
|
||||
console.info("mnemonic:", mnemonic);
|
||||
for (const { address, pubkey } of accounts) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user