import { IDL } from '@icp-sdk/core/candid';
import { Principal } from '@icp-sdk/core/principal';
import { Identity } from '@icp-sdk/core/agent';
import { PocketIcClient } from './pocket-ic-client.js';
import { ActorInterface } from './pocket-ic-actor.js';
export interface DeferredActorMethod<Args extends unknown[] = unknown[], Ret = unknown> {
    (...args: Args): Promise<() => Promise<Ret>>;
}
export type DeferredActorInterface<T extends ActorInterface<T> = ActorInterface> = {
    [K in keyof T]: DeferredActorMethod<Parameters<T[K]>, ReturnType<T[K]>>;
};
export type DeferredActor<T extends ActorInterface<T> = ActorInterface> = DeferredActorInterface<T> & {
    /**
     * @ignore
     */
    new (): DeferredActor<T>;
    /**
     * Set a Principal to be used as sender for all calls to the canister.
     *
     * @param principal The Principal to set.
     *
     * @see [Principal](https://agent-js.icp.xyz/principal/classes/Principal.html)
     *
     * @example
     * ```ts
     * import { PocketIc } from '@dfinity/pic';
     * import { Principal } from '@icp-sdk/core/principal';
     * import { _SERVICE, idlFactory } from '../declarations';
     *
     * const wasmPath = resolve('..', '..', 'canister.wasm');
     *
     * const pic = await PocketIc.create();
     * const fixture = await pic.setupCanister<_SERVICE>(idlFactory, wasmPath);
     * const { actor } = fixture;
     *
     * actor.setPrincipal(Principal.anonymous());
     * ```
     */
    setPrincipal(principal: Principal): void;
    /**
     * Set a Principal to be used as sender for all calls to the canister.
     * This is a convenience method over {@link setPrincipal} that accepts an
     * Identity and internally extracts the Principal.
     *
     * @param identity The identity to set.
     *
     * @see [Identity](https://agent-js.icp.xyz/agent/interfaces/Identity.html)
     * @see [Principal](https://agent-js.icp.xyz/principal/classes/Principal.html)
     *
     * @example
     * ```ts
     * import { PocketIc } from '@dfinity/pic';
     * import { AnonymousIdentity } from '@icp-sdk/core/agent';
     * import { _SERVICE, idlFactory } from '../declarations';
     *
     * const wasmPath = resolve('..', '..', 'canister.wasm');
     *
     * const pic = await PocketIc.create();
     * const fixture = await pic.setupCanister<_SERVICE>(idlFactory, wasmPath);
     * const { actor } = fixture;
     *
     * actor.setIdentity(new AnonymousIdentity());
     * ```
     */
    setIdentity(identity: Identity): void;
};
export declare function createDeferredActorClass<T extends ActorInterface<T> = ActorInterface>(interfaceFactory: IDL.InterfaceFactory, canisterId: Principal, pocketIcClient: PocketIcClient): DeferredActor<T>;
