Ooo, libbitcoin already has hash_transaction