bittorrent-dht-store-keypair
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -37,6 +37,7 @@ var ed = require('ed25519-supercop') | ||
if (opts.seq === undefined) this.seq ++ | ||
var salt = typeof opts.salt === 'string' ? Buffer(opts.salt) : opts.salt | ||
return { | ||
k: this.publicKey, | ||
seq: seq, | ||
salt: opts.salt, | ||
salt: salt, | ||
v: value, | ||
@@ -43,0 +44,0 @@ sign: function (buf) { |
{ | ||
"name": "bittorrent-dht-store-keypair", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "create and load signing keys for bittorrent-dht dht_store", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,4 +16,4 @@ var test = require('tape') | ||
var docs = [ | ||
{ value: 'wow', salt: 'doge' }, | ||
{ value: 'beep', salt: 'robot' } | ||
{ data: 'wow', salt: 'doge' }, | ||
{ data: 'beep', salt: 'robot' } | ||
] | ||
@@ -23,11 +23,11 @@ var hashes = {} | ||
dht1.addNode('127.0.0.1:' + dht0._port) | ||
dht1.once('node', upload) | ||
dht1.once('node', function () { upload(0) }) | ||
}) | ||
function upload () { | ||
if (docs.shift === 0) return check() | ||
var doc = docs.shift() | ||
function upload (i) { | ||
if (i >= docs.length) return check() | ||
var doc = docs[i] | ||
dht0.put(kp0.store(doc.data, doc), function (errors, hash) { | ||
errors.forEach(t.error) | ||
hashes[doc.data] = hash | ||
upload() | ||
upload(i + 1) | ||
}) | ||
@@ -34,0 +34,0 @@ } |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10592
208
0