balanceofsatoshis 13.1.0 → 13.1.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
CHANGED
package/README.md
CHANGED
package/network/open_channel.js
CHANGED
|
@@ -30,6 +30,7 @@ const getMempoolRetries = 10;
|
|
|
30
30
|
const maxMempoolSize = 2e6;
|
|
31
31
|
const minOutbound = 4294967;
|
|
32
32
|
const minForwarded = 1e5;
|
|
33
|
+
const numericFeeRate = n => !!n && /^\d+$/.test(n) ? Number(n) : undefined;
|
|
33
34
|
const regularConf = 72;
|
|
34
35
|
const slowConf = 144;
|
|
35
36
|
|
|
@@ -308,6 +309,7 @@ module.exports = (args, cbk) => {
|
|
|
308
309
|
|
|
309
310
|
return openChannel({
|
|
310
311
|
chain_fee_tokens_per_vbyte: feeRate,
|
|
312
|
+
fee_rate: numericFeeRate(args.set_fee_rate),
|
|
311
313
|
is_private: args.is_private,
|
|
312
314
|
lnd: args.lnd,
|
|
313
315
|
local_tokens: args.tokens || channelTokens,
|
package/package.json
CHANGED
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"csv-parse": "5.3.0",
|
|
31
31
|
"ecpair": "2.1.0",
|
|
32
32
|
"goldengate": "11.4.0",
|
|
33
|
-
"grammy": "1.11.
|
|
33
|
+
"grammy": "1.11.2",
|
|
34
34
|
"hot-formula-parser": "4.0.0",
|
|
35
35
|
"import-lazy": "4.0.0",
|
|
36
36
|
"ini": "3.0.1",
|
|
37
|
-
"inquirer": "9.1.
|
|
37
|
+
"inquirer": "9.1.3",
|
|
38
38
|
"ln-accounting": "6.0.0",
|
|
39
|
-
"ln-service": "54.2.
|
|
39
|
+
"ln-service": "54.2.1",
|
|
40
40
|
"ln-sync": "3.14.0",
|
|
41
41
|
"ln-telegram": "3.22.5",
|
|
42
42
|
"moment": "2.29.4",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@alexbosworth/tap": "15.0.11",
|
|
56
56
|
"invoices": "2.2.0",
|
|
57
|
-
"ln-docker-daemons": "3.1.
|
|
57
|
+
"ln-docker-daemons": "3.1.1",
|
|
58
58
|
"mock-lnd": "1.4.4",
|
|
59
59
|
"tiny-secp256k1": "2.2.1"
|
|
60
60
|
},
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis --push .",
|
|
84
84
|
"test": "tap --branches=1 --functions=1 --lines=1 --statements=1 -t 60 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"
|
|
85
85
|
},
|
|
86
|
-
"version": "13.1.
|
|
86
|
+
"version": "13.1.2"
|
|
87
87
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const defaultChannelCapacity = 5e6;
|
|
2
2
|
const isTrusted = type => ['private-trusted', 'public-trusted'].includes(type);
|
|
3
|
+
const numericFeeRate = n => !!n && /^\d+$/.test(n) ? Number(n) : undefined;
|
|
3
4
|
const privateTypes = ['private', 'private-trusted'];
|
|
4
5
|
const trustedFundingTypes = ['private-trusted', 'public-trusted'];
|
|
5
6
|
const uniq = arr => Array.from(new Set(arr));
|
|
@@ -36,6 +37,7 @@ module.exports = args => {
|
|
|
36
37
|
return {
|
|
37
38
|
capacity: args.capacities[i] || defaultChannelCapacity,
|
|
38
39
|
cooperative_close_address: args.addresses[i] || undefined,
|
|
40
|
+
fee_rate: numericFeeRate(args.rates[i]),
|
|
39
41
|
give_tokens: !!args.gives[i] ? Number(args.gives[i]) : undefined,
|
|
40
42
|
is_private: !!args.types[i] && privateTypes.includes(args.types[i]),
|
|
41
43
|
is_trusted_funding: !!args.types[i] && isTrusted(args.types[i]),
|
|
@@ -27,6 +27,7 @@ const tests = [
|
|
|
27
27
|
channels: [{
|
|
28
28
|
capacity: 2,
|
|
29
29
|
cooperative_close_address: 'address',
|
|
30
|
+
fee_rate: undefined,
|
|
30
31
|
give_tokens: 1,
|
|
31
32
|
is_private: true,
|
|
32
33
|
is_trusted_funding: false,
|
|
@@ -50,6 +51,7 @@ const tests = [
|
|
|
50
51
|
channels: [{
|
|
51
52
|
capacity: 5000000,
|
|
52
53
|
cooperative_close_address: undefined,
|
|
54
|
+
fee_rate: undefined,
|
|
53
55
|
give_tokens: undefined,
|
|
54
56
|
is_private: false,
|
|
55
57
|
is_trusted_funding: false,
|
|
@@ -77,6 +79,7 @@ const tests = [
|
|
|
77
79
|
channels: [{
|
|
78
80
|
capacity: 1,
|
|
79
81
|
cooperative_close_address: 'coopCloseAddressNodeA',
|
|
82
|
+
fee_rate: 1,
|
|
80
83
|
give_tokens: 3,
|
|
81
84
|
is_private: true,
|
|
82
85
|
is_trusted_funding: false,
|
|
@@ -90,6 +93,7 @@ const tests = [
|
|
|
90
93
|
channels: [{
|
|
91
94
|
capacity: 2,
|
|
92
95
|
cooperative_close_address: 'coopCloseAddressNodeB',
|
|
96
|
+
fee_rate: 2,
|
|
93
97
|
give_tokens: 4,
|
|
94
98
|
is_private: false,
|
|
95
99
|
is_trusted_funding: false,
|