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

[feature-request]: Enhance listtransactions rpc #7397

Open
niteshbalusu11 opened this issue Jun 15, 2024 · 2 comments
Open

[feature-request]: Enhance listtransactions rpc #7397

niteshbalusu11 opened this issue Jun 15, 2024 · 2 comments

Comments

@niteshbalusu11
Copy link

niteshbalusu11 commented Jun 15, 2024

I was working on a transactions view in zeus for onchain and noticed that to get info on actual deposits and withdrawals, its really hard in CLN. I am having to work with 3 different RPCs to get accurate info on what the tx is for.
Have to do listaccountevents which is an expensive call because it returns a lot of stuff and also check against listtransactions.

A nice improvement to listtransactions rpc would be to add a tag and type to indicate what transaction it is so that we can easily get the actual info of the tx that's going out or coming in.
It would also also extremely help if the outputs are tagged saying if its change coming back to our wallet or going to an external address.

This is just my thoughts on the rpc, open to other ideas if there are better ways of doing this.

@lnbc1QWFyb24
Copy link

Yeah it is definitely not easy to categorise onchain transactions with the API as it currently is, and I agree it would be nice if the inputs and outputs were tagged indicating if the wallet owns them. The bkpr-listaccountevents command also does not include events that happened before that plugin was added as far as I am aware.

Another way you can approach it for now is to use the listfunds command with spent=true to get all utxos that the wallet knows about under the outputs param of the response. You can then match the utxos to onchain transactions from listtransactions and infer whether inputs were spent, outputs are change or receives etc. Again not the greatest dev experience, but doable.

@kaloudis
Copy link

This comment does a pretty good job at illustrating the issue at hand: ZeusLN/zeus#2228 (comment)

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