@chainsafe/bls-keystore
Advanced tools
Comparing version 1.0.0-beta7 to 1.0.0-beta8
@@ -21,3 +21,3 @@ /// <reference types="node" /> | ||
*/ | ||
static encrypt(secret: bytes, password: string, path?: string, crypto?: CryptoFunction, kdfSalt?: bytes, aesIv?: bytes): IKeystore; | ||
static encrypt(secret: bytes, pubkey: bytes, password: string, path?: string, crypto?: CryptoFunction, kdfSalt?: bytes, aesIv?: bytes): IKeystore; | ||
verifyPassword(password: string): boolean; | ||
@@ -24,0 +24,0 @@ /** |
@@ -12,4 +12,2 @@ "use strict"; | ||
var _bls = require("@chainsafe/bls"); | ||
var _buffer = require("buffer"); | ||
@@ -66,3 +64,3 @@ | ||
static encrypt(secret, password, path = "", crypto = _crypto2.CryptoFunction.pbkdf2, kdfSalt = (0, _crypto.randomBytes)(32), aesIv = (0, _crypto.randomBytes)(16)) { | ||
static encrypt(secret, pubkey, password, path = "", crypto = _crypto2.CryptoFunction.pbkdf2, kdfSalt = (0, _crypto.randomBytes)(32), aesIv = (0, _crypto.randomBytes)(16)) { | ||
const kdfModule = new _crypto2.KdfModule({ | ||
@@ -84,3 +82,3 @@ function: crypto, | ||
path: path, | ||
pubkey: _bls.PublicKey.fromPrivateKey(_bls.PrivateKey.fromBytes(secret)).toHexString().replace("0x", ""), | ||
pubkey: pubkey.toString("hex"), | ||
crypto: new _crypto2.KeystoreCrypto({ | ||
@@ -87,0 +85,0 @@ kdf: { |
{ | ||
"name": "@chainsafe/bls-keystore", | ||
"version": "1.0.0-beta7", | ||
"version": "1.0.0-beta8", | ||
"main": "lib/index.js", | ||
@@ -28,3 +28,2 @@ "files": [ | ||
"@babel/register": "^7.6.2", | ||
"@babel/runtime": "^7.7.2", | ||
"@types/jest": "^24.0.22", | ||
@@ -39,3 +38,2 @@ "@types/uuid": "^3.4.6", | ||
"dependencies": { | ||
"@chainsafe/bls": "^0.1.7", | ||
"bcrypto": "^4.2.8", | ||
@@ -42,0 +40,0 @@ "buffer": "^5.4.3", |
@@ -7,2 +7,4 @@ # @ChainSafe/bls-keystore | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
![es-version](https://img.shields.io/badge/ES-2015-yellow) | ||
![node-version](https://img.shields.io/badge/node-10.x-green) | ||
@@ -9,0 +11,0 @@ > Bls keystore implementation as per draft [EIP 2335](https://github.com/ethereum/EIPs/pull/2335) for node and browser. |
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
4
13
45
71574
904
- Removed@chainsafe/bls@^0.1.7
- Removed@chainsafe/bit-utils@0.1.40.1.6(transitive)
- Removed@chainsafe/bls@0.1.7(transitive)
- Removed@chainsafe/eth2.0-params@0.1.0(transitive)
- Removed@chainsafe/eth2.0-types@0.1.1(transitive)
- Removed@chainsafe/milagro-crypto-js@0.1.3(transitive)
- Removed@chainsafe/ssz-type-schema@0.0.1(transitive)
- Removed@types/bn.js@4.11.6(transitive)
- Removed@types/node@22.9.3(transitive)
- Removedassert@1.5.12.1.0(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedbn.js@4.12.1(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedfor-each@0.3.3(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinherits@2.0.3(transitive)
- Removedis-arguments@1.1.1(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-generator-function@1.0.10(transitive)
- Removedis-nan@1.3.2(transitive)
- Removedis-typed-array@1.1.13(transitive)
- Removedjs-sha256@0.9.0(transitive)
- Removedobject-is@1.1.6(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedobject.assign@4.1.5(transitive)
- Removedpossible-typed-array-names@1.0.0(transitive)
- Removedsecure-random@1.1.2(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedundici-types@6.19.8(transitive)
- Removedutil@0.10.40.12.5(transitive)
- Removedwhich-typed-array@1.1.15(transitive)