Skip to content

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

License

Notifications You must be signed in to change notification settings

lidel/js-libp2p-delegated-content-routing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-libp2p-delegated-content-routing

Discourse posts Dependency Status

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'
})
const cid = new CID('QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv')

for await (const peerInfo of routing.findProviders(cid)) {
  console.log('found peer', peerInfo)
}

await routing.provide(cid)
console.log('providing %s', cid.toBaseEncodedString())

License

MIT

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%