@nexus-cross/dapp-ui 1.3.10-beta.2 → 1.3.10-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -91,8 +91,8 @@ declare class DappUiErrorBoundary extends Component<DappUiErrorBoundaryProps, Da
91
91
  render(): ReactNode;
92
92
  }
93
93
 
94
- type DappUiFeature = "app_launcher" | "bridge" | "connect_button" | "send" | "skills" | "wallet_connect" | "wallet_info" | "wallet_portfolio";
95
- type DappUiFlow = "connect" | "send" | "bridge" | "withdraw";
94
+ type DappUiFeature = "app_launcher" | "bridge" | "connect_button" | "relay" | "send" | "skills" | "wallet_connect" | "wallet_info" | "wallet_portfolio";
95
+ type DappUiFlow = "connect" | "send" | "bridge" | "withdraw" | "relay";
96
96
  type DappUiFailureReason = "user-rejected" | "insufficient-gas" | "timeout" | "contract-reverted" | "network" | "unknown";
97
97
  interface TrackDappUiFunnelOptions {
98
98
  status?: "success" | "failure";
@@ -280,7 +280,7 @@ interface SendTransactionArgs {
280
280
  maxFeePerGas?: bigint;
281
281
  maxPriorityFeePerGas?: bigint;
282
282
  }
283
- type SendTransactionFn = (args: SendTransactionArgs) => Promise<`0x${string}`>;
283
+ type SendTransactionFn$1 = (args: SendTransactionArgs) => Promise<`0x${string}`>;
284
284
  interface GetTransactionReceiptArgs {
285
285
  hash: `0x${string}`;
286
286
  chainId?: number;
@@ -398,7 +398,7 @@ type LpBalanceReaderFn = (pairAddresses: string[]) => Promise<Record<string, LpB
398
398
  * game-swap `/portfolio` pool 항목의 토큰 참조.
399
399
  * NOTE: CROSS 쪽(token_b)은 백엔드가 메타데이터 없이 내려준다 —
400
400
  * `symbol: ""`, `name: ""`, `decimals: 0`, `logo_url` 누락. 소비 측에서
401
- * symbol은 "CROSS"로, decimals는 18로 간주해야 한다 (실응답 확인 기준).
401
+ * symbol은 "ONE"으로, decimals는 18로 간주해야 한다 (실응답 확인 기준).
402
402
  */
403
403
  interface GameSwapTokenRef {
404
404
  address: string;
@@ -679,7 +679,7 @@ interface SendPageProps {
679
679
  token: SendAsset;
680
680
  tokens?: SendAsset[];
681
681
  onTokenChange?: (token: SendAsset) => void;
682
- sendTransaction?: SendTransactionFn;
682
+ sendTransaction?: SendTransactionFn$1;
683
683
  getTransactionReceipt?: GetTransactionReceiptFn;
684
684
  /**
685
685
  * 확인 단계에서 표시할 가스/수수료 추정 함수. 주입되지 않으면 Gas/Est.Time/Max.Gas 행은 "—"로 표시된다.
@@ -715,7 +715,7 @@ interface SendFlowProps {
715
715
  token: SendAsset;
716
716
  tokens?: SendAsset[];
717
717
  onTokenChange?: (token: SendAsset) => void;
718
- sendTransaction?: SendTransactionFn;
718
+ sendTransaction?: SendTransactionFn$1;
719
719
  getTransactionReceipt?: GetTransactionReceiptFn;
720
720
  estimateGas?: EstimateGasFn;
721
721
  getTokenPriceUsd?: (token: SendAsset) => number | undefined;
@@ -976,7 +976,7 @@ interface WalletInfoProps {
976
976
  * Send 페이지의 일반 토큰 전송에 사용할 외부 트랜잭션 전송 함수.
977
977
  * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다.
978
978
  */
979
- sendTransaction?: SendTransactionFn;
979
+ sendTransaction?: SendTransactionFn$1;
980
980
  getTransactionReceipt?: GetTransactionReceiptFn;
981
981
  /**
982
982
  * Send 확인 단계에서 표시할 가스/수수료 추정 함수.
@@ -1244,7 +1244,7 @@ interface WalletPortfolioProps {
1244
1244
  * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다.
1245
1245
  * 미주입 시 Withdraw는 기존 외부 링크로 폴백한다.
1246
1246
  */
1247
- sendTransaction?: SendTransactionFn;
1247
+ sendTransaction?: SendTransactionFn$1;
1248
1248
  /** 내장 Withdraw 확인 화면의 가스 추정 콜백. 미주입 시 지갑 추정에 위임. */
1249
1249
  estimateGas?: EstimateGasFn;
1250
1250
  /**
@@ -1302,7 +1302,7 @@ interface WalletPortfolioBodyProps {
1302
1302
  * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다.
1303
1303
  * 미주입 시 Withdraw는 기존 외부 링크로 폴백한다.
1304
1304
  */
1305
- sendTransaction?: SendTransactionFn;
1305
+ sendTransaction?: SendTransactionFn$1;
1306
1306
  /** 내장 Withdraw 확인 화면의 가스 추정 콜백. 미주입 시 지갑 추정에 위임. */
1307
1307
  estimateGas?: EstimateGasFn;
1308
1308
  /**
@@ -1619,7 +1619,7 @@ interface ConnectButtonProps {
1619
1619
  modal?: boolean;
1620
1620
  connectorId?: ConnectorId;
1621
1621
  /** Send 페이지의 일반 토큰 전송에 사용할 외부 트랜잭션 전송 함수. */
1622
- sendTransaction?: SendTransactionFn;
1622
+ sendTransaction?: SendTransactionFn$1;
1623
1623
  getTransactionReceipt?: GetTransactionReceiptFn;
1624
1624
  /**
1625
1625
  * Send 확인 단계의 가스/수수료 추정 함수. 미주입 시 SendPage Confirm 화면의
@@ -1748,4 +1748,775 @@ interface SkillsButtonProps {
1748
1748
  declare const DEFAULT_SKILLS_HREF = "https://www.onechain.nexus/skills";
1749
1749
  declare function SkillsButton({ label, href, onClick, className, style, theme, disabled, isLoading, loadingLabel, openInNewTab, type, }: SkillsButtonProps): react_jsx_runtime.JSX.Element;
1750
1750
 
1751
- 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 ChainDisplayMeta, type ChainId, type ChainsConfig, ConnectButton, type ConnectButtonProps, type ConnectButtonStyle, ConnectorId, type ConnectorMeta, type CrossdPosition, type CrossdPositionDetail, type CrossdPositionPoolRef, type CrossdPositionTokenRef, DEFAULT_SKILLS_HREF, DappUiErrorBoundary, type DappUiErrorBoundaryProps, type DappUiFailureReason, type DappUiFeature, type DappUiFlow, type DrawerDirection$1 as DrawerDirection, type Environment, type EstimateGasArgs, type EstimateGasFn, GOOGLE_ICON, type GameSwapPool, type GameSwapTokenRef, type GasEstimate, 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 OutlinkCategory, type OutlinkContext, type OutlinkOrigin, PORTFOLIO_SECTIONS, type PortfolioSection, type PreferredToken, type RecentSendAddress, SOCIAL_REGISTRY, type SendAccount, type SendAsset, SendFlow, type SendFlowProps, type SendPageProps, type SendStatus, type SendTransactionArgs, type SendTransactionFn, SkillsButton, type SkillsButtonProps, type SkillsButtonStyle, type SocialConfig, type SocialHandlers, type SocialId, type StakingRewardsInfo, type StakingRewardsReaderFn, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, type TrackDappUiFunnelOptions, type TransactionReceiptResult, USER_BALANCE_QUERY_KEY, WALLET_REGISTRY, 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, announceAppLauncherUsage, captureDappUiException, getChainDisplay, getDappUiSentryScope, initDappUiSentry, normalizeFailureReason, resolveEnvironment, setDappUiAnalyticsUser, trackDappUiEvent, trackDappUiFunnel, useChainDisplay, useChainsConfig, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
1751
+ /** One origin-side ERC-20 (or native, address = zero) token the UI may offer. */
1752
+ interface Token {
1753
+ symbol: string;
1754
+ address: string;
1755
+ decimals: number;
1756
+ logoUrl?: string;
1757
+ }
1758
+ /** The fixed destination asset every order delivers: crossd on CROSS. */
1759
+ interface Destination {
1760
+ symbol: string;
1761
+ chainId: number;
1762
+ address: string;
1763
+ decimals: number;
1764
+ note?: string;
1765
+ }
1766
+ /** Origin chain VM family: "evm" (default) or "svm" (Solana). */
1767
+ type ChainKind = 'evm' | 'svm';
1768
+ /**
1769
+ * One delivery-side asset an order's crossd-equivalent output may be paid
1770
+ * out as -- the default target (isDefault: true) is crossd itself
1771
+ * (byte-identical to Catalog.destination); non-default targets are
1772
+ * alternate payout assets the user may opt into (see GET /v1/deposit-address's
1773
+ * `target` query param). `external: true` marks a target delivered via an
1774
+ * external adapter (e.g. pONEUSD) rather than natively minted -- the UI
1775
+ * shows an extra trust note for these (Task 9).
1776
+ */
1777
+ type Target = {
1778
+ symbol: string;
1779
+ address: string;
1780
+ decimals: number;
1781
+ isDefault: boolean;
1782
+ external: boolean;
1783
+ };
1784
+ /** One supported (chain, token) pair the UI can offer as an order's source. */
1785
+ interface OriginOption {
1786
+ chainId: number;
1787
+ chainName: string;
1788
+ /**
1789
+ * VM family of the origin chain. "svm" (Solana) origins are display-only:
1790
+ * the connected EVM wallet cannot sign them, so no one-click deposit or
1791
+ * balance read is offered -- the user pays out-of-band from a Solana wallet.
1792
+ */
1793
+ kind: ChainKind;
1794
+ token: Token;
1795
+ /** Smallest-unit base-10 integer string (matches Token.decimals). */
1796
+ minAmount: string;
1797
+ /** Smallest-unit base-10 integer string; absent = no configured cap. */
1798
+ maxAmount?: string;
1799
+ }
1800
+ /**
1801
+ * Which order-creation flow is live: "standing" (GET /v1/deposit-address
1802
+ * returns a stable, reusable per-user address) or "per_order" (the legacy
1803
+ * flow, a fresh forwarder minted per POST /v1/orders). See
1804
+ * internal/catalog.Catalog.AddressMode's doc comment.
1805
+ */
1806
+ type AddressMode = 'standing' | 'per_order';
1807
+ /** GET /v1/config response: the curated catalog of origins + fixed destination. */
1808
+ interface Catalog {
1809
+ destination: Destination;
1810
+ origins: OriginOption[];
1811
+ addressMode: AddressMode;
1812
+ /**
1813
+ * The user-selectable delivery targets an order may pay out as (Task 4).
1814
+ * Always includes the default target (crossd, byte-identical to
1815
+ * `destination`). Defaults to `[]` when the backend response omits this
1816
+ * field entirely -- back-compat with an older backend that predates
1817
+ * per-target delivery (see createRelayClient's getConfig).
1818
+ */
1819
+ targets: Target[];
1820
+ }
1821
+ /** POST /v1/quote request body. */
1822
+ interface QuoteRequest {
1823
+ originChainId: number;
1824
+ originCurrency: string;
1825
+ /** Smallest-unit base-10 integer string. */
1826
+ amount: string;
1827
+ }
1828
+ /** POST /v1/quote response body. */
1829
+ interface QuoteResult {
1830
+ /** Smallest-unit (BSC USDT, 18 decimals) base-10 integer string. */
1831
+ expectedBscUsdt: string;
1832
+ belowMin: boolean;
1833
+ /**
1834
+ * Smallest-unit (crossd, catalog.destination.decimals) base-10 integer
1835
+ * string. Currently assumed at 1:1 parity with BSC USDT -- see
1836
+ * assumesParity.
1837
+ */
1838
+ expectedCrossd: string;
1839
+ assumesParity: boolean;
1840
+ /**
1841
+ * The fee DEDUCTED FROM the bridged amount, in USD, as a decimal string --
1842
+ * Relay's relayer fee plus any app surcharge (upstream af35dd5). It is
1843
+ * exactly what accounts for the gap between what the user sends and
1844
+ * `expectedBscUsdt`.
1845
+ *
1846
+ * It deliberately EXCLUDES the user's own origin-chain gas: that is paid from
1847
+ * their wallet in the origin chain's native token, the wallet already quotes
1848
+ * it at signing time, and none of it comes out of the bridged amount.
1849
+ *
1850
+ * Absent means UNKNOWN, never free -- render absence as absence. "$0.00" for
1851
+ * a fee nobody could compute is the one wrong reading. (A genuine zero, e.g.
1852
+ * the direct BSC-USDT route with no Relay leg, is also absent rather than
1853
+ * "0": no Relay leg means no relayer fee to report.)
1854
+ */
1855
+ feeUsd?: string;
1856
+ /**
1857
+ * How many seconds this quote stays valid. Drives the refresh cadence in
1858
+ * useDepositAddress -- the widget previously hardcoded 30s with no
1859
+ * relationship to the quote's real lifetime. Absent when the backend has no
1860
+ * TTL configured, in which case the client keeps its own default interval.
1861
+ *
1862
+ * There is deliberately no eta/duration field here. An earlier version of
1863
+ * this type carried `etaSeconds` on the assumption that Relay's quote
1864
+ * reports timing; it does not -- the response has no ETA field of any kind
1865
+ * -- so it was removed rather than left permanently undefined.
1866
+ */
1867
+ ttl?: number;
1868
+ }
1869
+ /** GET /v1/deposit-address request query params -- no amount: a standing
1870
+ * address is resolved purely from (user, originChainId, originCurrency),
1871
+ * independent of any deposit size. */
1872
+ interface DepositAddressRequest {
1873
+ user: string;
1874
+ originChainId: number;
1875
+ originCurrency: string;
1876
+ }
1877
+ /**
1878
+ * GET /v1/deposit-address response body -- a stable, reusable deposit
1879
+ * address for this (user, origin chain, origin token). The same request
1880
+ * always resolves to the same address; no order/deposit is created by
1881
+ * fetching it, and it accepts any number of deposits over time (see
1882
+ * internal/standing.Service.GetOrCreateDepositAddress).
1883
+ */
1884
+ interface DepositAddressResult {
1885
+ user: string;
1886
+ forwarder: string;
1887
+ version: number;
1888
+ depositAddress: string;
1889
+ originChainId: number;
1890
+ originCurrency: string;
1891
+ }
1892
+ /**
1893
+ * One row of GET /v1/orders?user=...'s "orders" array -- the sweeper mints
1894
+ * one order per deposit detected at a standing address, so a single (user,
1895
+ * origin) pair can accumulate many of these over time. Amount fields are
1896
+ * smallest-unit base-10 integer strings, "" when not yet known.
1897
+ */
1898
+ interface OrderSummary {
1899
+ orderId: string;
1900
+ status: string;
1901
+ source: string;
1902
+ amountIn: string;
1903
+ expectedOut: string;
1904
+ bscBridgeTx: string;
1905
+ originChainId: number;
1906
+ originCurrency: string;
1907
+ /** CROSS delivery-token symbol this order pays out as (a Catalog.targets
1908
+ * symbol, e.g. "pONEUSD"); "" / omitted means the default target. Used to
1909
+ * label the "out" side with the actual delivered token. */
1910
+ target?: string;
1911
+ forwarderVersion: number;
1912
+ /** RFC3339 timestamp. */
1913
+ createdAt: string;
1914
+ /** What the user ACTUALLY received, observed from the CROSS delivery
1915
+ * transfer. Distinct from expectedOut, which is the pre-delivery projection
1916
+ * after fees -- the two differ by swap slippage and any executor fallback.
1917
+ * "" until delivery, and for orders delivered before the backend recorded it. */
1918
+ amountOut?: string;
1919
+ /** The CROSS-side transaction that delivered the funds. "" until delivery. */
1920
+ deliveryTxHash?: string;
1921
+ /** RFC3339 timestamp of the COMPLETED transition -- when the user received
1922
+ * the funds. Absent for orders that never completed. */
1923
+ completedAt?: string;
1924
+ /** The individual deposits this delivery paid out, oldest first. There can be
1925
+ * SEVERAL: a user may top up a little at a time and the sweeper aggregates
1926
+ * whatever has arrived into one order. Empty when the backend has not
1927
+ * attributed the deposits to this order yet. */
1928
+ deposits?: OrderDeposit[];
1929
+ }
1930
+ /** One deposit inside an order, as GET /v1/orders reports it.
1931
+ *
1932
+ * originChainId/originCurrency are the chain and token the user ACTUALLY paid,
1933
+ * which the order itself cannot report (one reusable deposit address serves
1934
+ * every origin route, so the swept balance carries no memory of where it came
1935
+ * from). They are absent when the backend has not attributed the deposit --
1936
+ * for a DIRECT BSC deposit that is permanent and correct, since it has no
1937
+ * cross-chain leg. */
1938
+ interface OrderDeposit {
1939
+ /** Amount that arrived at the forwarder, in BSC USDT base units. NOT the
1940
+ * amount sent on the origin chain, which is larger by Relay's fees and
1941
+ * denominated in the origin token's own decimals. */
1942
+ amount: string;
1943
+ blockNumber: number;
1944
+ originChainId?: number;
1945
+ originCurrency?: string;
1946
+ /** The BSC-side arrival (transfer into the forwarder). */
1947
+ txHash: string;
1948
+ /** The user's own send on the ORIGIN chain -- what the "Deposit" step links
1949
+ * to. Absent when unattributed. */
1950
+ originTxHash?: string;
1951
+ }
1952
+ type StepStatus = 'done' | 'active' | 'pending';
1953
+ interface OrderStep {
1954
+ key: string;
1955
+ label: string;
1956
+ status: StepStatus;
1957
+ }
1958
+ /**
1959
+ * GET /v1/orders/{orderId} response body. "status" is the raw backend state
1960
+ * (e.g. "AWAITING_DEPOSIT", "COMPLETED", "FAILED", ...); "steps" is the
1961
+ * friendlier 3-stage deposit -> bridge -> deliver breakdown the UI renders.
1962
+ */
1963
+ interface Order {
1964
+ orderId: string;
1965
+ status: string;
1966
+ steps: OrderStep[];
1967
+ bridgeIndex: string;
1968
+ txs: {
1969
+ bscBridge: string;
1970
+ crossFinalize: string;
1971
+ crossExecute: string;
1972
+ };
1973
+ }
1974
+ /**
1975
+ * GET /v1/recovery?user=... response body -- the permissionless self-recovery
1976
+ * status for a user's standing forwarder on BSC. Task 1's endpoint; consumed
1977
+ * by useRecovery (Task 2) to drive the settings-menu "Recover stuck funds"
1978
+ * panel. Every recovery tx (factory.deploy, forwarder.execute/sweepToUser)
1979
+ * takes no destination argument -- funds always route to `forwarder`'s
1980
+ * immutable recipient, so this info is advisory/orientation only, never a
1981
+ * capability check the UI should use to block the user.
1982
+ */
1983
+ interface RecoveryInfo {
1984
+ user: string;
1985
+ /** The user's forwarder address on BSC for the requested target (CREATE2, deterministic from
1986
+ * user+version+target). */
1987
+ forwarder: string;
1988
+ /** Whether `forwarder` has been deployed on-chain yet. */
1989
+ isDeployed: boolean;
1990
+ /** BSC USDT token contract address -- always BSC USDT regardless of `target` (the forwarder
1991
+ * holds BSC USDT pre-bridge in every case). */
1992
+ token: string;
1993
+ decimals: number;
1994
+ /** Smallest-unit base-10 integer string -- the forwarder's current token balance. */
1995
+ balance: string;
1996
+ /** The factory that deploys/derives `forwarder` for the requested target: the
1997
+ * DepositorForwarderFactory for a depositor-kind target, the StandingForwarderFactory
1998
+ * otherwise (recovery follow-up, multi-target). */
1999
+ factory: string;
2000
+ version: number;
2001
+ /** Smallest-unit base-10 integer string -- the bridge's configured minimum. */
2002
+ bridgeMinWei: string;
2003
+ /** Server's best-effort recommendation: "execute" (balance clears the bridge minimum, so a
2004
+ * normal delivery can complete), "sweep" (below minimum -- recover directly instead), or
2005
+ * "none" (no balance to act on). Advisory only -- never used to disable an action. */
2006
+ suggestedAction: 'execute' | 'sweep' | 'none';
2007
+ /** True when the backend sees this balance as possibly mid-flight (e.g. a sweep/bridge job
2008
+ * already in progress) -- advisory caution only, must NOT disable either recovery action. */
2009
+ inFlight: boolean;
2010
+ inFlightReason?: string;
2011
+ /**
2012
+ * Task 6/7: every known BSC token held at `forwarder` (not just the primary `token`/`balance`
2013
+ * pair above, which only ever reports BSC USDT) -- lets the UI surface a MISDEPOSITED token
2014
+ * (e.g. someone sent BUSD to a USDT-swap forwarder) that the top-level fields alone can't
2015
+ * represent. Optional/omitted for an older backend that predates this field -- back-compat,
2016
+ * byte-identical to pre-Task-6 behavior when absent (the UI falls back to `token`/`balance`).
2017
+ * Each entry's `suggestedAction` mirrors the top-level one's semantics, per-token.
2018
+ */
2019
+ tokens?: {
2020
+ address: string;
2021
+ symbol: string;
2022
+ decimals: number;
2023
+ /** Smallest-unit base-10 integer string -- this token's current balance at `forwarder`. */
2024
+ balance: string;
2025
+ /** Server's advisory recoverable flag for this token -- never used to disable the sweep
2026
+ * action (see `recover`'s doc in useRecovery.ts), only to decide which tokens the UI lists. */
2027
+ recoverable: boolean;
2028
+ suggestedAction: 'execute' | 'sweep' | 'none';
2029
+ }[];
2030
+ }
2031
+ /** GET /v1/recovery request query params. */
2032
+ interface RecoveryRequest {
2033
+ user: string;
2034
+ /** Selected CROSS delivery target symbol (mirrors DepositAddressRequest's `target`) -- omitted
2035
+ * (or empty) selects the configured default, preserving pre-multi-target behavior
2036
+ * byte-for-byte. Passed through verbatim as "?target=" when set. */
2037
+ target?: string;
2038
+ }
2039
+
2040
+ /** Thrown for any non-2xx API response. `status` is the HTTP status code. */
2041
+ declare class RelayApiError extends Error {
2042
+ status: number;
2043
+ /** Parsed JSON error body when the response was valid JSON, else undefined. */
2044
+ body?: unknown;
2045
+ constructor(status: number, message: string, body?: unknown);
2046
+ }
2047
+ interface RelayClientOptions {
2048
+ /** API origin, e.g. "https://orchestrator.example.com". Trailing slashes are stripped. */
2049
+ baseUrl: string;
2050
+ }
2051
+ interface RelayClient {
2052
+ /** GET /v1/config -- the curated origin catalog + fixed crossd destination. */
2053
+ getConfig(): Promise<Catalog>;
2054
+ /** POST /v1/quote -- a price-only preview, no order/deposit is created. */
2055
+ getQuote(req: QuoteRequest): Promise<QuoteResult>;
2056
+ /**
2057
+ * GET /v1/deposit-address -- resolves the stable, reusable deposit
2058
+ * address for (user, originChainId, originCurrency). No amount is
2059
+ * involved and no order is created; the same address can receive any
2060
+ * number of deposits of any size (each swept into its own order).
2061
+ *
2062
+ * `target` (Task 8) is the delivery asset's symbol from
2063
+ * `Catalog.targets` -- sent as `&target=<symbol>` only when it's a
2064
+ * non-empty string; omitted otherwise, in which case the backend
2065
+ * resolves the default target (byte-identical to pre-Task-6 behavior).
2066
+ */
2067
+ getDepositAddress(req: DepositAddressRequest, target?: string): Promise<DepositAddressResult>;
2068
+ /**
2069
+ * GET /v1/orders/{orderId} -- current status + stepper progress for one
2070
+ * order. Reads are public (unauthenticated).
2071
+ */
2072
+ getOrder(orderId: string): Promise<Order>;
2073
+ /**
2074
+ * GET /v1/orders?user=... -- every order swept from deposits to that
2075
+ * user's standing address(es) (newest-first, capped server-side).
2076
+ */
2077
+ listOrders(user: string): Promise<OrderSummary[]>;
2078
+ /** Absolute URL of the SSE order-change stream for `user`
2079
+ * (GET /v1/orders/stream?user=...). Emits `event: connected` on open,
2080
+ * `event: orders-changed` when that user's orders change, and `:
2081
+ * heartbeat` comments -- it carries no order data itself, so consumers
2082
+ * always follow up with `listOrders`. */
2083
+ ordersStreamUrl(user: string): string;
2084
+ /**
2085
+ * GET /v1/recovery?user=... -- permissionless self-recovery status for a
2086
+ * user's forwarder on BSC (Task 1). `req.target` (optional) selects which
2087
+ * per-target forwarder/factory to report -- omitted selects the
2088
+ * configured default, byte-identical to pre-multi-target behavior.
2089
+ * Purely informational -- fetching it never triggers or blocks any
2090
+ * on-chain action. The response's `tokens[]` (Task 6/7 -- every known BSC
2091
+ * token held at the forwarder) flows through as-is: it's plain JSON, so no
2092
+ * extra parsing/mapping is needed beyond RecoveryInfo's own typing, and
2093
+ * it's simply absent/undefined for an older backend that predates it.
2094
+ */
2095
+ getRecovery(req: RecoveryRequest): Promise<RecoveryInfo>;
2096
+ }
2097
+ /**
2098
+ * Builds a framework-agnostic Relay API client. Uses plain `fetch` only --
2099
+ * no react-query, no RainbowKit/wagmi. `baseUrl` is passed in explicitly (no
2100
+ * `import.meta.env` coupling) so the widget can be embedded in any host app's
2101
+ * own config/env story.
2102
+ *
2103
+ * No API key: the backend has no inbound key gate (upstream 83845fb removed
2104
+ * the dead `apiKey`/X-API-Key plumbing -- a security control that does not
2105
+ * exist must not appear in a public type).
2106
+ */
2107
+ declare function createRelayClient(options: RelayClientOptions): RelayClient;
2108
+
2109
+ interface DefaultToken {
2110
+ chainId: number;
2111
+ /** Token contract address, or the zero address for the chain's native asset. */
2112
+ address: string;
2113
+ }
2114
+
2115
+ type Hex = `0x${string}`;
2116
+ interface RelayTxRequest {
2117
+ chainId: number;
2118
+ to: Hex;
2119
+ value?: bigint;
2120
+ data?: Hex;
2121
+ }
2122
+ interface RelayContractCall {
2123
+ chainId: number;
2124
+ address: Hex;
2125
+ abi: readonly unknown[];
2126
+ functionName: string;
2127
+ args: readonly unknown[];
2128
+ }
2129
+ interface RelayBalance {
2130
+ value: bigint;
2131
+ decimals: number;
2132
+ symbol: string;
2133
+ }
2134
+ type SendTransactionFn = (req: RelayTxRequest) => Promise<Hex>;
2135
+ type WriteContractFn = (call: RelayContractCall) => Promise<Hex>;
2136
+ type ReadContractFn = (call: RelayContractCall) => Promise<unknown>;
2137
+ type SwitchChainFn = (chainId: number) => Promise<void>;
2138
+ type WaitForReceiptFn = (p: {
2139
+ chainId: number;
2140
+ hash: Hex;
2141
+ }) => Promise<{
2142
+ status: "success" | "reverted";
2143
+ }>;
2144
+ type GetBalanceFn = (p: {
2145
+ chainId: number;
2146
+ address: Hex;
2147
+ token?: Hex;
2148
+ }) => Promise<RelayBalance>;
2149
+ /** 지갑 주입 props — 전부 optional, 미주입 시 graceful degradation. */
2150
+ interface RelayWalletProps {
2151
+ walletAddress?: string;
2152
+ walletChainId?: number;
2153
+ sendTransaction?: SendTransactionFn;
2154
+ writeContract?: WriteContractFn;
2155
+ readContract?: ReadContractFn;
2156
+ switchChain?: SwitchChainFn;
2157
+ waitForReceipt?: WaitForReceiptFn;
2158
+ getBalance?: GetBalanceFn;
2159
+ }
2160
+ type RelayTheme = "dark" | "light";
2161
+ type RelayDrawerDirection = "bottom" | "left" | "right" | "top";
2162
+ /**
2163
+ * Props of the `<RelayDeposit>` compound root (Task 11) — the union of
2164
+ *
2165
+ * * `RelayWalletProps` (injected wallet capabilities, all optional),
2166
+ * * the source widget's own configuration props (relay-protocol
2167
+ * `packages/relay-widget/src/components/RelayDeposit.tsx`), minus its
2168
+ * `theme: 'auto'` option, which the shared modal shell doesn't have, and
2169
+ * * `ResponsiveShellProps`' modal/drawer knobs (theme/breakpoint/size/open),
2170
+ * re-declared here rather than extended so the public surface reads as one
2171
+ * flat prop list.
2172
+ *
2173
+ * `children` holds `<RelayDeposit.Trigger>` / `<RelayDeposit.Content>`.
2174
+ */
2175
+ interface RelayDepositProps extends RelayWalletProps {
2176
+ /** Pre-built client. Takes precedence over apiBaseUrl. */
2177
+ client?: RelayClient;
2178
+ /** Used to build a client via createRelayClient when `client` isn't passed. */
2179
+ apiBaseUrl?: string;
2180
+ /**
2181
+ * Selects a built-in default relay API base URL (dev/stage/production) when
2182
+ * `apiBaseUrl` isn't passed. `client`/`apiBaseUrl` still take precedence --
2183
+ * this is only consulted when neither is provided. Omitted falls back to
2184
+ * the same global environment resolution every other dapp-ui feature uses
2185
+ * (see `resolveEnvironment`), defaulting to production.
2186
+ */
2187
+ environment?: Environment;
2188
+ /** Restrict the catalog's origins to these chain ids. */
2189
+ chains?: number[];
2190
+ /** Controlled recipient; when provided the recipient input is hidden and no wallet
2191
+ * connection is required to fetch a deposit address. Defaults to `walletAddress`. */
2192
+ recipient?: string;
2193
+ /** Hide the editable recipient input even when `recipient` is NOT controlled
2194
+ * (default `true` = original behavior). Hosts that lock the recipient to the
2195
+ * connected wallet set this `false` so a disconnected user sees a connect
2196
+ * prompt instead of a free-form address field — the deposit address can then
2197
+ * only ever resolve to the logged-in wallet. */
2198
+ showRecipientInput?: boolean;
2199
+ /** Controlled human-decimal amount; when provided the amount input is hidden. Optional —
2200
+ * it only drives the quote preview, and never blocks the deposit address. */
2201
+ amount?: string;
2202
+ /** Hide the amount input entirely (address-only, send-any-amount). Independent of `amount`. */
2203
+ hideAmount?: boolean;
2204
+ /** Render the EVM one-click deposit button (default `false`: the modal only
2205
+ * offers the QR / copy-address manual deposit path). Opt in with `true` for
2206
+ * hosts whose users connect external wallets that can sign on the origin
2207
+ * chains — CROSS embedded-wallet users never can, hence the off default. */
2208
+ showOneClickDeposit?: boolean;
2209
+ /** Render the recovery gear menu ("Recover stuck funds", default `false`).
2210
+ * Recovery signs on BSC with the connected wallet, which CROSS embedded-wallet
2211
+ * users can never do — so the gear is hidden unless a host serving external
2212
+ * wallets opts in. Even opted in, it still requires the injected
2213
+ * `writeContract`/`readContract`/`waitForReceipt` capability trio. */
2214
+ showRecovery?: boolean;
2215
+ /** Which (chainId, token address) to default-select once the catalog loads. */
2216
+ defaultToken?: DefaultToken;
2217
+ /** Restricts the delivery-token picker to these symbols from `Catalog.targets`. */
2218
+ targetTokens?: string[];
2219
+ /** Which delivery-token symbol to select initially, instead of the catalog's own default. */
2220
+ defaultTarget?: string;
2221
+ /** Whether to render the delivery-token picker at all. Default `true`; the picker only
2222
+ * ever renders when there is more than one target to choose from either way. */
2223
+ showTargetSelector?: boolean;
2224
+ /** Overrides the pinned factory set the one-click deposit verifies the forwarder against. */
2225
+ trustedFactories?: readonly string[];
2226
+ onDepositAddress?: (result: DepositAddressResult) => void;
2227
+ /** Fired once per one-click deposit that CONFIRMED successfully, with the tx
2228
+ * hash. NOT fired on submission, and NOT fired for a tx that reverted --
2229
+ * watch `depositState` (phase/txHash/reverted) for those. Safe to treat as
2230
+ * "the funds moved" (upstream 83845fb). */
2231
+ onDeposited?: (txHash: string) => void;
2232
+ /**
2233
+ * Called once per NEW order the backend mints while step 2 (the deposit
2234
+ * address) is showing — i.e. a deposit reached the address and the sweeper
2235
+ * picked it up. This is the only success signal that exists for a MANUAL
2236
+ * (QR / copied-address) deposit, which the widget cannot observe as a tx:
2237
+ * `onDeposited` above fires only for the one-click path, on confirmation.
2238
+ * Fires after the sweep (that is when the order is created), not at
2239
+ * on-chain arrival. One-click deposits also arrive here once swept.
2240
+ */
2241
+ onDepositDetected?: (order: OrderSummary) => void;
2242
+ onError?: (error: Error) => void;
2243
+ /** Called by the connect prompt shown above the form while there is neither a connected
2244
+ * wallet nor a usable recipient (host-supplied or typed). Omitted — the prompt renders as
2245
+ * text only, with no button. The form itself stays usable either way: typing a valid
2246
+ * recipient is a supported, wallet-free path to a deposit address. */
2247
+ onRequestConnect?: () => void;
2248
+ /** Extra class name(s) for the modal/drawer content element. */
2249
+ className?: string;
2250
+ theme?: RelayTheme;
2251
+ mobileBreakpoint?: number;
2252
+ drawerDirection?: RelayDrawerDirection;
2253
+ dialogWidth?: string;
2254
+ drawerMaxWidth?: string;
2255
+ drawerMinWidth?: string;
2256
+ style?: CSSProperties;
2257
+ open?: boolean;
2258
+ onOpenChange?: (open: boolean) => void;
2259
+ children?: ReactNode;
2260
+ }
2261
+ /**
2262
+ * Props of the `<RelayRecovery>` compound root — the standalone
2263
+ * "Recover stuck funds" modal, i.e. the deposit wizard's gear panel lifted out
2264
+ * into a modal of its own so a host can offer recovery WITHOUT the deposit
2265
+ * flow (the gear inside `<RelayDeposit>` is unaffected and still opt-in via
2266
+ * `showRecovery`).
2267
+ *
2268
+ * Extends `RelayWalletProps` because recovery is signing-first: unlike
2269
+ * `<RelayHistory>` (read-only, no wallet capabilities at all), the whole point
2270
+ * of this modal is that the USER signs the permissionless recovery tx on BSC.
2271
+ * A wallet missing the `writeContract`/`readContract`/`waitForReceipt` trio
2272
+ * gets a short note instead of a dead panel.
2273
+ *
2274
+ * `children` holds `<RelayRecovery.Trigger>` / `<RelayRecovery.Content>`.
2275
+ */
2276
+ interface RelayRecoveryProps extends RelayWalletProps {
2277
+ /** Pre-built client. Takes precedence over apiBaseUrl. */
2278
+ client?: RelayClient;
2279
+ /** Used to build a client via createRelayClient when `client` isn't passed. */
2280
+ apiBaseUrl?: string;
2281
+ /**
2282
+ * Selects a built-in default relay API base URL (dev/stage/production) when
2283
+ * `apiBaseUrl` isn't passed. `client`/`apiBaseUrl` still take precedence --
2284
+ * this is only consulted when neither is provided. Omitted falls back to
2285
+ * the same global environment resolution every other dapp-ui feature uses
2286
+ * (see `resolveEnvironment`), defaulting to production.
2287
+ */
2288
+ environment?: Environment;
2289
+ /**
2290
+ * Whose forwarder to check/recover. Defaults to `walletAddress`; when
2291
+ * neither resolves to a valid address the modal renders a short connect note
2292
+ * and makes ZERO requests (no catalog, no recovery lookup).
2293
+ */
2294
+ recipient?: string;
2295
+ /**
2296
+ * Overrides the pinned factory allowlist recovery verifies against before
2297
+ * signing -- only needed by a self-hosted deployment running its own
2298
+ * factories. Same meaning (and the same fail-closed reasoning) as
2299
+ * `RelayDepositProps.trustedFactories`.
2300
+ */
2301
+ trustedFactories?: readonly string[];
2302
+ onError?: (e: Error) => void;
2303
+ /** Extra class name(s) for the modal/drawer content element. */
2304
+ className?: string;
2305
+ theme?: RelayTheme;
2306
+ mobileBreakpoint?: number;
2307
+ drawerDirection?: RelayDrawerDirection;
2308
+ dialogWidth?: string;
2309
+ drawerMaxWidth?: string;
2310
+ drawerMinWidth?: string;
2311
+ style?: CSSProperties;
2312
+ open?: boolean;
2313
+ onOpenChange?: (open: boolean) => void;
2314
+ children?: ReactNode;
2315
+ }
2316
+ /**
2317
+ * Props of the `<RelayHistory>` compound root (Task 12) — the standalone
2318
+ * transfer-history modal built on the shared `ResponsiveShell` +
2319
+ * `useRelayOrders`. `RelayDepositProps`'s simpler sibling: no wizard step,
2320
+ * no catalog/target picking, no wallet-injected send/write capabilities —
2321
+ * just an address to look up orders for and a list to render.
2322
+ *
2323
+ * `children` holds `<RelayHistory.Trigger>` / `<RelayHistory.Content>`.
2324
+ */
2325
+ interface RelayHistoryProps {
2326
+ /** Pre-built client. Takes precedence over apiBaseUrl. */
2327
+ client?: RelayClient;
2328
+ /** Used to build a client via createRelayClient when `client` isn't passed. */
2329
+ apiBaseUrl?: string;
2330
+ /**
2331
+ * Selects a built-in default relay API base URL (dev/stage/production) when
2332
+ * `apiBaseUrl` isn't passed. `client`/`apiBaseUrl` still take precedence --
2333
+ * this is only consulted when neither is provided. Omitted falls back to
2334
+ * the same global environment resolution every other dapp-ui feature uses
2335
+ * (see `resolveEnvironment`), defaulting to production.
2336
+ */
2337
+ environment?: Environment;
2338
+ /** History subject. Falls back to `walletAddress`; empty-state UI when
2339
+ * neither resolves to a valid address. */
2340
+ recipient?: string;
2341
+ walletAddress?: string;
2342
+ onError?: (e: Error) => void;
2343
+ /** Notified with the resolved explorer URL when a history row's tx link is
2344
+ * clicked. Fire-and-forget -- unlike `OnOutlink` elsewhere in dapp-ui, it
2345
+ * does not intercept navigation; the link still opens in a new tab as normal. */
2346
+ onOutlink?: (url: string) => void;
2347
+ /** Extra class name(s) for the modal/drawer content element. */
2348
+ className?: string;
2349
+ theme?: RelayTheme;
2350
+ mobileBreakpoint?: number;
2351
+ drawerDirection?: RelayDrawerDirection;
2352
+ dialogWidth?: string;
2353
+ drawerMaxWidth?: string;
2354
+ drawerMinWidth?: string;
2355
+ style?: CSSProperties;
2356
+ open?: boolean;
2357
+ onOpenChange?: (open: boolean) => void;
2358
+ children?: ReactNode;
2359
+ }
2360
+
2361
+ interface RelayDepositContentProps {
2362
+ /** Extra class name(s) for the dialog/drawer content element. Falls back to
2363
+ * `<RelayDeposit>`'s own `className`. */
2364
+ className?: string;
2365
+ }
2366
+ /**
2367
+ * `<RelayDeposit.Content>` — the modal/drawer surface. The wizard body is a
2368
+ * child of `ShellContent`, i.e. of radix's `Dialog.Portal` / vaul's
2369
+ * `Drawer.Portal`, which render nothing while closed. The state it renders is
2370
+ * NOT its own any more: `<RelayDeposit>` mounts the wizard engine above the
2371
+ * shell for exactly as long as the modal is open, so "no request before open"
2372
+ * and "everything resets on close" still hold -- while a breakpoint crossing
2373
+ * mid-flow now only rebuilds this DOM, not the flow.
2374
+ */
2375
+ declare function RelayDepositContent({ className }: RelayDepositContentProps): react_jsx_runtime.JSX.Element;
2376
+
2377
+ interface RelayDepositTriggerProps {
2378
+ /** Render the child as the trigger instead of wrapping it. Defaults to
2379
+ * `true` whenever a child is supplied, matching
2380
+ * `WalletConnectModalTrigger`'s `asChild ?? children != null`. */
2381
+ asChild?: boolean;
2382
+ children?: ReactNode;
2383
+ }
2384
+ /**
2385
+ * Thin pass-through to `ShellTrigger` (radix `Dialog.Trigger` on desktop /
2386
+ * vaul `Drawer.Trigger` on mobile) so hosts write
2387
+ * `<RelayDeposit.Trigger><button>…</button></RelayDeposit.Trigger>` without
2388
+ * knowing which primitive is active. Falls back to a plain default button when
2389
+ * no child is given, same as `WalletConnectModalTrigger`.
2390
+ *
2391
+ * Wrapped in `<TrackingBoundary feature="relay">` for the same reason
2392
+ * `WalletConnectModalTrigger` is: the `data-track="open"` attribute below (and
2393
+ * on any host-supplied child that carries one) is only picked up by the
2394
+ * analytics delegate a boundary installs. Without it the open click is silently
2395
+ * untracked, since the trigger lives OUTSIDE the portaled `<Content>` boundary.
2396
+ */
2397
+ declare function RelayDepositTrigger({ asChild, children }: RelayDepositTriggerProps): react_jsx_runtime.JSX.Element;
2398
+
2399
+ declare function RelayDepositRoot(props: RelayDepositProps): react_jsx_runtime.JSX.Element;
2400
+ declare const RelayDeposit: typeof RelayDepositRoot & {
2401
+ Trigger: typeof RelayDepositTrigger;
2402
+ Content: typeof RelayDepositContent;
2403
+ };
2404
+
2405
+ interface RelayHistoryContentProps {
2406
+ /** Extra class name(s) for the dialog/drawer content element. Falls back to
2407
+ * `<RelayHistory>`'s own `className`. */
2408
+ className?: string;
2409
+ }
2410
+ /**
2411
+ * `<RelayHistory.Content>` — the modal/drawer surface. Like
2412
+ * `RelayDepositContent`, this is a child of `ShellContent`, i.e. of radix's
2413
+ * `Dialog.Portal` / vaul's `Drawer.Portal`, which render nothing while
2414
+ * closed: no `listOrders` request happens before the modal is opened, and the
2415
+ * subtree unmounts on close -- there is no per-open state here to reset
2416
+ * explicitly (unlike `RelayDepositBody`'s step/panel state), so
2417
+ * unmount-by-portal is the whole story.
2418
+ */
2419
+ declare function RelayHistoryContent({ className }: RelayHistoryContentProps): react_jsx_runtime.JSX.Element;
2420
+
2421
+ interface RelayHistoryTriggerProps {
2422
+ /** Render the child as the trigger instead of wrapping it. Defaults to
2423
+ * `true` whenever a child is supplied, matching `RelayDepositTrigger`'s
2424
+ * (and `WalletConnectModalTrigger`'s) `asChild ?? children != null` rule. */
2425
+ asChild?: boolean;
2426
+ children?: ReactNode;
2427
+ }
2428
+ /**
2429
+ * Thin pass-through to `ShellTrigger` (radix `Dialog.Trigger` on desktop /
2430
+ * vaul `Drawer.Trigger` on mobile), mirroring `RelayDepositTrigger` so hosts
2431
+ * write `<RelayHistory.Trigger><button>…</button></RelayHistory.Trigger>`
2432
+ * without knowing which primitive is active. Falls back to a plain default
2433
+ * button when no child is given.
2434
+ *
2435
+ * Wrapped in `<TrackingBoundary feature="relay">` for the same reason
2436
+ * `RelayDepositTrigger`/`WalletConnectModalTrigger` are: `data-track="open"` is
2437
+ * only read by the delegate a boundary installs, and this trigger sits OUTSIDE
2438
+ * the portaled `<Content>`'s own boundary.
2439
+ */
2440
+ declare function RelayHistoryTrigger({ asChild, children }: RelayHistoryTriggerProps): react_jsx_runtime.JSX.Element;
2441
+
2442
+ declare function RelayHistoryRoot(props: RelayHistoryProps): react_jsx_runtime.JSX.Element;
2443
+ declare const RelayHistory: typeof RelayHistoryRoot & {
2444
+ Trigger: typeof RelayHistoryTrigger;
2445
+ Content: typeof RelayHistoryContent;
2446
+ };
2447
+
2448
+ interface RelayRecoveryContentProps {
2449
+ /** Extra class name(s) for the dialog/drawer content element. Falls back to
2450
+ * `<RelayRecovery>`'s own `className`. */
2451
+ className?: string;
2452
+ }
2453
+ /**
2454
+ * `<RelayRecovery.Content>` — the modal/drawer surface. Same portal-scoped
2455
+ * lifecycle as `<RelayHistory.Content>`: nothing is requested before the modal
2456
+ * is opened, and the whole subtree (including `useRecovery`'s state and any
2457
+ * in-flight recovery tracking) unmounts on close, so there is no per-open state
2458
+ * to reset explicitly.
2459
+ */
2460
+ declare function RelayRecoveryContent({ className }: RelayRecoveryContentProps): react_jsx_runtime.JSX.Element;
2461
+
2462
+ interface RelayRecoveryTriggerProps {
2463
+ /** Render the child as the trigger instead of wrapping it. Defaults to
2464
+ * `true` whenever a child is supplied, matching `RelayHistoryTrigger`'s
2465
+ * (and `RelayDepositTrigger`'s) `asChild ?? children != null` rule. */
2466
+ asChild?: boolean;
2467
+ children?: ReactNode;
2468
+ }
2469
+ /**
2470
+ * Thin pass-through to `ShellTrigger` (radix `Dialog.Trigger` on desktop /
2471
+ * vaul `Drawer.Trigger` on mobile), mirroring `RelayHistoryTrigger` so hosts
2472
+ * write `<RelayRecovery.Trigger><button>…</button></RelayRecovery.Trigger>`
2473
+ * without knowing which primitive is active. Falls back to a plain-text
2474
+ * "Recover" button when no child is given -- unstyled like the sibling
2475
+ * `RelayDepositTrigger`/`RelayHistoryTrigger` defaults, so it inherits the
2476
+ * host's own button chrome instead of shipping a look of its own.
2477
+ *
2478
+ * The default button renders NO count badge (2026-07-30: removed on request --
2479
+ * the number read as an unread-notification alarm). The root's cross-target
2480
+ * recoverable count still reaches the trigger element as
2481
+ * `data-rd-recovery-count` (radix/vaul merge Trigger props onto the `asChild`
2482
+ * child too), so a host that WANTS a badge can opt in with its own CSS -- e.g.
2483
+ * `button[data-rd-recovery-count]:not([data-rd-recovery-count="0"])::after` --
2484
+ * without refetching anything.
2485
+ *
2486
+ * Wrapped in `<TrackingBoundary feature="relay">` for the same reason
2487
+ * `RelayHistoryTrigger` is: `data-track="open"` is only read by the delegate a
2488
+ * boundary installs, and this trigger sits OUTSIDE the portaled `<Content>`'s
2489
+ * own boundary.
2490
+ */
2491
+ declare function RelayRecoveryTrigger({ asChild, children }: RelayRecoveryTriggerProps): react_jsx_runtime.JSX.Element;
2492
+
2493
+ declare function RelayRecoveryRoot(props: RelayRecoveryProps): react_jsx_runtime.JSX.Element;
2494
+ declare const RelayRecovery: typeof RelayRecoveryRoot & {
2495
+ Trigger: typeof RelayRecoveryTrigger;
2496
+ Content: typeof RelayRecoveryContent;
2497
+ };
2498
+
2499
+ interface StatusTrackerProps {
2500
+ orderId: string;
2501
+ /** Latest polled order (steps/txs) from GET /v1/orders/{orderId}, owned by the caller. */
2502
+ order?: Order;
2503
+ /** Latest poll error, owned by the caller. */
2504
+ error?: Error;
2505
+ }
2506
+ declare function StatusTracker({ orderId, order, error }: StatusTrackerProps): react_jsx_runtime.JSX.Element;
2507
+
2508
+ /** Every StandingForwarderFactory / DepositorForwarderFactory this deployment
2509
+ * has issued deposit addresses from, on BSC.
2510
+ *
2511
+ * Superseded factories stay listed on purpose. A forwarder's factory is pinned
2512
+ * per address at issuance time (`standing_addresses.factory`, copied onto each
2513
+ * order), so a user recovering an address minted before a rotation legitimately
2514
+ * gets an older factory back from the API -- dropping it here would block that
2515
+ * user from recovering their own funds, which is a worse outcome than the
2516
+ * narrow trust gain. Every entry is one of ours either way.
2517
+ *
2518
+ * Rotation (see backends/deploy/RUNBOOK-canary.md): ADD the new factory, keep
2519
+ * the old ones. */
2520
+ declare const DEFAULT_TRUSTED_FACTORIES: readonly string[];
2521
+
2522
+ 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, 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 OrderSummary, type OriginOption, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, PORTFOLIO_SECTIONS, type PortfolioSection, type PreferredToken, type QuoteResult, type ReadContractFn, type RecentSendAddress, type RecoveryInfo, 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 RelayRecoveryContentProps, type RelayRecoveryProps, type RelayRecoveryTriggerProps, type SendTransactionFn as RelaySendTransactionFn, type RelayTheme, type RelayTxRequest, type RelayWalletProps, 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, 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, getChainDisplay, getDappUiSentryScope, initDappUiSentry, normalizeFailureReason, resolveEnvironment, setDappUiAnalyticsUser, trackDappUiEvent, trackDappUiFunnel, useChainDisplay, useChainsConfig, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };