Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 427338e

Browse files
richardschneiderdaviddias
authored andcommittedFeb 15, 2018
feat(bootstrap): add the spec
1 parent 2b23878 commit 427338e

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
 

‎SPEC/BOOTSTRAP.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Bootstrap API
2+
=============
3+
4+
> Manipulates the `bootstrap list`, which contains
5+
the addresses of the bootstrap nodes. These are the trusted peers from
6+
which to learn about other peers in the network.
7+
8+
> Only edit this list if you understand the risks of adding or removing nodes from this list.
9+
10+
#### `add`
11+
12+
> Add a peer address to the bootstrap list
13+
14+
##### `Go` **WIP**
15+
16+
##### `JavaScript` - ipfs.bootstrap.add(addr, [opts,] callback)
17+
18+
- `addr` is a [multiaddr](https://github.com/multiformats/js-multiaddr) to a peer node
19+
- `opts.default` if true, add the default peers to the list
20+
- `callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res.Peers` is an array of added addresses.
21+
22+
#### `list`
23+
24+
> List all peer addresses in the bootstrap list
25+
26+
##### `Go` **WIP**
27+
28+
##### `JavaScript` - ipfs.bootstrap.list(callback)
29+
30+
- `callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res.Peers` is an array of addresses.
31+
32+
33+
#### `rm`
34+
35+
> Remove a peer address from the bootstrap list
36+
37+
##### `Go` **WIP**
38+
39+
##### `JavaScript` - ipfs.bootstrap.rm(peer, [opt,] callback)
40+
41+
- `addr` is a [multiaddr](https://github.com/multiformats/js-multiaddr) to a peer node
42+
- `opts.all` if true, remove all peers from the list
43+
- `callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res.Peers` is an array of removed addresses.

0 commit comments

Comments
 (0)
This repository has been archived.