From 51378eb8f46c77ad34807faca802620a40b7a7e9 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Thu, 15 Oct 2020 11:19:51 +0300 Subject: [PATCH] Release 0.6.0. --- index.d.ts | 2 +- index.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index d8e397b..66c6f80 100644 --- a/index.d.ts +++ b/index.d.ts @@ -37,6 +37,6 @@ export declare function pairing(P: PointG1, Q: PointG2, withFinalExponent?: bool export declare function getPublicKey(privateKey: PrivateKey): Uint8Array; export declare function sign(message: Bytes, privateKey: PrivateKey): Promise; export declare function verify(signature: Bytes, message: Bytes, publicKey: Bytes): Promise; -export declare function aggregatePublicKeys(publicKeys: Bytes[]): PointG1; +export declare function aggregatePublicKeys(publicKeys: Bytes[]): Uint8Array; export declare function aggregateSignatures(signatures: Bytes[]): Uint8Array; export declare function verifyBatch(messages: Bytes[], publicKeys: Bytes[], signature: Bytes): Promise; diff --git a/index.js b/index.js index e51bdfa..00bc0fc 100644 --- a/index.js +++ b/index.js @@ -351,7 +351,7 @@ exports.verify = verify; function aggregatePublicKeys(publicKeys) { if (!publicKeys.length) throw new Error('Expected non-empty array'); - return publicKeys.reduce((sum, publicKey) => sum.add(PointG1.fromCompressedHex(publicKey)), PointG1.ZERO); + return publicKeys.reduce((sum, publicKey) => sum.add(PointG1.fromCompressedHex(publicKey)), PointG1.ZERO).toCompressedHex(); } exports.aggregatePublicKeys = aggregatePublicKeys; function aggregateSignatures(signatures) { diff --git a/package.json b/package.json index 5089aa6..9715e1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "noble-bls12-381", - "version": "0.5.0", + "version": "0.6.0", "description": "Noble BLS12-381 pairing-friendly curve. Fastest, high-security, easily auditable, 0-dep aggregated signatures & pubkey", "main": "index.js", "files": [