Initial version, readme docs, expectations, and so on

This commit is contained in:
David Dias
2015-09-27 00:14:40 +01:00
parent 1077718a13
commit 03cc2c28fb
2 changed files with 30 additions and 6 deletions

View File

@ -0,0 +1,18 @@
exports = module.exports = Libp2p
function Libp2p (swarm, peerRouting, recordStore) {
var self = this
if (!(self instanceof Libp2p)) {
throw new Error('Must be called with new')
}
if (!swarm) {
throw new Error('a swarm must be passed')
}
self.swarm = swarm
self.routing = peerRouting
self.record = recordStore
}