ethereumjs-tx
Advanced tools
Comparing version 0.7.2 to 0.7.3
29
index.js
const ethUtil = require('ethereumjs-util') | ||
const fees = require('ethereum-common') | ||
const BN = ethUtil.BN | ||
const rlp = ethUtil.rlp | ||
@@ -56,2 +55,3 @@ // secp256k1n/2 | ||
name: 'gasLimit', | ||
alias: 'gas', | ||
length: 32, | ||
@@ -95,7 +95,3 @@ allowLess: true, | ||
get: function () { | ||
if (this._from) { | ||
return this._from | ||
} | ||
this._from = this.getSenderAddress() | ||
return this._from | ||
return this.getSenderAddress() | ||
}, | ||
@@ -107,2 +103,8 @@ set: function (v) { | ||
/** | ||
* Returns the rlp encoding of the transaction | ||
* @method serialize | ||
* @return {Buffer} | ||
*/ | ||
// attached serialize | ||
ethUtil.defineProperties(this, fields, data) | ||
@@ -113,11 +115,2 @@ this._homestead = true | ||
/** | ||
* Returns the rlp encoding of the transaction | ||
* @method serialize | ||
* @return {Buffer} | ||
*/ | ||
Transaction.prototype.serialize = function () { | ||
return rlp.encode(this.raw) | ||
} | ||
/** | ||
* If the tx's `to` is to the creation address | ||
@@ -156,4 +149,8 @@ * @method toCreationAddress | ||
Transaction.prototype.getSenderAddress = function () { | ||
if (this._from) { | ||
return this._from | ||
} | ||
var pubkey = this.getSenderPublicKey() | ||
return ethUtil.publicToAddress(pubkey) | ||
this._from = ethUtil.publicToAddress(pubkey) | ||
return this._from | ||
} | ||
@@ -160,0 +157,0 @@ |
{ | ||
"name": "ethereumjs-tx", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "An simple module for creating, manipulating and signing ethereum transactions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1691087
36173