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

Commit

Permalink
feat(swarm): add swarm.addrs
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Aug 16, 2016
1 parent 5698bc6 commit 0f24de2
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions API/swarm/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,82 @@
swarm API
=========

#### `addrs`

> List of known addresses (from the peer).
##### `Go` **WIP**

##### `JavaScript` - ipfs.swarm.addrs([callback])

`callback` must follow `function (err, addrs) {}` signature, where `err` is an error if the operation was not successful. `addrs` will be an array of multiaddrs.

If no `callback` is passed, a promise is returned.

Example:

```JavaScript
ipfs.swarm.addrs(function (err, addrs) {})
```

#### `connect`

> Open a connection to a given address.
##### `Go` **WIP**

##### `JavaScript` - ipfs.swarm.SOMETHING(data, [callback])

`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of:

If no `callback` is passed, a promise is returned.

Example:


#### `disconnect`

> Close a connection on a given address.
##### `Go` **WIP**

##### `JavaScript` - ipfs.swarm.SOMETHING(data, [callback])

`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of:

If no `callback` is passed, a promise is returned.

Example:


#### `filters`

> Manipulate address filters
##### `Go` **WIP**

##### `JavaScript` - ipfs.swarm.filters(data, [callback])

`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of:

If no `callback` is passed, a promise is returned.

Example:


#### `peers`

> List out the peers that we have connections with.
##### `Go` **WIP**

##### `JavaScript` - ipfs.swarm.peers(data, [callback])

`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of:

If no `callback` is passed, a promise is returned.

Example:



0 comments on commit 0f24de2

Please sign in to comment.