xrpl.js has setTransactionFlagsToNumber() to convert flags from a map of names to an integer, and parseAccountRootFlags() for going from an AccountRoot object's flags integer to a map of booleans, but there's no helper to parse transaction flags from an integer into a map of booleans.
This is a common point of confusion for new XRPL devs, who don't know for example why, for example, this transaction has "Flags":2148007936 when there is no flag with the value 2148007936. (It's actually the combination of two flags, tfSell and tfFullyCanonicalSig.)
I suggest adding a parseTransactionFlags(transaction) method that returns a map of flag names with booleans, e.g.:
{
"tfSell": true,
"tfFullyCanonicalSig": true
}
I'm ambivalent about whether it should include flags with the value false (meaning, ones that are valid for this transaction type but not enabled).
xrpl.js has
setTransactionFlagsToNumber()to convert flags from a map of names to an integer, andparseAccountRootFlags()for going from an AccountRoot object's flags integer to a map of booleans, but there's no helper to parse transaction flags from an integer into a map of booleans.This is a common point of confusion for new XRPL devs, who don't know for example why, for example, this transaction has
"Flags":2148007936when there is no flag with the value 2148007936. (It's actually the combination of two flags, tfSell and tfFullyCanonicalSig.)I suggest adding a
parseTransactionFlags(transaction)method that returns a map of flag names with booleans, e.g.:{ "tfSell": true, "tfFullyCanonicalSig": true }I'm ambivalent about whether it should include flags with the value
false(meaning, ones that are valid for this transaction type but not enabled).