mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-23 23:37:59 +00:00
12 lines
527 B
JavaScript
12 lines
527 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.mnemonicToEntropy = mnemonicToEntropy;
|
|
const util_1 = require("@pezkuwi/util");
|
|
const wasm_crypto_1 = require("@pezkuwi/wasm-crypto");
|
|
const bip39_js_1 = require("./bip39.js");
|
|
function mnemonicToEntropy(mnemonic, wordlist, onlyJs) {
|
|
return !util_1.hasBigInt || (!wordlist && !onlyJs && (0, wasm_crypto_1.isReady)())
|
|
? (0, wasm_crypto_1.bip39ToEntropy)(mnemonic)
|
|
: (0, bip39_js_1.mnemonicToEntropy)(mnemonic, wordlist);
|
|
}
|