Convenience fn to convert transaction to hex string