Comparing version 0.2.2 to 0.2.3
@@ -141,12 +141,5 @@ "use strict"; | ||
async rawAnchor() { | ||
let anchorStart = 1027; | ||
const handle = await fs.promises.open(this.filename, "r"); | ||
const targetPresentBuffer = await read(handle.fd, Buffer.allocUnsafe(1), 0, 1, 1026).then((r) => r.buffer); | ||
const targetPresent = targetPresentBuffer[0] === 1; | ||
if (targetPresent) { | ||
anchorStart += 32; | ||
} | ||
const anchorPresentBuffer = await read(handle.fd, Buffer.allocUnsafe(1), 0, 1, anchorStart).then((r) => r.buffer); | ||
const anchorPresent = anchorPresentBuffer[0] === 1; | ||
const [anchorPresent, anchorStart] = await this.anchorStart(); | ||
if (anchorPresent) { | ||
const handle = await fs.promises.open(this.filename, "r"); | ||
const anchorBuffer = await read(handle.fd, Buffer.allocUnsafe(32), 0, 32, anchorStart + 1).then((r) => r.buffer); | ||
@@ -156,3 +149,2 @@ await handle.close(); | ||
} | ||
await handle.close(); | ||
return Buffer.allocUnsafe(0); | ||
@@ -234,3 +226,3 @@ } | ||
let tagsStart = anchorStart; | ||
tagsStart += anchorPresent ? 32 : 1; | ||
tagsStart += anchorPresent ? 33 : 1; | ||
return tagsStart; | ||
@@ -237,0 +229,0 @@ } |
{ | ||
"name": "arbundles", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Arweave bundling library", | ||
@@ -5,0 +5,0 @@ "author": "Josh Benaron <joshbenaron@gmail.com>", |
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
90229
1941