@ethersproject/wallet
Advanced tools
Comparing version 5.0.8 to 5.0.9
@@ -1,1 +0,1 @@ | ||
export declare const version = "wallet/5.0.8"; | ||
export declare const version = "wallet/5.0.9"; |
@@ -1,2 +0,2 @@ | ||
export const version = "wallet/5.0.8"; | ||
export const version = "wallet/5.0.9"; | ||
//# sourceMappingURL=_version.js.map |
@@ -70,2 +70,8 @@ "use strict"; | ||
else { | ||
// A lot of common tools do not prefix private keys with a 0x (see: #1166) | ||
if (typeof (privateKey) === "string") { | ||
if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) { | ||
privateKey = "0x" + privateKey; | ||
} | ||
} | ||
const signingKey = new SigningKey(privateKey); | ||
@@ -72,0 +78,0 @@ defineReadOnly(this, "_signingKey", () => signingKey); |
@@ -1,1 +0,1 @@ | ||
export declare const version = "wallet/5.0.8"; | ||
export declare const version = "wallet/5.0.9"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = "wallet/5.0.8"; | ||
exports.version = "wallet/5.0.9"; | ||
//# sourceMappingURL=_version.js.map |
@@ -114,2 +114,8 @@ "use strict"; | ||
else { | ||
// A lot of common tools do not prefix private keys with a 0x (see: #1166) | ||
if (typeof (privateKey) === "string") { | ||
if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) { | ||
privateKey = "0x" + privateKey; | ||
} | ||
} | ||
var signingKey_2 = new signing_key_1.SigningKey(privateKey); | ||
@@ -116,0 +122,0 @@ properties_1.defineReadOnly(_this, "_signingKey", function () { return signingKey_2; }); |
@@ -22,3 +22,13 @@ { | ||
"ethereum": "donations.ethers.eth", | ||
"gitHead": "8933467c01b64ead547d7c136f22f3c05c85ca1f", | ||
"funding": [ | ||
{ | ||
"type": "individual", | ||
"url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" | ||
}, | ||
{ | ||
"type": "individual", | ||
"url": "https://www.buymeacoffee.com/ricmoo" | ||
} | ||
], | ||
"gitHead": "211defa27f85af111e81b400a18922f35dff21e1", | ||
"keywords": [ | ||
@@ -36,2 +46,3 @@ "Ethereum", | ||
"repository": { | ||
"directory": "packages/wallet", | ||
"type": "git", | ||
@@ -44,5 +55,5 @@ "url": "git://github.com/ethers-io/ethers.js.git" | ||
"sideEffects": false, | ||
"tarballHash": "0xe72a82af893261e932470d462d7a54667654ff8f85da24d58c0ffc04cf186744", | ||
"tarballHash": "0x5a20d69b99052391b9cf659f97f9993e8a1a4ce96758afd05a184df1ecf6c30f", | ||
"types": "./lib/index.d.ts", | ||
"version": "5.0.8" | ||
"version": "5.0.9" | ||
} |
@@ -1,1 +0,1 @@ | ||
export const version = "wallet/5.0.8"; | ||
export const version = "wallet/5.0.9"; |
@@ -79,7 +79,16 @@ "use strict"; | ||
} | ||
defineReadOnly(this, "_signingKey", () => privateKey); | ||
defineReadOnly(this, "_signingKey", () => (<SigningKey>privateKey)); | ||
} else { | ||
// A lot of common tools do not prefix private keys with a 0x (see: #1166) | ||
if (typeof(privateKey) === "string") { | ||
if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) { | ||
privateKey = "0x" + privateKey; | ||
} | ||
} | ||
const signingKey = new SigningKey(privateKey); | ||
defineReadOnly(this, "_signingKey", () => signingKey); | ||
} | ||
defineReadOnly(this, "_mnemonic", (): Mnemonic => null); | ||
@@ -86,0 +95,0 @@ defineReadOnly(this, "address", computeAddress(this.publicKey)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50518
657