Leverage other peers in the network to perform Content Routing calls.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci
src
test
.aegir.js
.gitignore
CHANGELOG.md
LICENSE
README.md
package.json

README.md

js-libp2p-delegated-content-routing

Leverage other peers in the network to perform Content Routing calls.

Lead Maintainer

Jacob Heun

Example

const DelegatedContentRouting = require('libp2p-delegated-content-routing')

// default is to use ipfs.io
const routing = new DelegatedContentRouing(peerId, {
  // use default api settings
  protocol: 'https',
  port: 443,
  host: 'ipfs.io'
})

routing.findProviders(key, (err, peerInfos) => {
  if (err) {
    return console.error(err)
  }

  console.log('found peers', peerInfos)
})

routing.provide(key, (err) => {
  if (err) {
    return console.error(err)
  }

  console.log('providing %s', key)
})

License

MIT