hypercore
Advanced tools
Comparing version 10.37.16 to 10.37.17
@@ -110,3 +110,3 @@ const hypercoreCrypto = require('hypercore-crypto') | ||
manifest, | ||
keyPair, | ||
keyPair: keyPair ? { publicKey: keyPair.publicKey, secretKey: keyPair.secretKey || null } : null, | ||
userData: [], | ||
@@ -135,2 +135,7 @@ tree: { | ||
if (header.keyPair) { | ||
header.keyPair.publicKey = unslab(header.keyPair.publicKey) | ||
header.keyPair.secretKey = unslab(header.keyPair.secretKey) | ||
} | ||
if (opts.manifest) { | ||
@@ -209,2 +214,6 @@ // if we provide a manifest and no key, verify that the stored key is the same | ||
for (const entry of header.userData) { | ||
entry.value = unslab(entry.value) | ||
} | ||
return new this(header, compat, crypto, oplog, bigHeader, tree, blocks, bitfield, verifier, opts.sessions || [], legacy, opts.globalCache || null, opts.onupdate || noop, opts.onconflict || noop) | ||
@@ -1028,2 +1037,4 @@ } | ||
function updateUserData (list, key, value) { | ||
value = unslab(value) | ||
for (let i = 0; i < list.length; i++) { | ||
@@ -1030,0 +1041,0 @@ if (list[i].key === key) { |
{ | ||
"name": "hypercore", | ||
"version": "10.37.16", | ||
"version": "10.37.17", | ||
"description": "Hypercore is a secure, distributed append-only log", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
278158
7785