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.6 to 0.2.7

2

build/BundleItem.d.ts
/// <reference types="node" />
import { Signer } from "./signing/Signer";
import { Signer } from './signing';
import { Buffer } from "buffer";

@@ -4,0 +4,0 @@ declare type ResolvesTo<T> = T | Promise<T> | ((...args: any[]) => Promise<T>);

@@ -144,3 +144,3 @@ "use strict";

headers,
timeout: 200000,
timeout: 100000,
maxBodyLength: Infinity,

@@ -147,0 +147,0 @@ });

@@ -79,8 +79,3 @@ "use strict";

async signAndSubmit(arweave, jwk, tags = []) {
const streams = [
fs.createReadStream(this.headerFile),
...this.txs.map((t) => fs.createReadStream(t)),
];
const stream = multistream_1.default.obj(streams);
const tx = await promises_1.pipeline(stream, arweave_stream_tx_1.createTransactionAsync({}, arweave, jwk));
const tx = await this.toTransaction(arweave, jwk);
tx.addTag("Bundle-Format", "binary");

@@ -87,0 +82,0 @@ tx.addTag("Bundle-Version", "2.0.0");

@@ -5,2 +5,3 @@ /// <reference types="node" />

import { Signer } from "../build/signing";
import { AxiosResponse } from 'axios';
export default class FileDataItem implements BundleItem {

@@ -35,2 +36,3 @@ readonly filename: PathLike;

sign(signer: Signer): Promise<Buffer>;
sendToBundler(bundler: string): Promise<AxiosResponse>;
private anchorStart;

@@ -37,0 +39,0 @@ private tagsStart;

@@ -13,2 +13,4 @@ "use strict";

const signing_1 = require("../build/signing");
const axios_1 = tslib_1.__importDefault(require("axios"));
const constants_1 = require("../build/constants");
const write = util_1.promisify(fs.write);

@@ -209,2 +211,14 @@ const read = util_1.promisify(fs.read);

}
async sendToBundler(bundler) {
const headers = {
"Content-Type": "application/octet-stream",
};
if (!this.isSigned())
throw new Error("You must sign before sending to bundler");
return await axios_1.default.post(`${bundler ?? constants_1.BUNDLER}/tx`, fs.createReadStream(this.filename), {
headers,
timeout: 100000,
maxBodyLength: Infinity,
});
}
async anchorStart() {

@@ -211,0 +225,0 @@ let anchorStart = 1027;

{
"name": "arbundles",
"version": "0.2.6",
"version": "0.2.7",
"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