import { ContractLoader, EventHub, Executor, ExecutorOptions, SignerInterface } from '@evan.network/dbcp';
/**
 * options for executor agent instance
 */
export interface ExecutorAgentOptions extends ExecutorOptions {
    contractLoader: ContractLoader;
    agentUrl?: string;
    token?: string;
}
/**
 * helper for calling contract functions, executing transactions
 *
 * @class      ExecutorAgent (name)
 */
export declare class ExecutorAgent extends Executor {
    agentUrl: string;
    config: any;
    contractLoader: ContractLoader;
    defaultOptions: any;
    eventHub: EventHub;
    signer: SignerInterface;
    web3: any;
    token: string;
    /**
     * note, that the ExecutorAgent requires the "init" function to be called when intending to use the
     * EventHub helper for transactions with event return values
     */
    constructor(options: ExecutorAgentOptions);
    /**
     * creates a contract by contstructing creation transaction and signing it with private key of
     * options.from
     *
     * transactions, that transfer EVEs, will be rejected
     *
     * @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>;
    /**
     * initialize executor
     *
     * @param      {any}  options  object with the property "eventHub" (of the type EventHub)
     */
    init(options: any): void;
    /**
     * generate a new token for transactions (or contract creations)
     *
     * @param      {string}           password   password for token creation
     * @param      {any[]}            functions  array of function signatures as abi objects
     * @return     {Promise<string>}  new token
     */
    generateToken(password: any, functions: any): Promise<string>;
    private handleRequestResult(resolve, reject, error, msg, body);
}
