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

Transaction hash #10

Open
hastom opened this issue Mar 14, 2023 · 2 comments
Open

Transaction hash #10

hastom opened this issue Mar 14, 2023 · 2 comments

Comments

@hastom
Copy link

hastom commented Mar 14, 2023

Transaction does not contain its own hash, only hash of previous transaction. It’s quite inconvenient, e.g in scenarios when one wants to persist transactions in database. Also toncenter’s response has it, though it’s not encoded in “data” field. Could you please add it?

@ex3ndr
Copy link
Contributor

ex3ndr commented Mar 14, 2023

You just convert transaction to cell and get it's hash. It would match the one in blockchain.

@hastom
Copy link
Author

hastom commented Mar 14, 2023

Ok, but it looks complicated for me. Is there a built-in method for this or should I inverse loadTransaction? Also it's kinda unnecessary work, cause hash is already calculated, why bother recalculating it and not just copy?

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

2 participants