balanceofsatoshis 22.0.2 → 22.1.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/CHANGELOG.md +8 -0
- package/README.md +1 -0
- package/offchain/sign_payment_request.js +1 -1
- package/package.json +5 -5
- package/telegram/get_socks_proxy.js +13 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ module.exports = (args, cbk) => {
|
|
|
104
104
|
},
|
|
105
105
|
|
|
106
106
|
// Create a key pair for a virtual channel invoice
|
|
107
|
-
getKeyPair: ['validate', async ({}
|
|
107
|
+
getKeyPair: ['validate', async ({}) => {
|
|
108
108
|
// Exit early when not using a virtual channel
|
|
109
109
|
if (!args.is_virtual) {
|
|
110
110
|
return;
|
package/package.json
CHANGED
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"hot-formula-parser": "4.0.0",
|
|
36
36
|
"import-lazy": "4.0.0",
|
|
37
37
|
"ini": "7.0.0",
|
|
38
|
-
"inquirer": "
|
|
38
|
+
"inquirer": "14.0.2",
|
|
39
39
|
"ln-accounting": "10.0.2",
|
|
40
|
-
"ln-service": "59.0
|
|
40
|
+
"ln-service": "59.1.0",
|
|
41
41
|
"ln-sync": "8.0.2",
|
|
42
42
|
"ln-telegram": "8.0.2",
|
|
43
43
|
"minimist": "1.2.8",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"probing": "6.0.0",
|
|
47
47
|
"qrcode-terminal": "0.12.0",
|
|
48
48
|
"sanitize-filename": "1.6.4",
|
|
49
|
-
"socks-proxy-agent": "
|
|
49
|
+
"socks-proxy-agent": "10.0.0",
|
|
50
50
|
"table": "6.9.0",
|
|
51
51
|
"tiny-secp256k1": "2.2.4",
|
|
52
52
|
"window-size": "1.1.1"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"description": "Lightning balance CLI",
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"invoices": "5.0.2",
|
|
57
|
-
"ln-docker-daemons": "8.0.
|
|
57
|
+
"ln-docker-daemons": "8.0.1"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=22"
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"postpublish": "docker buildx build --platform linux/amd64,linux/arm64 -t alexbosworth/balanceofsatoshis -t alexbosworth/balanceofsatoshis:$npm_package_version --push .",
|
|
82
82
|
"test": "npx nyc@17.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"
|
|
83
83
|
},
|
|
84
|
-
"version": "22.
|
|
84
|
+
"version": "22.1.1"
|
|
85
85
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
const asyncAuto = require('async/auto');
|
|
2
2
|
const {returnResult} = require('asyncjs-util');
|
|
3
|
-
const {SocksProxyAgent} = require('socks-proxy-agent');
|
|
4
3
|
|
|
5
4
|
const {parse} = JSON;
|
|
6
5
|
|
|
7
6
|
/** Get a SOCKS proxy given a JSON configuration file path
|
|
8
|
-
|
|
9
7
|
{
|
|
10
8
|
fs: {
|
|
11
9
|
getFile: <Get File From Filesystem Function>
|
|
@@ -34,6 +32,17 @@ module.exports = ({fs, path}, cbk) => {
|
|
|
34
32
|
return cbk();
|
|
35
33
|
},
|
|
36
34
|
|
|
35
|
+
// Import socks-proxy-agent as ESM
|
|
36
|
+
getSocksAgent: ['validate', async ({}) => {
|
|
37
|
+
try {
|
|
38
|
+
const {SocksProxyAgent} = await import('socks-proxy-agent');
|
|
39
|
+
|
|
40
|
+
return SocksProxyAgent;
|
|
41
|
+
} catch (err) {
|
|
42
|
+
throw([503, 'FailedToImportSocksProxyAgent', {err}]);
|
|
43
|
+
}
|
|
44
|
+
}],
|
|
45
|
+
|
|
37
46
|
// Get the configuration file
|
|
38
47
|
getFile: ['validate', ({}, cbk) => {
|
|
39
48
|
return fs.getFile(path, (err, res) => {
|
|
@@ -50,7 +59,7 @@ module.exports = ({fs, path}, cbk) => {
|
|
|
50
59
|
}],
|
|
51
60
|
|
|
52
61
|
// Construct the SOCKS proxy agent
|
|
53
|
-
agent: ['getFile', ({getFile}, cbk) => {
|
|
62
|
+
agent: ['getFile', 'getSocksAgent', ({getFile, getSocksAgent}, cbk) => {
|
|
54
63
|
try {
|
|
55
64
|
parse(getFile);
|
|
56
65
|
} catch (err) {
|
|
@@ -78,7 +87,7 @@ module.exports = ({fs, path}, cbk) => {
|
|
|
78
87
|
url.username = userId;
|
|
79
88
|
}
|
|
80
89
|
|
|
81
|
-
const agent = new
|
|
90
|
+
const agent = new getSocksAgent(url.toString());
|
|
82
91
|
|
|
83
92
|
return cbk(null, {agent});
|
|
84
93
|
} catch (err) {
|