Giter Site home page Giter Site logo

ipfs-connector's People

Contributors

dependabot[bot] avatar kenshyx avatar michaelmure avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipfs-connector's Issues

Update package

  • ipfs-api changed to ipfs-http-client
  • ipfs-connector-utils v2.0
  • update travis config

Failed to import form Ionic 2 project

1
Seems due to the usage of relative path?
Or it just doesn't support 'client/browser' ?

import {Injectable} from '@angular/core';
import {Http} from '@angular/http';
import 'rxjs/add/operator/map';
import {IpfsConnector} from "@akashaproject/ipfs-connector";

/*
 Generated class for the Data provider.

 See https://angular.io/docs/ts/latest/guide/dependency-injection.html
 for more info on providers and Angular 2 DI.
 */
@Injectable()
export class Data {
  ipfsConnector: IpfsConnector;

  constructor(public http: Http) {
    console.log('Hello Data Provider');
    this.ipfsConnector = IpfsConnector.getInstance();
    console.log(this.ipfsConnector);
  }
}

conditional dependencies ?

The last version of ipfs-connector has js-ipfs as a dependency, even if I would like to use only go-ipfs. A nice thing would be to be able to choose the ipfs implementation.

On a side note, this is currently a problem for me because of a error in one of the dependencies that ultimately pull react (!) and break my app. I filed an issue there: https://github.com/ipld/js-ipld-eth-storage-trie/issues/3

└─┬ @akashaproject/[email protected]
   └─┬ [email protected]
      └─┬ [email protected]
         └─┬ [email protected]
            └─┬ [email protected]
               └─┬ [email protected]
                  └── [email protected] 

api.apiClient port doesn't get updated after a staticSetPorts()

js-ipfs-api is initialized with the first call to IpfsConnector.api() but need to get overwritten after the call to staticSetPorts(). I'm not sure what code path is used, but I end up with js-ipfs-api doing call to the default port 5001 instead of the one I set up.

For reference, this is what I use to start the daemon:

  const instance = IpfsConnector.getInstance()

  const userDataPath = app.getPath('userData')

  // set the download path for ipfs
  instance.setBinPath(userDataPath)

  // set the repo path
  instance.setIpfsFolder(path.join(userDataPath,'ipfs-repo'))

  // enable some experimental features
  instance.setOption('args', [
    'daemon',
    '--enable-pubsub-experiment'
  ])

  ports = {
    api: await getPort(4280),
    gateway: await getPort(4281),
    swarm: await getPort(4282)
  }

  await instance.staticSetPorts(ports)

  // start ipfs daemon and download binaries if needed
  instance.start()

IPFS binary doesn't get updated

After updating ipfs-connector to the latest version I expected it to download a newer version of IPFS since the expected version is different in the new version (0.4.9 instead of 0.4.7).

But that's not the case, IPFS 0.4.7 still get launched.

I guess you use something like this for akasha ?

const onServiceStarted = async () => {
  const instance = IpfsConnector.getInstance()
  const versionOK = await instance.checkVersion()

  if(!versionOK) {
    console.log("Need to update IPFS")
    await instance.stop()
    await instance.downloadManager.deleteBin()
    instance.start()
    return
  }
....
}

Would it be better to have ipfs-connector deal with this ? It will break with a wrong version for the daemon anyway since you expect a specific API.

go-ipfs v0.4.14-rc1

Hello,

Could you make a release with the new go-ipfs v0.4.14-rc1 ?

Thank you !

Misleading example

The example in the readme say that:

// start ipfs daemon and download binaries if needed
instance.start().then(...);

The .then(...) part led me to think that IPFS was ready at that point. Actually the promise resolve as soon as the binary is spawned, so the API is not ready at this point and will throw an error.

What you need to do is to install some listener like this:

instance.on(ipfsEvents.SERVICE_STARTED, onServiceStarted)

Maybe the start() promise should resolve once the API is available ?

Request: Collaborating with Hydrus

Hydrus is a client that allows for downloading of images from popular imageboards,
it also allows people to upload their tagged media database directly to IPFS.
Currently IPFS, and by extension Hydrus has no systems against leeching.
However, Ethereum does have such a system (Zero Knowledge Proofs).
It would be great if Hydrus and Akasha can collaborate on a common goal,
to fight against censorship, to protect public access of information and art.
https://hydrusnetwork.github.io/hydrus/

Offline port configuration for IPFS daemon

Currently, IPFS need to be started to change the port configuration but that cause problem when one of the port are already in use.

IPFS allow to change the port through the ipfs binary, when the daemon is not running:

// Change the api port config
ipfs config Addresses.API /ip4/127.0.0.1/tcp/5003

// Disable the gateway
ipfs config Addresses.Gateway ''

This could even be made config-less by using something like https://github.com/daaku/nodejs-freeport to find a free port.

error in transpile

Hi,

i try to use your project but i have a issue when use tsc command to transpile my project.

tsc --version 
version 1.8.10

when try transpile my project a i have ths error

node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(2,1): error TS1084: Invalid 'reference' directive syntax.
node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(3,1): error TS1084: Invalid 'reference' directive syntax.
node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(10,21): error TS1005: '=' expected.
node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(10,32): error TS1005: ';' expected.
node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(11,21): error TS1005: '=' expected.
node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(11,31): error TS1005: ';' expected.
node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(12,21): error TS1005: '=' expected.
/node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(12,33): error TS1005: ';' expected.
/node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(13,21): error TS1005: '=' expected.
/node_modules/@akashaproject/ipfs-connector/src/IpfsApiHelper.d.ts(13,31): error TS1005: ';' expected.
/node_modules/@akashaproject/ipfs-connector/src/IpfsBin.d.ts(2,1): error TS1084: Invalid 'reference' directive syntax.
node_modules/@akashaproject/ipfs-connector/src/IpfsConnector.d.ts(2,1): error TS1084: Invalid 'reference' directive syntax.
node_modules/@akashaproject/ipfs-connector/src/IpfsConnector.d.ts(3,1): error TS1084: Invalid 'reference' directive syntax.
/node_modules/@akashaproject/ipfs-connector/src/IpfsConnector.d.ts(31,14): error TS1005: '=' expected.
node_modules/@akashaproject/ipfs-connector/src/IpfsConnector.d.ts(31,17): error TS1005: ';' expected.
node_modules/@akashaproject/ipfs-connector/typings/main.d.ts(1,29): error TS1005: '{' expected.
node_modules/@akashaproject/ipfs-connector/typings/main.d.ts(2,26): error TS1005: '{' expected.
node_modules/@akashaproject/ipfs-connector/typings/main.d.ts(3,22): error TS1005: '{' expected.
node_modules/@akashaproject/ipfs-connector/typings/main.d.ts(4,25): error TS1005: '{' expected.

thx in advance for your help.
your idea is very interesting and i hope solve my needs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.