import type { CaipChainId, Hex } from "@metamask/utils"; import type { BridgeAsset, BridgeControllerState, GenericQuoteRequest, QuoteResponseV1 } from "../types.cjs"; /** * Checks whether the transaction is a cross-chain transaction by comparing the source and destination chainIds * * @param srcChainId - The source chainId * @param destChainId - The destination chainId * @returns Whether the transaction is a cross-chain transaction */ export declare const isCrossChain: (srcChainId: GenericQuoteRequest['srcChainId'], destChainId?: GenericQuoteRequest['destChainId']) => boolean; export declare const getDefaultBridgeControllerState: () => BridgeControllerState; /** * Returns the native swaps or bridge asset for a given chainId * * @param chainId - The chainId to get the default token for * @returns The native asset for the given chainId * @throws If no native asset is defined for the given chainId */ export declare const getNativeAssetForChainId: (chainId: string | number | Hex | CaipChainId) => BridgeAsset; /** * A function to return the txParam data for setting allowance to 0 for USDT on Ethereum * * @param destChainId - The destination chain ID * @returns The txParam data that will reset allowance to 0, combine it with the approval tx params received from Bridge API */ export declare const getEthUsdtResetData: (destChainId: GenericQuoteRequest['destChainId']) => `0x${string}`; export declare const isEthUsdt: (chainId: GenericQuoteRequest['srcChainId'], address: string) => boolean; export declare const sumHexes: (...hexStrings: string[]) => Hex; /** * Checks whether the provided address is strictly equal to the address for * the default swaps token of the provided chain. * * @param address - The string to compare to the default token address * @param chainId - The hex encoded chain ID of the default swaps token to check * @returns Whether the address is the provided chain's default token address */ export declare const isSwapsDefaultTokenAddress: (address: string, chainId: Hex | CaipChainId) => boolean; /** * Checks whether the provided symbol is strictly equal to the symbol for * the default swaps token of the provided chain. * * @param symbol - The string to compare to the default token symbol * @param chainId - The hex encoded chain ID of the default swaps token to check * @returns Whether the symbol is the provided chain's default token symbol */ export declare const isSwapsDefaultTokenSymbol: (symbol: string, chainId: Hex | CaipChainId) => boolean; /** * Checks whether the address is a native asset in any supported xchain swaps network * * @param address - The address to check * @returns Whether the address is a native asset */ export declare const isNativeAddress: (address?: string | null) => boolean; /** * Checks whether the chainId matches Solana in CaipChainId or number format * * @param chainId - The chainId to check * @returns Whether the chainId is Solana */ export declare const isSolanaChainId: (chainId: Hex | number | CaipChainId | string) => boolean; export declare const isBitcoinChainId: (chainId: Hex | number | CaipChainId | string) => boolean; export declare const isTronChainId: (chainId: Hex | number | CaipChainId | string) => boolean; /** * Checks if a chain ID represents a non-EVM blockchain supported by swaps * Currently supports Solana, Bitcoin and Tron * * @param chainId - The chain ID to check * @returns True if the chain is a supported non-EVM chain, false otherwise */ export declare const isNonEvmChainId: (chainId: GenericQuoteRequest['srcChainId']) => boolean; export declare const isEvmQuoteResponse: (quoteResponse: QuoteResponseV1) => quoteResponse is QuoteResponseV1<{ chainId: number; from: `0x${string}`; to: `0x${string}`; value: `0x${string}`; data: `0x${string}`; gasLimit: number | null; effectiveGas?: number | undefined; }, { chainId: number; from: `0x${string}`; to: `0x${string}`; value: `0x${string}`; data: `0x${string}`; gasLimit: number | null; effectiveGas?: number | undefined; }>; //# sourceMappingURL=bridge.d.cts.map