import * as bip39 from "@scure/bip39";
import { wordlist as enWordList } from "@scure/bip39/wordlists/english";
import { wordlist as koWordList } from "@scure/bip39/wordlists/korean";
import { ethers } from "ethers";
const bootstrap = async () => {
const mnemonic =
"물체 일등 이혼 해답 연극 성명 공동 합리적 영역 연세 깜빡 왼쪽";
const enNnemonic = mnemonic
.split(" ")
.map((word) => {
const idx = koWordList.findIndex((w) => word === w);
return enWordList[idx];
})
.join(" ");
const seed = await bip39.mnemonicToSeed(enNnemonic);
const wallet = ethers.Wallet.fromMnemonic(enNnemonic, "m/44'/60'/0'/0/0");
console.log("-->wallet.privateKey : ", wallet.privateKey);
};
bootstrap();