I want to get cborHex from cardano-cli transaction build
output and use it with cardano-serialization-lib to recreate the transaction body. I tried the following:
cborHex = '86a80081825820b9f5091d866b60db8ea3548d987fc237e5d89c8159aa6ddcee28fcf98b93860e000d80018282583900c19efef37292ee5b59ec5683ed52b537f43b1763f48469760affda73d6587eb03872ccf2ea313c55a5e6cfee9a409541dfa9b61fe35dfb921a3ab510f983581d70d5fa699784d82763328fbaee27412967a95f3371dfd69df3ceece8e71a004c4b405820851fe9c7b4b2e760c8b5f77a10963ea75a989f9285dcf988f637b814fd89946b021a0002c699031a03162a4508000e80075820f02f7b2a5ec946db2417a9afd42e27528763d39c3bf758fff7e9871230212c8e9fff8080f5d90103a100a1190cffa365646174756da26b636f6e7374727563746f7200666669656c647382a165627974657378386331396566656633373239326565356235396563353638336564353262353337663433623137363366343834363937363061666664613733a163696e741b000000075140a9da6b7573657241646472657373827840616464725f746573743171727165616c686e77326677756b366561337467386d326a6b356d6c67776368763036676736746b70746c613575376b74706c747177782c726a656e657735766675326b6a37646e6c776e6671663273776c34786d706c6336616c7766716e78306466326c77616e746564416d6f756e741b00000007b3d84700'
bytes = Buffer.from(cborHex, 'hex')
CardanoWasm.TransactionBody.from_bytes(bytes)
I am getting error
Uncaught Deserialization failed in TransactionBody because: Invalid cbor: not the right type, expected `Map' byte received `Array'
Is it possible to do this, and if yes what I am doing wrong?