@xyo-network/bip39 2.84.6 → 2.84.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18499,10 +18499,10 @@ var calcChecksum = (entropy) => {
18499
18499
  function getCoder(wordlist10) {
18500
18500
  if (!Array.isArray(wordlist10) || wordlist10.length !== 2048 || typeof wordlist10[0] !== "string")
18501
18501
  throw new Error("Worlist: expected array of 2048 strings");
18502
- wordlist10.forEach((i) => {
18502
+ for (const i of wordlist10) {
18503
18503
  if (typeof i !== "string")
18504
18504
  throw new Error(`Wordlist: non-string element: ${i}`);
18505
- });
18505
+ }
18506
18506
  return baseUtils.chain(baseUtils.checksum(1, calcChecksum), baseUtils.radix2(11, true), baseUtils.alphabet(wordlist10));
18507
18507
  }
18508
18508
  function mnemonicToEntropy(mnemonic, wordlist10) {
@@ -18519,7 +18519,7 @@ function entropyToMnemonic(entropy, wordlist10) {
18519
18519
  function validateMnemonic(mnemonic, wordlist10) {
18520
18520
  try {
18521
18521
  mnemonicToEntropy(mnemonic, wordlist10);
18522
- } catch (e) {
18522
+ } catch {
18523
18523
  return false;
18524
18524
  }
18525
18525
  return true;