import { BigNumber } from "bignumber.js";
import { Web3 } from "web3";
import { Address, Hash, SchemePermissions } from "./commonTypes";
export declare class Utils {
    static readonly NULL_ADDRESS: Address;
    static readonly NULL_HASH: Hash;
    /**
     * Returns Truffle contract wrapper given the name of the contract (like "SchemeRegistrar").
     * Optimized for synchronicity issues encountered with MetaMask.
     * Throws an exception if it can't load the contract.
     * Uses the asynchronous web.eth.getAccounts to obtain the default account (good with MetaMask).
     * @param contractName like "SchemeRegistrar"
     */
    static requireContract(contractName: string): Promise<any>;
    /**
     * Returns the web3 object.
     * When called for the first time, web3 is initialized from the Arc.js configuration.
     * Throws an exception when web3 cannot be initialized.
     */
    static getWeb3(): Promise<Web3>;
    /**
     * Returns the address of the default user account.
     *
     * Has the side-effect of setting web3.eth.defaultAccount.
     *
     * Throws an exception on failure.
     */
    static getDefaultAccount(): Promise<string>;
    /**
     * Return the current token balance for the given token and agent.
     */
    static getTokenBalance(agentAddress: Address, tokenAddress: Address): Promise<BigNumber>;
    /**
     * Return the current ETH balance for the given agent.
     */
    static getEthBalance(agentAddress: Address): Promise<BigNumber>;
    /**
     * Return the hash of a string the same way solidity would, and to a format that will be
     * properly translated into a bytes32 that solidity expects
     * @param str a string
     */
    static SHA3(str: string): string;
    /**
     * Return the tightly-packed hash of any arbitrary array of
     * objects just as Solidity's `keccak256` function would do.
     *
     * Items in the `types` array must appear in the same order in which the values would be
     * passed to Solidity's `keccak256` function.
     *
     * Type names can be:
     *   "bytes[N]' - fails if (N < 1 || N > 32)
     *   "string'
     *   "bool'
     *   "address'
     *   "uint[N]'  - fails if ((N % 8) || (N < 8) || (N > 256))
     *   "int[N]'   - fails if ((N % 8) || (N < 8) || (N > 256))
     *
     * Use "bytes32" for a Hash value
     *
     * See: https://github.com/ethereumjs/ethereumjs-abi
     *
     * @param types array of type names.
     * @param values - the values to pack and hash.  These must appear in the same order in which the types are ordered.
     */
    static keccak256(types: Array<string>, values: Array<any>): string;
    /**
     * Convert scheme permissions string to a number
     * @param {string} permissions
     */
    static permissionsStringToNumber(permissions: string): SchemePermissions;
    /**
     * Convert SchemePermissions | DefaultSchemePermissions to a scheme permissions string
     * @param {Number} permissions
     */
    static numberToPermissionsString(permissions: SchemePermissions): string;
    /**
     * Returns promise of the name of the current or given network
     * @param id Optional id of the network
     */
    static getNetworkName(id?: string): Promise<string>;
    /**
     * Returns promise of the id of the current network
     */
    static getNetworkId(): Promise<string>;
    /**
     * Returns promise of the address of the global GEN token.
     */
    static getGenTokenAddress(): Promise<string>;
    /**
     * Returns a promise of the given account's GEN token balance.
     * @param agentAddress
     */
    static getGenTokenBalance(agentAddress: Address): Promise<BigNumber>;
    /**
     * Returns the truffle artifact json for the given contract
     * @param contractName
     */
    static getTruffleArtifactForContract(contractName: string): any;
    private static web3;
    private static alreadyTriedAndFailed;
    private static networkId;
}
export { Web3 } from "web3";
