Socket
Book a DemoInstallSign in
Socket

ipfs-client

Package Overview
Dependencies
Maintainers
2
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-client

A client library to talk to local IPFS daemons

0.3.5-rc.19
Source
npmnpm
Version published
Weekly downloads
597
82.57%
Maintainers
2
Weekly downloads
 
Created
Source

ipfs-client

A client for ipfs daemons

This module combines the ipfs-grpc-client and ipfs-http-client modules to give you a client that is capable of bidirectional streaming in the browser as well as node.

Install

$ npm install ipfs-client

API

The client object created by the createClient function supports the IPFS Core API, see the docs for more.

create([options])

Parameters

None

Options

An optional object which may have the following keys:

NameTypeDefaultDescription
grpcMultiaddr or string or URLundefinedThe address of a ipfs-grpc-server to connect to
httpMultiaddr or string or URLundefinedThe address of a ipfs-http-server to connect to
agenthttp.AgentundefinedA http.Agent used to control HTTP client behaviour (node.js only)

Returns

TypeDescription
objectAn instance of the client

Example

const { create } = require('ipfs-client')

const client = create({
  grpc: '/ipv4/127.0.0.1/tcp/5003/ws',
  http: '/ipv4/127.0.0.1/tcp/5002/http'
})

const id = await client.id()

Keywords

ipfs

FAQs

Package last updated on 30 Apr 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.