restake 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
3
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
4
8
|
const cafe_utility_1 = require("cafe-utility");
|
|
5
9
|
const process_1 = require("process");
|
|
6
10
|
const n = cafe_utility_1.Arrays.requireNumberArgument(process_1.argv, 'n');
|
|
@@ -8,6 +12,6 @@ const bzz = cafe_utility_1.FixedPointNumber.fromFloat(cafe_utility_1.Arrays.requ
|
|
|
8
12
|
const sleep = cafe_utility_1.Dates.make(cafe_utility_1.Arrays.requireStringArgument(process_1.argv, 'sleep'));
|
|
9
13
|
cafe_utility_1.System.forever(async () => {
|
|
10
14
|
const port = 1633 + cafe_utility_1.Random.intBetween(0, n - 1);
|
|
11
|
-
await
|
|
15
|
+
await axios_1.default.post(`http://localhost:${port}/stake/${bzz.toString()}`);
|
|
12
16
|
}, sleep, console.error);
|
|
13
17
|
process.on('unhandledRejection', console.error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "restake",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"bin": {
|
|
6
6
|
"restake": "./dist/index.js"
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"type": "commonjs",
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"axios": "^0.30.3",
|
|
17
18
|
"cafe-utility": "^33.8.0"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|