forked from Icofunding/0xProject.contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
globals.d.ts
47 lines (43 loc) · 1.48 KB
/
globals.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
declare module 'bn.js';
declare module 'ethereumjs-abi';
declare module 'es6-promisify';
declare module '*.json' {
const json: any;
/* tslint:disable */
export default json;
/* tslint:enable */
}
// Truffle injects the following into the global scope
declare var web3: any; // TODO: figure out how to use Web3 definition from within global.d.ts instead of `any`
declare var artifacts: any;
declare var contract: any;
declare var before: any;
declare var beforeEach: any;
declare var describe: any;
declare var it: any;
declare module 'ethereumjs-util' {
function bufferToHex(value: Buffer): string;
function ecrecover(msgHash: Buffer, v: number, r: Buffer, s: Buffer): Buffer;
function fromRpcSig(sig: string): {v: number, r: Buffer, s: Buffer};
function hashPersonalMessage(hash: Buffer): Buffer;
function isHexString(value: any): boolean;
function pubToAddress(pubKey: Buffer, sanitize?: boolean): Buffer;
function setLength(a: Buffer, length: number): Buffer;
function setLengthLeft(a: Buffer, length: number): Buffer;
function sha3(a: Buffer|string|number, bits?: number): Buffer;
function toBuffer(value: any): Buffer;
function isValidAddress(address: string): boolean;
export = {
bufferToHex,
ecrecover,
fromRpcSig,
hashPersonalMessage,
isHexString,
pubToAddress,
setLength,
setLengthLeft,
sha3,
toBuffer,
isValidAddress,
};
}