New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ipfs-client

Package Overview
Dependencies
Maintainers
1
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-client - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "ipfs-client",
"version": "0.1.0",
"version": "0.1.1",
"description": "A Node.JS client library for the Inter-Planetary File System",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,27 +0,29 @@

# TOC
- [add(stream, cb(err, hash))](#addstream-cberr-hash)
- [cat(hash)](#cathash)
<a name=""></a>
<a name="addstream-cberr-hash"></a>
# add(stream, cb(err, hash))
should return a hash of the given stream.
# IPFS Node.JS Client
This library is a simple client for the [InterPlanetary File System](http://ipfs.io). It currently supports the operations of storing and retrieving file content in IPFS.
```js
$S.run(gen, done);
## Installing
```
npm --save install ipfs-client
```
<a name="cathash"></a>
# cat(hash)
should return a readable stream producing the file underlying the hash.
## API
### cat - Streaming content out of IPFS
Example:
```js
var ipfs = require('ipfs-client');
```js
$S.run(gen, done);
var stream = ipfs.cat('QmTE9Xp76E67vkYeygbKJrsVj8W2LLcyUifuMHMEkyRfUL');
stream.pipe(process.stdout);
```
should report error if hash is not found.
### add - Store the Content of a Stream
Provides a hash in return.
Example:
```js
$S.run(gen, done);
var ipfs = require('ipfs-client');
ipfs.add(process.stdin, function(err, hash) {
console.log(hash);
});
```
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