lib/transaction.js
function () {
        var Data = root.lookup("corepb.Data");
        var err = Data.verify(this.data);
        if (err) {
            throw new Error(err);
        }
        var data = Data.create(this.data);
        var dataBuffer = Data.encode(data).finish();
        var hash = cryptoUtils.sha3(
            this.from.getAddress(),
            this.to.getAddress(),
            cryptoUtils.padToBigEndian(this.value, 128),
            cryptoUtils.padToBigEndian(this.nonce, 64),
            cryptoUtils.padToBigEndian(this.timestamp, 64),
            dataBuffer,
            cryptoUtils.padToBigEndian(this.chainID, 32),
            cryptoUtils.padToBigEndian(this.gasPrice, 128),
            cryptoUtils.padToBigEndian(this.gasLimit, 128)
            );
        return hash;
    }
function () {
        var Data = root.lookup("corepb.Data");
        var err = Data.verify(this.data);
        if (err) {
            throw new Error(err);
        }
        var data = Data.create(this.data);
        var dataBuffer = Data.encode(data).finish();
        var hash = cryptoUtils.sha3(
            this.from.getAddress(),
            this.to.getAddress(),
            cryptoUtils.padToBigEndian(this.value, 128),
            cryptoUtils.padToBigEndian(this.nonce, 64),
            cryptoUtils.padToBigEndian(this.timestamp, 64),
            dataBuffer,
            cryptoUtils.padToBigEndian(this.chainID, 32),
            cryptoUtils.padToBigEndian(this.gasPrice, 128),
            cryptoUtils.padToBigEndian(this.gasLimit, 128)
            );
        return hash;
    }
function ( ) { var Data = root . lookup ( "corepb.Data" ) ; var err = Data . verify ( this . data ) ; if ( err ) { throw new Error ( err ) ; } var data = Data . create ( this . data ) ; var dataBuffer = Data . encode ( data ) . finish ( ) ; var hash = cryptoUtils . sha3 ( this . from . getAddress ( ) , this . to . getAddress ( ) , cryptoUtils . padToBigEndian ( this . value , 128 ) , cryptoUtils . padToBigEndian ( this . nonce , 64 ) , cryptoUtils . padToBigEndian ( this . timestamp , 64 ) , dataBuffer , cryptoUtils . padToBigEndian ( this . chainID , 32 ) , cryptoUtils . padToBigEndian ( this . gasPrice , 128 ) , cryptoUtils . padToBigEndian ( this . gasLimit , 128 ) ) ; return hash ; }
Convert transaction to hash by SHA3-256 algorithm.

@return {Hash} hash of Transaction.

@example
var acc = Account.NewAccount();

var tx = new Transaction({
chainID: 1,
from: acc,
to: "n1SAeQRVn33bamxN4ehWUT7JGdxipwn8b17",
value: 10,
nonce: 12,
gasPrice: 1000000,
gasLimit: 2000000
});
var txHash = tx.hashTransaction();
//Uint8Array(32) [211, 213, 102, 103, 23, 231, 246, 141, 20, 202, 210, 25, 92, 142, 162, 242, 232, 95, 44, 239, 45, 57, 241, 61, 34, 2, 213, 160, 17, 207, 75, 40]
Convert transaction to hash by SHA3 - 256 algorithm .