balanceofsatoshis 19.0.0 → 19.0.2
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/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/lsp/process_order.js +13 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/lsp/process_order.js
CHANGED
|
@@ -23,8 +23,9 @@ const {versionJsonRpc} = require('./lsps1_protocol');
|
|
|
23
23
|
|
|
24
24
|
const blocksAsMs = blocks => blocks * 10 * 60 * 1000;
|
|
25
25
|
const blocksPerYear = 144 * 365;
|
|
26
|
-
const capacityFee = (rate, capacity) => Math.floor(rate * capacity / 1e6
|
|
26
|
+
const capacityFee = (rate, capacity) => Math.floor(rate * capacity / 1e6);
|
|
27
27
|
const decodeMessage = n => Buffer.from(n, 'hex').toString();
|
|
28
|
+
const describeBlocks = blocks => `${(blocks / 144).toFixed(2)} days`;
|
|
28
29
|
const encodeMessage = n => Buffer.from(n, 'utf8').toString('hex');
|
|
29
30
|
const expiryDate = ms => new Date(Date.now() + ms).toISOString();
|
|
30
31
|
const {floor} = Math;
|
|
@@ -337,7 +338,17 @@ module.exports = (args, cbk) => {
|
|
|
337
338
|
|
|
338
339
|
const capacityFees = capacityFee(ppmFees, getMessage.capacity);
|
|
339
340
|
|
|
340
|
-
const ppmTotalFee =
|
|
341
|
+
const ppmTotalFee = Math.ceil(time * capacityFees);
|
|
342
|
+
|
|
343
|
+
args.logger.info({
|
|
344
|
+
request: {
|
|
345
|
+
capacity: tokensAsBigUnit(getMessage.capacity),
|
|
346
|
+
lifetime: describeBlocks(getMessage.params.channel_expiry_blocks),
|
|
347
|
+
ppm_fee: tokensAsBigUnit(ppmTotalFee),
|
|
348
|
+
base_fee: tokensAsBigUnit(baseFee),
|
|
349
|
+
chain_fee: tokensAsBigUnit(estimatedChainFee),
|
|
350
|
+
},
|
|
351
|
+
});
|
|
341
352
|
|
|
342
353
|
return cbk(null, {
|
|
343
354
|
capacity: getMessage.capacity,
|
package/package.json
CHANGED
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"csv-parse": "5.5.6",
|
|
32
32
|
"ecpair": "2.1.0",
|
|
33
33
|
"goldengate": "14.0.7",
|
|
34
|
-
"grammy": "1.26.
|
|
34
|
+
"grammy": "1.26.1",
|
|
35
35
|
"hot-formula-parser": "4.0.0",
|
|
36
36
|
"import-lazy": "4.0.0",
|
|
37
37
|
"ini": "4.1.3",
|
|
38
|
-
"inquirer": "9.3.
|
|
38
|
+
"inquirer": "9.3.4",
|
|
39
39
|
"ln-accounting": "8.0.3",
|
|
40
|
-
"ln-service": "57.14.
|
|
40
|
+
"ln-service": "57.14.4",
|
|
41
41
|
"ln-sync": "6.0.4",
|
|
42
42
|
"ln-telegram": "6.1.6",
|
|
43
43
|
"minimist": "1.2.8",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"description": "Lightning balance CLI",
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"invoices": "3.0.0",
|
|
59
|
-
"ln-docker-daemons": "6.0.
|
|
59
|
+
"ln-docker-daemons": "6.0.20",
|
|
60
60
|
"mock-lnd": "1.4.4"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis -t alexbosworth/balanceofsatoshis:$npm_package_version --push .",
|
|
85
85
|
"test": "npx nyc@15.1.0 node --experimental-test-coverage --test test/arrays/*.js test/balances/*.js test/chain/*.js test/display/*.js test/encryption/*.js test/lnd/*.js test/network/*.js test/nodes/*.js test/peers/*.js test/responses/*.js test/routing/*.js test/services/*.js test/swaps/*.js test/tags/*.js test/telegram/*.js test/wallets/*.js"
|
|
86
86
|
},
|
|
87
|
-
"version": "19.0.
|
|
87
|
+
"version": "19.0.2"
|
|
88
88
|
}
|