import { BigNumber, PopulatedTransaction } from 'ethers';
import { InterchainAccountRouter } from '@hyperlane-xyz/core';
import { Address } from '@hyperlane-xyz/utils';
import { HyperlaneAddressesMap, HyperlaneContracts, HyperlaneContractsMap } from '../../contracts/types.js';
import { MultiProvider } from '../../providers/MultiProvider.js';
import { CallData as SdkCallData } from '../../providers/transactions/types.js';
import { RouterApp } from '../../router/RouterApps.js';
import { ChainMap, ChainName } from '../../types.js';
import { InterchainAccountFactories } from './contracts.js';
import type { PostCallsType } from './icaCalls.js';
import { AccountConfig, GetCallRemoteSettings } from './types.js';
export declare class InterchainAccount extends RouterApp<InterchainAccountFactories> {
    knownAccounts: Record<Address, AccountConfig | undefined>;
    constructor(contractsMap: HyperlaneContractsMap<InterchainAccountFactories>, multiProvider: MultiProvider);
    remoteChains(chainName: string): Promise<ChainName[]>;
    router(contracts: HyperlaneContracts<InterchainAccountFactories>): InterchainAccountRouter;
    static fromAddressesMap(addressesMap: HyperlaneAddressesMap<any>, multiProvider: MultiProvider): InterchainAccount;
    static EMPTY_SALT: string;
    getAccount(destinationChain: ChainName, config: AccountConfig): Promise<Address>;
    deployAccount(destinationChain: ChainName, config: AccountConfig): Promise<Address>;
    protected getOrDeployAccount(deployIfNotExists: boolean, destinationChain: ChainName, config: AccountConfig): Promise<Address>;
    /**
     * Encode the ICA message body for handle() call estimation.
     * Mirrors solidity/contracts/middleware/libs/InterchainAccountMessage.sol#encode
     */
    encodeIcaMessageBody(owner: string, ism: string, calls: {
        to: string;
        value: BigNumber;
        data: string;
    }[], salt?: string): string;
    /**
     * Estimate gas for ICA handle() execution on destination chain.
     */
    estimateIcaHandleGas({ origin, destination, innerCalls, config, }: {
        origin: string;
        destination: string;
        innerCalls: SdkCallData[];
        config: AccountConfig;
    }): Promise<BigNumber>;
    getCallRemote({ chain, destination, innerCalls, config, hookMetadata, }: GetCallRemoteSettings): Promise<PopulatedTransaction>;
    private extractGasLimitFromMetadata;
    callRemote({ chain, destination, innerCalls, config, hookMetadata, }: GetCallRemoteSettings): Promise<void>;
}
export declare function buildInterchainAccountApp(multiProvider: MultiProvider, chain: ChainName, config: AccountConfig, coreAddressesByChain: ChainMap<Record<string, string>>): Promise<InterchainAccount>;
export declare function deployInterchainAccount(multiProvider: MultiProvider, chain: ChainName, config: AccountConfig, coreAddressesByChain: ChainMap<Record<string, string>>): Promise<Address>;
export declare function shareCallsWithPrivateRelayer(serverUrl: string, payload: PostCallsType): Promise<Response>;
//# sourceMappingURL=InterchainAccount.d.ts.map