3

How do you calculate the Id of a given transaction?

I have hex encoded signed transaction like this:

83a40081825820e6121528557c30515de581cf9284cedaa28d0e2f3967796fe597362ae3dc685901018282583900d445112afba4f34d531df640655a5d14b705fac06bfda87a5726d22d92a2116978a42962d86b55a65ce4f2057c38554a94af14a2d5cbd9631a000f42408258390068f9a99aee42f752737bcfc55058caabce8506752d86ee15d03b389457f91c8a1d4e92e22cecc222ecad40d5945cff39ef5e0571d2799abd1a3b772070021a00029204031a025fca45a1008182582030e0387eec27858662d4c2b233b604a1c9c64087656df6d5c8bd767109fadd1858402c5c17e237f01ebc2679c56984391fe42a323e9ea649e02d0fc4141a27ff621048d8a9f80c23affa95de83cdc1d9cf1b5c776edebdd32e87731eb2515b4cca0ff6

When I broadcasted the data, I got the following id:

6eee20dfb476e0d113d22a18246bec044bbb857d97e892f0789e05d486b27fde

So I was wondering if there's a way for me to calculate the id with given transaction data. I found this article:

https://emurgo.io/en/blog/understanding-unspent-transaction-outputs-in-cardano

and tried Blake2b256 hash, but it produced different value.

76b1d252029ef367eb95c782968a41eb7bb1d6f4968f6f38be0ae03ec283bce4

1 Answer 1

1

You are looking for blake2b-256 digest of the cbor-encoded transaction body.

Thanks to KtorZ to help with this.

1
  • I see, thank you!
    – Hiroto
    Oct 16, 2021 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.