Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 8c883de

Browse files
authored
Merge branch 'master' into feat/add-bootstrapers-through-dns
2 parents efaf1d9 + 1c12f46 commit 8c883de

File tree

215 files changed

+2361
-1381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+2361
-1381
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,12 @@ The HTTP-API exposed by the js-ipfs daemon follows the [`http-api-spec`](https:/
200200
const repo = <IPFS Repo instance or repo path>
201201

202202
// Create the IPFS node instance
203-
const node = new IPFS(repo)
203+
const node = new IPFS({
204+
repo: repo,
205+
EXPERIMENTAL: {
206+
pubsub: false
207+
}
208+
})
204209

205210
// We need to init our repo, in this case the repo was empty
206211
// We are picking 2048 bits for the RSA key that will be our PeerId

RELEASE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Release checklist
2+
3+
> List of actions to perform before issuing a new js-ipfs release
4+
5+
- Robustness and quality
6+
- [ ] Ensure that all tests are passing, this includes:
7+
- [ ] unit
8+
- [ ] interop
9+
- [ ] sharness
10+
- [ ] Run tests of the following projects with the new release:
11+
- [ ] orbitdb
12+
- [ ] orbit-core
13+
- [ ] ipfs-log
14+
- Documentation
15+
- [ ] Ensure that README.md is up to date
16+
- [ ] Ensure that all the examples run
17+
- Communication
18+
- [ ] Create the release issue
19+
- [ ] Announcements (both pre-release and post-release)
20+
- [ ] Twitter
21+
- [ ] IRC

ci/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM quay.io/ipfs/js-base:6.9.4

ci/jenkins

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
javascript

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ Let us know if you find any issue or if you want to contribute and add a new tut
99
- [js-ipfs basic, how to spawn a node and add a file to IPFS](/examples)
1010
- [How to bundle js-ipfs with Browserify](/bundle-browserify)
1111
- [How to bundle js-ipfs with WebPack](/bundle-webpack)
12+
- [Use IPFS to explore the Ethereum BlockChain](/explore-ethereum)
1213

1314
## Tutorials

examples/basics/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ const IPFS = require('../../src/core')
1212
/*
1313
* Create a new IPFS instance, using default repo (fs) on default path (~/.ipfs)
1414
*/
15-
const node = new IPFS(path.join(os.tmpDir() + '/' + new Date().toString()))
15+
const node = new IPFS({
16+
repo: path.join(os.tmpdir() + '/' + new Date().toString()),
17+
EXPERIMENTAL: {
18+
pubsub: false
19+
}
20+
})
1621

1722
const fileToAdd = {
1823
path: 'hello.txt',

examples/bundle-browserify/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@
44
"description": "Bundle js-ipfs with Browserify",
55
"main": "index.js",
66
"scripts": {
7-
"bundle": "browserify src/index.js > public/bundle.js",
7+
"bundle": "browserify src/index.js --require browserify-zlib-next:zlib > public/bundle.js",
88
"serve": "http-server public -a 127.0.0.1 -p 8888",
99
"start": "npm run bundle && npm run serve"
1010
},
11-
"browser": {
12-
"zlib": "browserify-zlib-next"
13-
},
1411
"keywords": [],
1512
"license": "MIT",
1613
"devDependencies": {
17-
"browserify": "^13.1.1",
18-
"concat-stream": "^1.5.2",
14+
"browserify": "^14.0.0",
15+
"concat-stream": "^1.6.0",
1916
"http-server": "^0.9.0",
2017
"browserify-zlib-next": "^1.0.1"
2118
},

examples/bundle-browserify/src/index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
'use strict'
22

3-
var IPFS = require('../../../src/core') // replace this by line below
3+
const concat = require('concat-stream')
4+
const IPFS = require('../../../src/core') // replace this by line below
45
// var IPFS = require('ipfs')
56

67
// Create the IPFS node instance
78
// for simplicity, we create a new repo everytime the node
89
// is created, because you can't init already existing repos
910
const repoPath = String(Math.random())
10-
const node = new IPFS(repoPath)
11-
const concat = require('concat-stream')
11+
12+
const node = new IPFS({
13+
repo: repoPath,
14+
EXPERIMENTAL: {
15+
pubsub: false
16+
}
17+
})
18+
19+
// expose the node to the window, for the fun!
20+
window.ipfs = node
1221

1322
node.init({ emptyRepo: true, bits: 2048 }, function (err) {
1423
if (err) {

examples/bundle-webpack/src/components/app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ class App extends React.Component {
2929
// for simplicity, we create a new repo everytime the node
3030
// is created, because you can't init already existing repos
3131
const repoPath = String(Math.random())
32-
node = new IPFS(repoPath)
32+
node = new IPFS({
33+
repo: repoPath,
34+
EXPERIMENTAL: {
35+
pubsub: false
36+
}
37+
})
3338

3439
node.init({ emptyRepo: true, bits: 2048 }, function (err) {
3540
if (err) {

examples/explore-ethereum/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Resolve the ethereum blockchain through IPFS
2+
3+
> This is a pre-example to a full Ethereum to IPFS bridge. It shows how to resolve Ethereum hashes through the IPFS DAG get API.
4+
5+
## Set up
6+
7+
Make sure to have the latest js-ipfs installed by doing
8+
9+
```sh
10+
> npm install ipfs -g
11+
```
12+
13+
If this is the first time you use js-ipfs, make sure to init your repo with
14+
15+
```sh
16+
> jsipfs init
17+
```
18+
19+
## Load ethereum chain data into ipfs
20+
21+
We've some ethereum blocks available at [eth-stuffs](/eth-stuffs) folder, you can add them to ipfs by running:
22+
23+
```sh
24+
> ./load-eth-stuffs.sh
25+
z43AaGEvwdfzjrCZ3Sq7DKxdDHrwoaPQDtqF4jfdkNEVTiqGVFW
26+
z43AaGEywSDX5PUJcrn5GfZmb6FjisJyR7uahhWPk456f7k7LDA
27+
z43AaGF42R2DXsU65bNnHRCypLPr9sg6D7CUws5raiqATVaB1jj
28+
z45oqTS2AQ9SgyVa31LRGZgfibtdoPvP2miMNaXbDLLgD9MdAAr
29+
z45oqTS8wZaNGU2eepKHRbXvmV93cKQbiL241RB3bRtMYZP8hNm
30+
z45oqTS8wZaNGU2eepKHRbXvmV93cKQbiL241RB3bRtMYZP8hNm
31+
z45oqTS4E1GeJujnKVJG3xSVnS64A8mMCWhKSkCWACNCeD95mtQ
32+
z45oqTS4MnurEeEaanvFieeJDNHH3jGNk9NJEiyrwXwYQSWfxUB
33+
z45oqTRwExySeMeivsU1Y9UdzWDp2mx71TtQhmTGzRaXCcsNujj
34+
z45oqTRzb9a5xyvx5RbfSXH1K5jibyZ4AxnXyYReuLw7KU5veYw
35+
```
36+
37+
## Explore these blocks using the DAG api
38+
39+
Some examples
40+
41+
```sh
42+
> jsipfs dag get z43AaGEvwdfzjrCZ3Sq7DKxdDHrwoaPQDtqF4jfdkNEVTiqGVFW/
43+
> jsipfs dag get z43AaGEvwdfzjrCZ3Sq7DKxdDHrwoaPQDtqF4jfdkNEVTiqGVFW/parentHash
44+
...
45+
```

0 commit comments

Comments
 (0)