[Batch] Add Ledger Object Hashing
Batch can sometimes require you to know the hash of the ledger entry object before processing therefore I would recommend we add the hashing functionality for all ledger objects into this repo so that developers don't need to build their own hashing functions.
Hello Dennis, could you elaborate on this issue?
The inner batch transactions are similar to the XRPL transactions, except for the fields pertaining to the Fees and Sequence. Do you have any Batch-specific examples where we would need ledger-object-hashes?
Furthermore, I would fetch the said ledger object via account_objects, ledger_entry (or) similar RPC calls. These responses contain an index field that supplies me with the said hash. Is this method not sufficient?
If a batch creates the object you dont have the object id... A great example is NFToken Offer and Accept in the same batch.
These functions already exist in xrpl.js however they are not feature complete, only a few of the object id hashing functions exist.
This library doesnt have any of the hashing functionality but you can take it from this repo:
https://github.com/Xahau/xahau-py/blob/xahau-main/xahau/utils/hash_utils.py