import BigNumber from 'bignumber.js'; import Web3 = require('web3'); import { TransactionReceipt, Subscribe } from 'web3/types'; import { Block, Transaction, BlockType } from 'web3/eth/types'; import { ITransactionRequest } from '../transactionRequest/ITransactionRequest'; import PromiEvent from 'web3/promiEvent'; export declare enum Networks { Private = 0, Mainnet = 1, Morden = 2, Ropsten = 3, Rinkeby = 4, RSKTestNet = 31, Kovan = 42, Docker = 1001, Development = 1002, Tobalaba = 401697 } declare type EAC_NETWORK_NAME = 'mainnet' | 'ropsten' | 'rinkeby' | 'rsk_testnet' | 'kovan' | 'docker' | 'development' | 'tobalaba' | 'tester'; export default class Util { static getWeb3FromProviderUrl(providerUrl: string): Web3; static isHTTPConnection(url: string): boolean; static isWatchingEnabled(web3: Web3): Promise; static isWSConnection(url: string): boolean; static testProvider(providerUrl: string): Promise; /** * @TODO refactor, use this synchronous method instead of async call to contract in eac * * @param callGas * @param callValue * @param gasPrice * @param fee * @param bounty */ static calcEndowment(callGas: any, callValue: any, gasPrice: any, fee: any, bounty: any): BigNumber; static estimateMaximumExecutionGasPrice(bounty: BigNumber, gasPrice: BigNumber, callGas: BigNumber): BigNumber; static estimateBountyForExecutionGasPrice(gasPrice: BigNumber, callGas: BigNumber, additionalGasPrice: BigNumber): BigNumber; private web3; constructor(web3: Web3); isNetworkSupported(): Promise; isNotNullAddress(address: string): boolean; checkValidAddress(address: string): boolean; getTransactionRequestAddressFromReceipt(receipt: TransactionReceipt): string; sendRawTransaction(transaction: string): PromiEvent; getABI(name: string): any; /** * Returns the string argument of the detected network. * * @param {Web3} web3 */ getChainName(): Promise; getRequestFactoryStartBlock(): Promise; balanceOf(account: string): Promise; getBlock(blockNumber?: BlockType): Promise; getTimestampForBlock(blockNum: BlockType): Promise; getTransactionCount(address: string): Promise; getReceipt(transactionHash: string): Promise; getTransaction(transactionHash: string): Promise; toHex(value: any): string; getContractsAddresses(): Promise; stopFilter(filter: Subscribe): Promise; getAverageBlockTime(): Promise; calculateGasAmount(txRequest: ITransactionRequest): BigNumber; waitForConfirmations(sentTransaction: PromiEvent, desiredConfirmations?: number): Promise; } export {};