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