diff --git a/types/ethereumjs-tx/ethereumjs-tx-tests.ts b/types/ethereumjs-tx/ethereumjs-tx-tests.ts new file mode 100644 index 0000000000..393dfd81d7 --- /dev/null +++ b/types/ethereumjs-tx/ethereumjs-tx-tests.ts @@ -0,0 +1,4 @@ +import EthereumjsTx = require('ethereumjs-tx'); + +const txParams = {}; +const tx = new EthereumjsTx(txParams); diff --git a/types/ethereumjs-tx/index.d.ts b/types/ethereumjs-tx/index.d.ts new file mode 100644 index 0000000000..1d52f5f8a4 --- /dev/null +++ b/types/ethereumjs-tx/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for ethereumjs-tx 1.0 +// Project: https://github.com/ethereumjs/ethereumjs-tx +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare class EthereumTx { + raw: Buffer[]; + r: Buffer; + s: Buffer; + v: Buffer; + nonce: Buffer; + serialize(): Buffer; + sign(buffer: Buffer): void; + getSenderAddress(): Buffer; + constructor(txParams: any); +} +export = EthereumTx; diff --git a/types/ethereumjs-tx/tsconfig.json b/types/ethereumjs-tx/tsconfig.json new file mode 100644 index 0000000000..8909d40844 --- /dev/null +++ b/types/ethereumjs-tx/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "ethereumjs-tx-tests.ts"] +} diff --git a/types/ethereumjs-tx/tslint.json b/types/ethereumjs-tx/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ethereumjs-tx/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }