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

@harmoniclabs/crypto

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harmoniclabs/crypto - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

5

dist/bls12_318.d.ts

@@ -7,4 +7,7 @@ import { ProjConstructor } from "./noble/abstract/weierstrass.js";

}>;
export declare function isBlsG1(stuff: any): stuff is BlsG1;
export declare function isBlsG2(stuff: any): stuff is BlsG2;
type UnwrapProjConstructor<Stuff extends ProjConstructor<any>> = Stuff extends ProjConstructor<infer T> ? T : never;
export type Fp2 = UnwrapProjConstructor<typeof BlsG2>;
export declare function isFp2(stuff: any): stuff is Fp2;
type ConstructorReturnType<CtorLike extends {

@@ -38,2 +41,3 @@ new (...args: any): any;

};
export declare function isBlsResult(stuff: any): stuff is BlsResult;
type Fp6_t = {

@@ -44,2 +48,3 @@ c0: Fp2;

};
export declare function isFp6(stuff: any): stuff is Fp6_t;
export {};

33

dist/bls12_318.js

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.bls12_381_finalVerify = exports.bls12_381_mulMlResult = exports.bls12_381_millerLoop = exports.bls12_381_G2_uncompress = exports.bls12_381_G2_compress = exports.bls12_381_G2_hashToGroup = exports.bls12_381_G2_equal = exports.bls12_381_G2_scalarMul = exports.bls12_381_G2_neg = exports.bls12_381_G2_add = exports.bls12_381_G1_uncompress = exports.bls12_381_G1_compress = exports.bls12_381_G1_hashToGroup = exports.bls12_381_G1_equal = exports.bls12_381_G1_scalarMul = exports.bls12_381_G1_neg = exports.bls12_381_G1_add = exports.BlsG2 = exports.BlsG1 = void 0;
exports.isFp6 = exports.isBlsResult = exports.bls12_381_finalVerify = exports.bls12_381_mulMlResult = exports.bls12_381_millerLoop = exports.bls12_381_G2_uncompress = exports.bls12_381_G2_compress = exports.bls12_381_G2_hashToGroup = exports.bls12_381_G2_equal = exports.bls12_381_G2_scalarMul = exports.bls12_381_G2_neg = exports.bls12_381_G2_add = exports.bls12_381_G1_uncompress = exports.bls12_381_G1_compress = exports.bls12_381_G1_hashToGroup = exports.bls12_381_G1_equal = exports.bls12_381_G1_scalarMul = exports.bls12_381_G1_neg = exports.bls12_381_G1_add = exports.isFp2 = exports.isBlsG2 = exports.isBlsG1 = exports.BlsG2 = exports.BlsG1 = void 0;
var noble_1 = require("./noble/index.js");

@@ -22,2 +22,20 @@ var hash_to_curve_1 = require("./noble/abstract/hash-to-curve.js");

exports.BlsG2 = noble_1.bls12_381.G2.ProjectivePoint;
function isBlsG1(stuff) {
return stuff instanceof exports.BlsG1 && (typeof stuff.px === "bigint" &&
typeof stuff.py === "bigint" &&
typeof stuff.pz === "bigint");
}
exports.isBlsG1 = isBlsG1;
function isBlsG2(stuff) {
return stuff instanceof exports.BlsG2 && (isFp2(stuff.px) &&
isFp2(stuff.py) &&
isFp2(stuff.pz));
}
exports.isBlsG2 = isBlsG2;
function isFp2(stuff) {
return typeof stuff === "object" && (stuff !== null && !Array.isArray(stuff) &&
typeof stuff.c0 === "bigint" &&
typeof stuff.c1 === "bigint");
}
exports.isFp2 = isFp2;
var curveOrder = BigInt("52435875175126190479447740508185965837690552500527637822603658699938581184513");

@@ -239,1 +257,14 @@ var htfDefaults = Object.freeze({

}
function isBlsResult(stuff) {
return typeof stuff === "object" && (stuff !== null && !Array.isArray(stuff) &&
isFp6(stuff.c0) &&
isFp6(stuff.c1));
}
exports.isBlsResult = isBlsResult;
function isFp6(stuff) {
return typeof stuff === "object" && (stuff !== null && !Array.isArray(stuff) &&
isFp2(stuff.c0) &&
isFp2(stuff.c1) &&
isFp2(stuff.c2));
}
exports.isFp6 = isFp6;

2

package.json
{
"name": "@harmoniclabs/crypto",
"version": "0.2.0",
"version": "0.2.1",
"description": "collection of cryptographic functions that support every js runtime for ES5+",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

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