Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin commands for node operator #196

Open
godSaysHODL opened this issue May 13, 2021 · 7 comments
Open

Admin commands for node operator #196

godSaysHODL opened this issue May 13, 2021 · 7 comments

Comments

@godSaysHODL
Copy link

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

@xraid
Copy link
Contributor

xraid commented May 21, 2021

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
Copy link
Contributor

xraid commented May 21, 2021

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
Copy link
Contributor

xraid commented Jun 12, 2021

// 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
Copy link
Contributor

xraid commented Jun 12, 2021

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

@xraid
Copy link
Contributor

xraid commented Jun 28, 2021

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

@lndhub-admin
Copy link
Contributor

Screenshot 2021-07-02 at 05 03 21

@lndhub-admin
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants