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

Add the transaction hash to the transactions in the getTransactions response #263

Closed
leighmcculloch opened this issue Aug 9, 2024 · 0 comments · Fixed by #299
Closed

Comments

@leighmcculloch
Copy link
Member

leighmcculloch commented Aug 9, 2024

What problem does your feature solve?

Make getting the identifier/hash of a transaction accessible.

What would you like to see?

Request:

{
  "jsonrpc": "2.0",
  "id": ...,
  "method": "getTransactions",
  "params": {
    "startLedger": ...,
  },
}

Response:

 {
   jsonrpc: "2.0",
   id: 0,
   result: {
     transactions: [
       {
+        hash: "30bfb0802d9aea95e9341c753b33ac78d9bb206c5bf110829b4026a4c00c2821",
         status: "FAILED",
         applicationOrder: 1,
         feeBump: false,
         envelopeXdr: "AAAAAgAAAABraisBXNgRPYfB16c3fe+AGAH6D/XrJTZJy4wMfKBEYAAehIAAABq4AAOPPQAAAAEAAAAAAAAAAAAAAABmtgNmAAAAAQAAAAlwc3BiOjQ0NTQAAAAAAAACAAAAAQAAAACKlutUN5GT3UOoE2BUkNtJEwoipGOinBFsQtXgpIZMxQAAAAEAAAAA433o+yremWU3t88cKpfpHR+JMFR44JHzmBGni6hqCEYAAAACQVRVU0QAAAAAAAAAAAAAAGfK1mN4mg51jbX6by6TWghGynQ463doEDgzriqZo9bzAAAAAAA4dSAAAAABAAAAAIqW61Q3kZPdQ6gTYFSQ20kTCiKkY6KcEWxC1eCkhkzFAAAAAQAAAADjfej7Kt6ZZTe3zxwql+kdH4kwVHjgkfOYEaeLqGoIRgAAAAJBVFVBSAAAAAAAAAAAAAAAZ8rWY3iaDnWNtfpvLpNaCEbKdDjrd2gQODOuKpmj1vMAAAAABo53gAAAAAAAAAACfKBEYAAAAEDgVC946dKXCXwXzL4pHrQuIqs2BweH8PU2i0BbDDqhOPZDv+bmX96vEn3lf10Q7TaLfidoSv63qBnt+Ekr6AsDpIZMxQAAAEA79mrevojxUBwxcfYvflGbZP3V7HSai96RrRl6G/Iqc8+90FNvtiwX+ukRPwBD8ouLDYlUzEeBQv2tN3hv2wkD",
         resultXdr: "AAAAAAAAAMj/////AAAAAgAAAAAAAAAB////+wAAAAAAAAAB////+wAAAAA=",
         resultMetaXdr: "AAAAAwAAAAAAAAACAAAAAwAOsp4AAAAAAAAAAGtqKwFc2BE9h8HXpzd974AYAfoP9eslNknLjAx8oERgAAAAF0WMiFwAABq4AAOPPAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAAA6ymQAAAABmtgMYAAAAAAAAAAEADrKeAAAAAAAAAABraisBXNgRPYfB16c3fe+AGAH6D/XrJTZJy4wMfKBEYAAAABdFjIhcAAAauAADjz0AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAOsp4AAAAAZrYDMQAAAAAAAAAAAAAAAAAAAAA=",
         ledger: 963230,
         createdAt: 1723204401
       },

What alternatives are there?

Alternatively developers can derive the hash by decoding the envelopeXdr, extracting the transaction, embedding the transaction into the transaction signed payload structure, embedding the appropriate network passphrase, xdr encoding the structure, and hashing it.

@aditya1702 aditya1702 self-assigned this Aug 12, 2024
@aditya1702 aditya1702 added this to the platform sprint 51 milestone Sep 19, 2024
@aditya1702 aditya1702 moved this from Backlog to To Do in Platform Scrum Sep 19, 2024
@aditya1702 aditya1702 added Protocol 22 breaking-change Breaking change tag and removed breaking-change Breaking change tag labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants