You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created transaction with @emurgo/cardano-serialization-lib-nodejs
Singed tx with this library
Send signed tx to the my local node (cardano-rossetta)
BUT
With that (signed tx which transfred to the node ) , can not create offline txId before sending transaction.
So, why signed-tx-hex (txHex) can transfer to the node but can not deseriaize and create txId?
If my code for creating txId is not correct , please guid me to create txId offline before sending tx to the network.
Steps to reproduce the bug
txHex == signed transaction hash
1- Send well formatted transaction with:
const hashResponse = await constructionSubmit(txHex);
return hashResponse.transaction_identifier.hash;
2- Try to create offline txId from txHex (which is input of constructionSubmit function) with below code:
const txHas = 'signed-tx-hash';
const signedTransactionBytes = Buffer.from(txHas, 'hex');
const parsed = TransactionHash.from_bytes(signedTransactionBytes); ----> This line created above error, instead of deserialization of signed-tx-hash
const hashBuffer = parsed && parsed.body() && Buffer.from(hash_transaction(parsed.body()).to_bytes());
Actual Result
Getting Error:
Deserialization failed in TransactionHash because: Invalid cbor: expected tuple 'hash length' of length 32 but got length Len(485).
From The Code :
const txHas = 'signed-tx-hash';
const signedTransactionBytes = Buffer.from(txHas, 'hex');
const parsed = TransactionHash.from_bytes(signedTransactionBytes); ----> This line created above error, instead of deserialization of signed-tx-hash
const hashBuffer = parsed && parsed.body() && Buffer.from(hash_transaction(parsed.body()).to_bytes());
Expected Result
I expect that, create offline txId. Actually I need to create txId offline.
Environment
Mainnet - local node using cardano-rosetta
Platform
Linux (Ubuntu)
Linux (Other)
macOS
Windows
Platform version
Ubuntu 18.04.6
Runtime
Node.js
Docker
Runtime version
v12.18.3
The text was updated successfully, but these errors were encountered:
Summary
I created transaction with @emurgo/cardano-serialization-lib-nodejs
Singed tx with this library
Send signed tx to the my local node (cardano-rossetta)
BUT
With that (signed tx which transfred to the node ) , can not create offline txId before sending transaction.
So, why signed-tx-hex (txHex) can transfer to the node but can not deseriaize and create txId?
If my code for creating txId is not correct , please guid me to create txId offline before sending tx to the network.
Steps to reproduce the bug
txHex == signed transaction hash
1- Send well formatted transaction with:
const hashResponse = await constructionSubmit(txHex);
return hashResponse.transaction_identifier.hash;
2- Try to create offline txId from txHex (which is input of constructionSubmit function) with below code:
Actual Result
Getting Error:
Deserialization failed in TransactionHash because: Invalid cbor: expected tuple 'hash length' of length 32 but got length Len(485).
From The Code :
Expected Result
I expect that, create offline txId. Actually I need to create txId offline.
Environment
Mainnet - local node using cardano-rosetta
Platform
Platform version
Ubuntu 18.04.6
Runtime
Runtime version
v12.18.3
The text was updated successfully, but these errors were encountered: