import BigNumber = require("bn.js"); import { Provider } from "../providers"; import Contract, { CustomOptions as CustomContractOptions } from "./contract"; import PromiEvent from "../promiEvent"; import ABI from "./abi"; import Accounts from "./accounts"; import { BatchRequest, Iban, BlockHeader, CompileResult, Block, Transaction, Tx, BlockType, Net, Personal } from "./types"; import { Callback, TransactionReceipt, Logs, Log, Subscribe, EncodedTransaction } from "../types"; export default interface Eth { defaultAccount: string; defaultBlock: BlockType; BatchRequest: new () => BatchRequest; Iban: Iban; Contract: new ( jsonInterface: any[], address?: string, options?: CustomContractOptions ) => Contract; abi: ABI; setProvider: (provider: Provider) => void; accounts: Accounts; call( callObject: Tx, defaultBloc?: BlockType, callBack?: Callback ): Promise; clearSubscriptions(): boolean; subscribe( type: "logs", options?: Logs, callback?: Callback> ): Promise>; subscribe( type: "syncing", callback?: Callback> ): Promise>; subscribe( type: "newBlockHeaders", callback?: Callback> ): Promise>; subscribe( type: "pendingTransactions", callback?: Callback> ): Promise>; subscribe( type: "pendingTransactions" | "newBlockHeaders" | "syncing" | "logs", options?: Logs, callback?: Callback> ): Promise>; unsubscribe(callBack: Callback): void | boolean; compile: { solidity( source: string, callback?: Callback ): Promise; lll( source: string, callback?: Callback ): Promise; serpent( source: string, callback?: Callback ): Promise; }; currentProvider: Provider; estimateGas(tx: Tx, callback?: Callback): Promise; getAccounts(cb?: Callback): Promise; getBalance( address: string, defaultBlock?: BlockType, cb?: Callback ): Promise; getBlock( number: BlockType, returnTransactionObjects?: boolean, cb?: Callback ): Promise; getBlockNumber(callback?: Callback): Promise; getBlockTransactionCount( number: BlockType | string, cb?: Callback ): Promise; getBlockUncleCount( number: BlockType | string, cb?: Callback ): Promise; getCode( address: string, defaultBlock?: BlockType, cb?: Callback ): Promise; getCoinbase(cb?: Callback): Promise; getCompilers(cb?: Callback): Promise; getGasPrice(cb?: Callback): Promise; getHashrate(cb?: Callback): Promise; getPastLogs( options: { fromBlock?: BlockType; toBlock?: BlockType; address?: string; topics?: Array; }, cb?: Callback ): Promise; getProtocolVersion(cb?: Callback): Promise; getStorageAt( address: string, position: number | BigNumber, defaultBlock?: BlockType, cb?: Callback ): Promise; getTransactionReceipt( hash: string, cb?: Callback ): Promise; getTransaction( hash: string, cb?: Callback ): Promise; getTransactionCount( address: string, defaultBlock?: BlockType, cb?: Callback ): Promise; getTransactionFromBlock( block: BlockType, index: number, cb?: Callback ): Promise; getUncle( blockHashOrBlockNumber: BlockType | string, uncleIndex: number, returnTransactionObjects?: boolean, cb?: Callback ): Promise; getWork(cb?: Callback): Promise; givenProvider: Provider; isMining(cb?: Callback): Promise; isSyncing(cb?: Callback): Promise; net: Net; personal: Personal; signTransaction( tx: Tx, address?: string, cb?: Callback ): Promise; sendSignedTransaction( data: string, cb?: Callback ): PromiEvent; sendTransaction( tx: Tx, cb?: Callback ): PromiEvent; submitWork( nonce: string, powHash: string, digest: string, cb?: Callback ): Promise; sign( address: string, dataToSign: string, cb?: Callback ): Promise; }