Closed dev-dantealighieri closed 3 months ago
Hello @dev-dantealighieri, Sorry I don't how you build the transaction? You used rosetta to build this transaction? And then signed it?
Are you using the current release or already node 9.0? Could you provide me more details?
hello @dev-dantealighieri
Rosetta actually adds extra envelopes around it's objects. If you decode (https://cbor.me) your payload, you'll see:
["84a40081825820c9076df9cd4b850ce12c32d9e2d401c20d207c954a8d8b7a746ef6f87436e841010181825839018ff5e406f728a1b21f566ca836b661e8d5cc97417ebbc4ef1a0ca6198ff5e406f728a1b21f566ca836b661e8d5cc97417ebbc4ef1a0ca6191a001967e2021a000285a1031affffffffa10081825820a2f32c4c4c3b33940e6995288aeb0b966f2fa75a4561719149666bad5a842cb758401b84e14cd9b9ade72b8c37512be7d8a354189281ec48767c0899bf0802229d95b842437a22467d597b65c90a1435af4d91b17ebb5db0b618136628a4a2fe170af5f6", {"operations": []}]
The above data structure is not a valid Cardano transaction according to the CDDL specs. But if you take the inside of this "84a400....5f6" and CBOR decode this it does return a valid format.
I've confirmed this by running the below code in CSL:
var signed_tx = "84a40081825820c9076df9cd4b850ce12c32d9e2d401c20d207c954a8d8b7a746ef6f87436e841010181825839018ff5e406f728a1b21f566ca836b661e8d5cc97417ebbc4ef1a0ca6198ff5e406f728a1b21f566ca836b661e8d5cc97417ebbc4ef1a0ca6191a001967e2021a000285a1031affffffffa10081825820a2f32c4c4c3b33940e6995288aeb0b966f2fa75a4561719149666bad5a842cb758401b84e14cd9b9ade72b8c37512be7d8a354189281ec48767c0899bf0802229d95b842437a22467d597b65c90a1435af4d91b17ebb5db0b618136628a4a2fe170af5f6"
var tx = CardanoWasm.wasm.Transaction.from_bytes(buffer.Buffer.from(signed_tx, 'hex'))
console.log(tx.body().outputs().get(0).address().to_bech32())
I hope this clarifies your issue!
i didn't see your reply, i solved the issue but thanks anyway!
https://github.com/cardano-foundation/cardano-rosetta/issues/566#issuecomment-2236181963
Ask a question
hi
I cannot get txhash from parse endpoint of you, and I get the following error when I try to deserialize signed transaction using
cardano-serialization-lib
, i used rosetta to construct and sign the transaction, what might be the problem?thanks, dante
example signed transaction that i want to deserialize: