import { Address } from 'viem';
import { BridgeType } from '@bnb-chain/canonical-bridge-sdk';
import { IBridgeTokenBaseInfo, IExternalChain, INativeCurrency } from '../types';

export interface ITransferTokenPair<T, P = unknown> {
    fromChainId: number;
    toChainId: number;
    fromTokenAddress: string;
    toTokenAddress: string;
    fromToken: T;
    toToken: T;
    isPegged?: boolean;
    peggedConfig?: P;
}
export interface IBaseAdapterOptions<G> {
    config: G;
    includedChains: number[];
    excludedChains?: number[];
    excludedTokens?: Record<number, Array<string | Address>>;
    nativeCurrencies?: Record<number, INativeCurrency>;
    bridgedTokenGroups?: string[][];
    brandChains?: number[];
    externalChains?: IExternalChain[];
    displayTokenSymbols?: Record<number, Record<string, string>>;
    assetPrefix?: string;
}
export declare abstract class BaseAdapter<G extends object, C = unknown, T = unknown> {
    abstract bridgeType: BridgeType;
    protected readonly config: G;
    protected readonly includedChains: number[];
    protected readonly excludedChains: number[];
    protected readonly excludedTokens: Record<number, Array<string | Address>>;
    protected readonly nativeCurrencies: Record<number, INativeCurrency>;
    protected readonly bridgedTokenGroups: string[][];
    protected readonly brandChains: number[];
    protected readonly externalChains: IExternalChain[];
    protected readonly displayTokenSymbols: Record<number, Record<string, string>>;
    protected readonly assetPrefix: string;
    protected chains: C[];
    protected chainMap: Map<number, C>;
    protected tokenMap: Map<number, T[]>;
    protected symbolMap: Map<number, Map<string, T>>;
    protected transferMap: Map<number, Map<number, Map<string, ITransferTokenPair<T, unknown>>>>;
    protected fromChainIds: Set<number>;
    protected fromChains: C[];
    protected toChainIds: Set<number>;
    protected toChains: C[];
    constructor(options: IBaseAdapterOptions<G>);
    protected init(): void;
    protected abstract initChains(): void;
    protected abstract initTokens(): void;
    protected abstract initTransferMap(): void;
    protected abstract getChainIdAsObject(chainId: number): unknown;
    abstract getChainId(chain: C): number;
    abstract getTokenInfo({ chainId, token, }: {
        chainId: number;
        token: T;
    }): IBridgeTokenBaseInfo;
    protected initFromChains(): void;
    protected initToChains(): void;
    protected filterTransferMap(): void;
    protected filterToChains({ fromChainId, matchedChainIds, compatibleChainIds, chains, tokenSymbol, }: {
        fromChainId?: number;
        matchedChainIds: Set<number>;
        compatibleChainIds: Set<number>;
        chains: C[];
        tokenSymbol?: string;
    }): {
        matchedChainIds: Set<number>;
        compatibleChainIds: Set<number>;
        chains: C[];
    };
    protected checkIsExcludedToken({ excludedList, tokenSymbol, tokenAddress, }: {
        excludedList: string[];
        tokenSymbol: string;
        tokenAddress: string;
    }): boolean;
    protected getTokenDisplaySymbolAndIcon({ defaultSymbol, chainId, tokenAddress, }: {
        chainId: number;
        defaultSymbol: string;
        tokenAddress: string;
    }): {
        displaySymbol: string;
        icon: string;
    };
    protected formatTokenIcon(tokenSymbol: string): string;
    protected getToToken({ fromChainId, toChainId, fromTokenSymbol, }: {
        fromChainId: number;
        toChainId: number;
        fromTokenSymbol: string;
    }): T | undefined;
    getFromChains({ toChainId, tokenSymbol }: {
        toChainId?: number;
        tokenSymbol?: string;
    }): {
        matchedChainIds: Set<number>;
        compatibleChainIds: Set<number>;
        chains: C[];
    };
    getToChains({ fromChainId, tokenSymbol }: {
        fromChainId?: number;
        tokenSymbol?: string;
    }): {
        matchedChainIds: Set<number>;
        compatibleChainIds: Set<number>;
        chains: C[];
    };
    getTokens({ fromChainId, toChainId }: {
        fromChainId: number;
        toChainId: number;
    }): {
        matchedTokens: Set<string>;
        compatibleTokens: Set<string>;
        tokenPairs: ITransferTokenPair<T, unknown>[];
    };
    getTokenPair({ fromChainId, toChainId, tokenSymbol, }: {
        fromChainId: number;
        toChainId: number;
        tokenSymbol: string;
    }): {
        tokenPair: ITransferTokenPair<T, unknown> | undefined;
    };
}
