Transaction id computation

When I compute the transaction id of the transaction below using Transact._getHash() I get a different value than the actual transaction value reported back by the insight server which broadcasts it, how is this possible?
Ultimately, an independent (chain.com) block explorer on testnet also agrees with the insight server.

Transaction._getHash = 2ddd41a81a7d3bdbb46673016c9e20ed78464d0a68892f9192da69d0640ea932
explorers.Insight.broadcast = 32a90e64d069da92912f89680a4d4678ed209e6c017366b4db3b7d1aa841dd2d

And the transaction is

{
“version”: 1,
“inputs”: [
{
“prevTxId”: “d149e6aa79dbd5fc8327c85fb51400420f5f928cc7bda2ed5b28216878379050”,
“outputIndex”: 1,
“sequenceNumber”: 4294967295,
“script”: “72 0x3045022100a9671dc82000635c26f534af0c81a0fbac72845014a0a2852fefa6801992edea02201960a3d15c6e71b7a832452799d40d844b9578532f967824b51de4a0680d8fef01 33 0x02773dd84a472739c1009f6d5d7ddefefee31932d222036bd9855f3ca0bf36552a”,
“output”: {
“satoshis”: 741020,
“script”: “OP_DUP OP_HASH160 20 0x9852d39a421dc669f5208bdb471e551b10ee8180 OP_EQUALVERIFY OP_CHECKSIG”
}
}
],
“outputs”: [
{
“satoshis”: 2490,
“script”: “OP_2 33 0x035847c20f32a5f0add3fdda5fba3a7a77d788f776c4852abd9ed82a806a061532 33 0x03a77d237323bc1daf003cff8f29de598993072819a40277347008c53bd70ef775 OP_2 OP_CHECKMULTISIG”
},
{
“satoshis”: 728530,
“script”: “OP_DUP OP_HASH160 20 0x9c83b3b9507057400c4709a4044c01210aeb406e OP_EQUALVERIFY OP_CHECKSIG”
}
],
“nLockTime”: 0,
“changeScript”: “OP_DUP OP_HASH160 20 0x9c83b3b9507057400c4709a4044c01210aeb406e OP_EQUALVERIFY OP_CHECKSIG”,
“changeIndex”: 1
}

_getHash() returns the value in little endian (in serialized form)

tx.hash will return the expected result

@braydon thanks a lot, that cleared things up!

When building transactions and using Transactions.from(), which one should one use?

tx.hash in most cases should be used, and should be used with transaction.from(). In general, the only time that the reversed little endian format is needed is during serialization.