Emurgo / cardano-serialization-lib

This is a library, written in Rust, for serialization & deserialization of data structures used in Cardano's Haskell implementation of Alonzo along with useful utility functions.
Other
231 stars 125 forks source link

tx hash #675

Closed dev-dantealighieri closed 1 month ago

dev-dantealighieri commented 1 month ago

hi

how can i get transaction hash from signed transaction that is ready to submit to the chain, using this library?

thanks, dante

lisicky commented 1 month ago

Hey @dev-dantealighieri ! If it tx that created by CSL you can use hash_transaction function

dev-dantealighieri commented 1 month ago

hi thanks,

i created it using cardano rosetta, i have the signed transaction, how can i extract it from that!

lisicky commented 1 month ago

This https://github.com/Emurgo/cardano-serialization-lib/issues/604#issuecomment-1475410869 should help to calculate correct tx hash from cbor of tx that was made by third party tool

dev-dantealighieri commented 1 month ago

i solved it, thank you anyway!

im leaving the solution in case anyone needs it!