Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
// the options are optional, so adjust the call as needed
if (typeof(options) === "function" && !progressCallback) {
progressCallback = options;
options = {};
}
if (!options) { options = {}; }
const privateKey: Uint8Array = arrayify(account.privateKey);
const passwordBytes = getPassword(password);
let entropy: Uint8Array = null
let path: string = account.path;
if (account.mnemonic) {
entropy = arrayify(mnemonicToEntropy(account.mnemonic));
if (!path) { path = defaultPath; }
}
let client = options.client;
if (!client) { client = "ethers.js"; }
// Check/generate the salt
let salt: Uint8Array = null;
if (options.salt) {
salt = arrayify(options.salt);
} else {
salt = randomBytes(32);;
}
// Override initialization vector
let iv: Uint8Array = null;
return Promise.reject(e);
}
// the options are optional, so adjust the call as needed
if (typeof (options) === "function" && !progressCallback) {
progressCallback = options;
options = {};
}
if (!options) {
options = {};
}
var privateKey = bytes_1.arrayify(account.privateKey);
var passwordBytes = utils_1.getPassword(password);
var entropy = null;
var path = account.path;
if (account.mnemonic) {
entropy = bytes_1.arrayify(hdnode_1.mnemonicToEntropy(account.mnemonic));
if (!path) {
path = hdnode_1.defaultPath;
}
}
var client = options.client;
if (!client) {
client = "ethers.js";
}
// Check/generate the salt
var salt = null;
if (options.salt) {
salt = bytes_1.arrayify(options.salt);
}
else {
salt = random_1.randomBytes(32);
;
return Promise.reject(e);
}
// the options are optional, so adjust the call as needed
if (typeof (options) === "function" && !progressCallback) {
progressCallback = options;
options = {};
}
if (!options) {
options = {};
}
const privateKey = arrayify(account.privateKey);
const passwordBytes = getPassword(password);
let entropy = null;
let path = account.path;
if (account.mnemonic) {
entropy = arrayify(mnemonicToEntropy(account.mnemonic));
if (!path) {
path = defaultPath;
}
}
let client = options.client;
if (!client) {
client = "ethers.js";
}
// Check/generate the salt
let salt = null;
if (options.salt) {
salt = arrayify(options.salt);
}
else {
salt = randomBytes(32);
;