Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
ipfs-block
Advanced tools
IPFS implementation of the Block data structure in JavaScript.
Block - A block is a blob of binary data.
> npm install ipfs-block
const Block = require('ipfs-block')
const Block = require('ipfs-block')
// create a block
const block = new Block(new Buffer('hello world'), cid)
console.log(block.data.toString())
The code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.
const Block = require('ipfs-block')
<script>
TagLoading this module through a script tag will make the IpfsBlock
obj available in
the global namespace.
<script src="https://unpkg.com/ipfs-block/dist/index.min.js"></script>
<!-- OR -->
<script src="https://unpkg.com/ipfs-block/dist/index.js"></script>
const Block = require('ipfs-block')
new Block(data, cid)
data: Buffer
Creates a new block with raw data data
.
block.data
The raw data of the block. Its format matches whatever was provided in its constructor.
block.cid
The cid of the block.
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
FAQs
JavaScript Implementation of IPFS Block
The npm package ipfs-block receives a total of 10,191 weekly downloads. As such, ipfs-block popularity was classified as popular.
We found that ipfs-block demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.