- Notifications
You must be signed in to change notification settings - Fork1.2k
IPFS implementation in JavaScript
License
Unknown and 2 other licenses found
Licenses found
ipfs/js-ipfs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
📚Learn more about this deprecation orhow to migrate
⚠️ If you continue using this repo, please note that security fixes will not be provided
- Read thedocs
- Ensure CORS iscorrectly configured for use with the HTTP client
- Look into theexamples to learn how to spawn an IPFS node in Node.js and in the Browser
- Consult theCore API docs to see what you can do with an IPFS node
- Head over tohttps://proto.school to take theIPFS course that covers core IPFS concepts and JS APIs
- Check outhttps://docs.ipfs.io forglossary, tips, how-tos and more
- Need help? Please ask 'How do I?' questions onhttps://discuss.ipfs.io
- Find out about chat channels, the IPFS newsletter, the IPFS blog, and more in theIPFS community space.
Installingipfs
globally will give you thejsipfs
command which you can use to start a daemon running:
$npm install -g ipfs$jsipfs daemonInitializing IPFS daemon...js-ipfs version: x.x.xSystem version: x64/darwinNode.js version: x.x.xSwarm listening on /ip4/127.0.... more output
You can then add a file:
$jsipfs add ./hello-world.txtadded QmXXY5ZxbtuYj6DnfApLiGstzPN7fvSyigrRee3hDWPCaf hello-world.txt
If you do not need to run a command line daemon, use theipfs-core
package - it has all the features ofipfs
but in a lighter package:
$npm install ipfs-core
Then start a node in your app:
import*asIPFSfrom'ipfs-core'constipfs=awaitIPFS.create()const{ cid}=awaitipfs.add('Hello world')console.info(cid)// QmXXY5ZxbtuYj6DnfApLiGstzPN7fvSyigrRee3hDWPCaf
This project is broken into several modules, their purposes are:
/packages/interface-ipfs-core
Tests to ensure adherence of an implementation to the spec/packages/ipfs
An aggregator module that bundles the core implementation, the CLI, HTTP API server and daemon/packages/ipfs-cli
A CLI to the core implementation/packages/ipfs-core
The core implementation/packages/ipfs-core-types
Typescript definitions for the core API/packages/ipfs-core-utils
Helpers and utilities common to core and the HTTP RPC API client/packages/ipfs-daemon
Run js-IPFS as a background daemon/packages/ipfs-grpc-client
A gRPC client for js-IPFS/packages/ipfs-grpc-protocol
Shared module between the gRPC client and server/packages/ipfs-grpc-server
A gRPC-over-websockets server for js-IPFS/packages/ipfs-http-client
A client for the RPC-over-HTTP API presented by both js-ipfs and go-ipfs/packages/ipfs-http-server
JS implementation of theKubo RPC HTTP API/packages/ipfs-http-gateway
JS implementation of theIPFS HTTP Gateway/packages/ipfs-http-response
Creates a HTTP response for a given IPFS Path/packages/ipfs-message-port-client
A client for the RPC-over-message-port API presented by js-ipfs running in a shared worker/packages/ipfs-message-port-protocol
Code shared by the message port client & server/packages/ipfs-message-port-server
The server that receives requests from ipfs-message-port-client
List of the main packages that make up the IPFS ecosystem.
This table is generated using the module
package-table
withpackage-table --data=package-list.json
.
The IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out:
Read theCode of Conduct andJavaScript Contributing Guidelines.
- Check out existing issues Theissue list has many that are marked as'help wanted' or'difficulty:easy' which make great starting points for development, many of which can be tackled with no prior IPFS knowledge
- Look at theIPFS Roadmap This are the high priority items being worked on right now
- Perform code reviews More eyes will helpa. speed the project alongb. ensure quality, andc. reduce possible future bugs.
- Add tests. There can never be enough tests.
About
IPFS implementation in JavaScript