@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/node/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
18522
|
+
} catch {
|
|
18523
18523
|
return false;
|
|
18524
18524
|
}
|
|
18525
18525
|
return true;
|