This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
792 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
generic API | ||
=========== | ||
|
||
#### `id` | ||
|
||
> Returns the identity of the Peer | ||
##### `Go` **WIP** | ||
|
||
##### `JavaScript` - ipfs.id([callback]) | ||
|
||
`callback` must follow `function (err, identity) {}` signature, where `err` is an error if the operation was not successful. `identity` is an object with the Peer identity. | ||
|
||
If no `callback` is passed, a promise is returned. | ||
|
||
Example: | ||
|
||
```js | ||
ipfs.id(function (err, identity) { | ||
if (err) { | ||
throw err | ||
} | ||
console.log(identity) | ||
}) | ||
``` | ||
|
||
#### `version` | ||
|
||
> Returns the implementation version | ||
##### `Go` **WIP** | ||
|
||
##### `JavaScript` - ipfs.version([callback]) | ||
|
||
`callback` must follow `function (err, version) {}` signature, where `err` is an error if the operation was not successful. `version` is the version string of the implementation. | ||
|
||
If no `callback` is passed, a promise is returned. | ||
|
||
Example: | ||
|
||
```js | ||
ipfs.version(function (err, version) { | ||
if (err) { | ||
throw err | ||
} | ||
console.log(version) | ||
}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.