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

Return related transaction to public keys in API #213

Closed
SamsungGalaxyPlayer opened this issue Aug 11, 2020 · 8 comments
Closed

Return related transaction to public keys in API #213

SamsungGalaxyPlayer opened this issue Aug 11, 2020 · 8 comments

Comments

@SamsungGalaxyPlayer
Copy link

The browser currently allows you to work backwards from a decoy output to the transaction that it is created in. This is not possible when using the API. The API presents the "block_no" and "public_key." While I can query the block for the list of transactions and build a local database to see which transaction matches the public key, I would rather the API return the transaction that the public_key is associated with like in the web version. This would save me multiple API requests when trying to work backwards from decoys.

@moneroexamples
Copy link
Owner

Thanks for the info. I will check that.

@rbrunner7
Copy link

I stumbled over the same issue today. While the public keys that the API now returns in the mixin data are very hard to process further, transaction hashes would be much more useful and of course straightforward to process.

@moneroexamples
Copy link
Owner

You mean the following APi endpoint?

api/outputs?txhash=<tx_hash>&address=&viewkey=&txprove=<0|1>

@rbrunner7
Copy link

No, like most probably @SamsungGalaxyPlayer as well I refer to api/transaction/<tx_hash>. When it lists the "mixins" of the transaction, it gives "public_key". This is quite unwieldy to query further as far as I could see.

Imagine I want to use the API to produce a nice list of the ring members of a transaction, showing which transactions the decoy outputs are from, like the explorer does in HTML.

As a workaround I intend to use that, grab the HTML the explorer produces and locate the links to the ring members to get at the info, as an alternative to using the API.

@moneroexamples
Copy link
Owner

moneroexamples commented Mar 26, 2021

Added to branch https://github.com/moneroexamples/onion-monero-blockchain-explorer/tree/api_tx

The branch builds with monero's release-v0.17. If you have time, you can check if possible.

@SamsungGalaxyPlayer Sorry it took so long.

@moneroexamples moneroexamples mentioned this issue Apr 2, 2021
@rbrunner7
Copy link

Tested, works. Thanks!

@moneroexamples
Copy link
Owner

moneroexamples commented Apr 3, 2021

@rbrunner7 Thanks. Soon will merge to master branch.

@moneroexamples
Copy link
Owner

Marge. Closing.
#229

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