balanceofsatoshis 11.46.0 → 11.47.0

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
@@ -1,5 +1,9 @@
1
1
  # Versions
2
2
 
3
+ ## 11.47.0
4
+
5
+ - `telegram`: Add `/graph <node public key or peer alias>` to lookup node info
6
+
3
7
  ## 11.46.0
4
8
 
5
9
  - `telegram`: Add `/stop` command to terminate the running bot
package/package.json CHANGED
@@ -35,9 +35,9 @@
35
35
  "inquirer": "8.2.0",
36
36
  "invoices": "2.0.3",
37
37
  "ln-accounting": "5.0.5",
38
- "ln-service": "53.6.0",
38
+ "ln-service": "53.7.0",
39
39
  "ln-sync": "3.9.0",
40
- "ln-telegram": "3.13.0",
40
+ "ln-telegram": "3.14.0",
41
41
  "moment": "2.29.1",
42
42
  "paid-services": "3.11.0",
43
43
  "probing": "2.0.2",
@@ -77,9 +77,8 @@
77
77
  "scripts": {
78
78
  "build-docker": "docker build -t alexbosworth/balanceofsatoshis . && docker save alexbosworth/balanceofsatoshis > balanceofsatoshis.tar && gzip balanceofsatoshis.tar",
79
79
  "integration-tests": "tap --branches=1 --functions=1 --lines=1 --statements=1 -t 120 test/integration/*.js",
80
- "postpack": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag -s v$PACKAGE_VERSION -m v$PACKAGE_VERSION && git push github --tags",
81
80
  "postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis --push .",
82
81
  "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/wallets/*.js"
83
82
  },
84
- "version": "11.46.0"
83
+ "version": "11.47.0"
85
84
  }
@@ -19,6 +19,7 @@ const {handleConnectCommand} = require('ln-telegram');
19
19
  const {handleCostsCommand} = require('ln-telegram');
20
20
  const {handleEarningsCommand} = require('ln-telegram');
21
21
  const {handleEditedMessage} = require('ln-telegram');
22
+ const {handleGraphCommand} = require('ln-telegram');
22
23
  const {handleInvoiceCommand} = require('ln-telegram');
23
24
  const {handleLiquidityCommand} = require('ln-telegram');
24
25
  const {handleMempoolCommand} = require('ln-telegram');
@@ -267,6 +268,7 @@ module.exports = (args, cbk) => {
267
268
  {command: 'connect', description: 'Get connect code for the bot'},
268
269
  {command: 'costs', description: 'Show costs over the week'},
269
270
  {command: 'earnings', description: 'Show earnings over the week'},
271
+ {command: 'graph', description: 'Show info about a node'},
270
272
  {command: 'help', description: 'Show the list of commands'},
271
273
  {command: 'invoice', description: 'Create an invoice'},
272
274
  {command: 'liquidity', description: 'Get liquidity [with-peer]'},
@@ -357,6 +359,22 @@ module.exports = (args, cbk) => {
357
359
  return;
358
360
  });
359
361
 
362
+ bot.command('graph', async ctx => {
363
+ try {
364
+ await handleGraphCommand({
365
+ from: ctx.message.from.id,
366
+ id: connectedId,
367
+ nodes: allNodes,
368
+ remove: () => ctx.deleteMessage(),
369
+ reply: (message, options) => ctx.reply(message, options),
370
+ text: ctx.message.text,
371
+ working: () => ctx.replyWithChatAction('typing'),
372
+ });
373
+ } catch (err) {
374
+ logger.error({err});
375
+ }
376
+ });
377
+
360
378
  // Handle creation of an invoice
361
379
  bot.command('invoice', async ctx => {
362
380
  try {
@@ -494,6 +512,7 @@ module.exports = (args, cbk) => {
494
512
  '/connect - Connect bot',
495
513
  '/costs - View costs over the past week',
496
514
  '/earnings - View earnings over the past week',
515
+ '/graph [pubkey or peer alias] - Show info about a node',
497
516
  '/invoice [amount] [memo] - Make an invoice',
498
517
  '/liquidity [with] - View node liquidity',
499
518
  '/mempool - BTC mempool report',