Provide a method to peek at a serialized transaction to determine whether it's an elements transaction or not
The code internally already has methods that detect serialization formats, but it is not exposed anywhere. It'd be nice to be able to peek at a serialized transaction and determine its serialization type.
Currently the only alternative is to know ahead of time, or first try one method, and if that fails try the other, which is a bit cumbersome.
For an example of this see this commit: we have to pass in is_elements in the wire message before parsing the transaction included in the same message so we can set that global variable and parse correctly.
This would be my preferred option as opposed to #139. if we were to do this then we could simply remove the ELEMENTS flag altogether since tx_from_hex/bytes is the only place where is/should be needed.