Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.serializeTransaction = transactions_1.serialize;
var units_1 = require("@ethersproject/units");
exports.commify = units_1.commify;
exports.formatEther = units_1.formatEther;
exports.parseEther = units_1.parseEther;
exports.formatUnits = units_1.formatUnits;
exports.parseUnits = units_1.parseUnits;
var wallet_1 = require("@ethersproject/wallet");
exports.verifyMessage = wallet_1.verifyMessage;
var web_1 = require("@ethersproject/web");
exports.fetchJson = web_1.fetchJson;
exports.poll = web_1.poll;
////////////////////////
// Enums
var sha2_2 = require("@ethersproject/sha2");
exports.SupportedAlgorithms = sha2_2.SupportedAlgorithms;
var strings_2 = require("@ethersproject/strings");
exports.UnicodeNormalizationForm = strings_2.UnicodeNormalizationForm;
HDNode._fromSeed = function (seed, mnemonic) {
var seedArray = bytes_1.arrayify(seed);
if (seedArray.length < 16 || seedArray.length > 64) {
throw new Error("invalid seed");
}
var I = bytes_1.arrayify(sha2_1.computeHmac(sha2_1.SupportedAlgorithms.sha512, MasterSecret, seedArray));
return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic, "m");
};
HDNode.fromMnemonic = function (mnemonic, password, wordlist) {