How to use the interface-ipfs-core.dht function in interface-ipfs-core

To help you get started, we’ve selected a few interface-ipfs-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ipfs / js-ipfs-http-client / test / interface.spec.js View on Github external
{
        name: 'should get dag-pb value via dag-cbor node',
        reason: 'FIXME vmx 2018-02-22: Currently not supported in go-ipfs, it might be possible once https://github.com/ipfs/go-ipfs/issues/4728 is done'
      },
      {
        name: 'should get by CID string + path',
        reason: 'FIXME vmx 2018-02-22: Currently not supported in go-ipfs, it might be possible once https://github.com/ipfs/go-ipfs/issues/4728 is done'
      },
      {
        name: 'should get only a CID, due to resolving locally only',
        reason: 'FIXME: go-ipfs does not support localResolve option'
      }
    ]
  })

  tests.dht(commonFactory, {
    skip: [
      // dht.findpeer
      {
        name: 'should fail to find other peer if peer does not exist',
        reason: 'FIXME checking what is exactly go-ipfs returning https://github.com/ipfs/go-ipfs/issues/3862#issuecomment-294168090'
      },
      // dht.findprovs
      {
        name: 'should take options to override timeout config',
        reason: 'FIXME go-ipfs does not support a timeout option'
      },
      // dht.get
      {
        name: 'should get a value after it was put on another node',
        reason: 'FIXME go-ipfs errors with  Error: key was not found (type 6) https://github.com/ipfs/go-ipfs/issues/3862'
      }
github ipfs-shipyard / js-ipfs-http-client-lite / test / interface.spec.js View on Github external
//     name: 'should get dag-pb value via dag-cbor node',
    //     reason: 'FIXME vmx 2018-02-22: Currently not supported in go-ipfs, it might be possible once https://github.com/ipfs/go-ipfs/issues/4728 is done'
    //   },
    //   {
    //     name: 'should get by CID string + path',
    //     reason: 'FIXME vmx 2018-02-22: Currently not supported in go-ipfs, it might be possible once https://github.com/ipfs/go-ipfs/issues/4728 is done'
    //   },
    //   {
    //     name: 'should get only a CID, due to resolving locally only',
    //     reason: 'FIXME: go-ipfs does not support localResolve option'
    //   }
    // ]
    skip: { reason: 'LITE: not implemented yet' }
  })

  tests.dht(defaultCommon, {
    // skip: [
    //   // dht.findpeer
    //   {
    //     name: 'should fail to find other peer if peer does not exist',
    //     reason: 'FIXME checking what is exactly go-ipfs returning https://github.com/ipfs/go-ipfs/issues/3862#issuecomment-294168090'
    //   },
    //   // dht.findprovs
    //   {
    //     name: 'should provide from one node and find it through another node',
    //     reason: 'FIXME go-ipfs endpoint doesn\'t conform with the others https://github.com/ipfs/go-ipfs/issues/5047'
    //   },
    //   // dht.get
    //   {
    //     name: 'should get a value after it was put on another node',
    //     reason: 'FIXME go-ipfs errors with  Error: key was not found (type 6) https://github.com/ipfs/go-ipfs/issues/3862'
    //   }
github ipfs-shipyard / ipfs-postmsg-proxy / test / integration / browser.js View on Github external
factory.dismantle(cb)
    }
  }
}

tests.bitswap(defaultCommonFactory, { skip: true })

tests.block(defaultCommonFactory)

tests.bootstrap(defaultCommonFactory)

tests.config(defaultCommonFactory)

tests.dag(defaultCommonFactory)

tests.dht(defaultCommonFactory, {
  skip: { reason: 'TODO: DHT is not implemented in js-ipfs yet!' }
})

tests.files(defaultCommonFactory, {
  skip: [
    {
      name: 'should add pull stream (promised)',
      reason: 'https://github.com/ipfs/js-ipfs/issues/1574'
    },
    {
      name: 'should stat file',
      reason: 'https://github.com/ipfs/interface-ipfs-core/pull/365'
    },
    {
      name: 'should stat dir',
      reason: 'https://github.com/ipfs/interface-ipfs-core/pull/365'
github ipfs / js-ipfs / test / http-api / interface.js View on Github external
tests.bootstrap(commonFactory)

  tests.config(commonFactory)

  tests.dag(commonFactory, {
    skip: [{
      name: 'should get only a CID, due to resolving locally only',
      reason: 'Local resolve option is not implemented yet'
    }, {
      name: 'tree',
      reason: 'dag.tree is not implemented yet'
    }]
  })

  tests.dht(commonFactory, {
    skip: {
      reason: 'TODO: unskip when DHT is enabled: https://github.com/ipfs/js-ipfs/pull/1994'
    }
  })

  tests.filesRegular(commonFactory, {
    skip: isNode ? null : [{
      name: 'addFromStream',
      reason: 'Not designed to run in the browser'
    }, {
      name: 'addFromFs',
      reason: 'Not designed to run in the browser'
    }]
  })

  tests.filesMFS(commonFactory)
github ipfs / js-ipfs-http-client / test / interface / dht.spec.js View on Github external
if (err) {
            return cb(err)
          }

          nodes.push(_ipfsd)
          cb(null, IPFSApi(_ipfsd.apiAddr))
        })
      }
    })
  },
  teardown: function (callback) {
    parallel(nodes.map((node) => (cb) => node.stop(cb)), callback)
  }
}

test.dht(common)
github ipfs-shipyard / ipfs-postmsg-proxy / test / integration / node.js View on Github external
const common = {
  setup (cb) {
    factory = new IpfsFactory(factoryOpts)
    cb(null, factory)
  },
  teardown (cb) {
    factory.dismantle(cb)
  }
}

test.block(common)
test.bootstrap(common)
test.config(common)
test.dag(common)
test.dht(common)
test.files(common)
test.filesMFS(common)
test.key(common)
test.miscellaneous(common)
test.object(common)
test.pin(common)
test.ping(common)
test.pubsub(common)
test.repo(common)
test.stats(common)
test.swarm(common)
github ipfs / js-ipfs / test / core / interface.spec.js View on Github external
ipfsBin: './src/cli/bin.js'
    }
  }
  const commonFactory = createFactory(commonOptions, overrides)

  tests.bitswap(commonFactory)

  tests.block(commonFactory)

  tests.bootstrap(commonFactory)

  tests.config(commonFactory)

  tests.dag(commonFactory)

  tests.dht(commonFactory, {
    skip: {
      reason: 'TODO: unskip when DHT is enabled: https://github.com/ipfs/js-ipfs/pull/1994'
    }
  })

  tests.filesRegular(commonFactory, {
    skip: isNode ? null : [{
      name: 'addFromStream',
      reason: 'Not designed to run in the browser'
    }, {
      name: 'addFromFs',
      reason: 'Not designed to run in the browser'
    }]
  })

  tests.filesMFS(commonFactory)