import { ChainConfig as BaseChainConfig, TokenId, ChainResourceMap, WormholeContext, WormholeConfig } from '../sdklegacy';
import { Network, Wormhole as WormholeV2, Chain, TokenAddress as TokenAddressV2, routes } from '@wormhole-foundation/sdk';
import { TransferDetails, WormholeConnectEventHandler } from '../telemetry/types';
import { SDKConverter } from './converter';
import { default as RouteOperator } from '../routes/operator';
import { UiConfig } from './ui';
export declare enum Icon {
    'AVAX' = 1,
    'BNB' = 2,
    'BSC' = 3,
    'CELO' = 4,
    'ETH' = 5,
    'FANTOM' = 6,
    'POLYGON' = 7,
    'SOLANA' = 8,
    'USDC' = 9,
    'GLMR' = 10,
    'DAI' = 11,
    'USDT' = 12,
    'BUSD' = 13,
    'WBTC' = 14,
    'SUI' = 15,
    'APT' = 16,
    'SEI' = 17,
    'BASE' = 18,
    'OSMO' = 19,
    'TBTC' = 20,
    'WSTETH' = 21,
    'ARBITRUM' = 22,
    'OPTIMISM' = 23,
    'ATOM' = 24,
    'EVMOS' = 25,
    'KUJI' = 26,
    'PYTH' = 27,
    'INJ' = 28,
    'KLAY' = 29,
    'NTT' = 30,
    'SCROLL' = 31,
    'BLAST' = 32,
    'XLAYER' = 33,
    'MANTLE' = 34
}
export type TransferSide = 'source' | 'destination';
export interface ExtendedTransferDetails extends TransferDetails {
    fromWalletAddress: string;
    toWalletAddress: string;
}
export interface ValidateTransferResult {
    isValid: boolean;
    error?: string;
}
export type ValidateTransferHandler = (transferDetails: ExtendedTransferDetails) => Promise<ValidateTransferResult>;
export type IsRouteSupportedHandler = (transferDetails: TransferDetails) => Promise<boolean>;
export interface WormholeConnectConfig {
    network?: Network;
    rpcs?: ChainResourceMap;
    rest?: ChainResourceMap;
    graphql?: ChainResourceMap;
    coinGeckoApiKey?: string;
    chains?: Chain[];
    tokens?: string[];
    routes?: routes.RouteConstructor<any>[];
    tokensConfig?: TokensConfig;
    wrappedTokens?: TokenAddressesByChain;
    eventHandler?: WormholeConnectEventHandler;
    validateTransferHandler?: ValidateTransferHandler;
    isRouteSupportedHandler?: IsRouteSupportedHandler;
    ui?: UiConfig;
}
export interface InternalConfig<N extends Network> {
    network: N;
    _v2Wormhole?: WormholeV2<N>;
    whLegacy: WormholeContext;
    sdkConfig: WormholeConfig;
    sdkConverter: SDKConverter;
    isMainnet: boolean;
    rpcs: ChainResourceMap;
    rest: ChainResourceMap;
    graphql: ChainResourceMap;
    mayanApi: string;
    wormholeApi: string;
    wormholeRpcHosts: string[];
    coinGeckoApiKey?: string;
    chains: ChainsConfig;
    chainsArr: ChainConfig[];
    tokens: TokensConfig;
    tokensArr: TokenConfig[];
    wrappedTokenAddressCache: WrappedTokenAddressCache;
    routes: RouteOperator;
    triggerEvent: WormholeConnectEventHandler;
    validateTransfer?: ValidateTransferHandler;
    isRouteSupportedHandler?: IsRouteSupportedHandler;
    ui: UiConfig;
    guardianSet: GuardianSetData;
}
export type TokenConfig = {
    key: string;
    symbol: string;
    nativeChain: Chain;
    icon: Icon | string;
    tokenId?: TokenId;
    coinGeckoId: string;
    color?: string;
    decimals: number;
    wrappedAsset?: string;
    displayName?: string;
};
export type TokensConfig = {
    [key: string]: TokenConfig;
};
export interface ChainConfig extends BaseChainConfig {
    displayName: string;
    explorerUrl: string;
    explorerName: string;
    gasToken: string;
    chainId: number | string;
    icon: Icon;
    maxBlockSearch: number;
}
export type ChainsConfig = {
    [chain in Chain]?: ChainConfig;
};
export type RpcMapping = {
    [chain in Chain]?: string;
};
export type GuardianSetData = {
    index: number;
    keys: string[];
};
export type NetworkData = {
    chains: ChainsConfig;
    tokens: TokensConfig;
    wrappedTokens: TokenAddressesByChain;
    rpcs: RpcMapping;
    rest: RpcMapping;
    graphql: RpcMapping;
    guardianSet: GuardianSetData;
};
export type TokenAddressesByChain = {
    [tokenKey: string]: {
        [chain in Chain]?: string;
    };
};
type ForeignAssets<C extends Chain> = Record<string, TokenAddressV2<C>>;
export declare class WrappedTokenAddressCache {
    caches: Partial<Record<Chain, ForeignAssets<Chain>>>;
    constructor(tokens: TokensConfig, addresses: TokenAddressesByChain);
    get<C extends Chain>(tokenKey: string, chain: C): TokenAddressV2<C> | null;
    set<C extends Chain>(tokenKey: string, chain: C, foreignAsset: TokenAddressV2<C>): void;
}
export interface Transaction {
    txHash: string;
    sender?: string;
    recipient: string;
    amount: string;
    amountUsd: number;
    toChain: Chain;
    fromChain: Chain;
    tokenAddress: string;
    tokenKey: string;
    tokenDecimals?: number;
    receivedTokenKey: string;
    receiveAmount: string;
    senderTimestamp: string;
    receiverTimestamp?: string;
    explorerLink: string;
    inProgress: boolean;
}
export interface TransactionLocal {
    txHash: string;
    amount: string;
    tokenKey: string;
    sourceChain: string;
    destChain: string;
    eta: number;
    explorerInfo: {
        name: string;
        url: string;
        apiUrl: string;
    };
}
export {};
//# sourceMappingURL=types.d.ts.map