Questions tagged [js-ipfs]

The JavaScript implementation of the IPFS (InterPlanetary File System) protocol.

IPFS logo

The InterPlanetary File System is a hypermedia distribution protocol, addressed by content and identities. It enables the creation of completely distributed applications.

IPFS aims to make the web faster, safer, and more open by connecting all computing devices with the same system of files.

js-ipfs provides a library which enables users to spin up full IPFS nodes from JavaScript. It runs in the command line, or in the browser.

Latest release of js-ipfs is 0.54.4. Read more about the latest release at https://github.com/ipfs/js-ipfs/releases

js-ipfs documentation: https://github.com/ipfs/js-ipfs/tree/master/docs

95 questions
1
vote
1 answer

Error downloading ipfs-js using npm i ipfs

I'm using Visual Studio Code and am on Windows 10. I'm trying to download Ipfs-js package using npm https://www.npmjs.com/package/ipfs https://github.com/ipfs/js-ipfs however it's giving me this error: I'm clueless on what to do at this point. I've…
DIRTY DAVE
  • 2,523
  • 2
  • 20
  • 83
1
vote
0 answers

Issues running the js Ipfs bitswap benchmarks

I'm trying to do some performance testing of the js implementation of IPFSs bitswap. I've followed the instructions in the git repo here: https://github.com/ipfs/js-ipfs-bitswap But if I do an npm run benchmarks or 0x test/benchmarks/get-many I just…
BobC
  • 11
  • 2
1
vote
3 answers

How to pin a hash for IPFS through Infura's gateway using ipfs-http-client API

The documentation shows the request to be in the following format: curl -X POST "https://ipfs.infura.io:5001/api/v0/pin/add?arg=&progress=" I'm currently using JavaScript's API ipfs-http-client to make Http calls. The add function from the source…
Kevvv
  • 3,655
  • 10
  • 44
  • 90
1
vote
1 answer

Fleek.co image upload not generating hash and hashV0

I was uploading an image using the safari browser, it does not return any ipfs hash. While on the other hand, it returns the ipfs hash if I am using a desktop web browser. Can anyone help me with this, or at least explain the process?
1
vote
1 answer

Connect browser to NodeJS IPFS node

I'm trying to connect a browser js-ipfs node to a my NodeJS server that is running an js-ipfs node as well. I understand that I need to add in the server's Multiaddr to the browser's bootstrap config in order to connect the two nodes. However, since…
now_world
  • 940
  • 7
  • 21
  • 56
1
vote
0 answers

Getting invalid version number error when connecting to peer

I'm getting an error when trying to connect to a node. The IPFS instance is created in a class, with a JavaScript factory function. The connect function looks like this: async connectToPeer(multiaddr, protocol = "/p2p-circuit/ipfs/") { try { …
Imestin
  • 49
  • 5
1
vote
1 answer

How to get IP address of WebRTC peer in IPFS / libp2p?

I'm using this code to play around with IPFS in the browser. I'm wondering how I can access the ip addresses of the webRTC peers? or even know if the peers are actually webRTC, or http peers?
cooldude101
  • 1,215
  • 2
  • 14
  • 29
1
vote
1 answer

How to get a public IP address with IPFS-JS

With IPFS JS when I run this: const ipfsNode = await IPFS.create(); const addresses = await ipfsNode.swarm.localAddrs(); console.log(addresses); I get this: Swarm listening on /ip4/127.0.0.1/tcp/4002/p2p/PeeridFooBar Swarm listening on…
now_world
  • 940
  • 7
  • 21
  • 56
0
votes
0 answers

How to Add Data to IPFS through Smart Contract in Truffle?

I'm currently working on a project where I have to store Student's basic data using Blockchain. I managed to to do so, but now I want the data to get Stored on the IPFS instead of the Blockchain, and the generated hash value to get stored on the…
0
votes
0 answers

How to get multiAddr from js-ipfs node running in browser, ipfs.config.get("Addresses.API") always is empty

I'm setting up a IPFS Cluster in my local and trying to connect a browser peer(js-ipfs) to it. The cluster will take bootstrap add , but I couldn't get the multiAddr from js-ipfs. Can anyone help me out here? js-ipfs code to create a…
Logesh
  • 1
0
votes
2 answers

With Inline script working, How can I make my external .js file work properly with my HTML file?

I'm currently working on a website utilizing ipfs & pinning services like Pinata. My last build works flawlessly when delivered locally or through a public gateway. When trying to pin my last build to Pinata, I was informed I can't use inline JS. So…
F0urL34f
  • 1
  • 1
0
votes
0 answers

How to pin (store) files in ipfs using node js?

i want to store files of type image in ipfs with node js without using any gateway like pinata , i have tried to install "ipfs-http-client" and "ipfs-core" but i always get an error Module not found for these two libraries . I've installed many…
Ghost
  • 318
  • 2
  • 8
0
votes
0 answers

node.js - OrbitDB can't append data

I want to use orbit-db to create database using Nodejs but every time I create a database and try to add a new data it deletes the last element and I only can read the new one. I tried different types of databases (docs, Keyvalue, log, feed) but…
Mourad
  • 101
  • 1
0
votes
1 answer

how to get CID of file when creating using ipfs.files.write using ipfs-http-client

first I created directory using ipfs.files.mkdir it works fine but doesn't return folder CID or any other information, then I created file to that directory using below code fs.readFile(temFilePath, async (err1, data) => { if (err1) throw…
0
votes
1 answer

Error when I try to add ipfs file with my nodejs Dapp

I am trying to create a Dapp with nodejs that allow me to upload a file to IPFS running in local, but I'm haveing some troubles. I've tried the next submit_change: document.getElementById('upload_form').addEventListener('submit', async…