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

feat: proposal: custom node commands #1007

Merged
merged 16 commits into from
Jan 30, 2025
Merged

feat: proposal: custom node commands #1007

merged 16 commits into from
Jan 30, 2025

Conversation

rdmitr
Copy link
Collaborator

@rdmitr rdmitr commented Jan 17, 2025

Closes #965

@rdmitr rdmitr requested a review from rolznz January 17, 2025 07:46
@rolznz
Copy link
Contributor

rolznz commented Jan 22, 2025

I've added a simple frontend for it:

image

image

api/api.go Outdated Show resolved Hide resolved
http/http_service.go Outdated Show resolved Hide resolved
utils/utils.go Show resolved Hide resolved
@rolznz rolznz marked this pull request as ready for review January 22, 2025 09:45
@rolznz rolznz requested review from bumi and im-adithya January 22, 2025 09:45
lnclient/cashu/cashu.go Outdated Show resolved Hide resolved
@rolznz
Copy link
Contributor

rolznz commented Jan 27, 2025

I've tested the updates, still seems to be working as before. I think the tests need to be improved a bit and then from my side it's good to merge 🚀

Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

Copy link
Contributor

@bumi bumi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

why did you not split the command and the arguments input? the we would not need to do the string parsing, would we?

@rdmitr
Copy link
Collaborator Author

rdmitr commented Jan 30, 2025

@bumi

why did you not split the command and the arguments input? the we would not need to do the string parsing, would we?

We'd still have to split/parse the arguments, and it would also make the frontend responsible for splitting (since somebody's got to do it anyways 😄). So I figured I would keep the API as simple as possible by accepting a single command line.

Alternatively, it is possible to make an API endpoint that would accept structured requests (with proper command and arg structures passed as JSON...) instead of raw commands, but again, that would require more complex frontend.

@rolznz rolznz merged commit d799bdf into master Jan 30, 2025
9 of 10 checks passed
@rolznz rolznz deleted the feat/custom-node-commands branch January 30, 2025 11:20
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

Successfully merging this pull request may close these issues.

Add general node command API endpoint that can be executed from settings -> debug tools
3 participants