
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
@storacha/blob-index
Advanced tools
An index for slices that may be sharded across multiple blobs.
@storacha/blob-index
An index for slices that may be sharded across multiple blobs.
npm install @storacha/blob-index
Create:
import { ShardedDAGIndex } from '@storacha/blob-index'
// Create a brand new index
const index = ShardedDAGIndex.create(rootCID)
// Add index data for slices within a shard
index.setSlice(shardMultihash, sliceMultihash, [offset, length])
// ...
// Create CAR archive
const result = index.archive()
console.log(result.ok) // a Uint8Array
Read:
import { ShardedDAGIndex } from '@storacha/blob-index'
import { base58btc } from 'multiformats/bases/base58'
const index = ShardedDAGIndex.extract(car)
console.log(index.content)
for (const [shard, slices] of index.shards.entries()) {
console.log(`Shard ${base58btc.encode(shard.bytes)}`)
console.log(' Slices:')
for (const [slice, [offset, length]] of slices.entries()) {
console.log(` ${base58btc.encode(slice.bytes)} @ ${offset} -> ${offset + length}`)
}
}
// Output:
// Shard zQmQKw6B745GGL3eeTcEE5kAoLAJgkBQydJPC5fWv5HA68A
// Slices:
// zQmeHPRNRDxHU5YMPewcBCbPYxzA3jBcadAZQwpQXm3jFFt @ 96 -> 128
// ...
Feel free to join in. All welcome. Please open an issue!
Dual-licensed under MIT + Apache 2.0
FAQs
An index for slices that may be sharded across multiple blobs.
The npm package @storacha/blob-index receives a total of 570 weekly downloads. As such, @storacha/blob-index popularity was classified as not popular.
We found that @storacha/blob-index demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.