How to create transaction object to get rawtransaction in hex?