import { BridgeType, ChainType } from '@bnb-chain/canonical-bridge-sdk'; export interface BaseEventData { timestamp?: number; sessionId?: string; userId?: string; } export type WalletType = 'metamask' | 'walletconnect' | 'coinbase' | 'trust' | 'rainbow' | 'injected' | 'phantom' | 'solflare' | 'backpack' | 'glow' | 'slope' | 'sollet' | 'tronlink' | 'klever' | 'bitkeep' | 'okx' | 'unknown'; export type BridgeProvider = BridgeType | 'wormhole' | 'multichain' | 'synapse' | 'hop' | 'across' | 'connext'; export type TokenInputMethod = 'manual' | 'max' | 'percentage'; export type TokenSelectionSource = 'dropdown' | 'search' | 'popular' | 'recent'; export type ChainPosition = 'from' | 'to'; export type ModalType = 'approve' | 'confirm' | 'success' | 'error' | 'network_switch' | 'transaction_details'; export type ModalAction = 'confirm' | 'cancel' | 'close' | 'retry'; export type ErrorType = 'network' | 'validation' | 'transaction' | 'wallet' | 'api' | 'insufficient_balance' | 'user_rejected'; export interface BridgeEvents { click_bridge_fromDropdown: null; select_bridge_fromDropdown: { fromNetwork: string; item_name: string; }; click_bridge_toDropdown: null; select_bridge_toDropdown: { toNetwork: string; item_name: string; }; click_bridge_tokenDropdown: null; select_bridge_tokenDropdown: { token: string; tokenAddress: string; }; input_bridge_amount: { token: string; tokenAddress: string; value: string; item_name: string; }; click_bridge_max: { networkName: string; token: string; tokenAddress: string; value: string; item_name: string; }; click_bridge_goal: { ctaLabel: 'Connect Wallet' | 'Switch Wallet' | 'Switch Network' | 'Approval' | 'Send'; item_name: 'Connect Wallet' | 'Switch Wallet' | 'Switch Network' | 'Approval' | 'Send'; }; click_bridge_confirmTransfer: { fromNetwork: string; toNetwork: string; bridgeRoute: string; token: string; tokenAddress: string; usdRate: string; toToken: string; toTokenAddress: string; value: string; item_category: string; item_category2: string; item_variant: string; }; click_bridge_approvalModal: { fromNetwork: string; toNetwork: string; token: string; tokenAddress: string; value: string; approvalResult: 'Approve' | 'Deny'; item_category: string; item_category2: string; item_variant: 'Approve' | 'Deny'; }; transaction_bridge_success: { fromNetwork: string; toNetwork: string; token: string; tokenAddress: string; usdRate: string; toToken: string; toTokenAddress: string; value: string; bridgeRoute: string; item_category: string; item_category2: string; item_variant: string; }; transaction_bridge_fail: { fromNetwork: string; toNetwork: string; token: string; tokenAddress: string; usdRate: string; toToken: string; toTokenAddress: string; value: string; bridgeRoute: string; message: string; page_location: string; item_category: string; item_category2: string; item_variant: string; }; click_bridge_changeRoute: null; click_bridge_refresh: null; click_bridge_switchNetwork: null; } export interface BridgeEventMap extends BridgeEvents { } export type EventName = keyof BridgeEventMap; export type BridgeEventName = keyof BridgeEventMap; export type EventParams = BridgeEventMap[T]; export type EventData = BaseEventData & EventParams; export type EventListener = (eventData: EventData) => void | Promise; export declare const EventTypes: { readonly CLICK_BRIDGE_FROM_DROPDOWN: "click_bridge_fromDropdown"; readonly SELECT_BRIDGE_FROM_DROPDOWN: "select_bridge_fromDropdown"; readonly CLICK_BRIDGE_TO_DROPDOWN: "click_bridge_toDropdown"; readonly SELECT_BRIDGE_TO_DROPDOWN: "select_bridge_toDropdown"; readonly CLICK_BRIDGE_TOKEN_DROPDOWN: "click_bridge_tokenDropdown"; readonly SELECT_BRIDGE_TOKEN_DROPDOWN: "select_bridge_tokenDropdown"; readonly INPUT_BRIDGE_AMOUNT: "input_bridge_amount"; readonly CLICK_BRIDGE_MAX: "click_bridge_max"; readonly CLICK_BRIDGE_GOAL: "click_bridge_goal"; readonly CLICK_BRIDGE_CONFIRM_TRANSFER: "click_bridge_confirmTransfer"; readonly CLICK_BRIDGE_APPROVAL_MODAL: "click_bridge_approvalModal"; readonly TRANSACTION_BRIDGE_SUCCESS: "transaction_bridge_success"; readonly TRANSACTION_BRIDGE_FAIL: "transaction_bridge_fail"; readonly CLICK_BRIDGE_CHANGE_ROUTE: "click_bridge_changeRoute"; readonly CLICK_BRIDGE_REFRESH: "click_bridge_refresh"; readonly CLICK_BRIDGE_SWITCH_NETWORK: "click_bridge_switchNetwork"; }; export declare const WalletTypes: { readonly METAMASK: "metamask"; readonly WALLETCONNECT: "walletconnect"; readonly COINBASE: "coinbase"; readonly TRUST: "trust"; readonly RAINBOW: "rainbow"; readonly INJECTED: "injected"; readonly PHANTOM: "phantom"; readonly SOLFLARE: "solflare"; readonly BACKPACK: "backpack"; readonly GLOW: "glow"; readonly SLOPE: "slope"; readonly SOLLET: "sollet"; readonly TRONLINK: "tronlink"; readonly KLEVER: "klever"; readonly BITKEEP: "bitkeep"; readonly OKX: "okx"; readonly UNKNOWN: "unknown"; }; export declare const BridgeProviders: { readonly CBRIDGE: "cBridge"; readonly DEBRIDGE: "deBridge"; readonly STARGATE: "stargate"; readonly LAYERZERO: "layerZero"; readonly MESON: "meson"; readonly MAYAN: "mayan"; readonly WORMHOLE: "wormhole"; readonly MULTICHAIN: "multichain"; readonly SYNAPSE: "synapse"; readonly HOP: "hop"; readonly ACROSS: "across"; readonly CONNEXT: "connext"; }; export declare function isBridgeEvent(eventName: string): eventName is BridgeEventName; export declare function isValidWalletType(walletType: string): walletType is WalletType; export declare function isValidBridgeProvider(provider: string): provider is BridgeProvider; export declare function createEventHandler(eventType: T, handler: (eventData: EventData) => void | Promise): (eventName: EventName, eventData: EventData) => void; export declare function asEventData(eventData: EventData): EventData; export type { ChainType, BridgeType };