|
1 | 1 | (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ethers = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
2 | 2 | "use strict";
|
3 | 3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 |
| -exports.version = "4.0.32"; |
| 4 | +exports.version = "4.0.33"; |
5 | 5 |
|
6 | 6 | },{}],2:[function(require,module,exports){
|
7 | 7 | "use strict";
|
@@ -8646,24 +8646,28 @@ exports.shr64_lo = shr64_lo;
|
8646 | 8646 | if (typeof Object.create === 'function') {
|
8647 | 8647 | // implementation from standard node.js 'util' module
|
8648 | 8648 | module.exports = function inherits(ctor, superCtor) {
|
8649 |
| - ctor.super_ = superCtor |
8650 |
| - ctor.prototype = Object.create(superCtor.prototype, { |
8651 |
| - constructor: { |
8652 |
| - value: ctor, |
8653 |
| - enumerable: false, |
8654 |
| - writable: true, |
8655 |
| - configurable: true |
8656 |
| - } |
8657 |
| - }); |
| 8649 | + if (superCtor) { |
| 8650 | + ctor.super_ = superCtor |
| 8651 | + ctor.prototype = Object.create(superCtor.prototype, { |
| 8652 | + constructor: { |
| 8653 | + value: ctor, |
| 8654 | + enumerable: false, |
| 8655 | + writable: true, |
| 8656 | + configurable: true |
| 8657 | + } |
| 8658 | + }) |
| 8659 | + } |
8658 | 8660 | };
|
8659 | 8661 | } else {
|
8660 | 8662 | // old school shim for old browsers
|
8661 | 8663 | module.exports = function inherits(ctor, superCtor) {
|
8662 |
| - ctor.super_ = superCtor |
8663 |
| - var TempCtor = function () {} |
8664 |
| - TempCtor.prototype = superCtor.prototype |
8665 |
| - ctor.prototype = new TempCtor() |
8666 |
| - ctor.prototype.constructor = ctor |
| 8664 | + if (superCtor) { |
| 8665 | + ctor.super_ = superCtor |
| 8666 | + var TempCtor = function () {} |
| 8667 | + TempCtor.prototype = superCtor.prototype |
| 8668 | + ctor.prototype = new TempCtor() |
| 8669 | + ctor.prototype.constructor = ctor |
| 8670 | + } |
8667 | 8671 | }
|
8668 | 8672 | }
|
8669 | 8673 |
|
@@ -9620,7 +9624,7 @@ module.exports = { browser: true };
|
9620 | 9624 |
|
9621 | 9625 | }).call(this,require("timers").setImmediate)
|
9622 | 9626 | },{"timers":45}],44:[function(require,module,exports){
|
9623 |
| -(function (process,global){ |
| 9627 | +(function (process,global,clearImmediate){ |
9624 | 9628 | (function (global, undefined) {
|
9625 | 9629 | "use strict";
|
9626 | 9630 |
|
@@ -9797,8 +9801,8 @@ module.exports = { browser: true };
|
9797 | 9801 | attachTo.clearImmediate = clearImmediate;
|
9798 | 9802 | }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
|
9799 | 9803 |
|
9800 |
| -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) |
9801 |
| -},{"_process":42}],45:[function(require,module,exports){ |
| 9804 | +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").clearImmediate) |
| 9805 | +},{"_process":42,"timers":45}],45:[function(require,module,exports){ |
9802 | 9806 | (function (global){
|
9803 | 9807 | module.exports = { setImmediate: global.setImmediate };
|
9804 | 9808 | }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
@@ -14339,8 +14343,8 @@ function _fromSeed(seed, mnemonic) {
|
14339 | 14343 | return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic, 'm');
|
14340 | 14344 | }
|
14341 | 14345 | function fromMnemonic(mnemonic, wordlist, password) {
|
14342 |
| - // Check that the checksum s valid (will throw an error) |
14343 |
| - mnemonicToEntropy(mnemonic, wordlist); |
| 14346 | + // Normalize the mnemonic (also throws if the checksum is invalid) |
| 14347 | + mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist); |
14344 | 14348 | return _fromSeed(mnemonicToSeed(mnemonic, password), mnemonic);
|
14345 | 14349 | }
|
14346 | 14350 | exports.fromMnemonic = fromMnemonic;
|
|
0 commit comments