mirror of
https://github.com/alexbosworth/balanceofsatoshis.git
synced 2026-08-13 12:33:37 +02:00
add telegram pending command, add initiator to find command
This commit is contained in:
parent
5e7a51cfe0
commit
ba7c35b42f
6 changed files with 586 additions and 754 deletions
|
|
@ -3,7 +3,6 @@ language: node_js
|
|||
node_js:
|
||||
- 14
|
||||
- 12
|
||||
- 10
|
||||
|
||||
os:
|
||||
- linux
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
# Versions
|
||||
|
||||
## Version 8.0.0
|
||||
|
||||
Support is ended for nodejs 10, nodejs 12 or higher is required
|
||||
|
||||
- `find`: Indicate if a peer initiated a found channel
|
||||
- `telegram`: Add `/pending` command to view pending HTLCs and channels
|
||||
|
||||
## Version 7.19.0
|
||||
|
||||
- `peers`: Add `--tag` option to show only one or more tags in the output
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ module.exports = ({lnd, query}, cbk) => {
|
|||
liquidity: `${outbound} | ${inbound}`,
|
||||
capacity: formatTokens({tokens: chan.capacity}).display,
|
||||
funding: `${chan.transaction_id} ${chan.transaction_vout}`,
|
||||
peer_created: chan.is_partner_initiated || undefined,
|
||||
};
|
||||
}),
|
||||
}
|
||||
|
|
|
|||
1298
package-lock.json
generated
1298
package-lock.json
generated
File diff suppressed because it is too large
Load diff
18
package.json
18
package.json
|
|
@ -20,21 +20,21 @@
|
|||
"bolt03": "1.2.7",
|
||||
"bolt07": "1.7.0",
|
||||
"caporal": "1.4.0",
|
||||
"cbor": "7.0.1",
|
||||
"cbor": "7.0.3",
|
||||
"cert-info": "1.5.1",
|
||||
"colorette": "1.2.1",
|
||||
"colorette": "1.2.2",
|
||||
"crypto-js": "4.0.0",
|
||||
"csv-parse": "4.15.1",
|
||||
"csv-parse": "4.15.3",
|
||||
"goldengate": "10.0.1",
|
||||
"hot-formula-parser": "4.0.0",
|
||||
"import-lazy": "4.0.0",
|
||||
"ini": "2.0.0",
|
||||
"inquirer": "7.3.3",
|
||||
"inquirer": "8.0.0",
|
||||
"invoices": "1.1.5",
|
||||
"ln-accounting": "4.2.5",
|
||||
"ln-service": "51.1.0",
|
||||
"ln-service": "51.2.0",
|
||||
"ln-sync": "0.4.3",
|
||||
"ln-telegram": "3.1.0",
|
||||
"ln-telegram": "3.2.0",
|
||||
"moment": "2.29.1",
|
||||
"node-fetch": "2.6.1",
|
||||
"probing": "1.3.3",
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
"sanitize-filename": "1.6.3",
|
||||
"stats-lite": "2.2.0",
|
||||
"table": "6.0.7",
|
||||
"telegraf": "4.1.0",
|
||||
"telegraf": "4.1.2",
|
||||
"update-notifier": "5.1.0",
|
||||
"window-size": "1.1.1"
|
||||
},
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
"tap": "14.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.12.0"
|
||||
"node": ">=12"
|
||||
},
|
||||
"keywords": [
|
||||
"cli",
|
||||
|
|
@ -76,5 +76,5 @@
|
|||
"postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis --push .",
|
||||
"test": "tap -t 60 test/arrays/*.js test/balances/*.js test/chain/*.js test/display/*.js test/encryption/*.js test/fiat/*.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/wallets/*.js"
|
||||
},
|
||||
"version": "7.19.0"
|
||||
"version": "8.0.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ const {handleInvoiceCommand} = require('ln-telegram');
|
|||
const {handleLiquidityCommand} = require('ln-telegram');
|
||||
const {handleMempoolCommand} = require('ln-telegram');
|
||||
const {handlePayCommand} = require('ln-telegram');
|
||||
const {handlePendingCommand} = require('ln-telegram');
|
||||
const {handleVersionCommand} = require('ln-telegram');
|
||||
const inquirer = require('inquirer');
|
||||
const {notifyOfForwards} = require('ln-telegram');
|
||||
|
|
@ -187,6 +188,7 @@ module.exports = ({fs, id, limits, lnds, logger, payments, request}, cbk) => {
|
|||
{command: 'liquidity', description: 'Get liquidity [with-peer]'},
|
||||
{command: 'mempool', description: 'Get info about the mempool'},
|
||||
{command: 'pay', description: 'Pay a payment request'},
|
||||
{command: 'pending', description: 'Get pending forwards, channels'},
|
||||
{command: 'version', description: 'View current bot version'},
|
||||
]);
|
||||
|
||||
|
|
@ -354,6 +356,19 @@ module.exports = ({fs, id, limits, lnds, logger, payments, request}, cbk) => {
|
|||
return;
|
||||
});
|
||||
|
||||
bot.command('pending', async ctx => {
|
||||
try {
|
||||
return await handlePendingCommand({
|
||||
from: ctx.message.from.id,
|
||||
id: connectedId,
|
||||
nodes: getNodes,
|
||||
reply: n => ctx.replyWithMarkdown(n),
|
||||
});
|
||||
} catch (err) {
|
||||
return logger.error({err});
|
||||
}
|
||||
});
|
||||
|
||||
bot.command('version', async ctx => {
|
||||
return await handleVersionCommand({
|
||||
named,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue