@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.
- package/dist/browser/index.cjs +3 -3
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +3 -3
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +4 -4
package/dist/browser/index.cjs
CHANGED
|
@@ -18539,10 +18539,10 @@ var calcChecksum = (entropy) => {
|
|
|
18539
18539
|
function getCoder(wordlist10) {
|
|
18540
18540
|
if (!Array.isArray(wordlist10) || wordlist10.length !== 2048 || typeof wordlist10[0] !== "string")
|
|
18541
18541
|
throw new Error("Worlist: expected array of 2048 strings");
|
|
18542
|
-
|
|
18542
|
+
for (const i of wordlist10) {
|
|
18543
18543
|
if (typeof i !== "string")
|
|
18544
18544
|
throw new Error(`Wordlist: non-string element: ${i}`);
|
|
18545
|
-
}
|
|
18545
|
+
}
|
|
18546
18546
|
return import_base.utils.chain(import_base.utils.checksum(1, calcChecksum), import_base.utils.radix2(11, true), import_base.utils.alphabet(wordlist10));
|
|
18547
18547
|
}
|
|
18548
18548
|
function mnemonicToEntropy(mnemonic, wordlist10) {
|
|
@@ -18559,7 +18559,7 @@ function entropyToMnemonic(entropy, wordlist10) {
|
|
|
18559
18559
|
function validateMnemonic(mnemonic, wordlist10) {
|
|
18560
18560
|
try {
|
|
18561
18561
|
mnemonicToEntropy(mnemonic, wordlist10);
|
|
18562
|
-
} catch
|
|
18562
|
+
} catch {
|
|
18563
18563
|
return false;
|
|
18564
18564
|
}
|
|
18565
18565
|
return true;
|