Socket
Socket
Sign inDemoInstall

arbundles

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arbundles - npm Package Compare versions

Comparing version 0.2.8 to 0.2.9

7

build/ar-data-bundle.js

@@ -22,6 +22,7 @@ "use strict";

headers.set(header, 64 * index);
const raw = d.getRaw();
return Array.from(raw);
return d.getRaw();
})).then((a) => {
return a.flat();
return a.reduce((previousValue, currentValue) => {
return buffer_1.Buffer.concat([previousValue, currentValue]);
}, buffer_1.Buffer.allocUnsafe(0));
});

@@ -28,0 +29,0 @@ const buffer = buffer_1.Buffer.from([

@@ -59,8 +59,9 @@ "use strict";

const items = this.getItems();
const validity = await Promise.all(items.map(item => {
const valid = item.isValid();
for (const item of items) {
const valid = await item.isValid();
const expected = base64url_1.default(crypto.createHash("sha256").update(item.rawSignature).digest());
return valid && item.id === expected;
}));
return validity.every(valid => valid === true);
if (!(valid && item.id === expected))
return false;
}
return true;
}

@@ -95,3 +96,2 @@ getOffset(id) {

const slice = this.binary.subarray(dataItemStart, dataItemStart + dataItemSize + 200);
console.log(slice.toString());
const item = new DataItem_1.default(slice);

@@ -98,0 +98,0 @@ item.rawId = this.binary.slice(32 + (64 * index), 64 + (64 * index));

{
"name": "arbundles",
"version": "0.2.8",
"version": "0.2.9",
"description": "Arweave bundling library",

@@ -5,0 +5,0 @@ "author": "Josh Benaron <joshbenaron@gmail.com>",

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