import { Scope } from '@sentry/react'; import * as React from 'react'; import { Component, ReactNode, ErrorInfo, CSSProperties, ElementType, ButtonHTMLAttributes } from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; import * as _tanstack_react_query from '@tanstack/react-query'; import { QueryClient, UseQueryOptions } from '@tanstack/react-query'; type Environment = "dev" | "stage" | "production"; type Theme = "dark" | "light"; type DrawerDirection$1 = "right" | "bottom" | "left"; declare function resolveEnvironment(env?: Environment | "staging" | "prd" | "prod" | "stg"): Environment; /** env별로 다르면 객체, 모든 env 동일하면 T 단일 값. */ type RemoteEnvValue = T | Record; type AppsConfig = { skills?: RemoteEnvValue; gametokenBridge?: RemoteEnvValue; /** 브릿지 버튼을 새창 대신 같은 창으로 여는 gametoken 사이트 URL prefix 목록. */ gametokenSites?: string[]; bridgePoweredBy?: { url?: RemoteEnvValue; }; /** * 약관 문서 링크. 브릿지 약관 동의 모달의 Terms of Service 링크가 읽는다 — * cross-game-swap의 legal.json과 같은 운영 방식(무배포 교체). 호출부가 * `termsUrl` prop을 넘기면 그 값이 우선, 값이 없으면 DEFAULT_TERMS_URL 폴백. */ legal?: { termsUrl?: RemoteEnvValue; }; /** * Get ONEUSD chooser action visibility. Swap/Bridge default to enabled; * Transfer Crypto defaults to disabled when remote config is unavailable. */ getOneUsd?: { modes?: { swap?: boolean; bridge?: boolean; transferCrypto?: boolean; }; /** * 액션별 최소 dapp-ui 버전. 호스트가 설치한 dapp-ui 가 이 값보다 낮으면 * `modes`가 true여도 해당 액션을 숨긴다 — 구버전에서 깨지는 기능을 호스트 * 재배포 없이 끄기 위한 장치. 값이 없으면 버전 제한 없음, 형식이 깨져 * 있으면 통과(설정 오타로 전체가 사라지지 않게). */ minVersions?: { swap?: string; bridge?: string; transferCrypto?: string; }; }; /** * 토큰 상세화면 섹션별 노출 여부. 값이 없으면 기본값(history·balance만 노출). * 섹션 키: chart / balance(=My Balance + Send) / overview / social / history. * env별 값은 apps.json 파일 자체가 환경마다 분리돼 있으므로 단순 boolean만 받는다. */ tokenDetail?: { sections?: { chart?: boolean; balance?: boolean; overview?: boolean; social?: boolean; history?: boolean; }; }; /** * Relay(외부체인 → CROSS 입금) 운영 설정. * `minDepositAmount`: 입금 위저드 Continue를 막는 최소 수량(사람 단위, * 토큰 공통). CDN 값이 없거나 fetch 실패 시 호출부 폴백(6)이 적용된다 — * endpoints.json과 달리 UI 게이트라 폴백을 허용한다. */ relay?: { minDepositAmount?: RemoteEnvValue; /** * `maxDepositAmount`: Continue를 막는 최대 수량(사람 단위, 토큰 공통). * 브릿지/DEX 유동성 한도를 운영이 수동 반영하는 값 — 미설정 시 상한 없음. */ maxDepositAmount?: RemoteEnvValue; /** * Role-labelled Relay factory addresses. New SDKs prefer this field so * operators can tell the StandingForwarderFactory and * DepositorForwarderFactory apart without relying on array order. * * A legacy `trustedFactories` field, if encountered, is deliberately not * typed or read by current code. */ forwarderFactories?: RemoteEnvValue<{ standingForwarderFactory?: string; depositorForwarderFactory?: string; }>; }; }; declare const CHAINS_CONFIG_FILE = "chains.json"; /** 체인 하나의 표시 메타. 지정 안 된 필드는 호출부 폴백(온체인/하드코딩)으로. */ type ChainDisplayMeta = { /** 체인 표시명 (예: 'One Mainnet'). */ name?: string; /** 네이티브 통화 표시 심볼 (예: 'ONE' / 'tONE'). DISPLAY 전용. */ nativeSymbol?: string; }; /** chains.json 스키마 — chainId(10진 문자열) → 표시 메타. */ type ChainsConfig = { chains?: Record; }; /** * chains.json에서 특정 chainId의 표시 메타를 비동기로 반환한다. * fetch 실패·미정의면 `{}` — 호출부에서 `?? 폴백`으로 처리. * React 밖(설정 생성·유틸)에서 사용. */ declare function getChainDisplay(chainId: number, env: Environment): Promise; /** * 컴포넌트에서 chainId의 표시명·네이티브 심볼을 구독하는 훅. * chainId 변경(네트워크 전환) 시 재조회한다. 로딩 중/미정의면 각 필드 * undefined — 호출부에서 `?? 온체인/하드코딩 폴백`으로 처리한다. */ declare function useChainDisplay(chainId: number | undefined, env: Environment): ChainDisplayMeta; /** * chains.json의 전체 chainId→표시 메타 맵을 구독한다. 여러 체인의 표시명을 * 한 번에 매핑해야 하는 곳(네트워크 스위처 등)에서 사용한다. 로딩 전/실패 시 * 빈 객체 — 호출부에서 `map[String(id)]?.name ?? 폴백`으로 처리한다. */ declare function useChainsConfig(env: Environment): Record; type AppLauncherUsageMode = "dapp-ui" | "connect-kit-react"; declare function announceAppLauncherUsage(options?: { mode?: AppLauncherUsageMode; connectKitVersion?: string; }): void; interface InitDappUiSentryOptions { /** Falls back to VITE_CROSSX_ENVIRONMENT / NEXT_PUBLIC_CROSSX_ENVIRONMENT detection. */ environment?: Environment | "dev" | "stg" | "staging" | "prod" | "prd"; /** Defaults to true only on prod; dev/stg init but do not send. */ enabled?: boolean; /** Override DSN (tests / self-hosted relay). */ dsn?: string; /** 0–1 sample rate for ui:/funnel: analytics events (default 0.1). Errors are never sampled. */ analyticsSampleRate?: number; } /** * dapp-ui is embedded in host apps that may run their own Sentry, so we never * call `Sentry.init()`: it claims the global hub and either clobbers the host * client or gets clobbered by it. Instead we keep a dedicated BrowserClient on * an isolated Scope, with no global integrations (no window.onerror, no * fetch/XHR patching) — errors reach the dapp-ui project only through explicit * captureDappUiException calls, and the host's Sentry is never touched. */ declare function initDappUiSentry(options?: InitDappUiSentryOptions): Scope | null; declare function getDappUiSentryScope(): Scope | null; /** Lazily initializes with defaults so error boundaries work without host setup. */ declare function captureDappUiException(error: unknown, extra?: Record): string | undefined; interface DappUiErrorBoundaryProps { children: ReactNode; /** Rendered when a child throws; defaults to rendering nothing. */ fallback?: ReactNode; /** Identifies which popup/root failed, e.g. "app-launcher". */ name?: string; } interface DappUiErrorBoundaryState { hasError: boolean; } /** * Reports to the isolated dapp-ui Sentry client instead of the global hub — * Sentry.ErrorBoundary would send to whichever client the host app installed. */ declare class DappUiErrorBoundary extends Component { state: DappUiErrorBoundaryState; static getDerivedStateFromError(): DappUiErrorBoundaryState; componentDidCatch(error: Error, info: ErrorInfo): void; render(): ReactNode; } type DappUiFeature = "app_launcher" | "bridge" | "connect_button" | "get_one_usd" | "relay" | "send" | "skills" | "wallet_connect" | "wallet_info" | "wallet_portfolio"; type DappUiFlow = "connect" | "send" | "bridge" | "withdraw" | "relay"; type DappUiFailureReason = "user-rejected" | "insufficient-gas" | "timeout" | "contract-reverted" | "network" | "unknown"; interface TrackDappUiFunnelOptions { status?: "success" | "failure"; reason?: DappUiFailureReason; tags?: Record; } declare function setDappUiAnalyticsUser(address?: string): void; /** Button/UI usage event: message `ui: _` on the isolated client. */ declare function trackDappUiEvent(feature: DappUiFeature, action: string, tags?: Record): void; /** Funnel step event: message `funnel: _` with funnel_status/failure_reason tags. */ declare function trackDappUiFunnel(flow: DappUiFlow, step: string, options?: TrackDappUiFunnelOptions): void; /** Maps arbitrary wallet/RPC errors onto the fixed failure_reason vocabulary. */ declare function normalizeFailureReason(error: unknown): DappUiFailureReason; interface AppLauncherProps { env?: Environment; theme?: Theme; mobileBreakpoint?: number; domain?: string; children: React.ReactNode; } declare function AppLauncher({ env, theme, mobileBreakpoint, domain, children, }: AppLauncherProps): react_jsx_runtime.JSX.Element; /** * `AppLauncherTrigger`의 `style` prop 타입. 표준 `CSSProperties` 위에 * `--at-*` CSS 커스텀 변수 키를 추가해 자동완성을 지원한다. * * 사용 예: `style={{ "--at-color": "white", "--at-bg-hover": "rgba(255,255,255,0.1)" }}` * * 변수는 `.al-trigger-btn` 클래스에 cascading 되므로 자식 아이콘도 * `currentColor` 를 통해 같은 색을 따라간다. */ interface AppLauncherTriggerStyle extends CSSProperties { "--at-bg"?: string; "--at-bg-hover"?: string; "--at-color"?: string; "--at-border"?: string; "--at-border-radius"?: string; "--at-size"?: string; "--at-padding"?: string; "--at-press-scale"?: string | number; "--at-transition"?: string; } interface GlobalMenuItemUrl { dev: string; stage: string; production: string; } type GlobalMenuItemAssetUrl = string | GlobalMenuItemUrl; type GlobalMenuItemServiceStatus = "available" | "ending" | "comingSoon"; type GlobalMenuCategoryStatus = "all" | GlobalMenuItemServiceStatus; interface GlobalMenuCategory { status: GlobalMenuCategoryStatus; label: string; } interface GlobalMenuItem { id: string; label: string; description: string; url: GlobalMenuItemUrl; iconUrl: GlobalMenuItemAssetUrl; order: number; type: string; badge: string | null; isNew: boolean; serviceStatus?: GlobalMenuItemServiceStatus; } interface GlobalMenu { version: string; categories?: GlobalMenuCategory[]; items: GlobalMenuItem[]; } interface AppLauncherTriggerProps { asChild?: boolean; children?: React.ReactNode; /** Additional CSS class merged with built-in `.al-trigger-btn` (default trigger only) */ className?: string; /** Inline style + CSS custom property overrides (`AppLauncherTriggerStyle`) — default trigger only */ style?: AppLauncherTriggerStyle; } declare function AppLauncherTrigger({ asChild, children, className, style, }: AppLauncherTriggerProps): react_jsx_runtime.JSX.Element; interface AppLauncherContentProps { align?: "start" | "center" | "end"; sideOffset?: number; className?: string; } declare function AppLauncherContent({ align, sideOffset, className, }: AppLauncherContentProps): react_jsx_runtime.JSX.Element; declare function useGlobalMenu(env?: Environment): _tanstack_react_query.UseQueryResult; /** CAIP-2 chain identifier (e.g. "eip155:612044") */ type ChainId = `eip155:${number}`; declare enum ConnectorId { CROSSx = "crossx", MetaMask = "io.metamask", Binance = "com.binance.wallet" } interface ConnectorMeta { name: string; iconUrl: string; } declare const CONNECTOR_REGISTRY: Record; interface PreferredToken { chainId: ChainId; address: string; } interface WalletInfoStyle extends CSSProperties { "--wi-primary"?: string; "--wi-secondary"?: string; "--wi-surface-bg"?: string; "--wi-surface-default"?: string; "--wi-surface-subtle"?: string; "--wi-border-default"?: string; "--wi-border-subtle"?: string; "--wi-texticon-primary"?: string; "--wi-texticon-secondary"?: string; "--wi-texticon-tertiary"?: string; } interface TokenBalance { blockNumber: number; name: string; symbol: string; chainId: number; address: string; quantity: { decimals: number; numeric: string; }; icon_url: string; } interface TokenBalanceResponse { code: number; message: string; data: TokenBalance[]; } interface TokenStats { chain_id: number; address: string; price: string; percent_change_24h: string; /** 시장 유통량. `/v1/public/token/stats`가 제공(문자열). 상세화면 Total Supply 표기용. */ circulating_supply?: string; market_cap?: string; volume_24h?: string; } interface TokenStatsResponse { code: number; message: string; data: TokenStats[]; } /** * 포트폴리오 본문에 노출 가능한 섹션 종류. * - `"rewards"` : CROSS Rewards * - `"points"` : CROSS Points (게임 토큰 예치 퀘스트, 내장 Withdraw) * - `"staking"` : CROSS Staking * - `"gameSwap"` : Gametoken LP * - `"forge"` : Forge * - `"crossdPool"` : CROSSD v3 pool 포지션, 내장 Withdraw * * `WalletPortfolioBody` / `WalletInfo`의 섹션 필터에 사용한다. */ type PortfolioSection = "rewards" | "points" | "staking" | "gameSwap" | "forge" | "crossdPool"; /** * 섹션 필터를 지정하지 않았을 때(=전체 노출)의 기본 표시 순서. * 배열로 필터를 줄 때 어떤 키들이 유효한지에 대한 단일 출처(source of truth). */ declare const PORTFOLIO_SECTIONS: readonly PortfolioSection[]; /** * 포트폴리오/Send 기능에서 트랜잭션을 실제로 서명/브로드캐스트할 때 * 호출하는 공통 payload 타입. * * 주입되는 지갑 스택(wagmi, viem, 자체 SDK 등)에 관계없이 동일한 계약으로 * 동작시키기 위한 최소 공통 시그니처다. wagmi의 `sendTransactionAsync`를 * 그대로 전달해도 호환된다. */ interface SendTransactionArgs { to: `0x${string}`; value?: bigint; data?: `0x${string}`; chainId?: number; gas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; } type SendTransactionFn$1 = (args: SendTransactionArgs) => Promise<`0x${string}`>; interface GetTransactionReceiptArgs { hash: `0x${string}`; chainId?: number; } interface TransactionReceiptResult { status?: "success" | "reverted" | "0x1" | "0x0" | number | bigint | boolean; } type GetTransactionReceiptFn = (args: GetTransactionReceiptArgs) => Promise; /** * Send 확인 단계에서 표시할 가스/수수료 추정 정보를 가져오는 콜백. * * Send 확인 화면 표기 정책 (crossy-sdk-js `docs/06-gas-fee.md` 기준): * - `maxFeePerGas` 채움 → Dynamic(EIP-1559) 모드로 표기 * · Est. Tx Fee = `gasLimit × maxFeePerGas` (native) * · Max Priority Fee = `maxPriorityFeePerGas` (Gwei) * · Max Gas Fee = `maxFeePerGas` (Gwei) * · Gas Limit = `gasLimit` * - `gasPrice`만 채움 → Legacy 모드로 표기 * · Est. Tx Fee = `gasLimit × gasPrice` (native) * · Gas Price = `gasPrice` (Gwei) * · Gas Limit = `gasLimit` * * 둘 다 채워지면 Dynamic 우선. 둘 다 비어있으면 해당 행은 "—"로 표시된다. */ interface EstimateGasArgs { to: `0x${string}`; value?: bigint; data?: `0x${string}`; chainId?: number; from?: `0x${string}`; } interface GasEstimate { gasLimit: bigint; gasPrice?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; } type EstimateGasFn = (args: EstimateGasArgs) => Promise; interface PoolToken { address: string; symbol: string; name: string; decimals: number; price: string; } interface RewardPool { pool_id: number; pool_address: string; pool_name: string; pool_type: "CrossPool" | "GamePool"; pool_status: string; deposit_token: PoolToken; reward_tokens: PoolToken[]; total_deposited: string; total_users: number; created_block: number; created_time: number; last_updated_block: number; last_updated_time: number; } interface UserDepositInfo { account: string; pool_address: string; pool_id: number; pool_name: string; deposited_amount: string; claimable_reward: string; total_rewards_claimed: string; last_deposited_block: number; last_updated_block: number; last_updated_time: number; last_withdrawn_block: number; } /** * 사용자가 출금할 수 있는 예치 포지션 하나 (deposited > 0인 풀). * `useWithdrawPositions`가 deposits API + pools API(+온체인 메타 폴백)를 * 합성해 만든다. 금액은 raw(wei) 문자열로 유지하고 표기 시에만 환산한다. */ interface WithdrawPosition { poolId: number; poolAddress: string; /** pools API가 모르는(비활성/quest) 풀은 "Unknown". */ poolType: RewardPool["pool_type"] | "Unknown"; tokenSymbol: string; tokenAddress: string; decimals: number; /** USD 단가 (pools API 제공 시에만). */ price?: string; /** 예치 잔액 (raw, wei 문자열) */ depositedRaw: string; } /** * host(wagmi 보유 측)가 공급하는 LP 잔고 reader가 반환하는 단위 정보. * 금액은 모두 raw(wei) BigInt로 다루고, 표기 시에만 decimals로 환산한다. */ interface LpBalanceInfo { /** 연결 계정의 LP 토큰 잔고 `balanceOf(account)` (raw, wei) */ balance: bigint; /** LP 토큰 총발행량 `totalSupply()` (raw, wei). 없으면 지분율 계산 불가. */ totalSupply?: bigint; /** LP 토큰 decimals (보통 18). 없으면 18로 간주. */ decimals?: number; } /** * 주입형 LP 잔고 reader. host(wagmi)가 연결 계정 기준으로 주어진 pair(LP) * 토큰 주소들의 balanceOf / totalSupply / decimals를 읽어 반환한다. * 반환 맵의 key는 소문자 정규화된 pair 주소. * * dapp-ui는 이 함수 시그니처에만 의존하며 viem/wagmi를 직접 사용하지 않는다. * 미주입 시 dapp-ui가 CROSS 체인 RPC로 직접 읽는 내부 폴백 * (`readLpBalancesViaRpc`)으로 동작하며, 폴백마저 실패해야 풀 정보만 표시한다. */ type LpBalanceReaderFn = (pairAddresses: string[]) => Promise>; /** * game-swap `/portfolio` pool 항목의 토큰 참조. * NOTE: CROSS 쪽(token_b)은 백엔드가 메타데이터 없이 내려준다 — * `symbol: ""`, `name: ""`, `decimals: 0`, `logo_url` 누락. 소비 측에서 * symbol은 "ONE"으로, decimals는 18로 간주해야 한다 (실응답 확인 기준). */ interface GameSwapTokenRef { address: string; symbol: string; name: string; decimals: number; logo_url?: string; } /** * game-swap `GET /addresses/:address/portfolio`의 `pools[]` 항목. * 풀 단위 정보(예비량/가격)만 담고, 사용자별 LP 잔고는 포함하지 않는다 * (그것은 주입형 reader의 온체인 read로 보강한다). */ interface GameSwapPool { pair_address: string; token_a?: GameSwapTokenRef; token_b?: GameSwapTokenRef; /** raw wei */ reserve_a: string; /** raw wei */ reserve_b: string; /** 1 token_a = X token_b(CROSS) */ last_price: string; /** last_price × quote_usd */ price_usd: string; /** CROSS/USD 환율 (백엔드 신규 필드명). */ quote_usd?: string; /** @deprecated 백엔드가 `quote_usd`로 이관. 전환기 폴백용으로만 유지. */ cross_usd?: string; /** token_a 24h 변동률 (0.0012 = +0.12%) */ change_24h: string; } /** * POSA governance API의 staking 요약 정보. `GET /stake/:address`. * 금액은 wei가 아니라 CROSS 단위 십진 문자열로 내려온다 * (예: `"500.0000"`, `"0.000000000000000000"`). 실응답 확인 기준. */ interface StakeInfo { address: string; /** 현재 스테이킹된 총량 (CROSS 단위 십진 문자열) */ total_stake: string; /** 누적/청구 가능 리워드 (CROSS 단위 십진 문자열) */ rewards_earned: string; /** 위임(delegation) 개수 */ delegations: number; /** 최초 스테이킹 시각 (ISO timestamp). 스테이킹 이력이 없으면 null. */ first_staked_at: string | null; /** 최초 스테이킹 이후 경과 일수. 스테이킹 이력이 없으면 null. */ days_since_first_stake: number | null; } /** * 주입형 staking 리워드 reader가 반환하는 온체인 값. * 금액은 모두 raw(wei) BigInt로 다루고, 표기 시에만 decimals(18)로 환산한다. */ interface StakingRewardsInfo { /** * 온체인 누적 미청구 리워드 `earned(account)` (raw, wei). * posa 비활성 상태에서는 lastRewardBlock 이후 블록 기반 projection을 더한 * 추정치(= posa 포트폴리오 "Accrued Rewards"와 동일 값)를 반환한다. */ earnedWei: bigint; /** 온체인 스테이킹 원금 `balanceOf(account)` (raw, wei). 개인 APR 분모. */ stakedWei: bigint; } /** * 주입형 staking 리워드 reader. host(wagmi 보유 측)가 연결 계정 기준으로 * POSA delegation pool 컨트랙트의 `earned()` / `balanceOf()`를 읽어 반환한다. * dapp-ui는 viem/wagmi를 직접 쓰지 못하므로, posa 포트폴리오의 온체인 * "Accrued Rewards"와 동일한 수치를 표기하려면 이 reader가 주입돼야 한다. * 미주입 시 StakeSection은 API `cumulative_earned`로 폴백한다. * * dapp-ui는 이 함수 시그니처에만 의존한다. */ type StakingRewardsReaderFn = (account: string) => Promise; /** 네트워크 통계 중 포트폴리오에서 사용하는 필드 (`GET /network/stats`). */ interface NetworkStats { /** 네트워크 APR (백분율 문자열, 예: "12.5") */ apr: string; total_staked: string; active_validators: number; } interface ForgePoolToken { address: string; name: string; symbol: string; image: string; } interface ForgePool { lp_balance: string; pair_address: string; pool_ownership: string; total_supply: string; token: ForgePoolToken; } interface ForgeTokenDetail { address: string; name: string; symbol: string; image: string; image_url: string; pair_address: string; wrapped_native: string; virtual_reserve_b: string; reserve_a: string; reserve_b: string; graduated: boolean; current_price: string; market_cap: string; total_supply: string; available_supply: string; } /** cross-defi API 토큰 참조 (detail 응답의 pool.token0/token1). */ interface CrossdPositionTokenRef { address?: string; symbol?: string; name?: string; decimals?: number; logo_url?: string; } /** positions list 항목의 pool 요약 — 심볼만 있고 토큰 주소는 없다(detail에서 보강). */ interface CrossdPositionPoolRef { pool_address?: string; fee_tier?: number; fee_tier_percentage?: string; token0_symbol?: string; token1_symbol?: string; } /** * cross-defi `GET /api/v1/positions?owner=` 목록 항목 중 포트폴리오가 쓰는 필드. * 수량류(liquidity, *_amount, uncollected_*)는 십진 문자열로 내려온다 — * 계산에 쓰는 것은 liquidity(BigInt 변환)뿐이고 나머지는 표시 전용. */ interface CrossdPosition { token_id?: string; /** 0이면 전량 출금된(closed) 포지션 — 섹션에서 제외. */ liquidity?: string; in_range?: boolean; is_full_range?: boolean; token0_amount?: string; token1_amount?: string; uncollected_fees_token0?: string; uncollected_fees_token1?: string; uncollected_fees_usd?: string; position_value_usd?: string; pool?: CrossdPositionPoolRef; } /** * `GET /api/v1/positions/{token_id}` detail 중 출금에 필요한 부분. * list에는 없는 token0/token1의 주소·decimals를 여기서 얻는다 * (WCROSS 판별 + sweepToken 인자 + 수량 표기). */ interface CrossdPositionDetail { token_id?: string; liquidity?: string; pool?: { pool_address?: string; token0?: CrossdPositionTokenRef; token1?: CrossdPositionTokenRef; }; } /** * dapp-ui가 렌더하는 outlink의 대분류. * `portfolio`는 세부적으로 `origin`으로 더 나뉜다. */ type OutlinkCategory = "terms" | "privacy" | "portfolio" | "send" | "token-detail"; /** * `onOutlink` 콜백에 전달되는 호출 컨텍스트. `category` + `origin`으로 * 호출측이 목적지별 분기를 할 수 있고, `portfolio-*`의 경우 해당 섹션의 * 원시 데이터를 `payload`로 내려보낸다. * * 새로운 포트폴리오 섹션이 추가될 때는 이 union에 variant 하나만 더하면 * 자동으로 호출측에도 타입이 좁혀져서 전달된다. */ type OutlinkContext = { category: "terms"; origin: "terms"; } | { category: "privacy"; origin: "privacy"; } | { category: "portfolio"; origin: "portfolio-rewards"; payload: { pool: RewardPool; userDeposit?: UserDepositInfo; }; } | { category: "portfolio"; origin: "portfolio-points"; payload: { position: WithdrawPosition; }; } | { category: "portfolio"; origin: "portfolio-stake"; payload: { stakeInfo?: StakeInfo; networkStats?: NetworkStats; }; } | { category: "portfolio"; origin: "portfolio-game-swap"; payload: { pool: GameSwapPool; }; } | { category: "portfolio"; origin: "portfolio-forge"; payload: { pool: ForgePool; tokenDetail?: ForgeTokenDetail; }; } | { category: "portfolio"; origin: "portfolio-crossd-pool"; payload: { position: CrossdPosition; detail?: CrossdPositionDetail; }; } | { category: "send"; origin: "send-transaction"; payload: { chainId: number; txHash: `0x${string}`; }; } | { category: "token-detail"; origin: "token-network" | "token-social" | "token-tx"; payload: { address: string; txHash?: string; }; }; type OutlinkOrigin = OutlinkContext["origin"]; /** * outlink 가로채기 콜백. 반환값 규칙: * * - `string` → 해당 URL로 이동(원본을 변형 가능). * - `null` → 이동 취소(창도 열리지 않음). * - `undefined` → 원본 URL로 그대로 이동 (no-op). * - `Promise<...>`→ 위 값 중 하나를 resolve. 비동기 동안 사용자 제스처를 * 유지하기 위해 빈 창이 먼저 열린 뒤 URL이 채워진다. * * middle-click · cmd-click · ctrl-click 등 브라우저 새 탭 단축 동작은 * 가로채지 않고 원본 `href`로 그대로 열린다. */ type OnOutlink = (link: string, ctx: OutlinkContext) => string | null | undefined | Promise; interface SendAsset { name: string; symbol: string; chainId: number; address: string; quantity: { decimals: number; numeric: string; }; icon_url: string; } type SendStatus = "idle" | "review" | "submitting" | "confirming" | "success" | "error"; interface RecentSendAddress { address: `0x${string}`; updatedAt: number; } interface SendAccount { address: `0x${string}`; index?: number; name?: string; } interface SendPageProps { env?: Environment; theme?: Theme; walletAddress: string; accountName?: string; accounts?: SendAccount[]; token: SendAsset; tokens?: SendAsset[]; onTokenChange?: (token: SendAsset) => void; sendTransaction?: SendTransactionFn$1; getTransactionReceipt?: GetTransactionReceiptFn; /** * 확인 단계에서 표시할 가스/수수료 추정 함수. 주입되지 않으면 Gas/Est.Time/Max.Gas 행은 "—"로 표시된다. * 사용자가 Send 버튼을 눌러 확인 화면에 진입할 때 한 번 호출된다. */ estimateGas?: EstimateGasFn; onSuccess?: (txHash: `0x${string}`) => void; onConfirmSuccess?: (txHash?: `0x${string}`) => void; onOutlink?: OnOutlink; } interface SendSubmittedInfo { txHash: `0x${string}`; chainId: number; amount: string; tokenSymbol: string; recipient: `0x${string}`; } interface SendFailedInfo { txHash?: `0x${string}`; chainId: number; message: string; } interface SendFlowProps { env?: Environment; theme?: Theme; walletAddress: string; accountName?: string; accounts?: SendAccount[]; /** First step shown when the flow opens. Defaults to `recipient`. */ initialStep?: "token" | "recipient"; token: SendAsset; tokens?: SendAsset[]; onTokenChange?: (token: SendAsset) => void; sendTransaction?: SendTransactionFn$1; getTransactionReceipt?: GetTransactionReceiptFn; estimateGas?: EstimateGasFn; getTokenPriceUsd?: (token: SendAsset) => number | undefined; onSubmitted?: (info: SendSubmittedInfo) => void; onSuccess?: (txHash: `0x${string}`) => void; onFailed?: (info: SendFailedInfo) => void; /** Close the whole surface (X). */ onClose?: () => void; /** Back out of the first step (return to the wallet view). */ onBackToWallet?: () => void; /** Finished after a successful send. */ onConfirmSuccess?: (txHash?: `0x${string}`) => void; onOutlink?: OnOutlink; className?: string; } declare function SendFlow({ onClose, onBackToWallet, onConfirmSuccess, onSuccess, className, ...rest }: SendFlowProps): react_jsx_runtime.JSX.Element; type BridgeStep = "form" | "history"; type BridgeStatus = "idle" | "quoting" | "submitting" | "success" | "error"; type BridgeAmountSource = "from" | "to"; type BridgePathType = "bridge" | "swap" | "swap-bridge" | "bridge-swap" | "deposit-swap" | "swap-withdraw"; interface BridgeToken { name: string; symbol: string; chainId: number; address: string; decimals: number; balance: string; iconUrl?: string; priceUsd?: number; } interface BridgeInfoTokenRef { symbol: string; iconUrl?: string; } interface BridgeInfoRow { label: string; value: string; tone?: "default" | "accent" | "warning" | "danger"; routeTokens?: BridgeInfoTokenRef[]; valueToken?: BridgeInfoTokenRef; } interface BridgeLiquidityInfo { label?: string; status?: "low" | "normal" | "rebalancing"; percentage?: number; } interface BridgeTxSummary { pathType?: BridgePathType; exchangeRate?: string; priceImpact?: string; liquidity?: BridgeLiquidityInfo; bridgeInfo?: BridgeInfoRow[]; swapInfo?: BridgeInfoRow[]; txFeeInfo?: { estTxFee: string; isDelegateFee?: boolean; tokenIconUrl?: string; tokenSymbol?: string; }; txFee?: BridgeInfoRow[]; } interface BridgeQuoteInput { fromToken: BridgeToken; toToken: BridgeToken; fromAmount: string; toAmount: string; lastChangedBy: BridgeAmountSource; slippage: string; } interface BridgeQuoteResult { fromAmount?: string; toAmount?: string; summary?: BridgeTxSummary; error?: string; } interface BridgeSubmittedInfo { txHash: `0x${string}`; fromToken: BridgeToken; toToken: BridgeToken; fromAmount: string; toAmount: string; pathType?: BridgePathType; routeTokens?: BridgeInfoTokenRef[]; } interface BridgeApprovalInfo { token: BridgeToken; tokenAddress: string; spenderAddress: string; amount?: string; } interface BridgeFailedInfo { message: string; txHash?: `0x${string}`; } interface BridgeHistoryItem { id: string; timestamp: string; txHash: `0x${string}`; fromToken: BridgeToken; toToken: BridgeToken; fromAmount: string; toAmount: string; summary?: BridgeTxSummary; status?: "pending" | "success" | "failed"; } type BridgeQuoteFn = (input: BridgeQuoteInput) => Promise | BridgeQuoteResult; type BridgeSubmitFn = (input: BridgeQuoteInput) => Promise | BridgeSubmittedInfo; type BridgeGetApprovalFn = (input: BridgeQuoteInput) => Promise | BridgeApprovalInfo | null; type BridgeApproveFn = (input: BridgeQuoteInput, approval: BridgeApprovalInfo) => Promise | void; type BridgeGetToTokensFn = (fromToken: BridgeToken, tokens: BridgeToken[]) => BridgeToken[]; interface BridgeFlowProps { walletAddress: string; tokens: BridgeToken[]; initialFromToken?: BridgeToken; initialToToken?: BridgeToken; history?: BridgeHistoryItem[]; initialSlippage?: string; termsUrl?: string; env?: Environment; getQuote?: BridgeQuoteFn; getToTokens?: BridgeGetToTokensFn; getApproval?: BridgeGetApprovalFn; approveBridge?: BridgeApproveFn; submitBridge?: BridgeSubmitFn; onSubmitted?: (info: BridgeSubmittedInfo) => void; onSuccess?: (info: BridgeSubmittedInfo) => void; onFailed?: (info: BridgeFailedInfo) => void; onClose?: () => void; onBackToWallet?: () => void; /** * 이 거래의 수수료를 서비스가 대납하는지. 견적(`BridgeTxSummary.txFeeInfo`)의 * `isDelegateFee` 는 가스만 가리키므로, 스왑/브릿지 수수료 대납은 호출부가 * 알려줘야 한다(Get ONEUSD 는 `pairs.swap/bridge.feeDelegated` 로 안다). */ feeDelegated?: boolean; /** Compact modal mode: fixed direction, no history entry, host-provided title. */ variant?: "default" | "embedded"; title?: string; /** Embedded mode only. Defaults to whether `walletAddress` is present. */ isConnected?: boolean; /** Opens the host wallet connection flow from the embedded CTA. */ onRequestConnect?: () => void; className?: string; } declare function BridgeFlow({ onClose, onBackToWallet, feeDelegated, env, variant, title: titleProp, isConnected: isConnectedProp, onRequestConnect, className, ...rest }: BridgeFlowProps): react_jsx_runtime.JSX.Element; /** * ONEpop (소셜 핸들 드롭) 진입 화면의 표시 계약. * * dapp-ui는 순수 UI 레이어라 `@nexus-cross/pop`(viem 필수)에 의존할 수 없다 * (CLAUDE.md §3, docs/pop/03-integration.md). 따라서 이 화면은 **랜딩/진입 * UI만** 담당하고, 조회(one-pop-api `/drops`·`/histories` — SIWE JWT + X 연결 * 필요)와 실제 deposit/withdraw는 호스트가 `@nexus-cross/pop`으로 수행해 * 결과만 `OnePopSummary`로 주입한다. on-ramp(`@nexus-cross/onramp` → `onBuy`)와 * 동일한 주입 구조다. */ /** 활동 행 우측 배지. 디자인의 Claimed / Waiting / Refunded / Ready. */ type OnePopActivityStatus = "claimed" | "waiting" | "refunded" | "ready"; /** 활동 행의 자금 방향. `sent`="Sent to @x", `received`="Claimed from @x". */ type OnePopActivityDirection = "sent" | "received"; interface OnePopActivityItem { /** React key 및 중복 제거용 고유 값. 보통 `${txHash}-${logIndex}`. */ id: string; direction: OnePopActivityDirection; /** 상대 소셜 핸들. `@` 없이 넘기면 UI가 붙인다. */ handle: string; /** 상대 프로필 이미지. 없으면 이니셜 아바타로 대체된다. */ avatarUrl?: string; /** * 금액 (raw wei-scale 10진 문자열). `decimals`와 함께 UI에서 소수점 2자리 * **버림**으로 표기한다 — Number 변환 없이 BigInt로만 다룬다 (CLAUDE.md §4). */ amountRaw: string; /** `amountRaw`의 소수 자릿수. */ decimals: number; /** 이벤트 시각 (unix epoch, 초 또는 밀리초). 상대시간 표기에 쓴다. */ timestamp: number; status: OnePopActivityStatus; } /** * ONEpop 화면이 그리는 상태 전부. 미주입(`undefined`)이면 "내역 없음" 화면을 * 그린다 — 조회 실패/미연동 상태에서도 진입 UI는 항상 동작한다. */ interface OnePopSummary { /** 수령 대기 중인 드롭 수. 0이면 클레임 배너를 그리지 않는다. */ claimableCount: number; /** 수령 대기 합계 (raw wei-scale). `claimableDecimals`와 함께 쓴다. */ claimableTotalRaw: string; /** `claimableTotalRaw`의 소수 자릿수. 기본 18. */ claimableDecimals: number; /** * "N replies waiting" 배너의 카운트. 백엔드 계약(one-pop-api)에 대응 개념이 * 아직 없어 **숫자만** 받는다 — 의미 해석과 조회는 주입측 책임이다. * 0이면 배너를 그리지 않는다. */ repliesWaitingCount: number; /** 최근 활동. 비어 있으면 3개 소개 항목(빈 상태)을 대신 그린다. */ activity: OnePopActivityItem[]; /** * 활성 X 연결 여부 (one-pop-api `/x-connections`). Activity 버튼은 X 연결이 * 있어야 의미가 있으므로(수신 내역이 핸들 기준) true일 때만 렌더한다. * 미주입(undefined)이면 미연결로 취급해 숨긴다. */ xConnected?: boolean; /** 조회 진행 중이면 배너/리스트 자리에 스켈레톤을 그린다. */ isLoading?: boolean; } interface OnePopBodyProps { /** ONEpop 서비스 웹 딥링크의 환경. 미지정 시 production. */ env?: Environment; /** Available 카드에 표시할 ONEUSD 잔액 (표시용 포맷 완료 문자열). */ balanceDisplay?: string; /** Available 카드의 토큰 아이콘. 미지정 시 아이콘 자리를 비운다. */ balanceIconUrl?: string; /** 잔액 조회 중이면 스켈레톤. */ isBalanceLoading?: boolean; /** 호스트가 `@nexus-cross/pop`으로 조회해 주입하는 상태. 미주입 = 빈 상태. */ summary?: OnePopSummary; /** 브랜드 워드마크 이미지. 미지정 시 인라인 SVG 재현본. */ logoSrc?: string; /** 히어로 일러스트 이미지. 미지정 시 인라인 SVG 재현본. */ heroSrc?: string; onBack: () => void; onClose: () => void; /** * Send POP 카드 + "Send your first POP!" CTA override. 미주입 시 ONEpop 웹 * 센드 페이지(`/pop`)를 새 탭으로 연다. 다른 액션도 같은 규칙 — 전부 서비스 * 페이지 이동이라 disabled 상태가 없다. */ onSend?: () => void; /** Claim POPs 카드 + 클레임 배너 override. 기본 `/pop/claim`. */ onClaim?: () => void; /** * Activity 카드 + "See all activity" override. 기본 `/pop/activity`. * Activity 카드는 `summary.xConnected` 가 true 일 때만 렌더된다. */ onActivity?: () => void; /** * 활동 화면으로 나가는 모든 경로(Activity 카드 / `See all activity` / * `N replies waiting` 배너)에서 **추가로** 호출되는 알림 훅. `onActivity` 와 * 달리 기본 동작을 대체하지 않는다 — 답장을 확인 처리해 * `repliesWaitingCount` 를 0 으로 떨어뜨리는 용도다. */ onRepliesSeen?: () => void; /** "You might have POPs waiting" 배너 override. 기본 `/pop/board`. */ onBoard?: () => void; /** "Get ONEUSD ›" override. 기본 게임토큰 브리지(`/gametoken/bridge`). */ onGetToken?: () => void; /** * "Get ONEUSD ›" 자리를 통째로 대체하는 노드. 지갑을 떠나지 않고 Get ONEUSD * 위젯(Swap / Bridge / Transfer 선택 모달)을 그 자리에서 열기 위한 슬롯이다 — * 위젯은 wagmi 어댑터가 필요해 dapp-ui 가 직접 마운트할 수 없으므로, * `@nexus-cross/connect-kit-react` 가 `` 를 주입한다. * * 주입되면 `onGetToken`/기본 딥링크는 쓰이지 않는다. */ getTokenSlot?: React.ReactNode; } declare function OnePopBody({ env, balanceDisplay, balanceIconUrl, isBalanceLoading, summary, logoSrc, heroSrc, onBack, onClose, onSend, onClaim, onActivity, onRepliesSeen, onBoard, onGetToken, getTokenSlot, }: OnePopBodyProps): react_jsx_runtime.JSX.Element; /** * ONEpop Available 카드의 "Get ONEUSD ›" 링크를 그대로 재현한 트리거. * * `` 의 * 커스텀 트리거로 쓰라고 있는 컴포넌트다 — 위젯이 넘기는 `onClick`/`disabled`/ * `aria-label` 은 그대로 받고, 위젯 기본 스킨(`gou-fab` className, 토큰 * 아이콘 + APR children)만 버린다. 그래서 지갑 안의 생김새는 딥링크 시절과 * 1px 도 달라지지 않고, 클릭은 위젯의 액션 선택 모달로 간다. */ declare const OnePopGetTokenTrigger: React.ForwardRefExoticComponent & React.RefAttributes>; interface WalletInfoTriggerProps { asChild?: boolean; className?: string; children?: React.ReactNode; } declare function WalletInfoTrigger({ asChild, className, children, }: WalletInfoTriggerProps): react_jsx_runtime.JSX.Element; interface WalletInfoContentProps { align?: "start" | "center" | "end"; sideOffset?: number; className?: string; children?: React.ReactNode; } declare function WalletInfoContent({ align, sideOffset, className, children, }: WalletInfoContentProps): react_jsx_runtime.JSX.Element; interface WalletInfoNavProps { position?: "top" | "bottom"; children: React.ReactNode; } declare function WalletInfoNav({ position, children, }: WalletInfoNavProps): null; interface WalletInfoFooterProps { children: React.ReactNode; } declare function WalletInfoFooter({ children }: WalletInfoFooterProps): null; interface WalletInfoProps { env?: Environment; theme?: Theme; mobileBreakpoint?: number; drawerDirection?: DrawerDirection$1; modal?: boolean; showBalance?: boolean; showForgeToken?: boolean; showGameToken?: boolean; showQR?: boolean; /** * Bridge 액션 노출 여부 (기본 true). * - true: 액션 행에 Bridge 버튼, Receive는 상단 QR 버튼으로 표기 * - false: 액션 행에 Receive 버튼, 상단 QR 버튼 미표기 */ showBridge?: boolean; qrLogoSrc?: string; walletAddress: string; accountName?: string; sendAccounts?: SendAccount[]; /** 헤더 좌측에 표시될 프로필 이미지 URL. 미지정 시 주소 기반 그라디언트 아바타가 자동 생성됨. */ profileImageUrl?: string; /** Resolves connectorName & connectorIconUrl from CONNECTOR_REGISTRY */ connectorId?: ConnectorId; connectorName?: string; connectorIconUrl?: string; preferredTokens?: PreferredToken[]; onSelectWallet?: () => void; onCopyAddress?: (address: string, success: boolean) => void; /** * WalletInfo 기본 액션 row의 Buy 클릭 핸들러. Promise를 반환하면 reject 시 * Buy 카드가 `onBuyDisabledMessage`와 동일한 토스트로 실패를 안내한다. */ onBuy?: () => void | Promise; /** * Buy 카드를 시각적으로 비활성 상태로 표시하고, 사용자가 클릭하면 이 * 메시지를 토스트로 띄운다. `onBuy`보다 우선. 예: on-ramp가 사용자 국가에서 * 차단된 경우 안내 메시지 전달용. */ onBuyDisabledMessage?: string; /** * Bridge 카드를 시각적으로 비활성 상태로 표시하고, 클릭하면 이 메시지를 * 토스트로 띄운다. 예: 연결된 지갑이 CROSSx 계열이 아니라 브릿지를 * 지원하지 않는 경우. */ onBridgeDisabledMessage?: string; /** * Send 카드(및 토큰 행 탭으로 진입하는 전송 플로우)를 시각적으로 비활성 * 상태로 표시하고, 클릭하면 이 메시지를 토스트로 띄운다. 예: 연결된 지갑이 * CROSSx 계열이 아닌 경우. */ onSendDisabledMessage?: string; /** * 지정 시 기본 Disconnect 버튼이 Footer에 노출됨. `WalletInfo.Footer` 슬롯이 * 있으면 해당 슬롯이 메인 영역을 대체한다. Terms/Privacy 링크는 둘 중 무엇을 * 쓰든 항상 하단에 함께 렌더된다. */ onDisconnect?: () => void; /** 기본 Disconnect 버튼 라벨 (기본 "Disconnect"). */ disconnectLabel?: string; /** * Footer 하단 Terms 링크 URL. * 미지정 시 CROSS 에코시스템 기본 URL로 폴백되어 자동 노출된다. * 숨기려면 빈 문자열(`""`)을 전달. */ termsUrl?: string; /** Terms 링크 라벨 (기본 "Terms of Service"). */ termsLabel?: string; /** * Footer 하단 Privacy 링크 URL. * 미지정 시 CROSS 에코시스템 기본 URL로 폴백되어 자동 노출된다. * 숨기려면 빈 문자열(`""`)을 전달. */ privacyUrl?: string; /** Privacy 링크 라벨 (기본 "Privacy Policy"). */ privacyLabel?: string; open?: boolean; onOpenChange?: (open: boolean) => void; /** * Portfolio 뷰 사용 여부. * true면 기본 액션 row에 Portfolio 버튼이 표시되며, 클릭 시 내부 Portfolio 뷰로 전환됩니다. */ showPortfolio?: boolean; /** * ONEpop 사용 여부 (기본 **false** — 서비스 오픈 전 딥링크가 죽은 링크가 * 되지 않도록 opt-in). true면 기본 액션 row에 ONEpop 버튼이 표시되며, * 클릭 시 내부 ONEpop 뷰로 전환된다. 뷰는 순수 UI라 아래 데이터/콜백이 * 없어도 렌더된다 — 액션 버튼은 전부 ONEpop 서비스 딥링크가 기본 동작이다. * connect-kit-react 경유라면 config `onePopEnabled: true` 하나로 노출과 * 조회가 함께 켜진다. */ showOnePop?: boolean; /** * ONEpop 뷰가 표시할 상태(수령 대기 수/합계, replies 카운트, 최근 활동). * * dapp-ui는 `@nexus-cross/pop`(viem 필수)에 의존할 수 없으므로 one-pop-api를 * 직접 조회하지 않는다 — `/drops`·`/histories`는 SIWE JWT + X 연결이 필요해 * 서명 가능한 호스트가 조회한 뒤 이 prop 으로 주입한다. * `@nexus-cross/connect-kit-react`를 쓰면 자동 주입된다. * 미주입 시 "내역 없음" 온보딩 화면을 그린다. */ onePopSummary?: OnePopSummary; /** * ONEpop 뷰 진입 시 1회 호출. `onePopSummary` 조회는 SIWE 서명(지갑 팝업)을 * 요구하므로, 주입측이 사용자가 실제로 ONEpop을 열 때까지 조회를 미루는 * 트리거로 쓴다. */ onOnePopOpen?: () => void; /** Send POP 카드 + "Send your first POP!" CTA. 미주입 시 비활성. */ onOnePopSend?: () => void; /** Claim POPs 카드 + 수령 대기 배너. 미주입 시 비활성. */ onOnePopClaim?: () => void; /** Activity 카드 + "See all activity" + replies 배너. 미주입 시 비활성. */ onOnePopActivity?: () => void; /** * 활동 화면으로 나가는 경로에서 추가로 호출되는 알림 훅(목적지 이동은 그대로). * `onOnePopActivity` 와 달리 기본 동작을 대체하지 않는다 — 답장을 확인 * 처리해 `onePopSummary.repliesWaitingCount` 를 떨어뜨리는 용도다. * connect-kit 경유라면 `useOnePopSummary().markRepliesSeen` 이 자동 배선된다. */ onOnePopRepliesSeen?: () => void; /** * ONEpop Available 카드의 "Get ONEUSD ›" 자리를 대체할 노드. * * 지갑을 떠나지 않고 Get ONEUSD 위젯(Swap / Bridge / Transfer 선택 모달)을 * 열기 위한 슬롯이다 — 위젯은 wagmi 어댑터가 필요하므로 dapp-ui 가 직접 * 마운트하지 못한다. `@nexus-cross/connect-kit-react` 를 쓰면 * `` 가 * 자동 주입되고, 직접 쓰는 호스트는 같은 형태로 넘기면 된다. * 미주입 시 기존 게임토큰 브리지 딥링크가 그대로 동작한다. */ onePopGetTokenSlot?: React.ReactNode; /** ONEpop 워드마크 이미지 URL. 미지정 시 내장 SVG 재현본. */ onePopLogoSrc?: string; /** ONEpop 히어로 일러스트 URL. 미지정 시 내장 SVG 재현본. */ onePopHeroSrc?: string; /** Portfolio 뷰의 헤더 타이틀 (기본 "My Portfolio"). */ portfolioTitle?: string; /** * Portfolio 뷰에 노출할 섹션 필터. 미지정 시 모든 섹션을 기본 순서대로 * 표시하고, 배열을 주면 포함된 섹션만 표시한다(빈 배열 = 전부 숨김). * 예: `["rewards", "staking"]`. */ portfolioSections?: PortfolioSection[]; /** Total Assets 섹션 노출 여부 (기본 true). showBalance=true일 때만 실제 표기. */ showTotalAssets?: boolean; /** Total Assets 라벨 텍스트 (기본 "Total Assets USD"). */ totalAssetsLabel?: string; /** * Send 페이지의 일반 토큰 전송에 사용할 외부 트랜잭션 전송 함수. * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다. */ sendTransaction?: SendTransactionFn$1; getTransactionReceipt?: GetTransactionReceiptFn; /** * Send 확인 단계에서 표시할 가스/수수료 추정 함수. * 주입되지 않으면 확인 화면의 Gas/Est.Time/Max.Gas 행은 "—"로 표시된다. */ estimateGas?: EstimateGasFn; /** * Terms/Privacy · 포트폴리오 섹션 등 외부 링크 이동을 가로채는 콜백. * `(url, ctx) => newUrl | null | undefined | Promise<...>` 형태이며 * - `string` → 해당 URL로 이동(변형 가능) * - `null` → 이동 취소 * - `undefined` → 원본 URL 유지 * middle-click · cmd-click은 가로채지 않고 원본 `href`로 열린다. * `showPortfolio=true`일 때 내부 `WalletPortfolioBody`로도 릴레이된다. */ onOutlink?: OnOutlink; /** * game-swap LP 섹션의 사용자별 LP 잔고/지분율을 온체인에서 보강하기 위한 * 주입형 reader. `showPortfolio=true`일 때 `WalletPortfolioBody`로 릴레이된다. * 미주입 시 LP 섹션은 풀 정보만 표시한다. */ lpBalanceReader?: LpBalanceReaderFn; /** * CROSS Staking 섹션의 온체인 `earned()` / `balanceOf()`를 보강하기 위한 * 주입형 reader. `showPortfolio=true`일 때 `WalletPortfolioBody`로 릴레이된다. * 미주입 시 Staking 섹션은 API `cumulative_earned`로 폴백한다. */ stakingRewardsReader?: StakingRewardsReaderFn; bridgeTokens?: BridgeToken[]; bridgeHistory?: BridgeHistoryItem[]; getBridgeQuote?: BridgeQuoteFn; getBridgeToTokens?: BridgeGetToTokensFn; getBridgeApproval?: BridgeGetApprovalFn; approveBridge?: BridgeApproveFn; submitBridge?: BridgeSubmitFn; /** * 상단 QR 버튼 / 기본 액션 row의 Receive / Send 콜백. (Buy는 위 onBuy * prop으로 이미 정의됨.) */ onReceive?: () => void; /** * @deprecated Bridge 버튼은 항상 apps.json(gametokenBridge) 웹으로 * 이동한다. 이 콜백은 더 이상 호출되지 않는다. */ onBridge?: () => void; onSend?: () => void; style?: WalletInfoStyle; children: React.ReactNode; } declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, showBridge, qrLogoSrc, walletAddress, accountName, sendAccounts, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onBuy, onBuyDisabledMessage, onBridgeDisabledMessage, onSendDisabledMessage, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, showOnePop, onePopSummary, onOnePopOpen, onOnePopSend, onOnePopClaim, onOnePopActivity, onOnePopRepliesSeen, onePopGetTokenSlot, onePopLogoSrc, onePopHeroSrc, portfolioTitle, portfolioSections, showTotalAssets, totalAssetsLabel, sendTransaction, getTransactionReceipt, estimateGas, onOutlink, lpBalanceReader, stakingRewardsReader, bridgeTokens, bridgeHistory, getBridgeQuote, getBridgeToTokens, getBridgeApproval, approveBridge, submitBridge, onReceive, onBridge, onSend, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element; declare const WalletInfo: typeof WalletInfoRoot & { Trigger: typeof WalletInfoTrigger; Content: typeof WalletInfoContent; Nav: typeof WalletInfoNav; Footer: typeof WalletInfoFooter; }; declare const USER_BALANCE_QUERY_KEY = "user-balance"; declare function useTokenBalance(env: Environment, walletAddress: string, active?: boolean): { tokens: TokenBalance[]; isLoading: boolean; isError: boolean; }; declare const TOKEN_STATS_QUERY_KEY = "token-stats"; declare function useTokenStats(env: Environment, enabled?: boolean): { error: Error; isError: true; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: true; isSuccess: false; isPlaceholderData: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise; statsMap: Map; } | { error: null; isError: false; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; isPlaceholderData: false; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise; statsMap: Map; } | { error: Error; isError: true; isPending: false; isLoading: false; isLoadingError: true; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise; statsMap: Map; } | { error: null; isError: false; isPending: true; isLoading: true; isLoadingError: false; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise; statsMap: Map; } | { error: null; isError: false; isPending: true; isLoadingError: false; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isLoading: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise; statsMap: Map; } | { isError: false; error: null; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; isPlaceholderData: true; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; isEnabled: boolean; refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult>; fetchStatus: _tanstack_react_query.FetchStatus; promise: Promise; statsMap: Map; }; interface WalletPortfolioTriggerProps { asChild?: boolean; children?: React.ReactNode; } declare function WalletPortfolioTrigger({ asChild, children, }: WalletPortfolioTriggerProps): react_jsx_runtime.JSX.Element; interface WalletPortfolioContentProps { className?: string; } declare function WalletPortfolioContent({ className, }: WalletPortfolioContentProps): react_jsx_runtime.JSX.Element; interface WalletPortfolioProps { env?: Environment; theme?: Theme; walletAddress: string; open?: boolean; onOpenChange?: (open: boolean) => void; /** * 포트폴리오 섹션 내부 외부 링크 이동을 가로채는 콜백. * 반환값으로 URL 변형 / 취소가 가능하며 async도 지원한다. */ onOutlink?: OnOutlink; /** * game-swap LP 섹션이 사용자별 LP 잔고/지분율을 온체인에서 보강하기 위해 * host(wagmi 보유 측)로부터 주입받는 reader. 미주입 시 dapp-ui가 CROSS 체인 * RPC로 직접 읽는 내부 폴백으로 동작한다. */ lpBalanceReader?: LpBalanceReaderFn; /** * CROSS Staking 섹션이 온체인 `earned()` / `balanceOf()`를 보강하기 위해 * host(wagmi 보유 측)로부터 주입받는 reader. 미주입 시 API 값으로 폴백한다. */ stakingRewardsReader?: StakingRewardsReaderFn; /** * 내장 Withdraw(Rewards) 트랜잭션 서명/브로드캐스트 콜백. * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다. * 미주입 시 Withdraw는 기존 외부 링크로 폴백한다. */ sendTransaction?: SendTransactionFn$1; /** 내장 Withdraw 확인 화면의 가스 추정 콜백. 미주입 시 지갑 추정에 위임. */ estimateGas?: EstimateGasFn; /** * 포트폴리오 금액 표시 통화의 USD 환산 비율(USD 기준). 미주입 시 1(=USD). */ conversionRatio?: number; /** 포트폴리오 금액 표시 통화 기호. 미주입 시 `"$"`. */ currencySymbol?: string; children: React.ReactNode; } declare function WalletPortfolioRoot({ env, theme, walletAddress, open: propOpen, onOpenChange, onOutlink, lpBalanceReader, stakingRewardsReader, sendTransaction, estimateGas, conversionRatio, currencySymbol, children, }: WalletPortfolioProps): react_jsx_runtime.JSX.Element; declare const WalletPortfolio: typeof WalletPortfolioRoot & { Trigger: typeof WalletPortfolioTrigger; Content: typeof WalletPortfolioContent; }; interface WalletPortfolioBodyProps { env?: Environment; theme?: Theme; walletAddress: string; /** * 헤더 좌측 아바타 옆에 표시할 지갑 이름 (예: "Account 1"). * 전달되지 않으면 텍스트는 숨겨지고 아바타만 표시된다. */ walletName?: string; /** 왼쪽 상단 back 버튼 클릭 핸들러. 없으면 back 버튼 숨김. */ onBack?: () => void; /** 헤더 노출 여부. embed 시 외부 헤더를 쓰면 false로 숨길 수 있음. */ showHeader?: boolean; /** * 내장 15초 자동 리프레시 폴링 여부 (기본 true). * host가 자체 헤더(리프레시 버튼/폴링)를 소유할 때 false로 끄고, * `invalidateWalletPortfolioQueries(queryClient)`로 직접 갱신한다. */ autoRefresh?: boolean; /** * 컨테이너 variant. * - `"embed"`(기본): 부모 영역을 채우도록 `.wp-embed` 래퍼로 감쌈 * - `"fullscreen"`: 고정 풀스크린 `.wp-fullscreen` 래퍼로 감쌈 * - `"none"`: 래퍼 div 없이 본문만 반환 (Drawer.Content 등 외부 래퍼에 클래스를 직접 줄 때) */ variant?: "fullscreen" | "embed" | "none"; className?: string; /** * 포트폴리오 섹션 내부 외부 링크 이동을 가로채는 콜백. * 반환값으로 URL 변형 / 취소가 가능하며 async도 지원한다. */ onOutlink?: OnOutlink; /** * game-swap LP 섹션이 사용자별 LP 잔고/지분율을 온체인에서 보강하기 위해 * host(wagmi 보유 측)로부터 주입받는 reader. 미주입 시 풀 정보만 표시한다. */ lpBalanceReader?: LpBalanceReaderFn; /** * CROSS Staking 섹션이 온체인 `earned()` / `balanceOf()`를 보강하기 위해 * host(wagmi 보유 측)로부터 주입받는 reader. 미주입 시 API 값으로 폴백한다. */ stakingRewardsReader?: StakingRewardsReaderFn; /** * 내장 Withdraw(Rewards) 트랜잭션 서명/브로드캐스트 콜백. * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다. * 미주입 시 Withdraw는 기존 외부 링크로 폴백한다. */ sendTransaction?: SendTransactionFn$1; /** 내장 Withdraw 확인 화면의 가스 추정 콜백. 미주입 시 지갑 추정에 위임. */ estimateGas?: EstimateGasFn; /** * 포트폴리오 금액 표시 통화의 USD 환산 비율(USD 기준). 미주입 시 1(=USD). */ conversionRatio?: number; /** 포트폴리오 금액 표시 통화 기호. 미주입 시 `"$"`. */ currencySymbol?: string; /** * 노출할 포트폴리오 섹션을 제한한다. 미지정(`undefined`)이면 모든 섹션을 * 기본 순서대로 표시하고, 배열을 주면 포함된 섹션만 (기본 순서를 유지한 채) * 표시한다. 빈 배열이면 아무 섹션도 표시하지 않는다. */ sections?: PortfolioSection[]; } declare function WalletPortfolioBody({ env, theme, walletAddress, walletName, onBack, showHeader, autoRefresh, variant, className, onOutlink, lpBalanceReader, stakingRewardsReader, sendTransaction, estimateGas, conversionRatio, currencySymbol, sections, }: WalletPortfolioBodyProps): react_jsx_runtime.JSX.Element; /** * 포트폴리오 섹션 쿼리 키가 공유하는 접두사. * 모든 wallet-portfolio 쿼리 키의 첫 요소는 이 접두사로 시작한다. */ declare const WALLET_PORTFOLIO_QUERY_PREFIX = "wp:"; /** * 포트폴리오 전체 쿼리를 무효화해 다시 불러오게 한다. * * host가 `WalletPortfolioBody`를 `showHeader={false} autoRefresh={false}`로 * 내장하고 자체 리프레시 버튼/폴링을 소유할 때, 같은 QueryClient(peer * `@tanstack/react-query`)를 넘겨 호출하면 내장 헤더의 리프레시와 동일하게 * 동작한다. */ declare function invalidateWalletPortfolioQueries(queryClient: QueryClient): Promise; /** One origin-side ERC-20 (or native, address = zero) token the UI may offer. */ interface Token { symbol: string; address: string; decimals: number; logoUrl?: string; } /** The fixed destination asset every order delivers: crossd on CROSS. */ interface Destination { symbol: string; chainId: number; address: string; decimals: number; note?: string; } /** Origin chain VM family: "evm" (default) or "svm" (Solana). */ type ChainKind = 'evm' | 'svm'; /** * One delivery-side asset an order's crossd-equivalent output may be paid * out as -- the default target (isDefault: true) is crossd itself * (byte-identical to Catalog.destination); non-default targets are * alternate payout assets the user may opt into (see GET /v1/deposit-address's * `target` query param). `external: true` marks a target delivered via an * external adapter (e.g. pONEUSD) rather than natively minted -- the UI * shows an extra trust note for these (Task 9). */ type Target = { symbol: string; address: string; decimals: number; isDefault: boolean; external: boolean; }; /** One supported (chain, token) pair the UI can offer as an order's source. */ interface OriginOption { chainId: number; chainName: string; /** * VM family of the origin chain. "svm" (Solana) origins are display-only: * the connected EVM wallet cannot sign them, so no one-click deposit or * balance read is offered -- the user pays out-of-band from a Solana wallet. */ kind: ChainKind; token: Token; /** Smallest-unit base-10 integer string (matches Token.decimals). */ minAmount: string; /** Smallest-unit base-10 integer string; absent = no configured cap. */ maxAmount?: string; } /** * Which order-creation flow is live: "standing" (GET /v1/deposit-address * returns a stable, reusable per-user address) or "per_order" (the legacy * flow, a fresh forwarder minted per POST /v1/orders). See * internal/catalog.Catalog.AddressMode's doc comment. */ type AddressMode = 'standing' | 'per_order'; /** GET /v1/config response: the curated catalog of origins + fixed destination. */ interface Catalog { destination: Destination; origins: OriginOption[]; addressMode: AddressMode; /** * The user-selectable delivery targets an order may pay out as (Task 4). * Always includes the default target (crossd, byte-identical to * `destination`). Defaults to `[]` when the backend response omits this * field entirely -- back-compat with an older backend that predates * per-target delivery (see createRelayClient's getConfig). */ targets: Target[]; } /** POST /v1/quote request body. */ interface QuoteRequest { originChainId: number; originCurrency: string; /** Smallest-unit base-10 integer string. */ amount: string; } /** POST /v1/quote response body. */ interface QuoteResult { /** Smallest-unit (BSC USDT, 18 decimals) base-10 integer string. */ expectedBscUsdt: string; belowMin: boolean; /** * Smallest-unit (crossd, catalog.destination.decimals) base-10 integer * string. Currently assumed at 1:1 parity with BSC USDT -- see * assumesParity. */ expectedCrossd: string; assumesParity: boolean; /** * The fee DEDUCTED FROM the bridged amount, in USD, as a decimal string -- * Relay's relayer fee plus any app surcharge (upstream af35dd5). It is * exactly what accounts for the gap between what the user sends and * `expectedBscUsdt`. * * It deliberately EXCLUDES the user's own origin-chain gas: that is paid from * their wallet in the origin chain's native token, the wallet already quotes * it at signing time, and none of it comes out of the bridged amount. * * Absent means UNKNOWN, never free -- render absence as absence. "$0.00" for * a fee nobody could compute is the one wrong reading. (A genuine zero, e.g. * the direct BSC-USDT route with no Relay leg, is also absent rather than * "0": no Relay leg means no relayer fee to report.) */ feeUsd?: string; /** * How many seconds this quote stays valid. Drives the refresh cadence in * useDepositAddress -- the widget previously hardcoded 30s with no * relationship to the quote's real lifetime. Absent when the backend has no * TTL configured, in which case the client keeps its own default interval. * * There is deliberately no eta/duration field here. An earlier version of * this type carried `etaSeconds` on the assumption that Relay's quote * reports timing; it does not -- the response has no ETA field of any kind * -- so it was removed rather than left permanently undefined. */ ttl?: number; } /** GET /v1/deposit-address request query params -- no amount: a standing * address is resolved purely from (user, originChainId, originCurrency), * independent of any deposit size. */ interface DepositAddressRequest { user: string; originChainId: number; originCurrency: string; } /** * GET /v1/deposit-address response body -- a stable, reusable deposit * address for this (user, origin chain, origin token). The same request * always resolves to the same address; no order/deposit is created by * fetching it, and it accepts any number of deposits over time (see * internal/standing.Service.GetOrCreateDepositAddress). */ interface DepositAddressResult { user: string; forwarder: string; version: number; depositAddress: string; originChainId: number; originCurrency: string; } /** * One row of GET /v1/orders?user=...'s "orders" array. A single order can * aggregate several deposits made to the same reusable forwarder; `deposits[]` * is the per-arrival identity. Amount fields are smallest-unit base-10 integer * strings, "" when not yet known. */ interface OrderSummary { orderId: string; status: string; source: string; amountIn: string; expectedOut: string; bscBridgeTx: string; originChainId: number; originCurrency: string; /** CROSS delivery-token symbol this order pays out as (a Catalog.targets * symbol, e.g. "pONEUSD"); "" / omitted means the default target. Used to * label the "out" side with the actual delivered token. */ target?: string; forwarderVersion: number; /** RFC3339 timestamp. */ createdAt: string; /** What the user ACTUALLY received, observed from the CROSS delivery * transfer. Distinct from expectedOut, which is the pre-delivery projection * after fees -- the two differ by swap slippage and any executor fallback. * "" until delivery, and for orders delivered before the backend recorded it. */ amountOut?: string; /** The CROSS-side transaction that delivered the funds. "" until delivery. */ deliveryTxHash?: string; /** RFC3339 timestamp of the COMPLETED transition -- when the user received * the funds. Absent for orders that never completed. */ completedAt?: string; /** The individual deposits this delivery paid out, oldest first. There can be * SEVERAL: a user may top up a little at a time and the sweeper aggregates * whatever has arrived into one order. Empty when the backend has not * attributed the deposits to this order yet. */ deposits?: OrderDeposit[]; } /** One deposit inside an order, as GET /v1/orders reports it. * * originChainId/originCurrency are the chain and token the user ACTUALLY paid, * which the order itself cannot report (one reusable deposit address serves * every origin route, so the swept balance carries no memory of where it came * from). They are absent when the backend has not attributed the deposit -- * for a DIRECT BSC deposit that is permanent and correct, since it has no * cross-chain leg. */ interface OrderDeposit { /** Amount that arrived at the forwarder, in BSC USDT base units. NOT the * amount sent on the origin chain, which is larger by Relay's fees and * denominated in the origin token's own decimals. */ amount: string; blockNumber: number; originChainId?: number; originCurrency?: string; /** The BSC-side arrival (transfer into the forwarder). */ txHash: string; /** The user's own send on the ORIGIN chain -- what the "Deposit" step links * to. Absent when unattributed. */ originTxHash?: string; } type StepStatus = 'done' | 'active' | 'pending'; interface OrderStep { key: string; label: string; status: StepStatus; } /** * GET /v1/orders/{orderId} response body. "status" is the raw backend state * (e.g. "AWAITING_DEPOSIT", "COMPLETED", "FAILED", ...); "steps" is the * friendlier 3-stage deposit -> bridge -> deliver breakdown the UI renders. */ interface Order { orderId: string; status: string; steps: OrderStep[]; bridgeIndex: string; txs: { bscBridge: string; crossFinalize: string; crossExecute: string; }; } /** * GET /v1/recovery?user=... response body -- the permissionless self-recovery * status for a user's standing forwarder on BSC. Task 1's endpoint; consumed * by useRecovery (Task 2) to drive the settings-menu "Recover stuck funds" * panel. Every recovery tx (factory.deploy, forwarder.execute/sweepToUser) * takes no destination argument -- funds always route to `forwarder`'s * immutable recipient, so this info is advisory/orientation only, never a * capability check the UI should use to block the user. */ interface RecoveryInfo { user: string; /** The user's forwarder address on BSC for the requested target (CREATE2, deterministic from * user+version+target). */ forwarder: string; /** Whether `forwarder` has been deployed on-chain yet. */ isDeployed: boolean; /** BSC USDT token contract address -- always BSC USDT regardless of `target` (the forwarder * holds BSC USDT pre-bridge in every case). */ token: string; decimals: number; /** Smallest-unit base-10 integer string -- the forwarder's current token balance. */ balance: string; /** The factory that deploys/derives `forwarder` for the requested target: the * DepositorForwarderFactory for a depositor-kind target, the StandingForwarderFactory * otherwise (recovery follow-up, multi-target). */ factory: string; version: number; /** Smallest-unit base-10 integer string -- the bridge's configured minimum. */ bridgeMinWei: string; /** Server's best-effort recommendation: "execute" (balance clears the bridge minimum, so a * normal delivery can complete), "sweep" (below minimum -- recover directly instead), or * "none" (no balance to act on). Advisory only -- never used to disable an action. */ suggestedAction: 'execute' | 'sweep' | 'none'; /** True when the backend sees this balance as possibly mid-flight (e.g. a sweep/bridge job * already in progress) -- advisory caution only, must NOT disable either recovery action. */ inFlight: boolean; inFlightReason?: string; /** * Task 6/7: every known BSC token held at `forwarder` (not just the primary `token`/`balance` * pair above, which only ever reports BSC USDT) -- lets the UI surface a MISDEPOSITED token * (e.g. someone sent BUSD to a USDT-swap forwarder) that the top-level fields alone can't * represent. Optional/omitted for an older backend that predates this field -- back-compat, * byte-identical to pre-Task-6 behavior when absent (the UI falls back to `token`/`balance`). * Each entry's `suggestedAction` mirrors the top-level one's semantics, per-token. */ tokens?: { address: string; symbol: string; decimals: number; /** Smallest-unit base-10 integer string -- this token's current balance at `forwarder`. */ balance: string; /** Server's advisory recoverable flag for this token -- never used to disable the sweep * action (see `recover`'s doc in useRecovery.ts), only to decide which tokens the UI lists. */ recoverable: boolean; suggestedAction: 'execute' | 'sweep' | 'none'; }[]; } /** GET /v1/recovery request query params. */ interface RecoveryRequest { user: string; /** Selected CROSS delivery target symbol (mirrors DepositAddressRequest's `target`) -- omitted * (or empty) selects the configured default, preserving pre-multi-target behavior * byte-for-byte. Passed through verbatim as "?target=" when set. */ target?: string; } /** Thrown for any non-2xx API response. `status` is the HTTP status code. */ declare class RelayApiError extends Error { status: number; /** Parsed JSON error body when the response was valid JSON, else undefined. */ body?: unknown; constructor(status: number, message: string, body?: unknown); } interface RelayClientOptions { /** API origin, e.g. "https://orchestrator.example.com". Trailing slashes are stripped. */ baseUrl: string; } interface RelayClient { /** GET /v1/config -- the curated origin catalog + fixed crossd destination. */ getConfig(): Promise; /** POST /v1/quote -- a price-only preview, no order/deposit is created. */ getQuote(req: QuoteRequest): Promise; /** * GET /v1/deposit-address -- resolves the stable, reusable deposit * address for (user, originChainId, originCurrency). No amount is * involved and no order is created; the same address can receive any * number of deposits of any size. Several deposits can be aggregated into * one order when they jointly fund the same reusable forwarder. * * `target` (Task 8) is the delivery asset's symbol from * `Catalog.targets` -- sent as `&target=` only when it's a * non-empty string; omitted otherwise, in which case the backend * resolves the default target (byte-identical to pre-Task-6 behavior). */ getDepositAddress(req: DepositAddressRequest, target?: string): Promise; /** * GET /v1/orders/{orderId} -- current status + stepper progress for one * order. Reads are public (unauthenticated). */ getOrder(orderId: string): Promise; /** * GET /v1/orders?user=... -- every order swept from deposits to that * user's standing address(es) (newest-first, capped server-side). */ listOrders(user: string): Promise; /** Absolute URL of the SSE order-change stream for `user` * (GET /v1/orders/stream?user=...). Emits `event: connected` on open, * `event: orders-changed` when that user's orders change, and `: * heartbeat` comments -- it carries no order data itself, so consumers * always follow up with `listOrders`. */ ordersStreamUrl(user: string): string; /** * GET /v1/recovery?user=... -- permissionless self-recovery status for a * user's forwarder on BSC (Task 1). `req.target` (optional) selects which * per-target forwarder/factory to report -- omitted selects the * configured default, byte-identical to pre-multi-target behavior. * Purely informational -- fetching it never triggers or blocks any * on-chain action. The response's `tokens[]` (Task 6/7 -- every known BSC * token held at the forwarder) flows through as-is: it's plain JSON, so no * extra parsing/mapping is needed beyond RecoveryInfo's own typing, and * it's simply absent/undefined for an older backend that predates it. */ getRecovery(req: RecoveryRequest): Promise; } /** * Builds a framework-agnostic Relay API client. Uses plain `fetch` only -- * no react-query, no RainbowKit/wagmi. `baseUrl` is passed in explicitly (no * `import.meta.env` coupling) so the widget can be embedded in any host app's * own config/env story. * * No API key: the backend has no inbound key gate (upstream 83845fb removed * the dead `apiKey`/X-API-Key plumbing -- a security control that does not * exist must not appear in a public type). */ declare function createRelayClient(options: RelayClientOptions): RelayClient; interface DefaultToken { chainId: number; /** Token contract address, or the zero address for the chain's native asset. */ address: string; } type Hex = `0x${string}`; interface RelayTxRequest { chainId: number; to: Hex; value?: bigint; data?: Hex; } interface RelayContractCall { chainId: number; address: Hex; abi: readonly unknown[]; functionName: string; args: readonly unknown[]; } interface RelayBalance { value: bigint; decimals: number; symbol: string; } type SendTransactionFn = (req: RelayTxRequest) => Promise; type WriteContractFn = (call: RelayContractCall) => Promise; type ReadContractFn = (call: RelayContractCall) => Promise; type SwitchChainFn = (chainId: number) => Promise; type WaitForReceiptFn = (p: { chainId: number; hash: Hex; }) => Promise<{ status: "success" | "reverted"; }>; type GetBalanceFn = (p: { chainId: number; address: Hex; token?: Hex; }) => Promise; /** 지갑 주입 props — 전부 optional, 미주입 시 graceful degradation. */ interface RelayWalletProps { walletAddress?: string; walletChainId?: number; sendTransaction?: SendTransactionFn; writeContract?: WriteContractFn; readContract?: ReadContractFn; switchChain?: SwitchChainFn; waitForReceipt?: WaitForReceiptFn; getBalance?: GetBalanceFn; } /** A recovery transaction confirmed successfully on BNB Smart Chain. */ interface RecoverySuccessResult { action: "execute" | "sweep"; forwarder: string; actionTxHash: string; /** Present only when this attempt first had to deploy the forwarder. */ deployTxHash?: string; } type RelayTheme = "dark" | "light"; type RelayDrawerDirection = "bottom" | "left" | "right" | "top"; /** * Props of the `` compound root (Task 11) — the union of * * * `RelayWalletProps` (injected wallet capabilities, all optional), * * the source widget's own configuration props (relay-protocol * `packages/relay-widget/src/components/RelayDeposit.tsx`), minus its * `theme: 'auto'` option, which the shared modal shell doesn't have, and * * `ResponsiveShellProps`' modal/drawer knobs (theme/breakpoint/size/open), * re-declared here rather than extended so the public surface reads as one * flat prop list. * * `children` holds `` / ``. */ interface RelayDepositProps extends RelayWalletProps { /** Pre-built client. Takes precedence over apiBaseUrl. */ client?: RelayClient; /** Used to build a client via createRelayClient when `client` isn't passed. */ apiBaseUrl?: string; /** * Selects a built-in default relay API base URL (dev/stage/production) when * `apiBaseUrl` isn't passed. `client`/`apiBaseUrl` still take precedence -- * this is only consulted when neither is provided. Omitted falls back to * the same global environment resolution every other dapp-ui feature uses * (see `resolveEnvironment`), defaulting to production. */ environment?: Environment; /** Restrict the catalog's origins to these chain ids. */ chains?: number[]; /** Controlled recipient; when provided the recipient input is hidden and no wallet * connection is required to fetch a deposit address. Defaults to `walletAddress`. */ recipient?: string; /** Require a valid connected wallet before the deposit flow can issue an * address, quote an amount, or start live order/recovery reads. When enabled, * the recipient is pinned to `walletAddress`; a controlled `recipient` cannot * redirect the connected user's deposit. Defaults to `true` when * `showRecipientInput` is explicitly `false`, otherwise `false` for the * low-level public-address integration. `CrossRelayDeposit` always enables * this guard. */ requireWalletConnection?: boolean; /** Hide the editable recipient input even when `recipient` is NOT controlled * (default `true` = original behavior). Hosts that lock the recipient to the * connected wallet set this `false` so a disconnected user sees a connect * prompt instead of a free-form address field — the deposit address can then * only ever resolve to the logged-in wallet. */ showRecipientInput?: boolean; /** Controlled human-decimal amount; when provided the amount input is hidden. Optional — * it only drives the quote preview, and never blocks the deposit address. */ amount?: string; /** Hide the amount input entirely (address-only, send-any-amount). Independent of `amount`. */ hideAmount?: boolean; /** Render the EVM one-click deposit button (default `false`: the modal only * offers the QR / copy-address manual deposit path). Opt in with `true` for * hosts whose users connect external wallets that can sign on the origin * chains — CROSS embedded-wallet users never can, hence the off default. */ showOneClickDeposit?: boolean; /** Enable recovery actions (default `false` for low-level RelayDeposit). * The Recover tab remains visible so the Deposit navigation always has the * same three entries; when disabled it shows an unavailable-state message. * Recovery signs on BSC with the connected wallet, which CROSS embedded-wallet * users can never do — so actions stay unavailable unless a host serving * external wallets opts in. Even opted in, it still requires the injected * `writeContract`/`readContract`/`waitForReceipt` capability trio. */ showRecovery?: boolean; /** Which (chainId, token address) to default-select once the catalog loads. */ defaultToken?: DefaultToken; /** Restricts the delivery-token picker to these symbols from `Catalog.targets`. */ targetTokens?: string[]; /** Which delivery-token symbol to select initially, instead of the catalog's own default. */ defaultTarget?: string; /** Whether to render the delivery-token picker at all. Default `true`; the picker only * ever renders when there is more than one target to choose from either way. */ showTargetSelector?: boolean; /** Overrides the pinned factory set the one-click deposit verifies the forwarder against. */ trustedFactories?: readonly string[]; onDepositAddress?: (result: DepositAddressResult) => void; /** Fired once per one-click deposit that CONFIRMED successfully, with the tx * hash. NOT fired on submission, and NOT fired for a tx that reverted -- * watch `depositState` (phase/txHash/reverted) for those. Safe to treat as * "the funds moved" (upstream 83845fb). */ onDeposited?: (txHash: string) => void; /** Fired once after a recovery action receipt confirms successfully. */ onRecoverySuccess?: (result: RecoverySuccessResult) => void; onError?: (error: Error) => void; /** Called by the `Connect Wallet` CTA under the locked card that stands in for the QR * while the required connected wallet (or, in low-level public-address mode, * a usable recipient) is absent. Omitted — the locked card renders as text * only, with no button. */ onRequestConnect?: () => void; /** @deprecated The Deposit footer entry was removed. Retained as a no-op * compatibility prop so existing hosts do not need an immediate migration. */ onOpenHistory?: () => void; /** Extra class name(s) for the modal/drawer content element. */ className?: string; theme?: RelayTheme; mobileBreakpoint?: number; drawerDirection?: RelayDrawerDirection; dialogWidth?: string; drawerMaxWidth?: string; drawerMinWidth?: string; style?: CSSProperties; open?: boolean; onOpenChange?: (open: boolean) => void; children?: ReactNode; } /** * Props of the `` compound root — the standalone * "Recover stuck funds" modal, i.e. the deposit wizard's gear panel lifted out * into a modal of its own so a host can offer recovery WITHOUT the deposit * flow (the gear inside `` is unaffected and still opt-in via * `showRecovery`). * * Extends `RelayWalletProps` because recovery is signing-first: unlike * `` (read-only, no wallet capabilities at all), the whole point * of this modal is that the USER signs the permissionless recovery tx on BSC. * A wallet missing the `writeContract`/`readContract`/`waitForReceipt` trio * gets a short note instead of a dead panel. * * `children` holds `` / ``. */ interface RelayRecoveryProps extends RelayWalletProps { /** Pre-built client. Takes precedence over apiBaseUrl. */ client?: RelayClient; /** Used to build a client via createRelayClient when `client` isn't passed. */ apiBaseUrl?: string; /** * Selects a built-in default relay API base URL (dev/stage/production) when * `apiBaseUrl` isn't passed. `client`/`apiBaseUrl` still take precedence -- * this is only consulted when neither is provided. Omitted falls back to * the same global environment resolution every other dapp-ui feature uses * (see `resolveEnvironment`), defaulting to production. */ environment?: Environment; /** * Optional assertion of whose forwarder to check/recover. Recovery is always * pinned to the valid connected `walletAddress`; when this value is supplied * it must match that wallet. A missing/invalid wallet or mismatch renders a * short note and makes ZERO requests (no catalog, no recovery lookup). */ recipient?: string; /** * Overrides the pinned factory allowlist recovery verifies against before * signing -- only needed by a self-hosted deployment running its own * factories. Same meaning (and the same fail-closed reasoning) as * `RelayDepositProps.trustedFactories`. */ trustedFactories?: readonly string[]; /** Fired once after a recovery action receipt confirms successfully. */ onRecoverySuccess?: (result: RecoverySuccessResult) => void; onError?: (e: Error) => void; /** Extra class name(s) for the modal/drawer content element. */ className?: string; theme?: RelayTheme; mobileBreakpoint?: number; drawerDirection?: RelayDrawerDirection; dialogWidth?: string; drawerMaxWidth?: string; drawerMinWidth?: string; style?: CSSProperties; open?: boolean; onOpenChange?: (open: boolean) => void; children?: ReactNode; } /** * Props of the `` compound root (Task 12) — the standalone * transfer-history modal built on the shared `ResponsiveShell` + * `useRelayOrders`. `RelayDepositProps`'s simpler sibling: no wizard step, * no catalog/target picking, no wallet-injected send/write capabilities — * just an address to look up orders for and a list to render. * * `children` holds `` / ``. */ interface RelayHistoryProps { /** Pre-built client. Takes precedence over apiBaseUrl. */ client?: RelayClient; /** Used to build a client via createRelayClient when `client` isn't passed. */ apiBaseUrl?: string; /** * Selects a built-in default relay API base URL (dev/stage/production) when * `apiBaseUrl` isn't passed. `client`/`apiBaseUrl` still take precedence -- * this is only consulted when neither is provided. Omitted falls back to * the same global environment resolution every other dapp-ui feature uses * (see `resolveEnvironment`), defaulting to production. */ environment?: Environment; /** History subject. Falls back to `walletAddress`; empty-state UI when * neither resolves to a valid address. */ recipient?: string; walletAddress?: string; onError?: (e: Error) => void; /** Notified with the resolved explorer URL when a history row's tx link is * clicked. Fire-and-forget -- unlike `OnOutlink` elsewhere in dapp-ui, it * does not intercept navigation; the link still opens in a new tab as normal. */ onOutlink?: (url: string) => void; /** Extra class name(s) for the modal/drawer content element. */ className?: string; theme?: RelayTheme; mobileBreakpoint?: number; drawerDirection?: RelayDrawerDirection; dialogWidth?: string; drawerMaxWidth?: string; drawerMinWidth?: string; style?: CSSProperties; open?: boolean; onOpenChange?: (open: boolean) => void; children?: ReactNode; } interface RelayDepositContentProps { /** Extra class name(s) for the dialog/drawer content element. Falls back to * ``'s own `className`. */ className?: string; } /** * `` — the modal/drawer surface. The deposit body is a * child of `ShellContent`, i.e. of radix's `Dialog.Portal` / vaul's * `Drawer.Portal`, which render nothing while closed. The state it renders is * NOT its own any more: `` mounts the wizard engine above the * shell for exactly as long as the modal is open, so "no request before open" * and "everything resets on close" still hold -- while a breakpoint crossing * mid-flow now only rebuilds this DOM, not the flow. */ declare function RelayDepositContent({ className }: RelayDepositContentProps): react_jsx_runtime.JSX.Element; interface RelayDepositTriggerProps { /** Render the child as the trigger instead of wrapping it. Defaults to * `true` whenever a child is supplied, matching * `WalletConnectModalTrigger`'s `asChild ?? children != null`. */ asChild?: boolean; children?: ReactNode; } /** * Thin pass-through to `ShellTrigger` (radix `Dialog.Trigger` on desktop / * vaul `Drawer.Trigger` on mobile) so hosts write * `` without * knowing which primitive is active. Falls back to a plain default button when * no child is given, same as `WalletConnectModalTrigger`. * * Wrapped in `` for the same reason * `WalletConnectModalTrigger` is: the `data-track="open"` attribute below (and * on any host-supplied child that carries one) is only picked up by the * analytics delegate a boundary installs. Without it the open click is silently * untracked, since the trigger lives OUTSIDE the portaled `` boundary. */ declare function RelayDepositTrigger({ asChild, children }: RelayDepositTriggerProps): react_jsx_runtime.JSX.Element; declare function RelayDepositRoot(props: RelayDepositProps): react_jsx_runtime.JSX.Element; declare const RelayDeposit: typeof RelayDepositRoot & { Trigger: typeof RelayDepositTrigger; Content: typeof RelayDepositContent; }; interface RelayHistoryContentProps { /** Extra class name(s) for the dialog/drawer content element. Falls back to * ``'s own `className`. */ className?: string; } /** * `` — the modal/drawer surface. Like * `RelayDepositContent`, this is a child of `ShellContent`, i.e. of radix's * `Dialog.Portal` / vaul's `Drawer.Portal`, which render nothing while * closed: no `listOrders` request happens before the modal is opened, and the * subtree unmounts on close -- there is no per-open state here to reset * explicitly (unlike `RelayDepositBody`'s step/panel state), so * unmount-by-portal is the whole story. */ declare function RelayHistoryContent({ className }: RelayHistoryContentProps): react_jsx_runtime.JSX.Element; interface RelayHistoryTriggerProps { /** Render the child as the trigger instead of wrapping it. Defaults to * `true` whenever a child is supplied, matching `RelayDepositTrigger`'s * (and `WalletConnectModalTrigger`'s) `asChild ?? children != null` rule. */ asChild?: boolean; children?: ReactNode; } /** * Thin pass-through to `ShellTrigger` (radix `Dialog.Trigger` on desktop / * vaul `Drawer.Trigger` on mobile), mirroring `RelayDepositTrigger` so hosts * write `` * without knowing which primitive is active. Falls back to a plain default * button when no child is given. * * Wrapped in `` for the same reason * `RelayDepositTrigger`/`WalletConnectModalTrigger` are: `data-track="open"` is * only read by the delegate a boundary installs, and this trigger sits OUTSIDE * the portaled ``'s own boundary. */ declare function RelayHistoryTrigger({ asChild, children }: RelayHistoryTriggerProps): react_jsx_runtime.JSX.Element; declare function RelayHistoryRoot(props: RelayHistoryProps): react_jsx_runtime.JSX.Element; declare const RelayHistory: typeof RelayHistoryRoot & { Trigger: typeof RelayHistoryTrigger; Content: typeof RelayHistoryContent; }; interface RelayRecoveryContentProps { /** Extra class name(s) for the dialog/drawer content element. Falls back to * ``'s own `className`. */ className?: string; } /** * `` — the modal/drawer surface. Same portal-scoped * lifecycle as ``: nothing is requested before the modal * is opened, and the whole subtree (including `useRecovery`'s state and any * in-flight recovery tracking) unmounts on close, so there is no per-open state * to reset explicitly. */ declare function RelayRecoveryContent({ className }: RelayRecoveryContentProps): react_jsx_runtime.JSX.Element; interface RelayRecoveryTriggerProps { /** Render the child as the trigger instead of wrapping it. Defaults to * `true` whenever a child is supplied, matching `RelayHistoryTrigger`'s * (and `RelayDepositTrigger`'s) `asChild ?? children != null` rule. */ asChild?: boolean; children?: ReactNode; } /** * Thin pass-through to `ShellTrigger` (radix `Dialog.Trigger` on desktop / * vaul `Drawer.Trigger` on mobile), mirroring `RelayHistoryTrigger` so hosts * write `` * without knowing which primitive is active. Falls back to a plain-text * "Recover" button when no child is given -- unstyled like the sibling * `RelayDepositTrigger`/`RelayHistoryTrigger` defaults, so it inherits the * host's own button chrome instead of shipping a look of its own. * * The default button renders NO count badge (2026-07-30: removed on request -- * the number read as an unread-notification alarm). The root's cross-target * recoverable count still reaches the trigger element as * `data-rd-recovery-count` (radix/vaul merge Trigger props onto the `asChild` * child too), so a host that WANTS a badge can opt in with its own CSS -- e.g. * `button[data-rd-recovery-count]:not([data-rd-recovery-count="0"])::after` -- * without refetching anything. * * Wrapped in `` for the same reason * `RelayHistoryTrigger` is: `data-track="open"` is only read by the delegate a * boundary installs, and this trigger sits OUTSIDE the portaled ``'s * own boundary. */ declare function RelayRecoveryTrigger({ asChild, children }: RelayRecoveryTriggerProps): react_jsx_runtime.JSX.Element; declare function RelayRecoveryRoot(props: RelayRecoveryProps): react_jsx_runtime.JSX.Element; declare const RelayRecovery: typeof RelayRecoveryRoot & { Trigger: typeof RelayRecoveryTrigger; Content: typeof RelayRecoveryContent; }; interface UseRelayOrdersOptions { client: RelayClient; /** Valid EVM address, or undefined -- undefined clears the list and stops polling. */ recipient?: string; /** Gate: wait for truthy before the first fetch (RelayDeposit passes rawCatalog). Default true. */ enabled?: boolean; /** Keep the snapshot live with SSE + fallback polling. Default true. */ live?: boolean; /** REST safety-net cadence in milliseconds. Defaults to 30s; the open Deposit popup uses 1s * so completion still appears promptly when the SSE event is absent. */ refetchInterval?: number; /** @deprecated Use `refetchInterval`. Retained for compatibility. */ fallbackPollMs?: number; onError?: (e: Error) => void; } interface UseRelayOrdersResult { /** Every order swept from deposits to this recipient so far, newest-first * as served by the API. Kept live unless `live: false` requests one snapshot. */ orders: OrderSummary[]; ordersLoading: boolean; ordersError?: Error; /** Recipient the current snapshot belongs to. Undefined while a new * subscription is waiting for its first accepted fetch, so consumers never * baseline a previous recipient's rows as fresh deposits. */ ordersForRecipient?: string; /** Increments after every accepted fetch, even when the client returns the * same array reference or the request fails. Consumers use this as a * low-frequency refresh signal for related read models such as /recovery. */ ordersRevision: number; /** True once at least one fetch has COMPLETED (success or failure) for the * current (recipient, enabled) subscription; false again when it resets. * Distinct from `!ordersLoading`, which is also true BEFORE the first fetch * has even started -- consumers that snapshot the list (e.g. the deposit * wizard's new-order watch) must wait for this, or they baseline against * the initial empty state and misread every existing order as new. */ ordersInitialized: boolean; } declare function useRelayOrders(opts: UseRelayOrdersOptions): UseRelayOrdersResult; interface UseRelayConfigOptions { /** Pre-built client. Takes precedence over apiBaseUrl. */ client?: RelayClient; /** Used to build a client when `client` is not supplied. */ apiBaseUrl?: string; /** Stops the request and clears the current snapshot. Defaults to true. */ enabled?: boolean; /** Optional automatic REST refresh cadence in milliseconds. Disabled when omitted or <= 0. */ refetchInterval?: number; onError?: (error: Error) => void; } interface UseRelayConfigResult { /** Latest GET /v1/config response. */ config?: Catalog; loading: boolean; error?: Error; /** Re-fetches GET /v1/config using the current client. */ refresh: () => void; } /** * Public read-only hook for Relay's origin/destination/target catalog. * * The response is a normal REST snapshot, not an SSE stream. Use * `refetchInterval` for periodic refreshes or call `refresh` for an immediate * read without replacing the client or remounting the component. */ declare function useRelayConfig(opts?: UseRelayConfigOptions): UseRelayConfigResult; type RecoveryAction = "execute" | "sweep"; /** Per-attempt progress for `recover()`. "switching" = prompting a chain switch to BSC; * "deploying" = the factory.deploy() write is in flight/confirming (only needed when the * forwarder wasn't deployed yet); "recovering" = the execute()/sweepToUser() write is in * flight/confirming; "done"/"error" are terminal for this attempt. */ type RecoveryStep = "idle" | "switching" | "deploying" | "recovering" | "done" | "error"; interface RecoveryState { step: RecoveryStep; /** Tx hash of the factory.deploy() write -- only set when this attempt needed one. */ deployTxHash?: string; /** Tx hash of the execute()/sweepToUser() write. */ actionTxHash?: string; error?: string; } type RelayRecoveryQueryKey = readonly [ "relay", "recovery", number, string | null, string | null ]; /** * React Query policies accepted by useRelayRecovery. The SDK owns the request * identity and response shape, so callers cannot replace queryKey/queryFn or * inject/select recovery balances. */ type RelayRecoveryQueryOptions = Omit, "queryKey" | "queryFn" | "select" | "initialData" | "initialDataUpdatedAt" | "placeholderData">; interface UseRelayRecoveryOptions { /** Pre-built client. Takes precedence over apiBaseUrl. */ client?: RelayClient; /** Used to build a client via createRelayClient when client isn't passed. */ apiBaseUrl?: string; /** Connected EVM wallet whose recoverable forwarder balances are queried. */ recipient?: string; /** Optional CROSS delivery target passed to GET /v1/recovery. */ target?: string; /** React Query lifecycle, cache, retry, and refetch policies. */ query?: RelayRecoveryQueryOptions; /** Optional wallet capabilities. Read-only consumers may omit this. */ wallet?: RelayWalletProps; /** Called when GET /v1/recovery returns 401. */ onUnauthorized?: () => void; /** Called after a terminal query or recovery-action error. */ onError?: (error: Error) => void; /** Called once after a recovery transaction confirms successfully. */ onRecoverySuccess?: (result: RecoverySuccessResult) => void; /** Trusted factory override for a self-hosted deployment. */ trustedFactories?: readonly string[]; } interface UseRelayRecoveryResult { info?: RecoveryInfo; loading: boolean; error?: Error; /** True for background refetches as well as the first request. */ isFetching: boolean; /** Invalidates no identities; immediately refetches this hook's fixed query. */ refresh: () => void; /** Signs a recovery transaction for the currently fetched info. */ recover: (action: RecoveryAction, tokenAddress?: string) => Promise; recoveryState: RecoveryState; } /** * Public Recovery API hook. Unlike the widget-internal useRecovery fetch, this * hook uses the host QueryClient and accepts React Query policies through * `query`. queryKey/queryFn and balance-shaping options remain SDK-owned. */ declare function useRelayRecovery(opts?: UseRelayRecoveryOptions): UseRelayRecoveryResult; interface StatusTrackerProps { orderId: string; /** Latest polled order (steps/txs) from GET /v1/orders/{orderId}, owned by the caller. */ order?: Order; /** Latest poll error, owned by the caller. */ error?: Error; } declare function StatusTracker({ orderId, order, error }: StatusTrackerProps): react_jsx_runtime.JSX.Element; /** Every StandingForwarderFactory / DepositorForwarderFactory this deployment * has issued deposit addresses from, on BSC. * * Superseded factories stay listed on purpose. A forwarder's factory is pinned * per address at issuance time (`standing_addresses.factory`, copied onto each * order), so a user recovering an address minted before a rotation legitimately * gets an older factory back from the API -- dropping it here would block that * user from recovering their own funds, which is a worse outcome than the * narrow trust gain. Every entry is one of ours either way. * * Rotation (see backends/deploy/RUNBOOK-canary.md): ADD the new factory, keep * the old ones. */ declare const DEFAULT_TRUSTED_FACTORIES: readonly string[]; type GetOneUsdActionId = "swap" | "bridge" | "transfer"; type GetOneUsdMode = "floating" | "button"; type GetOneUsdButtonComponent = ElementType>; type GetOneUsdWaitForTransaction = (info: BridgeSubmittedInfo) => Promise; interface GetOneUsdTokenRef { chainId: number; address: string; } interface GetOneUsdPairs { target: GetOneUsdTokenRef; swap: { from: GetOneUsdTokenRef; feeDelegated?: boolean; }; bridge: { from: GetOneUsdTokenRef[]; feeDelegated?: boolean; }; } type GetOneUsdBridgeProps = Omit; type GetOneUsdRelayProps = Omit; type GetOneUsdEvent = { name: "fab_click"; state: "expanded" | "icon_only"; } | { name: "action_select"; action: GetOneUsdActionId; } | { name: "connect_click"; action: GetOneUsdActionId; } | { name: "success"; action: GetOneUsdActionId; txHash: string; } | { name: "failure"; action: GetOneUsdActionId; message: string; }; interface GetOneUsdProps { /** Connected wallet. A missing address renders a connect CTA in execution views. */ walletAddress?: string; /** Full token list supplied by a bridge adapter. It is never mutated. */ tokens: BridgeToken[]; /** Exact source/target token allowlist. May arrive after remote config loads. */ pairs?: GetOneUsdPairs; /** True while the bridge adapter is resolving contracts/tokens. */ loading?: boolean; /** View-only BridgeFlow transaction ports. */ bridge: GetOneUsdBridgeProps; /** Relay configuration and low-level wallet ports. Built-in env URL is used when omitted. */ relay?: GetOneUsdRelayProps; env?: Environment; targetSymbol?: string; /** Relay catalog delivery symbol. Defaults to the canonical `ONEUSD`. */ relayTargetSymbol?: string; targetIconUrl?: string; /** Trigger layout. Transaction status always renders as a floating pill. */ mode?: GetOneUsdMode; /** Custom styled trigger element used only in button mode. Must forward button props. */ buttonComponent?: GetOneUsdButtonComponent; theme?: RelayTheme; mobileBreakpoint?: number; drawerDirection?: RelayDrawerDirection; dialogWidth?: string; drawerMaxWidth?: string; drawerMinWidth?: string; /** CSS variables/styles applied to the selected trigger. */ style?: CSSProperties; className?: string; contentClassName?: string; hidden?: boolean; /** Force the floating trigger to icon-only. Ignored in button mode. */ compactTrigger?: boolean; collapseOnScroll?: boolean; scrollThreshold?: number; /** * Waits for an already-submitted Swap/Bridge transaction to confirm. * While pending, a non-interactive floating status pill is shown. * Omit only when submission itself is the final confirmation boundary. */ waitForTransaction?: GetOneUsdWaitForTransaction; /** How long a confirmed/failed result stays on the floating button. Default 4000ms. */ transactionResultDurationMs?: number; onRequestConnect?: () => void | Promise; onEvent?: (event: GetOneUsdEvent) => void; } interface ResolvedGetOneUsdRoute { fromTokens: BridgeToken[]; targetToken?: BridgeToken; } declare function GetOneUsd({ walletAddress, tokens, pairs, loading, bridge, relay, env, targetSymbol: targetSymbolProp, relayTargetSymbol, targetIconUrl, mode, buttonComponent, theme, mobileBreakpoint, drawerDirection, dialogWidth, drawerMaxWidth, drawerMinWidth, style, className, contentClassName, hidden, compactTrigger, collapseOnScroll, scrollThreshold, waitForTransaction, transactionResultDurationMs, onRequestConnect, onEvent, }: GetOneUsdProps): react_jsx_runtime.JSX.Element; type GetOneUsdRemoteModes = NonNullable["modes"]>; type GetOneUsdRemoteMinVersions = NonNullable["minVersions"]>; /** * 목록에 보일지 여부. Swap/Bridge stay enabled when config is unavailable. * Transfer Crypto is opt-in and stays hidden until S3 explicitly enables it. */ declare function isGetOneUsdActionVisible(action: GetOneUsdActionId, modes?: GetOneUsdRemoteModes): boolean; /** * 이 dapp-ui 버전에서 실행 가능한지. 미달이면 **숨기지 않고 비활성**으로 둔다 — * 항목이 조용히 사라지면 사용자는 기능이 없어진 줄 알지만, 비활성 + 안내면 * "업데이트하면 쓸 수 있다"가 전달된다. */ declare function isGetOneUsdActionSupported(action: GetOneUsdActionId, minVersions?: GetOneUsdRemoteMinVersions): boolean; /** 노출 + 실행 가능(= 실제로 선택할 수 있는지). */ declare function isGetOneUsdActionEnabled(action: GetOneUsdActionId, modes?: GetOneUsdRemoteModes, minVersions?: GetOneUsdRemoteMinVersions): boolean; declare function getOneUsdTokenKey(token: GetOneUsdTokenRef): string; declare function matchesGetOneUsdToken(token: BridgeToken, ref: GetOneUsdTokenRef): boolean; declare function findGetOneUsdToken(tokens: BridgeToken[], ref?: GetOneUsdTokenRef): BridgeToken | undefined; /** Resolve an action's exact token allowlist without mutating adapter data. */ declare function resolveGetOneUsdRoute(tokens: BridgeToken[], pairs: GetOneUsdPairs | undefined, action: Exclude): ResolvedGetOneUsdRoute; declare function isGetOneUsdTargetAvailable(available: BridgeToken[], target: BridgeToken): boolean; declare function CROSSxIcon(): react_jsx_runtime.JSX.Element; declare function MetaMaskIcon(): react_jsx_runtime.JSX.Element; declare function BinanceIcon(): react_jsx_runtime.JSX.Element; declare function Verse8Icon(): react_jsx_runtime.JSX.Element; declare function TronIcon(): react_jsx_runtime.JSX.Element; declare function GoogleIcon(): react_jsx_runtime.JSX.Element; declare function AppleIcon(): react_jsx_runtime.JSX.Element; declare const WALLET_REGISTRY: { cross_embedded: { id: string; name: "ONEpocket with Social"; description: string; icon: typeof CROSSxIcon; }; cross_wallet: { id: string; name: "ONEpocket"; description: string; icon: typeof CROSSxIcon; featured: true; }; cross_extension: { id: string; name: "ONEpocket Extension"; description: string; icon: typeof CROSSxIcon; rdns: string; installUrl: string; visibility: "desktop-only"; }; metamask: { id: string; name: string; description: string; icon: typeof MetaMaskIcon; rdns: string; }; binance: { id: string; name: string; description: string; icon: typeof BinanceIcon; }; verse8: { id: string; name: string; description: string; icon: typeof Verse8Icon; badge: string; }; tron: { id: string; name: string; description: string; icon: typeof TronIcon; badge: string; }; }; type WalletId = keyof typeof WALLET_REGISTRY; declare const SOCIAL_REGISTRY: { google: { id: string; name: string; icon: typeof GoogleIcon; }; apple: { id: string; name: string; icon: typeof AppleIcon; }; }; type SocialId = keyof typeof SOCIAL_REGISTRY; /** * Per-instance layout overrides applied as inline CSS variables. * * Colors / typography are driven by the design system (`--ds-*`, published * by `CrossConnectKitProvider` from `@nexus-cross/crossx-design-system`) — * retheme there, not per modal. Only layout knobs remain here. */ interface WalletConnectModalStyle extends CSSProperties { "--wcm-dialog-width"?: string; "--wcm-drawer-max-width"?: string; "--wcm-drawer-min-width"?: string; } type WalletVisibility = "always" | "mobile-only" | "desktop-only"; interface WalletConfig { id: string; name: string; description: string; icon: () => ReactNode; rdns?: string; featured?: boolean; badge?: string; installUrl?: string; visibility?: WalletVisibility; } type WalletHandlers = Partial void | Promise>>; interface SocialConfig { id: string; name: string; icon: () => ReactNode; } type SocialHandlers = Partial void | Promise>>; type DrawerDirection = "bottom" | "left" | "right" | "top"; interface WalletConnectModalProps { wallets: WalletHandlers; socialProviders?: SocialHandlers; /** * URL the "Terms of Service" link in the footer points to. When * omitted the text is rendered without an anchor (still styled in the * primary color to match the design). */ termsUrl?: string; /** URL the "Privacy Policy" link in the footer points to. */ privacyUrl?: string; theme?: "dark" | "light"; mobileBreakpoint?: number; drawerDirection?: DrawerDirection; dialogWidth?: string; drawerMaxWidth?: string; drawerMinWidth?: string; style?: WalletConnectModalStyle; open?: boolean; onOpenChange?: (open: boolean) => void; children: ReactNode; } interface WalletConnectModalTriggerProps { asChild?: boolean; children?: ReactNode; } interface WalletConnectModalContentProps { className?: string; } declare function WalletConnectModalTrigger({ asChild, children, }: WalletConnectModalTriggerProps): react_jsx_runtime.JSX.Element; declare function WalletConnectModalContent({ className, }: WalletConnectModalContentProps): react_jsx_runtime.JSX.Element; declare function WalletConnectModalRoot({ wallets, socialProviders, termsUrl, privacyUrl, theme, mobileBreakpoint, drawerDirection, dialogWidth, drawerMaxWidth, drawerMinWidth, style, open: openProp, onOpenChange, children, }: WalletConnectModalProps): react_jsx_runtime.JSX.Element; declare const WalletConnectModal: typeof WalletConnectModalRoot & { Trigger: typeof WalletConnectModalTrigger; Content: typeof WalletConnectModalContent; }; interface DetectedWallet { rdns: string; name: string; icon?: string; } interface WalletDetectResult { wallets: DetectedWallet[]; isDetected: (rdns: string) => boolean; isLoading: boolean; } declare function useWalletDetect(): WalletDetectResult; /** * `ConnectButton`의 `style` prop 타입. 표준 `CSSProperties` 위에 * `--cb-*` CSS 커스텀 변수 키를 추가해 자동완성을 지원한다. * * 사용 예: `style={{ "--cb-bg": "#7346f3", "--cb-pill-bg": "#1a1a2e" }}` * * 변수는 ConnectButton 의 모든 상태(disconnected / connecting / connected * pill)에 cascading 된다. WalletInfo popover 의 스타일은 별도 * `walletInfoStyle` prop 으로 분리되어 있다. */ interface ConnectButtonStyle extends CSSProperties { "--cb-bg"?: string; "--cb-bg-hover"?: string; "--cb-color"?: string; "--cb-border"?: string; "--cb-radius"?: string; "--cb-height"?: string; "--cb-padding"?: string; "--cb-font-family"?: string; "--cb-font-size"?: string; "--cb-font-weight"?: string | number; "--cb-line-height"?: string | number; "--cb-letter-spacing"?: string; "--cb-gap"?: string; "--cb-transition"?: string; "--cb-loading-opacity"?: string | number; "--cb-press-scale"?: string | number; "--cb-icon-size"?: string; "--cb-spinner-size"?: string; "--cb-spinner-thumb"?: string; "--cb-spinner-track"?: string; "--cb-pill-bg"?: string; "--cb-pill-bg-hover"?: string; "--cb-pill-color"?: string; "--cb-pill-border"?: string; "--cb-pill-radius"?: string; "--cb-pill-height"?: string; "--cb-pill-padding"?: string; "--cb-pill-press-scale"?: string | number; "--cb-pill-font-family"?: string; "--cb-pill-font-size"?: string; "--cb-pill-font-weight"?: string | number; "--cb-pill-line-height"?: string | number; "--cb-pill-gap"?: string; "--cb-pill-icon-size"?: string; "--cb-pill-icon-placeholder-bg"?: string; "--cb-pill-address-font"?: string; "--cb-pill-address-font-size"?: string; "--cb-pill-address-letter-spacing"?: string; } /** * Resolved wallet provider — determines which icon + display name appears * in the connected pill. * * - `google` / `apple`: crossy-sdk 2.0 OAuth login types (embedded wallet) * - `cross`: generic CROSSx mark (covers CROSSx 1.0 extension/app + 2.0 * embedded when no OAuth provider is attached) * - `metamask` / `binance`: external wallets */ type WalletProvider = "google" | "apple" | "cross" | "metamask" | "binance"; interface ConnectButtonProps { /** 사용자가 Connect 버튼을 눌러 연결이 진행 중. 스피너 버튼으로 전환된다. */ isConnecting?: boolean; /** * 0x… 지갑 주소. 지정되면 connected pill로 렌더링된다. 없으면 * disconnected 버튼("Connect Wallet")으로 떨어진다. */ address?: string; /** * 트리거 pill에 표시될 provider 아이콘 키. * * `address`가 있는데 `provider`가 `undefined`면 SDK 조회 중인 전이 * 상태로 취급해 placeholder 원을 띄운다(`pending` 플래시 방지). */ provider?: WalletProvider; /** * 트리거 버튼 aria-label에 포함될 provider 표시 이름. 미지정 시 * `provider`로부터 기본값이 유추된다 (예: 'Google', 'CROSSx'). */ providerName?: string; /** WalletInfo 헤더에 노출될 계정 라벨 (예: "Account 1", 사용자 지정 이름). */ accountName?: string; /** Send 주소록의 My Account 탭에 노출할 계정 목록. */ sendAccounts?: SendAccount[]; /** disconnected 상태에서 버튼 클릭 핸들러. */ onConnect?: () => void; /** connected 상태에서 WalletInfo 하단 Disconnect 클릭 핸들러. */ onDisconnect?: () => void; /** * 주소 복사 성공 콜백. WalletInfo의 `onCopyAddress(address, success)` 에서 * `success === true`일 때만 호출된다. */ onCopy?: () => void; /** 지갑 변경 chevron 클릭 핸들러. 지정하지 않으면 chevron이 숨김 처리된다. */ onSelectWallet?: () => void; /** * WalletInfo 기본 액션 row의 Buy 클릭 핸들러. Promise를 반환하면 reject 시 * Buy 카드가 `onBuyDisabledMessage`와 동일한 토스트로 실패를 안내한다. */ onBuy?: () => void | Promise; /** * Buy 카드를 시각적으로 비활성 상태로 표시하고, 사용자가 클릭하면 이 메시지를 * 토스트로 띄운다. `onBuy`보다 우선. WalletInfoProps의 동일 prop으로 그대로 * 전달된다. */ onBuyDisabledMessage?: string; /** * disconnected 버튼 라벨. 기본 'Connect Wallet'. * 문자열 외에 ReactNode를 넘겨 아이콘-only / 커스텀 마크업을 렌더할 수 있다 * (모바일에서 아이콘만 보여주고 싶을 때 등). */ label?: ReactNode; /** isConnecting 상태 라벨. 기본 'Connecting...'. */ connectingLabel?: ReactNode; /** WalletInfo 내장 Disconnect 버튼 라벨. 기본 'Disconnect'. */ disconnectLabel?: string; /** * 외부(호출부)에서 주입하는 className. disconnected / connecting / * connected(트리거 pill)에 공통으로 추가된다 (기본 `cb-button` / * `cb-pill` 클래스에 병합). */ className?: string; /** * 버튼 자체(`disconnected` / `connecting` / `connected pill`)의 * CSS 커스텀 변수 오버라이드. WalletInfo popover 스타일은 별도 * `walletInfoStyle` 로 분리되어 있다. */ style?: ConnectButtonStyle; /** * 트리거 pill 을 눌러 열리는 WalletInfo popover/drawer 의 CSS * 커스텀 변수 오버라이드 (`WalletInfoStyle`). */ walletInfoStyle?: WalletInfoStyle; theme?: Theme; env?: Environment; showBalance?: boolean; showPortfolio?: boolean; drawerDirection?: DrawerDirection$1; modal?: boolean; connectorId?: ConnectorId; /** Send 페이지의 일반 토큰 전송에 사용할 외부 트랜잭션 전송 함수. */ sendTransaction?: SendTransactionFn$1; getTransactionReceipt?: GetTransactionReceiptFn; /** * Send 확인 단계의 가스/수수료 추정 함수. 미주입 시 SendPage Confirm 화면의 * Est. Tx Fee / Gas Limit / Max. Total Amount 행이 "—"로 표시된다. */ estimateGas?: EstimateGasFn; /** * 상단 QR 버튼 / 기본 액션 row의 Receive / Send 콜백. (Buy는 위 onBuy로 * 정의됨.) */ onReceive?: () => void; /** * @deprecated Bridge 버튼은 항상 apps.json(gametokenBridge) 웹으로 * 이동한다. 이 콜백은 더 이상 호출되지 않는다. */ onBridge?: () => void; onSend?: () => void; bridgeTokens?: BridgeToken[]; bridgeHistory?: BridgeHistoryItem[]; getBridgeQuote?: BridgeQuoteFn; getBridgeToTokens?: BridgeGetToTokensFn; getBridgeApproval?: BridgeGetApprovalFn; approveBridge?: BridgeApproveFn; submitBridge?: BridgeSubmitFn; } /** * 3-state wallet connect button. Caller drives the visual state: * * - `isConnecting === true` → 스피너 disabled 버튼 * - `address` 있음 → WalletInfo + connected pill * - `address`가 있는데 `provider` 없음 → SDK 조회 전이 상태, placeholder 원 * - 둘 다 없음 → "Connect Wallet" 버튼 * * view-only: wagmi / connect-kit 같은 web3 의존성은 갖지 않으며 모든 * 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은 * `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다. */ declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, sendAccounts, onConnect, onDisconnect, onCopy, onSelectWallet, onBuy, onBuyDisabledMessage, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, walletInfoStyle, sendTransaction, getTransactionReceipt, estimateGas, onReceive, onBridge, onSend, bridgeTokens, bridgeHistory, getBridgeQuote, getBridgeToTokens, getBridgeApproval, approveBridge, submitBridge, }: ConnectButtonProps): react_jsx_runtime.JSX.Element; /** * Wallet provider icons used by `ConnectButton`. Ported from * `@nexus-cross/connect-kit-wagmi` so dapp-ui stays a self-contained, * bundler-agnostic module (no SVG loader required) and doesn't pull in a * web3 dependency for icon assets. * * Each icon is an inline `data:image/svg+xml` URI so it can be consumed * directly by ``. * * Source references mirror the ones in `connect-kit-wagmi/src/wallets/icons.ts`: * wallet-crossx.svg → CROSSX_ICON (cross / cross-extension / cross-embedded fallback) * wallet-metamask.svg → METAMASK_ICON * wallet-binance.svg → BINANCE_ICON */ declare const CROSSX_ICON: string; declare const METAMASK_ICON: string; declare const BINANCE_ICON: string; declare const GOOGLE_ICON: string; declare const APPLE_ICON: string; /** * `SkillsButton`의 `style` prop 타입. 표준 `CSSProperties` 위에 * `--sb-*` CSS 커스텀 변수 키를 추가해 자동완성을 지원한다. * * 사용 예: `style={{ "--sb-color": "white", "--sb-bg": "rgba(0,0,0,0.4)" }}` * * CSS 변수는 자식 요소(아이콘, 스피너)로 cascading 되므로, `--sb-color` * 하나만 바꿔도 텍스트·아이콘·스피너가 모두 같은 색을 따라간다. */ interface SkillsButtonStyle extends CSSProperties { "--sb-bg"?: string; "--sb-border"?: string; "--sb-border-hover"?: string; "--sb-color"?: string; "--sb-color-hover"?: string; "--sb-radius"?: string; "--sb-height"?: string; "--sb-padding"?: string; "--sb-gap"?: string; "--sb-font-size"?: string; "--sb-font-weight"?: string | number; "--sb-line-height"?: string | number; "--sb-letter-spacing"?: string; "--sb-blur"?: string; "--sb-border-width"?: string; "--sb-icon-size"?: string; "--sb-icon-hover-rotation"?: string; "--sb-spinner-size"?: string; "--sb-spinner-thumb"?: string; "--sb-spinner-track"?: string; "--sb-disabled-opacity"?: string | number; "--sb-press-scale"?: string | number; "--sb-hover-duration"?: string; "--sb-icon-duration"?: string; "--sb-easing"?: string; } interface SkillsButtonProps { /** Button text label */ label?: string; /** Skills service URL or path to navigate to */ href?: string; /** Called when button is clicked (instead of navigation if provided) */ onClick?: () => void | Promise; /** Optional CSS class name (merged with built-in `.sb-button`) */ className?: string; /** Inline style + CSS custom property overrides (`SkillsButtonStyle`) */ style?: SkillsButtonStyle; /** Light/dark surface preset (sets `data-theme`). Defaults to no preset. */ theme?: Theme; /** Disable the button */ disabled?: boolean; /** Whether button is in loading state */ isLoading?: boolean; /** Label shown while loading */ loadingLabel?: string; /** Open link in new tab */ openInNewTab?: boolean; /** Button type attribute */ type?: "button" | "submit" | "reset"; } /** * @deprecated 이동 대상은 apps.json(skills)이 단일 소스다. 이 상수는 더 이상 * 폴백으로 쓰이지 않으며 하위 호환(공개 export)용으로만 남아 있다. */ declare const DEFAULT_SKILLS_HREF = "https://www.onechain.nexus/skills"; declare function SkillsButton({ label, href, onClick, className, style, theme, disabled, isLoading, loadingLabel, openInNewTab, type, }: SkillsButtonProps): react_jsx_runtime.JSX.Element; export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, type AppLauncherTriggerStyle, type AppLauncherUsageMode, BINANCE_ICON, type BridgeAmountSource, type BridgeApprovalInfo, type BridgeApproveFn, type BridgeFailedInfo, BridgeFlow, type BridgeFlowProps, type BridgeGetApprovalFn, type BridgeGetToTokensFn, type BridgeHistoryItem, type BridgeInfoRow, type BridgeInfoTokenRef, type BridgeLiquidityInfo, type BridgePathType, type BridgeQuoteFn, type BridgeQuoteInput, type BridgeQuoteResult, type BridgeStatus, type BridgeStep, type BridgeSubmitFn, type BridgeSubmittedInfo, type BridgeToken, type BridgeTxSummary, CHAINS_CONFIG_FILE, CONNECTOR_REGISTRY, CROSSX_ICON, type Catalog, type ChainDisplayMeta, type ChainId, type ChainsConfig, ConnectButton, type ConnectButtonProps, type ConnectButtonStyle, ConnectorId, type ConnectorMeta, type CrossdPosition, type CrossdPositionDetail, type CrossdPositionPoolRef, type CrossdPositionTokenRef, DEFAULT_SKILLS_HREF, DEFAULT_TRUSTED_FACTORIES, DappUiErrorBoundary, type DappUiErrorBoundaryProps, type DappUiFailureReason, type DappUiFeature, type DappUiFlow, type DepositAddressResult, type DrawerDirection$1 as DrawerDirection, type Environment, type EstimateGasArgs, type EstimateGasFn, GOOGLE_ICON, type GameSwapPool, type GameSwapTokenRef, type GasEstimate, type GetBalanceFn, GetOneUsd, type GetOneUsdActionId, type GetOneUsdBridgeProps, type GetOneUsdButtonComponent, type GetOneUsdEvent, type GetOneUsdMode, type GetOneUsdPairs, type GetOneUsdProps, type GetOneUsdRelayProps, type GetOneUsdRemoteModes, type GetOneUsdTokenRef, type GetOneUsdWaitForTransaction, type GetTransactionReceiptArgs, type GetTransactionReceiptFn, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemAssetUrl, type GlobalMenuItemServiceStatus, type GlobalMenuItemUrl, type InitDappUiSentryOptions, type LpBalanceInfo, type LpBalanceReaderFn, METAMASK_ICON, type OnOutlink, type OnePopActivityDirection, type OnePopActivityItem, type OnePopActivityStatus, OnePopBody, type OnePopBodyProps, OnePopGetTokenTrigger, type OnePopSummary, type OrderSummary, type OriginOption, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, PORTFOLIO_SECTIONS, type PortfolioSection, type PreferredToken, type QuoteResult, type ReadContractFn, type RecentSendAddress, type RecoveryInfo, type RecoverySuccessResult, RelayApiError, type RelayBalance, type RelayClient, type RelayClientOptions, type RelayContractCall, RelayDeposit, type RelayDepositContentProps, type RelayDepositProps, type RelayDepositTriggerProps, type RelayDrawerDirection, type Hex as RelayHex, RelayHistory, type RelayHistoryContentProps, type RelayHistoryProps, type RelayHistoryTriggerProps, RelayRecovery, type RecoveryAction as RelayRecoveryAction, type RelayRecoveryContentProps, type RelayRecoveryProps, type RelayRecoveryQueryKey, type RelayRecoveryQueryOptions, type RecoveryState as RelayRecoveryState, type RecoveryStep as RelayRecoveryStep, type RelayRecoveryTriggerProps, type SendTransactionFn as RelaySendTransactionFn, type RelayTheme, type RelayTxRequest, type RelayWalletProps, type ResolvedGetOneUsdRoute, SOCIAL_REGISTRY, type SendAccount, type SendAsset, SendFlow, type SendFlowProps, type SendPageProps, type SendStatus, type SendTransactionArgs, type SendTransactionFn$1 as SendTransactionFn, SkillsButton, type SkillsButtonProps, type SkillsButtonStyle, type SocialConfig, type SocialHandlers, type SocialId, type StakingRewardsInfo, type StakingRewardsReaderFn, StatusTracker, type StatusTrackerProps, type SwitchChainFn, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, type TrackDappUiFunnelOptions, type TransactionReceiptResult, USER_BALANCE_QUERY_KEY, type UseRelayConfigOptions, type UseRelayConfigResult, type UseRelayOrdersOptions, type UseRelayOrdersResult, type UseRelayRecoveryOptions, type UseRelayRecoveryResult, WALLET_PORTFOLIO_QUERY_PREFIX, WALLET_REGISTRY, type WaitForReceiptFn, type WalletConfig, WalletConnectModal, type WalletConnectModalContentProps, type WalletConnectModalProps, type WalletConnectModalStyle, type WalletConnectModalTriggerProps, type WalletHandlers, type WalletId, WalletInfo, type WalletInfoContentProps, type WalletInfoFooterProps, type WalletInfoNavProps, type WalletInfoProps, type WalletInfoStyle, type WalletInfoTriggerProps, WalletPortfolio, WalletPortfolioBody, type WalletPortfolioBodyProps, type WalletPortfolioContentProps, type WalletPortfolioProps, type WalletPortfolioTriggerProps, type WalletProvider, type WriteContractFn, announceAppLauncherUsage, captureDappUiException, createRelayClient, findGetOneUsdToken, getChainDisplay, getDappUiSentryScope, getOneUsdTokenKey, initDappUiSentry, invalidateWalletPortfolioQueries, isGetOneUsdActionEnabled, isGetOneUsdActionSupported, isGetOneUsdActionVisible, isGetOneUsdTargetAvailable, matchesGetOneUsdToken, normalizeFailureReason, resolveEnvironment, resolveGetOneUsdRoute, setDappUiAnalyticsUser, trackDappUiEvent, trackDappUiFunnel, useChainDisplay, useChainsConfig, useGlobalMenu, useRelayConfig, useRelayOrders, useRelayRecovery, useTokenBalance, useTokenStats, useWalletDetect };