mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Add types for ethereumjs-tx (#26118)
This commit is contained in:
committed by
Mohamed Hegazy
parent
00f9711ca2
commit
2a260edbdb
4
types/ethereumjs-tx/ethereumjs-tx-tests.ts
Normal file
4
types/ethereumjs-tx/ethereumjs-tx-tests.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import EthereumjsTx = require('ethereumjs-tx');
|
||||
|
||||
const txParams = {};
|
||||
const tx = new EthereumjsTx(txParams);
|
||||
19
types/ethereumjs-tx/index.d.ts
vendored
Normal file
19
types/ethereumjs-tx/index.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Type definitions for ethereumjs-tx 1.0
|
||||
// Project: https://github.com/ethereumjs/ethereumjs-tx
|
||||
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node"/>
|
||||
|
||||
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;
|
||||
16
types/ethereumjs-tx/tsconfig.json
Normal file
16
types/ethereumjs-tx/tsconfig.json
Normal file
@@ -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"]
|
||||
}
|
||||
1
types/ethereumjs-tx/tslint.json
Normal file
1
types/ethereumjs-tx/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user