Updated dist files.
This commit is contained in:
parent
af10705632
commit
ba404ffb0b
2
.gitignore
vendored
2
.gitignore
vendored
@ -18,3 +18,5 @@ lerna-debug.log
|
||||
packages/*/tsconfig.tsbuildinfo
|
||||
|
||||
packages/testcases/input/nameprep/**
|
||||
|
||||
.nyc_output/**
|
||||
|
@ -3,6 +3,13 @@ Changelog
|
||||
|
||||
This change log is managed by `scripts/cmds/update-versions` but may be manually updated.
|
||||
|
||||
ethers/v5.0.7 (2020-07-20 02:22)
|
||||
--------------------------------
|
||||
|
||||
- Fix Logger setLogLevel with enum case mismatch. ([#947](https://github.com/ethers-io/ethers.js/issues/947); [5443363](https://github.com/ethers-io/ethers.js/commit/5443363de43e92de712e72d55165c3f4d7f652e9), [af10705](https://github.com/ethers-io/ethers.js/commit/af10705632bc1f8203ea50ea7ed3120b01c67122))
|
||||
- Removed UUID dependency from json-wallets. ([#966](https://github.com/ethers-io/ethers.js/issues/966); [e3f7426](https://github.com/ethers-io/ethers.js/commit/e3f7426af4d6d7e43db322700d768216b06433e0))
|
||||
- Removed unnecessary dependency from BigNumber. ([#951](https://github.com/ethers-io/ethers.js/issues/951); [78b350b](https://github.com/ethers-io/ethers.js/commit/78b350bbc5ea73561bf47038743b9e51049496f7))
|
||||
|
||||
ethers/v5.0.6 (2020-07-16 05:54)
|
||||
--------------------------------
|
||||
|
||||
|
59
package-lock.json
generated
59
package-lock.json
generated
@ -647,15 +647,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@istanbuljs/nyc-config-typescript": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-1.0.1.tgz",
|
||||
"integrity": "sha512-/gz6LgVpky205LuoOfwEZmnUtaSmdk0QIMcNFj9OvxhiMhPpKftMgZmGN7jNj7jR+lr8IB1Yks3QSSSNSxfoaQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@istanbuljs/schema": "^0.1.2"
|
||||
}
|
||||
},
|
||||
"@istanbuljs/schema": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz",
|
||||
@ -2335,12 +2326,6 @@
|
||||
"readable-stream": "^2.0.6"
|
||||
}
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||
"dev": true
|
||||
},
|
||||
"argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
@ -2545,12 +2530,6 @@
|
||||
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz",
|
||||
"integrity": "sha1-zFRJaF37hesRyYKKzHy4erW7/MA=",
|
||||
"dev": true
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
|
||||
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -7754,12 +7733,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"make-error": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||
"dev": true
|
||||
},
|
||||
"make-fetch-happen": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz",
|
||||
@ -11481,12 +11454,6 @@
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
||||
"dev": true
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -11684,19 +11651,6 @@
|
||||
"integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=",
|
||||
"dev": true
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.10.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz",
|
||||
"integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
"diff": "^4.0.1",
|
||||
"make-error": "^1.1.1",
|
||||
"source-map-support": "^0.5.17",
|
||||
"yn": "3.1.1"
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
|
||||
@ -12037,9 +11991,10 @@
|
||||
"dev": true
|
||||
},
|
||||
"uuid": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz",
|
||||
"integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w="
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
|
||||
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==",
|
||||
"dev": true
|
||||
},
|
||||
"validate-npm-package-license": {
|
||||
"version": "3.0.4",
|
||||
@ -12510,12 +12465,6 @@
|
||||
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
|
||||
"integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
|
||||
"dev": true
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@erquhart/rollup-plugin-node-builtins": "2.1.5",
|
||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||
"@types/assert": "^1.4.1",
|
||||
"@types/mocha": "^5.2.0",
|
||||
"@types/node": "^12.7.4",
|
||||
@ -66,9 +65,7 @@
|
||||
"rollup-pluginutils": "2.8.1",
|
||||
"scrypt-js": "3.0.1",
|
||||
"semver": "^5.6.0",
|
||||
"source-map-support": "^0.5.19",
|
||||
"tar": "4.4.8",
|
||||
"ts-node": "^8.10.2",
|
||||
"typescript": "3.8.3"
|
||||
}
|
||||
}
|
||||
|
4
packages/ethers/dist/ethers-all.esm.min.js
vendored
4
packages/ethers/dist/ethers-all.esm.min.js
vendored
File diff suppressed because one or more lines are too long
4
packages/ethers/dist/ethers-all.umd.min.js
vendored
4
packages/ethers/dist/ethers-all.umd.min.js
vendored
File diff suppressed because one or more lines are too long
251
packages/ethers/dist/ethers.esm.js
vendored
251
packages/ethers/dist/ethers.esm.js
vendored
@ -3461,7 +3461,7 @@ var bn = createCommonjsModule(function (module) {
|
||||
});
|
||||
var bn_1 = bn.BN;
|
||||
|
||||
const version = "logger/5.0.3";
|
||||
const version = "logger/5.0.4";
|
||||
|
||||
"use strict";
|
||||
let _permanentCensorErrors = false;
|
||||
@ -3745,7 +3745,7 @@ class Logger {
|
||||
_permanentCensorErrors = !!permanent;
|
||||
}
|
||||
static setLogLevel(logLevel) {
|
||||
const level = LogLevels[logLevel];
|
||||
const level = LogLevels[logLevel.toLowerCase()];
|
||||
if (level == null) {
|
||||
Logger.globalLogger().warn("invalid log level - " + logLevel);
|
||||
return;
|
||||
@ -17062,10 +17062,10 @@ catch (error) {
|
||||
anyGlobal = {};
|
||||
}
|
||||
}
|
||||
let crypto$1 = anyGlobal.crypto || anyGlobal.msCrypto;
|
||||
if (!crypto$1 || !crypto$1.getRandomValues) {
|
||||
let crypto = anyGlobal.crypto || anyGlobal.msCrypto;
|
||||
if (!crypto || !crypto.getRandomValues) {
|
||||
logger$k.warn("WARNING: Missing strong random number source");
|
||||
crypto$1 = {
|
||||
crypto = {
|
||||
getRandomValues: function (buffer) {
|
||||
return logger$k.throwError("no secure random source avaialble", Logger.errors.UNSUPPORTED_OPERATION, {
|
||||
operation: "crypto.getRandomValues"
|
||||
@ -17078,7 +17078,7 @@ function randomBytes(length) {
|
||||
logger$k.throwArgumentError("invalid length", "length", length);
|
||||
}
|
||||
const result = new Uint8Array(length);
|
||||
crypto$1.getRandomValues(result);
|
||||
crypto.getRandomValues(result);
|
||||
return arrayify(result);
|
||||
}
|
||||
;
|
||||
@ -17884,7 +17884,7 @@ var aesJs = createCommonjsModule(function (module, exports) {
|
||||
})(commonjsGlobal);
|
||||
});
|
||||
|
||||
const version$i = "json-wallets/5.0.2";
|
||||
const version$i = "json-wallets/5.0.3";
|
||||
|
||||
"use strict";
|
||||
function looseArrayify(hexString) {
|
||||
@ -17927,6 +17927,25 @@ function searchPath(object, path) {
|
||||
}
|
||||
return currentChild;
|
||||
}
|
||||
// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)
|
||||
function uuidV4(randomBytes) {
|
||||
const bytes = arrayify(randomBytes);
|
||||
// Section: 4.1.3:
|
||||
// - time_hi_and_version[12:16] = 0b0100
|
||||
bytes[6] = (bytes[6] & 0x0f) | 0x40;
|
||||
// Section 4.4
|
||||
// - clock_seq_hi_and_reserved[6] = 0b0
|
||||
// - clock_seq_hi_and_reserved[7] = 0b1
|
||||
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
||||
const value = hexlify(bytes);
|
||||
return [
|
||||
value.substring(2, 10),
|
||||
value.substring(10, 14),
|
||||
value.substring(14, 18),
|
||||
value.substring(18, 22),
|
||||
value.substring(22, 34),
|
||||
].join("-");
|
||||
}
|
||||
|
||||
"use strict";
|
||||
const logger$l = new Logger(version$i);
|
||||
@ -18507,220 +18526,6 @@ var scrypt = createCommonjsModule(function (module, exports) {
|
||||
var scrypt_1 = scrypt.scrypt;
|
||||
var scrypt_2 = scrypt.syncScrypt;
|
||||
|
||||
var rng;
|
||||
|
||||
if (commonjsGlobal.crypto && crypto.getRandomValues) {
|
||||
// WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
|
||||
// Moderately fast, high quality
|
||||
var _rnds8 = new Uint8Array(16);
|
||||
rng = function whatwgRNG() {
|
||||
crypto.getRandomValues(_rnds8);
|
||||
return _rnds8;
|
||||
};
|
||||
}
|
||||
|
||||
if (!rng) {
|
||||
// Math.random()-based (RNG)
|
||||
//
|
||||
// If all else fails, use Math.random(). It's fast, but is of unspecified
|
||||
// quality.
|
||||
var _rnds = new Array(16);
|
||||
rng = function() {
|
||||
for (var i = 0, r; i < 16; i++) {
|
||||
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
|
||||
_rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
|
||||
}
|
||||
|
||||
return _rnds;
|
||||
};
|
||||
}
|
||||
|
||||
var rngBrowser = rng;
|
||||
|
||||
// uuid.js
|
||||
//
|
||||
// Copyright (c) 2010-2012 Robert Kieffer
|
||||
// MIT License - http://opensource.org/licenses/mit-license.php
|
||||
|
||||
// Unique ID creation requires a high quality random # generator. We feature
|
||||
// detect to determine the best RNG source, normalizing to a function that
|
||||
// returns 128-bits of randomness, since that's what's usually required
|
||||
|
||||
|
||||
// Maps for number <-> hex string conversion
|
||||
var _byteToHex = [];
|
||||
var _hexToByte = {};
|
||||
for (var i = 0; i < 256; i++) {
|
||||
_byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
||||
_hexToByte[_byteToHex[i]] = i;
|
||||
}
|
||||
|
||||
// **`parse()` - Parse a UUID into it's component bytes**
|
||||
function parse$1(s, buf, offset) {
|
||||
var i = (buf && offset) || 0, ii = 0;
|
||||
|
||||
buf = buf || [];
|
||||
s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
|
||||
if (ii < 16) { // Don't overflow!
|
||||
buf[i + ii++] = _hexToByte[oct];
|
||||
}
|
||||
});
|
||||
|
||||
// Zero out remaining bytes if string was short
|
||||
while (ii < 16) {
|
||||
buf[i + ii++] = 0;
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
// **`unparse()` - Convert UUID byte array (ala parse()) into a string**
|
||||
function unparse(buf, offset) {
|
||||
var i = offset || 0, bth = _byteToHex;
|
||||
return bth[buf[i++]] + bth[buf[i++]] +
|
||||
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
||||
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
||||
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
||||
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
||||
bth[buf[i++]] + bth[buf[i++]] +
|
||||
bth[buf[i++]] + bth[buf[i++]] +
|
||||
bth[buf[i++]] + bth[buf[i++]];
|
||||
}
|
||||
|
||||
// **`v1()` - Generate time-based UUID**
|
||||
//
|
||||
// Inspired by https://github.com/LiosK/UUID.js
|
||||
// and http://docs.python.org/library/uuid.html
|
||||
|
||||
// random #'s we need to init node and clockseq
|
||||
var _seedBytes = rngBrowser();
|
||||
|
||||
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
||||
var _nodeId = [
|
||||
_seedBytes[0] | 0x01,
|
||||
_seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
|
||||
];
|
||||
|
||||
// Per 4.2.2, randomize (14 bit) clockseq
|
||||
var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
|
||||
|
||||
// Previous uuid creation time
|
||||
var _lastMSecs = 0, _lastNSecs = 0;
|
||||
|
||||
// See https://github.com/broofa/node-uuid for API details
|
||||
function v1(options, buf, offset) {
|
||||
var i = buf && offset || 0;
|
||||
var b = buf || [];
|
||||
|
||||
options = options || {};
|
||||
|
||||
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
||||
|
||||
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
||||
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
||||
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
||||
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
||||
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
|
||||
|
||||
// Per 4.2.1.2, use count of uuid's generated during the current clock
|
||||
// cycle to simulate higher resolution clock
|
||||
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
||||
|
||||
// Time since last uuid creation (in msecs)
|
||||
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
|
||||
|
||||
// Per 4.2.1.2, Bump clockseq on clock regression
|
||||
if (dt < 0 && options.clockseq === undefined) {
|
||||
clockseq = clockseq + 1 & 0x3fff;
|
||||
}
|
||||
|
||||
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
||||
// time interval
|
||||
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
||||
nsecs = 0;
|
||||
}
|
||||
|
||||
// Per 4.2.1.2 Throw error if too many uuids are requested
|
||||
if (nsecs >= 10000) {
|
||||
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
||||
}
|
||||
|
||||
_lastMSecs = msecs;
|
||||
_lastNSecs = nsecs;
|
||||
_clockseq = clockseq;
|
||||
|
||||
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
||||
msecs += 12219292800000;
|
||||
|
||||
// `time_low`
|
||||
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
||||
b[i++] = tl >>> 24 & 0xff;
|
||||
b[i++] = tl >>> 16 & 0xff;
|
||||
b[i++] = tl >>> 8 & 0xff;
|
||||
b[i++] = tl & 0xff;
|
||||
|
||||
// `time_mid`
|
||||
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
|
||||
b[i++] = tmh >>> 8 & 0xff;
|
||||
b[i++] = tmh & 0xff;
|
||||
|
||||
// `time_high_and_version`
|
||||
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
||||
b[i++] = tmh >>> 16 & 0xff;
|
||||
|
||||
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
||||
b[i++] = clockseq >>> 8 | 0x80;
|
||||
|
||||
// `clock_seq_low`
|
||||
b[i++] = clockseq & 0xff;
|
||||
|
||||
// `node`
|
||||
var node = options.node || _nodeId;
|
||||
for (var n = 0; n < 6; n++) {
|
||||
b[i + n] = node[n];
|
||||
}
|
||||
|
||||
return buf ? buf : unparse(b);
|
||||
}
|
||||
|
||||
// **`v4()` - Generate random UUID**
|
||||
|
||||
// See https://github.com/broofa/node-uuid for API details
|
||||
function v4(options, buf, offset) {
|
||||
// Deprecated - 'format' argument, as supported in v1.2
|
||||
var i = buf && offset || 0;
|
||||
|
||||
if (typeof(options) == 'string') {
|
||||
buf = options == 'binary' ? new Array(16) : null;
|
||||
options = null;
|
||||
}
|
||||
options = options || {};
|
||||
|
||||
var rnds = options.random || (options.rng || rngBrowser)();
|
||||
|
||||
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
||||
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
||||
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
||||
|
||||
// Copy bytes to buffer, if provided
|
||||
if (buf) {
|
||||
for (var ii = 0; ii < 16; ii++) {
|
||||
buf[i + ii] = rnds[ii];
|
||||
}
|
||||
}
|
||||
|
||||
return buf || unparse(rnds);
|
||||
}
|
||||
|
||||
// Export public API
|
||||
var uuid = v4;
|
||||
uuid.v1 = v1;
|
||||
uuid.v4 = v4;
|
||||
uuid.parse = parse$1;
|
||||
uuid.unparse = unparse;
|
||||
|
||||
var uuid_1 = uuid;
|
||||
|
||||
"use strict";
|
||||
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
@ -18978,7 +18783,7 @@ function encrypt(account, password, options, progressCallback) {
|
||||
// See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition
|
||||
const data = {
|
||||
address: account.address.substring(2).toLowerCase(),
|
||||
id: uuid_1.v4({ random: uuidRandom }),
|
||||
id: uuidV4(uuidRandom),
|
||||
version: 3,
|
||||
Crypto: {
|
||||
cipher: "aes-128-ctr",
|
||||
@ -23613,7 +23418,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
|
||||
Indexed: Indexed
|
||||
});
|
||||
|
||||
const version$o = "ethers/5.0.6";
|
||||
const version$o = "ethers/5.0.7";
|
||||
|
||||
"use strict";
|
||||
const logger$E = new Logger(version$o);
|
||||
|
4
packages/ethers/dist/ethers.esm.min.js
vendored
4
packages/ethers/dist/ethers.esm.min.js
vendored
File diff suppressed because one or more lines are too long
248
packages/ethers/dist/ethers.umd.js
vendored
248
packages/ethers/dist/ethers.umd.js
vendored
@ -3470,7 +3470,7 @@
|
||||
var _version = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "logger/5.0.3";
|
||||
exports.version = "logger/5.0.4";
|
||||
|
||||
});
|
||||
|
||||
@ -3774,7 +3774,7 @@
|
||||
_permanentCensorErrors = !!permanent;
|
||||
};
|
||||
Logger.setLogLevel = function (logLevel) {
|
||||
var level = LogLevels[logLevel];
|
||||
var level = LogLevels[logLevel.toLowerCase()];
|
||||
if (level == null) {
|
||||
Logger.globalLogger().warn("invalid log level - " + logLevel);
|
||||
return;
|
||||
@ -19374,7 +19374,7 @@
|
||||
var _version$A = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "json-wallets/5.0.2";
|
||||
exports.version = "json-wallets/5.0.3";
|
||||
|
||||
});
|
||||
|
||||
@ -19430,6 +19430,26 @@
|
||||
return currentChild;
|
||||
}
|
||||
exports.searchPath = searchPath;
|
||||
// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)
|
||||
function uuidV4(randomBytes) {
|
||||
var bytes = lib$1.arrayify(randomBytes);
|
||||
// Section: 4.1.3:
|
||||
// - time_hi_and_version[12:16] = 0b0100
|
||||
bytes[6] = (bytes[6] & 0x0f) | 0x40;
|
||||
// Section 4.4
|
||||
// - clock_seq_hi_and_reserved[6] = 0b0
|
||||
// - clock_seq_hi_and_reserved[7] = 0b1
|
||||
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
||||
var value = lib$1.hexlify(bytes);
|
||||
return [
|
||||
value.substring(2, 10),
|
||||
value.substring(10, 14),
|
||||
value.substring(14, 18),
|
||||
value.substring(18, 22),
|
||||
value.substring(22, 34),
|
||||
].join("-");
|
||||
}
|
||||
exports.uuidV4 = uuidV4;
|
||||
|
||||
});
|
||||
|
||||
@ -19438,6 +19458,7 @@
|
||||
var utils_2 = utils$1.zpad;
|
||||
var utils_3 = utils$1.getPassword;
|
||||
var utils_4 = utils$1.searchPath;
|
||||
var utils_5 = utils$1.uuidV4;
|
||||
|
||||
var crowdsale = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
@ -20072,220 +20093,6 @@
|
||||
var scrypt_1 = scrypt.scrypt;
|
||||
var scrypt_2 = scrypt.syncScrypt;
|
||||
|
||||
var rng;
|
||||
|
||||
if (commonjsGlobal.crypto && crypto.getRandomValues) {
|
||||
// WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
|
||||
// Moderately fast, high quality
|
||||
var _rnds8 = new Uint8Array(16);
|
||||
rng = function whatwgRNG() {
|
||||
crypto.getRandomValues(_rnds8);
|
||||
return _rnds8;
|
||||
};
|
||||
}
|
||||
|
||||
if (!rng) {
|
||||
// Math.random()-based (RNG)
|
||||
//
|
||||
// If all else fails, use Math.random(). It's fast, but is of unspecified
|
||||
// quality.
|
||||
var _rnds = new Array(16);
|
||||
rng = function() {
|
||||
for (var i = 0, r; i < 16; i++) {
|
||||
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
|
||||
_rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
|
||||
}
|
||||
|
||||
return _rnds;
|
||||
};
|
||||
}
|
||||
|
||||
var rngBrowser = rng;
|
||||
|
||||
// uuid.js
|
||||
//
|
||||
// Copyright (c) 2010-2012 Robert Kieffer
|
||||
// MIT License - http://opensource.org/licenses/mit-license.php
|
||||
|
||||
// Unique ID creation requires a high quality random # generator. We feature
|
||||
// detect to determine the best RNG source, normalizing to a function that
|
||||
// returns 128-bits of randomness, since that's what's usually required
|
||||
|
||||
|
||||
// Maps for number <-> hex string conversion
|
||||
var _byteToHex = [];
|
||||
var _hexToByte = {};
|
||||
for (var i = 0; i < 256; i++) {
|
||||
_byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
||||
_hexToByte[_byteToHex[i]] = i;
|
||||
}
|
||||
|
||||
// **`parse()` - Parse a UUID into it's component bytes**
|
||||
function parse(s, buf, offset) {
|
||||
var i = (buf && offset) || 0, ii = 0;
|
||||
|
||||
buf = buf || [];
|
||||
s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
|
||||
if (ii < 16) { // Don't overflow!
|
||||
buf[i + ii++] = _hexToByte[oct];
|
||||
}
|
||||
});
|
||||
|
||||
// Zero out remaining bytes if string was short
|
||||
while (ii < 16) {
|
||||
buf[i + ii++] = 0;
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
// **`unparse()` - Convert UUID byte array (ala parse()) into a string**
|
||||
function unparse(buf, offset) {
|
||||
var i = offset || 0, bth = _byteToHex;
|
||||
return bth[buf[i++]] + bth[buf[i++]] +
|
||||
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
||||
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
||||
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
||||
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
||||
bth[buf[i++]] + bth[buf[i++]] +
|
||||
bth[buf[i++]] + bth[buf[i++]] +
|
||||
bth[buf[i++]] + bth[buf[i++]];
|
||||
}
|
||||
|
||||
// **`v1()` - Generate time-based UUID**
|
||||
//
|
||||
// Inspired by https://github.com/LiosK/UUID.js
|
||||
// and http://docs.python.org/library/uuid.html
|
||||
|
||||
// random #'s we need to init node and clockseq
|
||||
var _seedBytes = rngBrowser();
|
||||
|
||||
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
||||
var _nodeId = [
|
||||
_seedBytes[0] | 0x01,
|
||||
_seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
|
||||
];
|
||||
|
||||
// Per 4.2.2, randomize (14 bit) clockseq
|
||||
var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
|
||||
|
||||
// Previous uuid creation time
|
||||
var _lastMSecs = 0, _lastNSecs = 0;
|
||||
|
||||
// See https://github.com/broofa/node-uuid for API details
|
||||
function v1(options, buf, offset) {
|
||||
var i = buf && offset || 0;
|
||||
var b = buf || [];
|
||||
|
||||
options = options || {};
|
||||
|
||||
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
||||
|
||||
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
||||
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
||||
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
||||
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
||||
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
|
||||
|
||||
// Per 4.2.1.2, use count of uuid's generated during the current clock
|
||||
// cycle to simulate higher resolution clock
|
||||
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
||||
|
||||
// Time since last uuid creation (in msecs)
|
||||
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
|
||||
|
||||
// Per 4.2.1.2, Bump clockseq on clock regression
|
||||
if (dt < 0 && options.clockseq === undefined) {
|
||||
clockseq = clockseq + 1 & 0x3fff;
|
||||
}
|
||||
|
||||
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
||||
// time interval
|
||||
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
||||
nsecs = 0;
|
||||
}
|
||||
|
||||
// Per 4.2.1.2 Throw error if too many uuids are requested
|
||||
if (nsecs >= 10000) {
|
||||
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
||||
}
|
||||
|
||||
_lastMSecs = msecs;
|
||||
_lastNSecs = nsecs;
|
||||
_clockseq = clockseq;
|
||||
|
||||
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
||||
msecs += 12219292800000;
|
||||
|
||||
// `time_low`
|
||||
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
||||
b[i++] = tl >>> 24 & 0xff;
|
||||
b[i++] = tl >>> 16 & 0xff;
|
||||
b[i++] = tl >>> 8 & 0xff;
|
||||
b[i++] = tl & 0xff;
|
||||
|
||||
// `time_mid`
|
||||
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
|
||||
b[i++] = tmh >>> 8 & 0xff;
|
||||
b[i++] = tmh & 0xff;
|
||||
|
||||
// `time_high_and_version`
|
||||
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
||||
b[i++] = tmh >>> 16 & 0xff;
|
||||
|
||||
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
||||
b[i++] = clockseq >>> 8 | 0x80;
|
||||
|
||||
// `clock_seq_low`
|
||||
b[i++] = clockseq & 0xff;
|
||||
|
||||
// `node`
|
||||
var node = options.node || _nodeId;
|
||||
for (var n = 0; n < 6; n++) {
|
||||
b[i + n] = node[n];
|
||||
}
|
||||
|
||||
return buf ? buf : unparse(b);
|
||||
}
|
||||
|
||||
// **`v4()` - Generate random UUID**
|
||||
|
||||
// See https://github.com/broofa/node-uuid for API details
|
||||
function v4(options, buf, offset) {
|
||||
// Deprecated - 'format' argument, as supported in v1.2
|
||||
var i = buf && offset || 0;
|
||||
|
||||
if (typeof(options) == 'string') {
|
||||
buf = options == 'binary' ? new Array(16) : null;
|
||||
options = null;
|
||||
}
|
||||
options = options || {};
|
||||
|
||||
var rnds = options.random || (options.rng || rngBrowser)();
|
||||
|
||||
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
||||
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
||||
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
||||
|
||||
// Copy bytes to buffer, if provided
|
||||
if (buf) {
|
||||
for (var ii = 0; ii < 16; ii++) {
|
||||
buf[i + ii] = rnds[ii];
|
||||
}
|
||||
}
|
||||
|
||||
return buf || unparse(rnds);
|
||||
}
|
||||
|
||||
// Export public API
|
||||
var uuid = v4;
|
||||
uuid.v1 = v1;
|
||||
uuid.v4 = v4;
|
||||
uuid.parse = parse;
|
||||
uuid.unparse = unparse;
|
||||
|
||||
var uuid_1 = uuid;
|
||||
|
||||
var keystore = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
|
||||
@ -20350,7 +20157,6 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var aes_js_1 = __importDefault(aesJs);
|
||||
var scrypt$1 = __importStar(scrypt);
|
||||
var uuid_1$1 = __importDefault(uuid_1);
|
||||
|
||||
|
||||
|
||||
@ -20625,7 +20431,7 @@
|
||||
// See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition
|
||||
var data = {
|
||||
address: account.address.substring(2).toLowerCase(),
|
||||
id: uuid_1$1.default.v4({ random: uuidRandom }),
|
||||
id: utils$1.uuidV4(uuidRandom),
|
||||
version: 3,
|
||||
Crypto: {
|
||||
cipher: "aes-128-ctr",
|
||||
@ -26729,7 +26535,7 @@
|
||||
var utils_2$1 = utils$3.checkResultErrors;
|
||||
var utils_3$1 = utils$3.defaultAbiCoder;
|
||||
var utils_4$1 = utils$3.EventFragment;
|
||||
var utils_5 = utils$3.FormatTypes;
|
||||
var utils_5$1 = utils$3.FormatTypes;
|
||||
var utils_6 = utils$3.Fragment;
|
||||
var utils_7 = utils$3.FunctionFragment;
|
||||
var utils_8 = utils$3.Indexed;
|
||||
@ -26817,7 +26623,7 @@
|
||||
var _version$M = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "ethers/5.0.6";
|
||||
exports.version = "ethers/5.0.7";
|
||||
|
||||
});
|
||||
|
||||
|
4
packages/ethers/dist/ethers.umd.min.js
vendored
4
packages/ethers/dist/ethers.umd.min.js
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/lib.esm/_version.d.ts
vendored
2
packages/ethers/lib.esm/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "ethers/5.0.6";
|
||||
export declare const version = "ethers/5.0.7";
|
||||
|
@ -1,2 +1,2 @@
|
||||
export const version = "ethers/5.0.6";
|
||||
export const version = "ethers/5.0.7";
|
||||
//# sourceMappingURL=_version.js.map
|
2
packages/ethers/lib/_version.d.ts
vendored
2
packages/ethers/lib/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "ethers/5.0.6";
|
||||
export declare const version = "ethers/5.0.7";
|
||||
|
@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "ethers/5.0.6";
|
||||
exports.version = "ethers/5.0.7";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -49,7 +49,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x5cbf72bd9673e75ea995c21e8f0bd9acf2173e13d38417206b955c146581fc5d",
|
||||
"tarballHash": "0x17ba6d6f28b5eddd096e17f9c1c855d4c9559f25de72246080f61ea22ca640a1",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.6"
|
||||
"version": "5.0.7"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "ethers/5.0.6";
|
||||
export const version = "ethers/5.0.7";
|
||||
|
2
packages/json-wallets/lib.esm/_version.d.ts
vendored
2
packages/json-wallets/lib.esm/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "json-wallets/5.0.2";
|
||||
export declare const version = "json-wallets/5.0.3";
|
||||
|
@ -1,2 +1,2 @@
|
||||
export const version = "json-wallets/5.0.2";
|
||||
export const version = "json-wallets/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
};
|
||||
import aes from "aes-js";
|
||||
import * as scrypt from "scrypt-js";
|
||||
import uuid from "uuid";
|
||||
import { getAddress } from "@ethersproject/address";
|
||||
import { arrayify, concat, hexlify } from "@ethersproject/bytes";
|
||||
import { defaultPath, entropyToMnemonic, HDNode, mnemonicToEntropy } from "@ethersproject/hdnode";
|
||||
@ -19,7 +18,7 @@ import { pbkdf2 as _pbkdf2 } from "@ethersproject/pbkdf2";
|
||||
import { randomBytes } from "@ethersproject/random";
|
||||
import { Description } from "@ethersproject/properties";
|
||||
import { computeAddress } from "@ethersproject/transactions";
|
||||
import { getPassword, looseArrayify, searchPath, zpad } from "./utils";
|
||||
import { getPassword, looseArrayify, searchPath, uuidV4, zpad } from "./utils";
|
||||
import { Logger } from "@ethersproject/logger";
|
||||
import { version } from "./_version";
|
||||
const logger = new Logger(version);
|
||||
@ -269,7 +268,7 @@ export function encrypt(account, password, options, progressCallback) {
|
||||
// See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition
|
||||
const data = {
|
||||
address: account.address.substring(2).toLowerCase(),
|
||||
id: uuid.v4({ random: uuidRandom }),
|
||||
id: uuidV4(uuidRandom),
|
||||
version: 3,
|
||||
Crypto: {
|
||||
cipher: "aes-128-ctr",
|
||||
|
File diff suppressed because one or more lines are too long
3
packages/json-wallets/lib.esm/utils.d.ts
vendored
3
packages/json-wallets/lib.esm/utils.d.ts
vendored
@ -1,5 +1,6 @@
|
||||
import { Bytes } from "@ethersproject/bytes";
|
||||
import { Bytes, BytesLike } from "@ethersproject/bytes";
|
||||
export declare function looseArrayify(hexString: string): Uint8Array;
|
||||
export declare function zpad(value: String | number, length: number): String;
|
||||
export declare function getPassword(password: Bytes | string): Uint8Array;
|
||||
export declare function searchPath(object: any, path: string): string;
|
||||
export declare function uuidV4(randomBytes: BytesLike): string;
|
||||
|
@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
import { arrayify } from "@ethersproject/bytes";
|
||||
import { arrayify, hexlify } from "@ethersproject/bytes";
|
||||
import { toUtf8Bytes, UnicodeNormalizationForm } from '@ethersproject/strings';
|
||||
export function looseArrayify(hexString) {
|
||||
if (typeof (hexString) === 'string' && hexString.substring(0, 2) !== '0x') {
|
||||
@ -41,4 +41,23 @@ export function searchPath(object, path) {
|
||||
}
|
||||
return currentChild;
|
||||
}
|
||||
// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)
|
||||
export function uuidV4(randomBytes) {
|
||||
const bytes = arrayify(randomBytes);
|
||||
// Section: 4.1.3:
|
||||
// - time_hi_and_version[12:16] = 0b0100
|
||||
bytes[6] = (bytes[6] & 0x0f) | 0x40;
|
||||
// Section 4.4
|
||||
// - clock_seq_hi_and_reserved[6] = 0b0
|
||||
// - clock_seq_hi_and_reserved[7] = 0b1
|
||||
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
||||
const value = hexlify(bytes);
|
||||
return [
|
||||
value.substring(2, 10),
|
||||
value.substring(10, 14),
|
||||
value.substring(14, 18),
|
||||
value.substring(18, 22),
|
||||
value.substring(22, 34),
|
||||
].join("-");
|
||||
}
|
||||
//# sourceMappingURL=utils.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src.ts/utils.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAS,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC3C,IAAI,OAAM,CAAC,SAAS,CAAC,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE;QACtE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;KAChC;IACD,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,KAAsB,EAAE,MAAc;IACvD,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACtB,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE;QAAE,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;KAAE;IACtD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAwB;IAChD,IAAI,OAAM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D;AAC1D,MAAM,UAAU,MAAM,CAAC,WAAsB;IACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAEpC,kBAAkB;IAClB,wCAAwC;IACxC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAEpC,cAAc;IACd,uCAAuC;IACvC,uCAAuC;IACvC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAEpC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAE7B,OAAO;QACJ,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;QACtB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;KACzB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChB,CAAC"}
|
2
packages/json-wallets/lib/_version.d.ts
vendored
2
packages/json-wallets/lib/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "json-wallets/5.0.2";
|
||||
export declare const version = "json-wallets/5.0.3";
|
||||
|
@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "json-wallets/5.0.2";
|
||||
exports.version = "json-wallets/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -61,7 +61,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var aes_js_1 = __importDefault(require("aes-js"));
|
||||
var scrypt = __importStar(require("scrypt-js"));
|
||||
var uuid_1 = __importDefault(require("uuid"));
|
||||
var address_1 = require("@ethersproject/address");
|
||||
var bytes_1 = require("@ethersproject/bytes");
|
||||
var hdnode_1 = require("@ethersproject/hdnode");
|
||||
@ -336,7 +335,7 @@ function encrypt(account, password, options, progressCallback) {
|
||||
// See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition
|
||||
var data = {
|
||||
address: account.address.substring(2).toLowerCase(),
|
||||
id: uuid_1.default.v4({ random: uuidRandom }),
|
||||
id: utils_1.uuidV4(uuidRandom),
|
||||
version: 3,
|
||||
Crypto: {
|
||||
cipher: "aes-128-ctr",
|
||||
|
File diff suppressed because one or more lines are too long
3
packages/json-wallets/lib/utils.d.ts
vendored
3
packages/json-wallets/lib/utils.d.ts
vendored
@ -1,5 +1,6 @@
|
||||
import { Bytes } from "@ethersproject/bytes";
|
||||
import { Bytes, BytesLike } from "@ethersproject/bytes";
|
||||
export declare function looseArrayify(hexString: string): Uint8Array;
|
||||
export declare function zpad(value: String | number, length: number): String;
|
||||
export declare function getPassword(password: Bytes | string): Uint8Array;
|
||||
export declare function searchPath(object: any, path: string): string;
|
||||
export declare function uuidV4(randomBytes: BytesLike): string;
|
||||
|
@ -46,4 +46,24 @@ function searchPath(object, path) {
|
||||
return currentChild;
|
||||
}
|
||||
exports.searchPath = searchPath;
|
||||
// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)
|
||||
function uuidV4(randomBytes) {
|
||||
var bytes = bytes_1.arrayify(randomBytes);
|
||||
// Section: 4.1.3:
|
||||
// - time_hi_and_version[12:16] = 0b0100
|
||||
bytes[6] = (bytes[6] & 0x0f) | 0x40;
|
||||
// Section 4.4
|
||||
// - clock_seq_hi_and_reserved[6] = 0b0
|
||||
// - clock_seq_hi_and_reserved[7] = 0b1
|
||||
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
||||
var value = bytes_1.hexlify(bytes);
|
||||
return [
|
||||
value.substring(2, 10),
|
||||
value.substring(10, 14),
|
||||
value.substring(14, 18),
|
||||
value.substring(18, 22),
|
||||
value.substring(22, 34),
|
||||
].join("-");
|
||||
}
|
||||
exports.uuidV4 = uuidV4;
|
||||
//# sourceMappingURL=utils.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src.ts/utils.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,8CAAuD;AACvD,kDAA+E;AAE/E,SAAgB,aAAa,CAAC,SAAiB;IAC3C,IAAI,OAAM,CAAC,SAAS,CAAC,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE;QACtE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;KAChC;IACD,OAAO,gBAAQ,CAAC,SAAS,CAAC,CAAC;AAC/B,CAAC;AALD,sCAKC;AAED,SAAgB,IAAI,CAAC,KAAsB,EAAE,MAAc;IACvD,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACtB,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE;QAAE,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;KAAE;IACtD,OAAO,KAAK,CAAC;AACjB,CAAC;AAJD,oBAIC;AAED,SAAgB,WAAW,CAAC,QAAwB;IAChD,IAAI,OAAM,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE;QAC/B,OAAO,qBAAW,CAAC,QAAQ,EAAE,kCAAwB,CAAC,IAAI,CAAC,CAAC;KAC/D;IACD,OAAO,gBAAQ,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;AALD,kCAKC;AAED,SAAgB,UAAU,CAAC,MAAW,EAAE,IAAY;IAChD,IAAI,YAAY,GAAG,MAAM,CAAC;IAE1B,IAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,E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C,CAAC,EAAE,EAAE,CAAC;QACtB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;KACzB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChB,CAAC;AArBD,wBAqBC"}
|
@ -35,7 +35,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x73d9217aa697804e2ef8b6887f6aaabf5726ed550e2b5f58764c390b6dfd4a71",
|
||||
"tarballHash": "0x4a441a1d1289da6181565c45bd43c8636a15488ab9aafb2bc5c0e8d6c0c87376",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "json-wallets/5.0.2";
|
||||
export const version = "json-wallets/5.0.3";
|
||||
|
2
packages/logger/lib.esm/_version.d.ts
vendored
2
packages/logger/lib.esm/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "logger/5.0.3";
|
||||
export declare const version = "logger/5.0.4";
|
||||
|
@ -1,2 +1,2 @@
|
||||
export const version = "logger/5.0.3";
|
||||
export const version = "logger/5.0.4";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -281,7 +281,7 @@ export class Logger {
|
||||
_permanentCensorErrors = !!permanent;
|
||||
}
|
||||
static setLogLevel(logLevel) {
|
||||
const level = LogLevels[logLevel];
|
||||
const level = LogLevels[logLevel.toLowerCase()];
|
||||
if (level == null) {
|
||||
Logger.globalLogger().warn("invalid log level - " + logLevel);
|
||||
return;
|
||||
|
File diff suppressed because one or more lines are too long
2
packages/logger/lib/_version.d.ts
vendored
2
packages/logger/lib/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "logger/5.0.3";
|
||||
export declare const version = "logger/5.0.4";
|
||||
|
@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "logger/5.0.3";
|
||||
exports.version = "logger/5.0.4";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -294,7 +294,7 @@ var Logger = /** @class */ (function () {
|
||||
_permanentCensorErrors = !!permanent;
|
||||
};
|
||||
Logger.setLogLevel = function (logLevel) {
|
||||
var level = LogLevels[logLevel];
|
||||
var level = LogLevels[logLevel.toLowerCase()];
|
||||
if (level == null) {
|
||||
Logger.globalLogger().warn("invalid log level - " + logLevel);
|
||||
return;
|
||||
|
File diff suppressed because one or more lines are too long
@ -20,7 +20,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x0b9ecd4f0f13ec2b62937bc098114b4ff75b7919f0a45cf6c7cd915c79eab0b7",
|
||||
"tarballHash": "0x138e27c0eca1b2ef66f15ef1753af60b63ef39841569ec66a4665a7199cc1ad6",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.3"
|
||||
"version": "5.0.4"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "logger/5.0.3";
|
||||
export const version = "logger/5.0.4";
|
||||
|
2
packages/tests/lib.esm/_version.d.ts
vendored
2
packages/tests/lib.esm/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "tests/5.0.3";
|
||||
export declare const version = "tests/5.0.4";
|
||||
|
@ -1,2 +1,2 @@
|
||||
export const version = "tests/5.0.3";
|
||||
export const version = "tests/5.0.4";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -504,6 +504,15 @@ describe("BigNumber", function () {
|
||||
});
|
||||
describe("Logger", function () {
|
||||
const logger = new ethers.utils.Logger("testing/0.0");
|
||||
it("setLogLevel", function () {
|
||||
ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.DEBUG);
|
||||
ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.INFO);
|
||||
ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.WARNING);
|
||||
ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.ERROR);
|
||||
ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.OFF);
|
||||
// Reset back to INFO when done tests
|
||||
ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.INFO);
|
||||
});
|
||||
it("checkArgumentCount", function () {
|
||||
logger.checkArgumentCount(3, 3);
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
2
packages/tests/lib/_version.d.ts
vendored
2
packages/tests/lib/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "tests/5.0.3";
|
||||
export declare const version = "tests/5.0.4";
|
||||
|
@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "tests/5.0.3";
|
||||
exports.version = "tests/5.0.4";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -515,6 +515,15 @@ describe("BigNumber", function () {
|
||||
});
|
||||
describe("Logger", function () {
|
||||
var logger = new ethers_1.ethers.utils.Logger("testing/0.0");
|
||||
it("setLogLevel", function () {
|
||||
ethers_1.ethers.utils.Logger.setLogLevel(ethers_1.ethers.utils.Logger.levels.DEBUG);
|
||||
ethers_1.ethers.utils.Logger.setLogLevel(ethers_1.ethers.utils.Logger.levels.INFO);
|
||||
ethers_1.ethers.utils.Logger.setLogLevel(ethers_1.ethers.utils.Logger.levels.WARNING);
|
||||
ethers_1.ethers.utils.Logger.setLogLevel(ethers_1.ethers.utils.Logger.levels.ERROR);
|
||||
ethers_1.ethers.utils.Logger.setLogLevel(ethers_1.ethers.utils.Logger.levels.OFF);
|
||||
// Reset back to INFO when done tests
|
||||
ethers_1.ethers.utils.Logger.setLogLevel(ethers_1.ethers.utils.Logger.levels.INFO);
|
||||
});
|
||||
it("checkArgumentCount", function () {
|
||||
logger.checkArgumentCount(3, 3);
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
@ -39,7 +39,7 @@
|
||||
"scripts": {
|
||||
"test": "exit 1"
|
||||
},
|
||||
"tarballHash": "0xb348c246bc5832dc37b6e798836c9410b8b09dfd795a377c7f53b573b12450e8",
|
||||
"tarballHash": "0xc942735bd0e208426f49181e44da6143c1a068cf2ff5ed5a5122d8a2e87e4ead",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.3"
|
||||
"version": "5.0.4"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "tests/5.0.3";
|
||||
export const version = "tests/5.0.4";
|
||||
|
Loading…
Reference in New Issue
Block a user