import { ContractLoader, Executor, ExecutorOptions } from '@evan.network/dbcp';
import { Wallet } from './wallet';
/**
 * options for executor instance
 */
export interface ExecutorWalletOptions extends ExecutorOptions {
    contractLoader: ContractLoader;
    accountId: string;
    wallet: Wallet;
    defaultOptions?: any;
}
/**
 * helper for calling contract functions, executing transactions, uses wallet for performing
 * transactions
 *
 * @class      ExecutorWallet (name)
 */
export declare class ExecutorWallet extends Executor {
    options: ExecutorWalletOptions;
    /**
     * note, that the ExecutorWallet requires the "init" function to be called when intending to use
     * EventHub helper for transactions with event return values
     */
    constructor(options: ExecutorWalletOptions);
    /**
     * will throw, as creating contracts directly is not supported by the walled based executor
     *
     * @param      {string}        contractName       contract name
     * @param      {any[]}         functionArguments  arguments for contract creation, pass empty
     *                                                Array if no arguments
     * @param      {any}           inputOptions       transaction arguments, having at least .from and
     *                                                .gas
     * @return     {Promise<any>}  new contract
     */
    createContract(contractName: string, functionArguments: any[], inputOptions: any): Promise<any>;
    /**
     * @brief      run the given call from contract
     *
     * @param      {any}           contract      the target contract
     * @param      {string}        functionName  name of the contract function to call
     * @param      {any[]}         args          optional array of arguments for contract call. if
     *                                           last arguments is {Object}, it is used as the options
     *                                           parameter
     * @return     {Promise<any>}  resolves to: {Object} contract calls result
     */
    executeContractCall(contract: any, functionName: string, ...args: any[]): Promise<any>;
    /**
     * execute a transaction against the blockchain, handle gas exceeded and return values from
     * contract function
     *
     * transactions, that transfer EVEs, will be rejected
     *
     * @param      {any}           contract           contract instance
     * @param      {string}        functionName       name of the contract function to call
     * @param      {any}           inputOptions       currently supported: from, gas, event,
     *                                                getEventResult, eventTimeout, estimate, force
     * @param      {any[]}         functionArguments  optional arguments to pass to contract
     *                                                transaction
     * @return     {Promise<any>}  Promise, that resolves to: no result (if no event to watch was
     *                             given), the event (if event but no getEventResult was given), the
     *                             value returned by getEventResult(eventObject)
     */
    executeContractTransaction(contract: any, functionName: string, inputOptions: any, ...functionArguments: any[]): Promise<any>;
    /**
     * will throw, as sending funds directly is not supported by the walled based executor
     *
     * @param      {any}            inputOptions  transaction options, having at least from, to and
     *                                            value
     * @return     {Promise<void>}  resolved when done
     */
    executeSend(inputOptions: any): Promise<void>;
    /**
     * Should be called to encode constructor params (taken from
     * https://github.com/ethereum/web3.js/blob/develop/lib/web3/contract.js)
     *
     * @param      abi     The abi
     * @param      params  The parameters
     *
     * @return     encoded params
     */
    private encodeConstructorParams;
    /**
     * create, sign and submit a contract transaction with private key of options.from
     *
     * @param      {any}       contract           contract instance from api.eth.loadContract(...)
     * @param      {string}    functionName       function name
     * @param      {any[]}     functionArguments  arguments for contract creation, pass empty Array if
     *                                            no arguments
     * @param      {any}       options            transaction arguments, having at least .from and
     *                                            .gas
     * @param      {function}  handleTxResult     callback(error, result)
     * @return     {void}
     */
    private signAndExecuteTransactionViaWallet;
}
