0.0.43 • Published 3 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
3 years ago
0.0.42
3 years ago
0.0.41
3 years ago
0.0.40
3 years ago
0.0.39
3 years ago
0.0.37
3 years ago
0.0.38
3 years ago
0.0.36
3 years ago
0.0.35
3 years ago
0.0.33
3 years ago
0.0.34
3 years ago
0.0.31
3 years ago
0.0.32
3 years ago
0.0.30
3 years ago
0.0.29
3 years ago
0.0.28
3 years ago
0.0.27
3 years ago
0.0.24
3 years ago
0.0.25
3 years ago
0.0.26
3 years ago
0.0.23
3 years ago
0.0.22
3 years ago
0.0.20
3 years ago
0.0.21
3 years ago
0.0.19
3 years ago
0.0.18
3 years ago
0.0.16
3 years ago
0.0.17
3 years ago
0.0.15
3 years ago
0.0.14
3 years ago
0.0.13
3 years ago
0.0.12
3 years ago
0.0.11
3 years ago
0.0.10
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago