Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mattrglobal/bls12381-key-pair

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mattrglobal/bls12381-key-pair - npm Package Compare versions

Comparing version 0.4.1-unstable.f581696 to 0.5.1-unstable.7a64d06

14

CHANGELOG.md

@@ -1,9 +0,19 @@

## 0.4.1-unstable.f581696 (2020-12-16)
## 0.5.1-unstable.7a64d06 (2021-02-24)
## 0.4.1 (2020-12-16)
## 0.5.1 (2021-02-24)
# [0.5.0](https://github.com/mattrglobal/bls12381-key-pair/compare/v0.4.0...v0.5.0) (2021-02-24)
### Features
- add async api support for bbs-signatures ([#33](https://github.com/mattrglobal/bls12381-key-pair/issues/33)) ([6b18486](https://github.com/mattrglobal/bls12381-key-pair/commit/6b1848617875d9db16b22f746c897614c8df0d90))
- add support to convert to and from JWKs ([#25](https://github.com/mattrglobal/bls12381-key-pair/issues/25)) ([98235ce](https://github.com/mattrglobal/bls12381-key-pair/commit/98235ce2e2b0a8bdaa4aec85f3008ad057dbcade)), closes [#12](https://github.com/mattrglobal/bls12381-key-pair/issues/12)
- adds support for G1 key pairs ([#26](https://github.com/mattrglobal/bls12381-key-pair/issues/26)) ([aeea218](https://github.com/mattrglobal/bls12381-key-pair/commit/aeea2183df7d7cf5d2599c42489f4b33cda62d22)), closes [#15](https://github.com/mattrglobal/bls12381-key-pair/issues/15)
- bump bbs signatures version ([#34](https://github.com/mattrglobal/bls12381-key-pair/issues/34)) ([ad69446](https://github.com/mattrglobal/bls12381-key-pair/commit/ad69446b1941277c0af89911d14bcec6d527da9d))
- update bls12381G2 names and add keylength check to the constructor ([#27](https://github.com/mattrglobal/bls12381-key-pair/issues/27)) ([3e11f99](https://github.com/mattrglobal/bls12381-key-pair/commit/3e11f99870de14b190a72ff05faae7d90fab1f18))
# [0.4.0](https://github.com/mattrglobal/bls12381-key-pair/compare/v0.3.0...v0.4.0) (2020-08-27)

@@ -10,0 +20,0 @@

4

lib/Bls12381G1KeyPair.js

@@ -131,4 +131,4 @@ "use strict";

// TODO: Do we want to set a minimum size input for the seed?
const keyPair = ((_a = options) === null || _a === void 0 ? void 0 : _a.seed) ? bbs_signatures_1.generateBls12381G1KeyPair(options.seed)
: bbs_signatures_1.generateBls12381G1KeyPair();
const keyPair = ((_a = options) === null || _a === void 0 ? void 0 : _a.seed) ? await bbs_signatures_1.generateBls12381G1KeyPair(options.seed)
: await bbs_signatures_1.generateBls12381G1KeyPair();
return new Bls12381G1KeyPair(Object.assign(Object.assign({}, options), { privateKeyBase58: bs58_1.default.encode(keyPair.secretKey), publicKeyBase58: bs58_1.default.encode(keyPair.publicKey) }));

@@ -135,0 +135,0 @@ }

@@ -64,3 +64,3 @@ "use strict";

if (data instanceof Uint8Array) {
return bbs_signatures_1.blsSign({
return await bbs_signatures_1.blsSign({
messages: [data],

@@ -73,3 +73,3 @@ keyPair: {

}
return bbs_signatures_1.blsSign({
return await bbs_signatures_1.blsSign({
messages: data,

@@ -106,13 +106,13 @@ keyPair: {

if (data instanceof Uint8Array) {
return bbs_signatures_1.blsVerify({
return (await bbs_signatures_1.blsVerify({
messages: [data],
publicKey: new Uint8Array(key.publicKeyBuffer),
signature
}).verified;
})).verified;
}
return bbs_signatures_1.blsVerify({
return (await bbs_signatures_1.blsVerify({
messages: data,
publicKey: new Uint8Array(key.publicKeyBuffer),
signature
}).verified;
})).verified;
}

@@ -170,4 +170,4 @@ };

var _a;
const keyPair = ((_a = options) === null || _a === void 0 ? void 0 : _a.seed) ? bbs_signatures_1.generateBls12381G2KeyPair(options.seed)
: bbs_signatures_1.generateBls12381G2KeyPair();
const keyPair = ((_a = options) === null || _a === void 0 ? void 0 : _a.seed) ? await bbs_signatures_1.generateBls12381G2KeyPair(options.seed)
: await bbs_signatures_1.generateBls12381G2KeyPair();
return new Bls12381G2KeyPair(Object.assign(Object.assign({}, options), { privateKeyBase58: bs58_1.default.encode(keyPair.secretKey), publicKeyBase58: bs58_1.default.encode(keyPair.publicKey) }));

@@ -174,0 +174,0 @@ }

{
"name": "@mattrglobal/bls12381-key-pair",
"version": "0.4.1-unstable.f581696",
"version": "0.5.1-unstable.7a64d06",
"description": "A library for using BLS 12-381 key pairs with BBS+ signatures",

@@ -68,3 +68,3 @@ "homepage": "https://github.com/mattrglobal/bls12381-key-pair",

"dependencies": {
"@mattrglobal/bbs-signatures": "0.4.0",
"@mattrglobal/bbs-signatures": "0.5.0",
"bs58": "4.0.1",

@@ -71,0 +71,0 @@ "rfc4648": "1.4.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc