bitagora-booth
Advanced tools
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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21640
7
655
- Removedsawtooth-sdk@^1.0.4
- Removed@protobufjs/aspromise@1.1.2(transitive)
- Removed@protobufjs/base64@1.1.2(transitive)
- Removed@protobufjs/codegen@2.0.4(transitive)
- Removed@protobufjs/eventemitter@1.1.0(transitive)
- Removed@protobufjs/fetch@1.1.0(transitive)
- Removed@protobufjs/float@1.0.2(transitive)
- Removed@protobufjs/inquire@1.1.0(transitive)
- Removed@protobufjs/path@1.1.2(transitive)
- Removed@protobufjs/pool@1.1.0(transitive)
- Removed@protobufjs/utf8@1.1.0(transitive)
- Removed@types/long@4.0.2(transitive)
- Removed@types/node@22.7.4(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedaproba@1.2.0(transitive)
- Removedare-we-there-yet@1.1.7(transitive)
- Removedbindings@1.5.0(transitive)
- Removedbip66@1.1.5(transitive)
- Removedbl@1.2.3(transitive)
- Removedbn.js@4.12.0(transitive)
- Removedbrorand@1.1.0(transitive)
- Removedbrowserify-aes@1.2.0(transitive)
- Removedbuffer-alloc@1.2.0(transitive)
- Removedbuffer-alloc-unsafe@1.1.0(transitive)
- Removedbuffer-fill@1.0.0(transitive)
- Removedbuffer-xor@1.0.3(transitive)
- Removedchownr@1.1.4(transitive)
- Removedcipher-base@1.0.4(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedconsole-control-strings@1.1.0(transitive)
- Removedcreate-hash@1.2.0(transitive)
- Removedcreate-hmac@1.1.7(transitive)
- Removeddecompress-response@3.3.0(transitive)
- Removeddeep-extend@0.6.0(transitive)
- Removeddelegates@1.0.0(transitive)
- Removeddetect-libc@1.0.3(transitive)
- Removeddrbg.js@1.0.1(transitive)
- Removedelliptic@6.5.7(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedevp_bytestokey@1.0.3(transitive)
- Removedexpand-template@1.1.1(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedfs-constants@1.0.0(transitive)
- Removedgauge@2.7.4(transitive)
- Removedgithub-from-package@0.0.0(transitive)
- Removedhas-unicode@2.0.1(transitive)
- Removedhash-base@3.1.0(transitive)
- Removedhash.js@1.1.7(transitive)
- Removedhmac-drbg@1.0.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedini@1.3.8(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedlong@4.0.0(transitive)
- Removedmd5.js@1.3.5(transitive)
- Removedmimic-response@1.0.1(transitive)
- Removedminimalistic-assert@1.0.1(transitive)
- Removedminimalistic-crypto-utils@1.0.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removednan@2.20.0(transitive)
- Removednode-abi@2.30.1(transitive)
- Removednoop-logger@0.1.1(transitive)
- Removednpmlog@4.1.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedprebuild-install@2.5.3(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedprotobufjs@6.11.4(transitive)
- Removedpump@1.0.32.0.1(transitive)
- Removedrc@1.2.8(transitive)
- Removedreadable-stream@2.3.83.6.2(transitive)
- Removedripemd160@2.0.2(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsawtooth-sdk@1.1.1(transitive)
- Removedsecp256k1@3.8.0(transitive)
- Removedsemver@5.7.2(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedsha.js@2.4.11(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedsimple-concat@1.0.1(transitive)
- Removedsimple-get@2.8.2(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstring_decoder@1.1.11.3.0(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
- Removedtar-fs@1.16.3(transitive)
- Removedtar-stream@1.6.2(transitive)
- Removedto-buffer@1.1.1(transitive)
- Removedundici-types@6.19.8(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwhich-pm-runs@1.1.0(transitive)
- Removedwide-align@1.1.5(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedxtend@4.0.2(transitive)
- Removedzeromq@4.6.0(transitive)