aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-26 01:39:44 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-10 18:24:32 +0800
commit5c4a1dcbd5548375c8ee6b80f0f54de61e48423e (patch)
treed1255a32010d03731b6d36a282082685f79ea950 /packages
parent4f488dee61db34b29a61ada11b89ac1dac501891 (diff)
downloaddexon-0x-contracts-5c4a1dcbd5548375c8ee6b80f0f54de61e48423e.tar
dexon-0x-contracts-5c4a1dcbd5548375c8ee6b80f0f54de61e48423e.tar.gz
dexon-0x-contracts-5c4a1dcbd5548375c8ee6b80f0f54de61e48423e.tar.bz2
dexon-0x-contracts-5c4a1dcbd5548375c8ee6b80f0f54de61e48423e.tar.lz
dexon-0x-contracts-5c4a1dcbd5548375c8ee6b80f0f54de61e48423e.tar.xz
dexon-0x-contracts-5c4a1dcbd5548375c8ee6b80f0f54de61e48423e.tar.zst
dexon-0x-contracts-5c4a1dcbd5548375c8ee6b80f0f54de61e48423e.zip
Move interface definitions into the web3 namespace
Diffstat (limited to 'packages')
-rw-r--r--packages/web3-typescript-typings/index.d.ts64
1 files changed, 32 insertions, 32 deletions
diff --git a/packages/web3-typescript-typings/index.d.ts b/packages/web3-typescript-typings/index.d.ts
index a05a3d809..acab855bb 100644
--- a/packages/web3-typescript-typings/index.d.ts
+++ b/packages/web3-typescript-typings/index.d.ts
@@ -19,61 +19,61 @@ declare module 'web3' {
sign(address: string, message: string, callback: (err: Error, signData: string) => void): string;
getBlock(blockHash: string, callback: (err: Error, blockObj: any) => void): BigNumber.BigNumber;
getBlockNumber(callback: (err: Error, blockNumber: number) => void): void;
- contract(abi: AbiDefinition[]): Contract;
+ contract(abi: Web3.AbiDefinition[]): Web3.Contract;
getBalance(addressHexString: string,
callback?: (err: any, result: BigNumber.BigNumber) => void): BigNumber.BigNumber;
getCode(addressHexString: string,
callback?: (err: any, code: string) => void): string;
- filter(value: string|FilterObject): FilterResult;
+ filter(value: string|Web3.FilterObject): Web3.FilterResult;
getAccounts(callback: (err: Error, value: any) => void): string[];
sendTransaction(txData: any, callback: (err: Error, value: any) => void): void;
getTransactionReceipt(txHash: string, callback: (err: Error, receipt: any) => void): void;
};
- public setProvider(provider: Provider): void;
+ public setProvider(provider: Web3.Provider): void;
public currentProvider(): any;
public fromWei(amount: number|BigNumber.BigNumber, unit: string): BigNumber.BigNumber;
public toWei(amount: number|BigNumber.BigNumber, unit: string): BigNumber.BigNumber;
public isAddress(address: string): boolean;
}
- export interface AbiIOParameter {
- name: string;
- type: string;
- }
-
- export interface AbiDefinition {
- constants: boolean;
- inputs: AbiIOParameter[];
- name: string;
- outputs: AbiIOParameter[];
- type: string;
+ namespace providers {
+ class HttpProvider implements Web3.Provider {
+ constructor(url?: string);
+ }
}
- export interface Contract {}
+ namespace Web3 {
+ interface AbiIOParameter {
+ name: string;
+ type: string;
+ }
- export interface FilterObject {
- fromBlock: number|string;
- toBlock: number|string;
- address: string;
- topics: string[];
- }
+ interface AbiDefinition {
+ constants: boolean;
+ inputs: AbiIOParameter[];
+ name: string;
+ outputs: AbiIOParameter[];
+ type: string;
+ }
- export interface FilterResult {
- get(callback: () => void): void;
- watch(callback: () => void): void;
- stopWatching(): void;
- }
+ interface Contract {}
- export interface Provider {}
+ interface FilterObject {
+ fromBlock: number|string;
+ toBlock: number|string;
+ address: string;
+ topics: string[];
+ }
- namespace providers {
- class HttpProvider implements Provider {
- constructor(url?: string);
+ interface FilterResult {
+ get(callback: () => void): void;
+ watch(callback: () => void): void;
+ stopWatching(): void;
}
- }
- namespace Web3 {} // Empty module so the class is exportable as a module
+ interface Provider {}
+ }
/* tslint:disable */
export default Web3;
/* tslint:enable */