0.0.43 • Published 4 years ago
js-swrm-client v0.0.43
JS-Swrm-Client
A lightweight client for peer to peer connections.
JS-Swrm-Client runs the minimal setup required to get and put data on the IPFS network.
Steps to download, install and run JS-Swrm-Client
- Install
Node.js
andNPM
from Browser. - Verify Installation.
- Open a command prompt (or PowerShell), and enter the following:
node –v
- The system should display the Node.js version installed on your system. You can do the same for NPM:
npm –v
- Open a command prompt (or PowerShell), and enter the following:
- To download and install packages on npm or yarn, on the command line, run the following command:
npm install js-swrm-client
yarn add js-swrm-client
You can download and run the code from https://www.npmjs.com/package/js-swrm-client
Developer Integration Guide
<script>
var swrm = require('js-swrm-client')
var options = {
progress: true,
}
// SWRMLabs will return an object based on the options provided.
Let d_event = swrm.download(link, options)
// options are optional, default evens will be started, completed and error
d_event.on("started").subscribe((data) => {
console.log("started ", data); // e,g data = { fileName : test.txt , link : nwfua76waf78bfwafafbwud , size : 1 MB }
});
d_event.on("progress").subscribe((data) => {
console.log("progress ", data);
});
d_event.on("completed").subscribe((data) => {
console.log("completed ", data);
});
d_event.on("error").subscribe((data) => {
console.log("error ", data);
});
</script>
0.0.43
4 years ago
0.0.42
4 years ago
0.0.41
4 years ago
0.0.40
4 years ago
0.0.39
4 years ago
0.0.37
4 years ago
0.0.38
4 years ago
0.0.36
4 years ago
0.0.35
4 years ago
0.0.33
4 years ago
0.0.34
4 years ago
0.0.31
4 years ago
0.0.32
4 years ago
0.0.30
4 years ago
0.0.29
4 years ago
0.0.28
4 years ago
0.0.27
4 years ago
0.0.24
4 years ago
0.0.25
4 years ago
0.0.26
4 years ago
0.0.23
4 years ago
0.0.22
4 years ago
0.0.20
4 years ago
0.0.21
4 years ago
0.0.19
4 years ago
0.0.18
4 years ago
0.0.16
4 years ago
0.0.17
4 years ago
0.0.15
4 years ago
0.0.14
4 years ago
0.0.13
4 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago