-
Notifications
You must be signed in to change notification settings - Fork 567
Failing to decode txs from encodeForSigning
Elliot. edited this page Jun 2, 2025
·
1 revision
The xrpl4j library can encode transactions using the encodeForSigning method.
Currently, xrpl.js fails to decode these transactions, regardless of tx type.
This is because encodeForSigning adds a prefix. You can remove the leading 53545800 hex from the encoded transaction in order for xrpl.js to decode it.
It only works if you use encode, not encodeForSigning.
xrpl4j does automatic prefix stripping when decoding: https://github.com/XRPLF/xrpl4j/issues/278
xrpl.js and xrpl-py would need to be updated to match xrpl4j and strip the prefix when decoding.
The prefix is likely used by rippled.