Socket
Socket
Sign inDemoInstall

bitagora-booth

Package Overview
Dependencies
Maintainers
1
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitagora-booth - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

13

booth.js

@@ -11,6 +11,6 @@ const bitagoraBoothVersion = '1.0.12';

const Bs58 = require('base-x')(BASE58);
const { Secp256k1PrivateKey, Secp256k1PublicKey } = require('sawtooth-sdk/signing/secp256k1');
const { protobuf } = require('sawtooth-sdk');
const { createContext, CryptoFactory } = require('sawtooth-sdk/signing');
const signerContext = createContext('secp256k1');
//const { Secp256k1PrivateKey, Secp256k1PublicKey } = require('sawtooth-sdk/signing/secp256k1');
//const { protobuf } = require('sawtooth-sdk');
//const { createContext, CryptoFactory } = require('sawtooth-sdk/signing');
//const signerContext = createContext('secp256k1');

@@ -39,3 +39,3 @@ const today = new Date();

const privkey_hex = Bs58.decode(data.privkey).toString('hex');
const privateKey = Secp256k1PrivateKey.fromHex(privkey_hex);
/* const privateKey = Secp256k1PrivateKey.fromHex(privkey_hex);
const factory = new CryptoFactory(signerContext);

@@ -47,2 +47,3 @@ const signer = factory.newSigner(privateKey);

requestState(data.poll, data.id, cb);
*/
} catch(e) {

@@ -190,2 +191,3 @@ cb({status: 'UNKNOWN' });

var privkey_hex = Bs58.decode(ballot.privkey).toString('hex');
/*
const privateKey = Secp256k1PrivateKey.fromHex(privkey_hex);

@@ -214,2 +216,3 @@ const factory = new CryptoFactory(signerContext);

}
*/
} catch(e) {

@@ -216,0 +219,0 @@ cb({ status: 'ERROR' });

@@ -6,3 +6,3 @@ 'use strict';

} = require('./functions');
const { Secp256k1PublicKey } = require('sawtooth-sdk/signing/secp256k1');
//const { Secp256k1PublicKey } = require('sawtooth-sdk/signing/secp256k1');
/*

@@ -43,3 +43,3 @@ const Ecdsa = require('elliptic');

console.log("Validating signature with new algorithm");
return Secp256k1PublicKey.verify(self, vote.certsig, certScript, certKey);
//return Secp256k1PublicKey.verify(self, vote.certsig, certScript, certKey);
/*

@@ -71,2 +71,3 @@ var pubPoint = EC.keyFromPublic(certKey, 'hex').getPublic();

if ( parseInt(timestamp) > parseInt(poll.ends)) return false;
if (vote.poll != poll.id) return false;

@@ -73,0 +74,0 @@ /* Check that the ballot corresponds to one of the options in the election and that options and questions are well formed */

{
"name": "bitagora-booth",
"version": "1.0.16",
"version": "1.0.17",
"description": "Bitagora booth",

@@ -26,4 +26,3 @@ "main": "booth.js",

"request": "^2.8.1",
"async": "^2.6.0",
"sawtooth-sdk": "^1.0.4"
"async": "^2.6.0"
},

@@ -30,0 +29,0 @@ "author": "Bitagora Dev",

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