| 1 2 3 4 5 6 7 8 9 10 11 | 4x 4x 22x 22x 22x | import serializeTransactionIntoCanonicalString from './serializeTransactionIntoCanonicalString'
import sha256Hash from '../sha256Hash'
export default function hashTransaction(transaction) {
// Safely remove any tx id from the given transaction for hashing
const tx = { ...transaction }
delete tx.id
return sha256Hash(serializeTransactionIntoCanonicalString(tx))
}
|