Revamp AbiDefinition
This commit is contained in:
		
				
					committed by
					
						
						Leonid Logvinov
					
				
			
			
				
	
			
			
			
						parent
						
							2eabb439d9
						
					
				
				
					commit
					4ff5afecc8
				
			
							
								
								
									
										44
									
								
								packages/web3-typescript-typings/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										44
									
								
								packages/web3-typescript-typings/index.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -19,7 +19,7 @@ declare module 'web3' {
 | 
				
			|||||||
            sign(address: string, message: string, callback: (err: Error, signData: string) => void): string;
 | 
					            sign(address: string, message: string, callback: (err: Error, signData: string) => void): string;
 | 
				
			||||||
            getBlock(blockHash: string, callback: (err: Error, blockObj: any) => void): BigNumber.BigNumber;
 | 
					            getBlock(blockHash: string, callback: (err: Error, blockObj: any) => void): BigNumber.BigNumber;
 | 
				
			||||||
            getBlockNumber(callback: (err: Error, blockNumber: number) => void): void;
 | 
					            getBlockNumber(callback: (err: Error, blockNumber: number) => void): void;
 | 
				
			||||||
            contract(abi: Web3.AbiDefinition[]): Web3.Contract;
 | 
					            contract<A>(abi: Web3.ContractAbi): Web3.Contract<A>;
 | 
				
			||||||
            getBalance(addressHexString: string,
 | 
					            getBalance(addressHexString: string,
 | 
				
			||||||
                callback?: (err: any, result: BigNumber.BigNumber) => void): BigNumber.BigNumber;
 | 
					                callback?: (err: any, result: BigNumber.BigNumber) => void): BigNumber.BigNumber;
 | 
				
			||||||
            getCode(addressHexString: string,
 | 
					            getCode(addressHexString: string,
 | 
				
			||||||
@@ -44,21 +44,39 @@ declare module 'web3' {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    namespace Web3 {
 | 
					    namespace Web3 {
 | 
				
			||||||
        interface AbiIOParameter {
 | 
					        type ContractAbi = Array<AbiDefinition>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        type AbiDefinition = FunctionDescription | EventDescription;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        interface FunctionDescription {
 | 
				
			||||||
 | 
					            type: "function" | "constructor" | "fallback";
 | 
				
			||||||
 | 
					            name: string;
 | 
				
			||||||
 | 
					            inputs: Array<FunctionParameter>;
 | 
				
			||||||
 | 
					            outputs?: Array<FunctionParameter>;
 | 
				
			||||||
 | 
					            constant: boolean;
 | 
				
			||||||
 | 
					            payable: boolean;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        interface EventParameter {
 | 
				
			||||||
 | 
					            name: string;
 | 
				
			||||||
 | 
					            type: string;
 | 
				
			||||||
 | 
					            indexed: boolean;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        interface EventDescription {
 | 
				
			||||||
 | 
					            type: "event";
 | 
				
			||||||
 | 
					            name: string;
 | 
				
			||||||
 | 
					            inputs: Array<EventParameter>;
 | 
				
			||||||
 | 
					            anonymous: boolean;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        interface FunctionParameter {
 | 
				
			||||||
            name: string;
 | 
					            name: string;
 | 
				
			||||||
            type: string;
 | 
					            type: string;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        interface AbiDefinition {
 | 
					        interface Contract<A> {
 | 
				
			||||||
            constants: boolean;
 | 
					            at(address: string): A;
 | 
				
			||||||
            inputs: AbiIOParameter[];
 | 
					 | 
				
			||||||
            name: string;
 | 
					 | 
				
			||||||
            outputs: AbiIOParameter[];
 | 
					 | 
				
			||||||
            type: string;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        interface Contract {
 | 
					 | 
				
			||||||
            at(address: string): ContractInstance;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        interface FilterObject {
 | 
					        interface FilterObject {
 | 
				
			||||||
@@ -80,8 +98,6 @@ declare module 'web3' {
 | 
				
			|||||||
            stopWatching(callback: () => void): void;
 | 
					            stopWatching(callback: () => void): void;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        interface ContractInstance {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        interface Provider {}
 | 
					        interface Provider {}
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    /* tslint:disable */
 | 
					    /* tslint:disable */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user