Add new properties and functions for ethereumjs-tx (#31409)

This commit is contained in:
David Mihal
2018-12-20 08:27:50 -08:00
committed by Nathan Shively-Sanders
parent e42357a571
commit f0ece96cd3
+18
View File
@@ -1,19 +1,37 @@
// Type definitions for ethereumjs-tx 1.0
// Project: https://github.com/ethereumjs/ethereumjs-tx
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
// David Mihal <https://github.com/dmihal>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node"/>
import BN = require("bn.js");
declare class EthereumTx {
raw: Buffer[];
r: Buffer;
s: Buffer;
v: Buffer;
nonce: Buffer;
gasPrice: Buffer;
gasLimit: Buffer;
to: Buffer;
value: Buffer;
data: Buffer;
serialize(): Buffer;
sign(buffer: Buffer): void;
toJSON(): string | string[];
toCreationAddress(): boolean;
hash(includeSignature?: boolean): Buffer;
getChainId(): Buffer;
getSenderAddress(): Buffer;
getSenderPublicKey(): Buffer;
verifySignature(): boolean;
getDataFee(): BN;
getBaseFee(): BN;
getUpfrontCost(): BN;
validate(stringError?: boolean): string | boolean;
constructor(txParams: any);
}
export = EthereumTx;