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

@cryptoeconomicslab/signature

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cryptoeconomicslab/signature - npm Package Compare versions

Comparing version 0.0.35 to 0.0.36

10

lib/verifier/Ed25519.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const bs58check_1 = tslib_1.__importDefault(require("bs58check"));
const tweetnacl_1 = tslib_1.__importDefault(require("tweetnacl"));
exports.ed25519Verifier = {
verify: async (message, signature, publicKey) => {
const sig = Buffer.from(signature.toHexString().slice(2), 'hex');
const msg = Buffer.from(message.toHexString());
const pk = bs58check_1.default.decode(publicKey.intoString()).slice(4);
const publicKeyHeaderAndBody = publicKey.split(1);
const [sig, msg, pk] = [
signature,
message,
publicKeyHeaderAndBody[1]
].map(b => Buffer.from(b.toHexString().substr(2), 'hex'));
return tweetnacl_1.default.sign.detached.verify(msg, sig, pk);

@@ -12,0 +14,0 @@ }

7

package.json
{
"name": "@cryptoeconomicslab/signature",
"version": "0.0.35",
"version": "0.0.36",
"description": "signatures and verifiers",

@@ -32,3 +32,2 @@ "author": {

"dependencies": {
"bs58check": "^2.1.2",
"ethers": "^4.0.43",

@@ -38,3 +37,3 @@ "tweetnacl": "^1.0.3"

"devDependencies": {
"@cryptoeconomicslab/primitives": "^0.0.35",
"@cryptoeconomicslab/primitives": "^0.0.36",
"@types/libsodium-wrappers-sumo": "^0.7.3"

@@ -45,3 +44,3 @@ },

},
"gitHead": "7ff03bfccb9535c21068bd3ad45d0ea982c80553"
"gitHead": "3cf96a9462b6ff0bdf64995dbbbbdee7a6a1f48d"
}

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