Skip to content

Commit

Permalink
Merge 7aaa9c8 into dc143e8
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Aug 25, 2017
2 parents dc143e8 + 7aaa9c8 commit a5a641c
Show file tree
Hide file tree
Showing 40 changed files with 1,741 additions and 1,257 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# While testing new npm
package-lock.json
yarn.lock

# Logs
logs
Expand Down
36 changes: 12 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@
> npm install ipfs-bitswap
```

### Use in Node.js

```js
const Bitswap = require('ipfs-bitswap')
```

### Use in a browser with browserify, webpack or any other bundler
### Use in Node.js or in the browser with browserify, webpack or any other bundler

```js
const Bitswap = require('ipfs-bitswap')
Expand All @@ -56,10 +50,6 @@ Loading this module through a script tag will make the `IpfsBitswap` object avai
<script src="https://unpkg.com/ipfs-bitswap/dist/index.js"></script>
```

## Usage

See https://ipfs.github.io/js-ipfs-bitswap

## API

See https://ipfs.github.io/js-ipfs-bitswap
Expand All @@ -73,24 +63,22 @@ See https://ipfs.github.io/js-ipfs-bitswap
```sh
» tree src
src
├── components
│   ├── decision
│   │   ├── engine.js
│   │   ├── index.js
│   │   └── ledger.js
│   ├── network # Handles peerSet and open new conns
│   │   └── index.js
│   └── want-manager # Keeps track of all blocks the peer wants (not the others which it is connected)
│   ├── index.js
│   └── msg-queue.js # Messages to send queue, one per peer
├── constants.js
├── decision-engine
│   ├── index.js
│   └── ledger.js
├── index.js
└── types
├── message # (Type) message that is put in the wire
├── network.js # Handles peerSet and open new conns
├── notifications.js # Handles tracking of incomning blocks and wants/unwants.
├─── want-manager # Keeps track of all blocks the peer (self) wants
│   ├── index.js
│   └── msg-queue.js # Messages to send queue, one per peer
└─── types
├── message # (Type) message that is put in the wire
│   ├── entry.js
│   ├── index.js
│   └── message.proto.js
└── wantlist # (Type) track wanted blocks
└── wantlist # (Type) track wanted blocks
├── entry.js
└── index.js
```
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Node.js implementation of the Bitswap data exchange protocol used by IPFS",
"main": "src/index.js",
"browser": {
"./test/libp2p-bundle": false
"./test/utils/create-libp2p-node": false,
"./test/utils/create-temp-repo-nodejs.js": "./test/utils/create-temp-repo-browser.js"
},
"scripts": {
"test": "aegir-test",
Expand Down Expand Up @@ -39,10 +40,11 @@
"devDependencies": {
"aegir": "^11.0.2",
"benchmark": "^2.1.4",
"chai": "^4.1.0",
"chai": "^4.1.1",
"dirty-chai": "^2.0.1",
"ipfs-repo": "~0.17.0",
"libp2p": "^0.11.0",
"libp2p-kad-dht": "^0.4.1",
"libp2p-multiplex": "^0.4.4",
"libp2p-secio": "^0.7.1",
"libp2p-tcp": "^0.10.2",
Expand All @@ -58,7 +60,7 @@
"dependencies": {
"async": "^2.5.0",
"cids": "~0.5.1",
"debug": "^2.6.8",
"debug": "^3.0.0",
"ipfs-block": "~0.6.0",
"lodash.debounce": "^4.0.8",
"lodash.find": "^4.6.0",
Expand All @@ -75,6 +77,7 @@
"pull-length-prefixed": "^1.3.0",
"pull-pushable": "^2.1.1",
"pull-stream": "^3.6.0",
"safe-buffer": "^5.1.1",
"varint-decoder": "^0.1.1"
},
"contributors": [
Expand Down
194 changes: 0 additions & 194 deletions src/components/network/index.js

This file was deleted.

Loading

0 comments on commit a5a641c

Please sign in to comment.