LndHub icon indicating copy to clipboard operation
LndHub copied to clipboard

Admin commands for node operator

Open godSaysHODL opened this issue 3 years ago • 7 comments

It would be nice to add some basic commands for an admin user (maybe these already exist)

viewfee - view current fee % setfee - sets sending fees for LNDhub in terms of basis points (% of a %)

backup - command which downloads a file containing account backups

BankBalance - checks node balance against sum of all account balances

It would be super great to have some commands like this that umbrel and myNode could turn into a UI panel

godSaysHODL avatar May 13 '21 16:05 godSaysHODL

This could be had with a add on route handler installed without any big changes (some adds and one change fee hardcoded now at 0.01) to existing repo, it would be a combination of redis db calls and js LND calls together with a admin account login set at config.

The UI part could be to this new route handler API ... where in config besides the admin login also specifies the path to UI.

xraid avatar May 21 '21 21:05 xraid

It could be installed as a folder Extension add on as i did with the LNDhub LNURL-withdraw / LNURL-Pay Extension that only adds one line to LNDhub index.js

xraid avatar May 21 '21 21:05 xraid

// for UI reference await redis.set('_internalFee', internalFee); await redis.set('_forwardFee', forwardFee);

/** */ router.get('/admin/fees', async function (req, res) { logger.log('/admin', [req.id]);

let fees = LndHub Admin fees { forwardFee: ${forwardFee}, internalFee: ${internalFee} };

res.send(fees); });

Screenshot 2021-06-12 at 16 56 23

xraid avatar Jun 12 '21 15:06 xraid

Forwarding fee reserve 1% and internal fee 0.3% is set in config at startup and can be changed at runtime.

xraid avatar Jun 12 '21 15:06 xraid

Soon able to drop a PR for changes in LndHub for config fees at startup. And have a Extension Admin UI example that gives access to BlueWallet Lightning Protocol = LndHub API | Redis DB | LND gRPC

Installed as a separate folder with no changes to LndHub Repo other then add one-line in index.js

the example Extension LndHub Admin UI will come with a dynamic fee settings at runtime, as first component

Screenshot 2021-06-28 at 10 57 16

xraid avatar Jun 28 '21 08:06 xraid

Screenshot 2021-07-02 at 05 03 21

lndhub-admin avatar Jul 02 '21 03:07 lndhub-admin

TG : https://t.me/joinchat/L31KXn9TlDNmMTY0

lndhub-admin avatar Jul 03 '21 10:07 lndhub-admin