Creates a new transaction object
Parameters
data
Properties
rawBuffer The raw rlp decoded transactionnonceBuffertoBuffer the to addressvalueBuffer the amount of ether sentdataBuffer this will contain the data of the message or the init of a contractvBuffer EC signature parameterrBuffer EC signature parametersBuffer EC recovery IDfromBuffer If you are not planing on signing the tx you can set the from property. If you do sign it will be over written
Examples
var rawTx = {
nonce: '00',
gasPrice: '09184e72a000',
gasLimit: '2710',
to: '0000000000000000000000000000000000000000',
value: '00',
data: '7f7465737432000000000000000000000000000000000000000000000000000000600057',
v: '1c',
r: '5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab',
s '5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13'
};
var tx = new Transaction(rawTx);the minimum amount of gas the tx must have (DataFee + TxFee)
Returns BN
The amount of gas paid for the data in this tx
Returns BN
returns the sender`s address
Returns Buffer
returns the public key of the sender
Returns Buffer
the up front amount that an account must have for this transaction to be valid
Returns BN
Computes a sha3-256 hash of the serialized tx
Parameters
signature[Boolean] whether or not to inculde the signature (optional, defaulttrue)
Returns Buffer
Returns the rlp encoding of the transaction
Returns Buffer
sign a transaction with a given a private key
Parameters
privateKeyBuffer
validates the signature and checks to see if it has enough gas
Parameters
stringError[Boolean] whether to return a string with a dscription of why the validation failed or return a Bloolean (optional, defaultfalse)
Returns Boolean or String
Determines if the signature is valid
Returns Boolean