New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dfinity/bls-verify

Package Overview
Dependencies
Maintainers
11
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/bls-verify - npm Package Compare versions

Comparing version 0.19.2 to 0.19.3-react-native

lib/cjs/index.d.ts

8

lib/cjs/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.blsVerify = void 0;
const amcl_js_1 = require("amcl-js");
const utils_1 = require("./utils");
const blsVerify = async (primaryKey, signature, message) => {
const { verifyShortSignature } = (await Promise.resolve().then(() => require('./verifyShortSignature'))).default();
const pk = typeof primaryKey === 'string' ? primaryKey : (0, utils_1.toHex)(primaryKey);
const sig = typeof signature === 'string' ? signature : (0, utils_1.toHex)(signature);
const msg = typeof message === 'string' ? message : (0, utils_1.toHex)(message);
const ctx = new amcl_js_1.CTX('BLS12381');
if (ctx.BLS.init() !== 0) {
throw new Error('Cannot initialize BLS');
}
return (ctx.BLS.core_verify(ctx.BLS.stringtobytes(sig), ctx.BLS.stringtobytes(msg), ctx.BLS.stringtobytes(pk)) == 0);
return verifyShortSignature(sig, msg, pk);
};
exports.blsVerify = blsVerify;
//# sourceMappingURL=index.js.map

@@ -1,13 +0,9 @@

import { CTX } from 'amcl-js';
import { toHex } from './utils';
export const blsVerify = async (primaryKey, signature, message) => {
const { verifyShortSignature } = (await import('./verifyShortSignature')).default();
const pk = typeof primaryKey === 'string' ? primaryKey : toHex(primaryKey);
const sig = typeof signature === 'string' ? signature : toHex(signature);
const msg = typeof message === 'string' ? message : toHex(message);
const ctx = new CTX('BLS12381');
if (ctx.BLS.init() !== 0) {
throw new Error('Cannot initialize BLS');
}
return (ctx.BLS.core_verify(ctx.BLS.stringtobytes(sig), ctx.BLS.stringtobytes(msg), ctx.BLS.stringtobytes(pk)) == 0);
return verifyShortSignature(sig, msg, pk);
};
//# sourceMappingURL=index.js.map
{
"name": "@dfinity/bls-verify",
"version": "0.19.2",
"version": "0.19.3-react-native",
"author": "DFINITY Stiftung <sdk@dfinity.org>",

@@ -16,3 +16,2 @@ "license": "Apache-2.0",

},
"type": "module",
"keywords": [

@@ -43,2 +42,3 @@ "internet computer",

"size-limit": "size-limit",
"test": "vitest",
"ci": "npm run prettier && npm run lint && npm run test",

@@ -52,7 +52,8 @@ "lint": "eslint 'src' --ext '.js,.jsx,.ts,.tsx'",

"dependencies": {
"amcl-js": "file:src/vendor/amcl-js"
"@noble/curves": "file:noble-curves-1.2.0.tgz"
},
"devDependencies": {
"esbuild": "^0.15.16",
"size-limit": "^8.1.0"
"size-limit": "^8.1.0",
"vitest": "^0.34.6"
},

@@ -59,0 +60,0 @@ "size-limit": [

@@ -23,9 +23,2 @@ # @dfinity/bls-verify

import { blsVerify } from '@dfinity/bls-verify';
import { createActor, canisterId } from '../declarations/example';
const exampleActor = createActor(canisterId, {
actorOptions: {
blsVerify,
},
});
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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