@nexus-cross/dapp-ui 1.3.0-beta.1 → 1.3.0
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 +21 -19
- package/dist/index.d.cts +147 -7
- package/dist/index.d.ts +147 -7
- package/dist/index.js +21 -19
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -497,6 +497,124 @@ interface SendFlowProps {
|
|
|
497
497
|
}
|
|
498
498
|
declare function SendFlow({ onClose, onBackToWallet, onConfirmSuccess, onSuccess, className, ...rest }: SendFlowProps): react_jsx_runtime.JSX.Element;
|
|
499
499
|
|
|
500
|
+
type BridgeStep = "form" | "history";
|
|
501
|
+
type BridgeStatus = "idle" | "quoting" | "submitting" | "success" | "error";
|
|
502
|
+
type BridgeAmountSource = "from" | "to";
|
|
503
|
+
type BridgePathType = "bridge" | "swap" | "swap-bridge" | "bridge-swap" | "deposit-swap" | "swap-withdraw";
|
|
504
|
+
interface BridgeToken {
|
|
505
|
+
name: string;
|
|
506
|
+
symbol: string;
|
|
507
|
+
chainId: number;
|
|
508
|
+
address: string;
|
|
509
|
+
decimals: number;
|
|
510
|
+
balance: string;
|
|
511
|
+
iconUrl?: string;
|
|
512
|
+
priceUsd?: number;
|
|
513
|
+
}
|
|
514
|
+
interface BridgeInfoTokenRef {
|
|
515
|
+
symbol: string;
|
|
516
|
+
iconUrl?: string;
|
|
517
|
+
}
|
|
518
|
+
interface BridgeInfoRow {
|
|
519
|
+
label: string;
|
|
520
|
+
value: string;
|
|
521
|
+
tone?: "default" | "accent" | "warning";
|
|
522
|
+
routeTokens?: BridgeInfoTokenRef[];
|
|
523
|
+
valueToken?: BridgeInfoTokenRef;
|
|
524
|
+
}
|
|
525
|
+
interface BridgeLiquidityInfo {
|
|
526
|
+
label?: string;
|
|
527
|
+
value: string;
|
|
528
|
+
status?: "low" | "normal" | "rebalancing";
|
|
529
|
+
percentage?: number;
|
|
530
|
+
}
|
|
531
|
+
interface BridgeTxSummary {
|
|
532
|
+
pathType?: BridgePathType;
|
|
533
|
+
exchangeRate?: string;
|
|
534
|
+
liquidity?: BridgeLiquidityInfo;
|
|
535
|
+
bridgeInfo?: BridgeInfoRow[];
|
|
536
|
+
swapInfo?: BridgeInfoRow[];
|
|
537
|
+
txFeeInfo?: {
|
|
538
|
+
estTxFee: string;
|
|
539
|
+
isDelegateFee?: boolean;
|
|
540
|
+
tokenIconUrl?: string;
|
|
541
|
+
tokenSymbol?: string;
|
|
542
|
+
};
|
|
543
|
+
txFee?: BridgeInfoRow[];
|
|
544
|
+
}
|
|
545
|
+
interface BridgeQuoteInput {
|
|
546
|
+
fromToken: BridgeToken;
|
|
547
|
+
toToken: BridgeToken;
|
|
548
|
+
fromAmount: string;
|
|
549
|
+
toAmount: string;
|
|
550
|
+
lastChangedBy: BridgeAmountSource;
|
|
551
|
+
slippage: string;
|
|
552
|
+
}
|
|
553
|
+
interface BridgeQuoteResult {
|
|
554
|
+
fromAmount?: string;
|
|
555
|
+
toAmount?: string;
|
|
556
|
+
summary?: BridgeTxSummary;
|
|
557
|
+
error?: string;
|
|
558
|
+
}
|
|
559
|
+
interface BridgeSubmittedInfo {
|
|
560
|
+
txHash: `0x${string}`;
|
|
561
|
+
fromToken: BridgeToken;
|
|
562
|
+
toToken: BridgeToken;
|
|
563
|
+
fromAmount: string;
|
|
564
|
+
toAmount: string;
|
|
565
|
+
pathType?: BridgePathType;
|
|
566
|
+
routeTokens?: BridgeInfoTokenRef[];
|
|
567
|
+
}
|
|
568
|
+
interface BridgeApprovalInfo {
|
|
569
|
+
token: BridgeToken;
|
|
570
|
+
tokenAddress: string;
|
|
571
|
+
spenderAddress: string;
|
|
572
|
+
amount?: string;
|
|
573
|
+
}
|
|
574
|
+
interface BridgeFailedInfo {
|
|
575
|
+
message: string;
|
|
576
|
+
txHash?: `0x${string}`;
|
|
577
|
+
}
|
|
578
|
+
interface BridgeHistoryItem {
|
|
579
|
+
id: string;
|
|
580
|
+
timestamp: string;
|
|
581
|
+
txHash: `0x${string}`;
|
|
582
|
+
fromToken: BridgeToken;
|
|
583
|
+
toToken: BridgeToken;
|
|
584
|
+
fromAmount: string;
|
|
585
|
+
toAmount: string;
|
|
586
|
+
summary?: BridgeTxSummary;
|
|
587
|
+
status?: "pending" | "success" | "failed";
|
|
588
|
+
}
|
|
589
|
+
type BridgeQuoteFn = (input: BridgeQuoteInput) => Promise<BridgeQuoteResult> | BridgeQuoteResult;
|
|
590
|
+
type BridgeSubmitFn = (input: BridgeQuoteInput) => Promise<BridgeSubmittedInfo> | BridgeSubmittedInfo;
|
|
591
|
+
type BridgeGetApprovalFn = (input: BridgeQuoteInput) => Promise<BridgeApprovalInfo | null> | BridgeApprovalInfo | null;
|
|
592
|
+
type BridgeApproveFn = (input: BridgeQuoteInput, approval: BridgeApprovalInfo) => Promise<void> | void;
|
|
593
|
+
type BridgeGetToTokensFn = (fromToken: BridgeToken, tokens: BridgeToken[]) => BridgeToken[];
|
|
594
|
+
|
|
595
|
+
interface BridgeFlowProps {
|
|
596
|
+
walletAddress: string;
|
|
597
|
+
tokens: BridgeToken[];
|
|
598
|
+
initialFromToken?: BridgeToken;
|
|
599
|
+
initialToToken?: BridgeToken;
|
|
600
|
+
history?: BridgeHistoryItem[];
|
|
601
|
+
initialSlippage?: string;
|
|
602
|
+
termsUrl?: string;
|
|
603
|
+
env?: Environment;
|
|
604
|
+
getQuote?: BridgeQuoteFn;
|
|
605
|
+
getToTokens?: BridgeGetToTokensFn;
|
|
606
|
+
getApproval?: BridgeGetApprovalFn;
|
|
607
|
+
approveBridge?: BridgeApproveFn;
|
|
608
|
+
submitBridge?: BridgeSubmitFn;
|
|
609
|
+
onSubmitted?: (info: BridgeSubmittedInfo) => void;
|
|
610
|
+
onSuccess?: (info: BridgeSubmittedInfo) => void;
|
|
611
|
+
onFailed?: (info: BridgeFailedInfo) => void;
|
|
612
|
+
onClose?: () => void;
|
|
613
|
+
onBackToWallet?: () => void;
|
|
614
|
+
className?: string;
|
|
615
|
+
}
|
|
616
|
+
declare function BridgeFlow({ onClose, onBackToWallet, env, className, ...rest }: BridgeFlowProps): react_jsx_runtime.JSX.Element;
|
|
617
|
+
|
|
500
618
|
interface WalletInfoTriggerProps {
|
|
501
619
|
asChild?: boolean;
|
|
502
620
|
className?: string;
|
|
@@ -533,6 +651,12 @@ interface WalletInfoProps {
|
|
|
533
651
|
showForgeToken?: boolean;
|
|
534
652
|
showGameToken?: boolean;
|
|
535
653
|
showQR?: boolean;
|
|
654
|
+
/**
|
|
655
|
+
* Bridge 액션 노출 여부 (기본 true).
|
|
656
|
+
* - true: 액션 행에 Bridge 버튼, Receive는 상단 QR 버튼으로 표기
|
|
657
|
+
* - false: 액션 행에 Receive 버튼, 상단 QR 버튼 미표기
|
|
658
|
+
*/
|
|
659
|
+
showBridge?: boolean;
|
|
536
660
|
qrLogoSrc?: string;
|
|
537
661
|
walletAddress: string;
|
|
538
662
|
accountName?: string;
|
|
@@ -618,16 +742,24 @@ interface WalletInfoProps {
|
|
|
618
742
|
* 미주입 시 LP 섹션은 풀 정보만 표시한다.
|
|
619
743
|
*/
|
|
620
744
|
lpBalanceReader?: LpBalanceReaderFn;
|
|
745
|
+
bridgeTokens?: BridgeToken[];
|
|
746
|
+
bridgeHistory?: BridgeHistoryItem[];
|
|
747
|
+
getBridgeQuote?: BridgeQuoteFn;
|
|
748
|
+
getBridgeToTokens?: BridgeGetToTokensFn;
|
|
749
|
+
getBridgeApproval?: BridgeGetApprovalFn;
|
|
750
|
+
approveBridge?: BridgeApproveFn;
|
|
751
|
+
submitBridge?: BridgeSubmitFn;
|
|
621
752
|
/**
|
|
622
|
-
*
|
|
623
|
-
* 이미 정의됨.)
|
|
753
|
+
* 상단 QR 버튼 / 기본 액션 row의 Bridge / Send 콜백. (Buy는 위 onBuy
|
|
754
|
+
* prop으로 이미 정의됨.) Bridge는 미주입 시 내장 Bridge 화면으로 진입한다.
|
|
624
755
|
*/
|
|
625
756
|
onReceive?: () => void;
|
|
757
|
+
onBridge?: () => void;
|
|
626
758
|
onSend?: () => void;
|
|
627
759
|
style?: WalletInfoStyle;
|
|
628
760
|
children: React.ReactNode;
|
|
629
761
|
}
|
|
630
|
-
declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName, sendAccounts, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onBuy, onBuyDisabledMessage, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, sendTransaction, getTransactionReceipt, estimateGas, onOutlink, lpBalanceReader, onReceive, onSend, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
|
|
762
|
+
declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, showBridge, qrLogoSrc, walletAddress, accountName, sendAccounts, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onBuy, onBuyDisabledMessage, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, sendTransaction, getTransactionReceipt, estimateGas, onOutlink, lpBalanceReader, bridgeTokens, bridgeHistory, getBridgeQuote, getBridgeToTokens, getBridgeApproval, approveBridge, submitBridge, onReceive, onBridge, onSend, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
|
|
631
763
|
declare const WalletInfo: typeof WalletInfoRoot & {
|
|
632
764
|
Trigger: typeof WalletInfoTrigger;
|
|
633
765
|
Content: typeof WalletInfoContent;
|
|
@@ -1177,11 +1309,19 @@ interface ConnectButtonProps {
|
|
|
1177
1309
|
*/
|
|
1178
1310
|
estimateGas?: EstimateGasFn;
|
|
1179
1311
|
/**
|
|
1180
|
-
*
|
|
1181
|
-
*
|
|
1312
|
+
* 상단 QR 버튼 / 기본 액션 row의 Bridge / Send 콜백. (Buy는 위 onBuy로
|
|
1313
|
+
* 정의됨.) Bridge는 미주입 시 WalletInfo 내장 Bridge 화면으로 진입한다.
|
|
1182
1314
|
*/
|
|
1183
1315
|
onReceive?: () => void;
|
|
1316
|
+
onBridge?: () => void;
|
|
1184
1317
|
onSend?: () => void;
|
|
1318
|
+
bridgeTokens?: BridgeToken[];
|
|
1319
|
+
bridgeHistory?: BridgeHistoryItem[];
|
|
1320
|
+
getBridgeQuote?: BridgeQuoteFn;
|
|
1321
|
+
getBridgeToTokens?: BridgeGetToTokensFn;
|
|
1322
|
+
getBridgeApproval?: BridgeGetApprovalFn;
|
|
1323
|
+
approveBridge?: BridgeApproveFn;
|
|
1324
|
+
submitBridge?: BridgeSubmitFn;
|
|
1185
1325
|
}
|
|
1186
1326
|
|
|
1187
1327
|
/**
|
|
@@ -1196,7 +1336,7 @@ interface ConnectButtonProps {
|
|
|
1196
1336
|
* 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
|
|
1197
1337
|
* `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
|
|
1198
1338
|
*/
|
|
1199
|
-
declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, sendAccounts, onConnect, onDisconnect, onCopy, onSelectWallet, onBuy, onBuyDisabledMessage, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, walletInfoStyle, sendTransaction, getTransactionReceipt, estimateGas, onReceive, onSend, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
|
|
1339
|
+
declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, sendAccounts, onConnect, onDisconnect, onCopy, onSelectWallet, onBuy, onBuyDisabledMessage, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, walletInfoStyle, sendTransaction, getTransactionReceipt, estimateGas, onReceive, onBridge, onSend, bridgeTokens, bridgeHistory, getBridgeQuote, getBridgeToTokens, getBridgeApproval, approveBridge, submitBridge, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
|
|
1200
1340
|
|
|
1201
1341
|
/**
|
|
1202
1342
|
* Wallet provider icons used by `ConnectButton`. Ported from
|
|
@@ -1282,4 +1422,4 @@ interface SkillsButtonProps {
|
|
|
1282
1422
|
declare const DEFAULT_SKILLS_HREF = "https://skills.cross.nexus";
|
|
1283
1423
|
declare function SkillsButton({ label, href, onClick, className, style, theme, disabled, isLoading, loadingLabel, openInNewTab, type, }: SkillsButtonProps): react_jsx_runtime.JSX.Element;
|
|
1284
1424
|
|
|
1285
|
-
export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, type AppLauncherTriggerStyle, type AppLauncherUsageMode, BINANCE_ICON, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, type ConnectButtonStyle, ConnectorId, type ConnectorMeta, DEFAULT_SKILLS_HREF, 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 GlobalMenuItemUrl, type LpBalanceInfo, type LpBalanceReaderFn, METAMASK_ICON, type OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, 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, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, 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, resolveEnvironment, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
|
|
1425
|
+
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, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, type ConnectButtonStyle, ConnectorId, type ConnectorMeta, DEFAULT_SKILLS_HREF, 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 GlobalMenuItemUrl, type LpBalanceInfo, type LpBalanceReaderFn, METAMASK_ICON, type OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, 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, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, 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, resolveEnvironment, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
|
package/dist/index.d.ts
CHANGED
|
@@ -497,6 +497,124 @@ interface SendFlowProps {
|
|
|
497
497
|
}
|
|
498
498
|
declare function SendFlow({ onClose, onBackToWallet, onConfirmSuccess, onSuccess, className, ...rest }: SendFlowProps): react_jsx_runtime.JSX.Element;
|
|
499
499
|
|
|
500
|
+
type BridgeStep = "form" | "history";
|
|
501
|
+
type BridgeStatus = "idle" | "quoting" | "submitting" | "success" | "error";
|
|
502
|
+
type BridgeAmountSource = "from" | "to";
|
|
503
|
+
type BridgePathType = "bridge" | "swap" | "swap-bridge" | "bridge-swap" | "deposit-swap" | "swap-withdraw";
|
|
504
|
+
interface BridgeToken {
|
|
505
|
+
name: string;
|
|
506
|
+
symbol: string;
|
|
507
|
+
chainId: number;
|
|
508
|
+
address: string;
|
|
509
|
+
decimals: number;
|
|
510
|
+
balance: string;
|
|
511
|
+
iconUrl?: string;
|
|
512
|
+
priceUsd?: number;
|
|
513
|
+
}
|
|
514
|
+
interface BridgeInfoTokenRef {
|
|
515
|
+
symbol: string;
|
|
516
|
+
iconUrl?: string;
|
|
517
|
+
}
|
|
518
|
+
interface BridgeInfoRow {
|
|
519
|
+
label: string;
|
|
520
|
+
value: string;
|
|
521
|
+
tone?: "default" | "accent" | "warning";
|
|
522
|
+
routeTokens?: BridgeInfoTokenRef[];
|
|
523
|
+
valueToken?: BridgeInfoTokenRef;
|
|
524
|
+
}
|
|
525
|
+
interface BridgeLiquidityInfo {
|
|
526
|
+
label?: string;
|
|
527
|
+
value: string;
|
|
528
|
+
status?: "low" | "normal" | "rebalancing";
|
|
529
|
+
percentage?: number;
|
|
530
|
+
}
|
|
531
|
+
interface BridgeTxSummary {
|
|
532
|
+
pathType?: BridgePathType;
|
|
533
|
+
exchangeRate?: string;
|
|
534
|
+
liquidity?: BridgeLiquidityInfo;
|
|
535
|
+
bridgeInfo?: BridgeInfoRow[];
|
|
536
|
+
swapInfo?: BridgeInfoRow[];
|
|
537
|
+
txFeeInfo?: {
|
|
538
|
+
estTxFee: string;
|
|
539
|
+
isDelegateFee?: boolean;
|
|
540
|
+
tokenIconUrl?: string;
|
|
541
|
+
tokenSymbol?: string;
|
|
542
|
+
};
|
|
543
|
+
txFee?: BridgeInfoRow[];
|
|
544
|
+
}
|
|
545
|
+
interface BridgeQuoteInput {
|
|
546
|
+
fromToken: BridgeToken;
|
|
547
|
+
toToken: BridgeToken;
|
|
548
|
+
fromAmount: string;
|
|
549
|
+
toAmount: string;
|
|
550
|
+
lastChangedBy: BridgeAmountSource;
|
|
551
|
+
slippage: string;
|
|
552
|
+
}
|
|
553
|
+
interface BridgeQuoteResult {
|
|
554
|
+
fromAmount?: string;
|
|
555
|
+
toAmount?: string;
|
|
556
|
+
summary?: BridgeTxSummary;
|
|
557
|
+
error?: string;
|
|
558
|
+
}
|
|
559
|
+
interface BridgeSubmittedInfo {
|
|
560
|
+
txHash: `0x${string}`;
|
|
561
|
+
fromToken: BridgeToken;
|
|
562
|
+
toToken: BridgeToken;
|
|
563
|
+
fromAmount: string;
|
|
564
|
+
toAmount: string;
|
|
565
|
+
pathType?: BridgePathType;
|
|
566
|
+
routeTokens?: BridgeInfoTokenRef[];
|
|
567
|
+
}
|
|
568
|
+
interface BridgeApprovalInfo {
|
|
569
|
+
token: BridgeToken;
|
|
570
|
+
tokenAddress: string;
|
|
571
|
+
spenderAddress: string;
|
|
572
|
+
amount?: string;
|
|
573
|
+
}
|
|
574
|
+
interface BridgeFailedInfo {
|
|
575
|
+
message: string;
|
|
576
|
+
txHash?: `0x${string}`;
|
|
577
|
+
}
|
|
578
|
+
interface BridgeHistoryItem {
|
|
579
|
+
id: string;
|
|
580
|
+
timestamp: string;
|
|
581
|
+
txHash: `0x${string}`;
|
|
582
|
+
fromToken: BridgeToken;
|
|
583
|
+
toToken: BridgeToken;
|
|
584
|
+
fromAmount: string;
|
|
585
|
+
toAmount: string;
|
|
586
|
+
summary?: BridgeTxSummary;
|
|
587
|
+
status?: "pending" | "success" | "failed";
|
|
588
|
+
}
|
|
589
|
+
type BridgeQuoteFn = (input: BridgeQuoteInput) => Promise<BridgeQuoteResult> | BridgeQuoteResult;
|
|
590
|
+
type BridgeSubmitFn = (input: BridgeQuoteInput) => Promise<BridgeSubmittedInfo> | BridgeSubmittedInfo;
|
|
591
|
+
type BridgeGetApprovalFn = (input: BridgeQuoteInput) => Promise<BridgeApprovalInfo | null> | BridgeApprovalInfo | null;
|
|
592
|
+
type BridgeApproveFn = (input: BridgeQuoteInput, approval: BridgeApprovalInfo) => Promise<void> | void;
|
|
593
|
+
type BridgeGetToTokensFn = (fromToken: BridgeToken, tokens: BridgeToken[]) => BridgeToken[];
|
|
594
|
+
|
|
595
|
+
interface BridgeFlowProps {
|
|
596
|
+
walletAddress: string;
|
|
597
|
+
tokens: BridgeToken[];
|
|
598
|
+
initialFromToken?: BridgeToken;
|
|
599
|
+
initialToToken?: BridgeToken;
|
|
600
|
+
history?: BridgeHistoryItem[];
|
|
601
|
+
initialSlippage?: string;
|
|
602
|
+
termsUrl?: string;
|
|
603
|
+
env?: Environment;
|
|
604
|
+
getQuote?: BridgeQuoteFn;
|
|
605
|
+
getToTokens?: BridgeGetToTokensFn;
|
|
606
|
+
getApproval?: BridgeGetApprovalFn;
|
|
607
|
+
approveBridge?: BridgeApproveFn;
|
|
608
|
+
submitBridge?: BridgeSubmitFn;
|
|
609
|
+
onSubmitted?: (info: BridgeSubmittedInfo) => void;
|
|
610
|
+
onSuccess?: (info: BridgeSubmittedInfo) => void;
|
|
611
|
+
onFailed?: (info: BridgeFailedInfo) => void;
|
|
612
|
+
onClose?: () => void;
|
|
613
|
+
onBackToWallet?: () => void;
|
|
614
|
+
className?: string;
|
|
615
|
+
}
|
|
616
|
+
declare function BridgeFlow({ onClose, onBackToWallet, env, className, ...rest }: BridgeFlowProps): react_jsx_runtime.JSX.Element;
|
|
617
|
+
|
|
500
618
|
interface WalletInfoTriggerProps {
|
|
501
619
|
asChild?: boolean;
|
|
502
620
|
className?: string;
|
|
@@ -533,6 +651,12 @@ interface WalletInfoProps {
|
|
|
533
651
|
showForgeToken?: boolean;
|
|
534
652
|
showGameToken?: boolean;
|
|
535
653
|
showQR?: boolean;
|
|
654
|
+
/**
|
|
655
|
+
* Bridge 액션 노출 여부 (기본 true).
|
|
656
|
+
* - true: 액션 행에 Bridge 버튼, Receive는 상단 QR 버튼으로 표기
|
|
657
|
+
* - false: 액션 행에 Receive 버튼, 상단 QR 버튼 미표기
|
|
658
|
+
*/
|
|
659
|
+
showBridge?: boolean;
|
|
536
660
|
qrLogoSrc?: string;
|
|
537
661
|
walletAddress: string;
|
|
538
662
|
accountName?: string;
|
|
@@ -618,16 +742,24 @@ interface WalletInfoProps {
|
|
|
618
742
|
* 미주입 시 LP 섹션은 풀 정보만 표시한다.
|
|
619
743
|
*/
|
|
620
744
|
lpBalanceReader?: LpBalanceReaderFn;
|
|
745
|
+
bridgeTokens?: BridgeToken[];
|
|
746
|
+
bridgeHistory?: BridgeHistoryItem[];
|
|
747
|
+
getBridgeQuote?: BridgeQuoteFn;
|
|
748
|
+
getBridgeToTokens?: BridgeGetToTokensFn;
|
|
749
|
+
getBridgeApproval?: BridgeGetApprovalFn;
|
|
750
|
+
approveBridge?: BridgeApproveFn;
|
|
751
|
+
submitBridge?: BridgeSubmitFn;
|
|
621
752
|
/**
|
|
622
|
-
*
|
|
623
|
-
* 이미 정의됨.)
|
|
753
|
+
* 상단 QR 버튼 / 기본 액션 row의 Bridge / Send 콜백. (Buy는 위 onBuy
|
|
754
|
+
* prop으로 이미 정의됨.) Bridge는 미주입 시 내장 Bridge 화면으로 진입한다.
|
|
624
755
|
*/
|
|
625
756
|
onReceive?: () => void;
|
|
757
|
+
onBridge?: () => void;
|
|
626
758
|
onSend?: () => void;
|
|
627
759
|
style?: WalletInfoStyle;
|
|
628
760
|
children: React.ReactNode;
|
|
629
761
|
}
|
|
630
|
-
declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName, sendAccounts, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onBuy, onBuyDisabledMessage, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, sendTransaction, getTransactionReceipt, estimateGas, onOutlink, lpBalanceReader, onReceive, onSend, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
|
|
762
|
+
declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, showBridge, qrLogoSrc, walletAddress, accountName, sendAccounts, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onBuy, onBuyDisabledMessage, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, sendTransaction, getTransactionReceipt, estimateGas, onOutlink, lpBalanceReader, bridgeTokens, bridgeHistory, getBridgeQuote, getBridgeToTokens, getBridgeApproval, approveBridge, submitBridge, onReceive, onBridge, onSend, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
|
|
631
763
|
declare const WalletInfo: typeof WalletInfoRoot & {
|
|
632
764
|
Trigger: typeof WalletInfoTrigger;
|
|
633
765
|
Content: typeof WalletInfoContent;
|
|
@@ -1177,11 +1309,19 @@ interface ConnectButtonProps {
|
|
|
1177
1309
|
*/
|
|
1178
1310
|
estimateGas?: EstimateGasFn;
|
|
1179
1311
|
/**
|
|
1180
|
-
*
|
|
1181
|
-
*
|
|
1312
|
+
* 상단 QR 버튼 / 기본 액션 row의 Bridge / Send 콜백. (Buy는 위 onBuy로
|
|
1313
|
+
* 정의됨.) Bridge는 미주입 시 WalletInfo 내장 Bridge 화면으로 진입한다.
|
|
1182
1314
|
*/
|
|
1183
1315
|
onReceive?: () => void;
|
|
1316
|
+
onBridge?: () => void;
|
|
1184
1317
|
onSend?: () => void;
|
|
1318
|
+
bridgeTokens?: BridgeToken[];
|
|
1319
|
+
bridgeHistory?: BridgeHistoryItem[];
|
|
1320
|
+
getBridgeQuote?: BridgeQuoteFn;
|
|
1321
|
+
getBridgeToTokens?: BridgeGetToTokensFn;
|
|
1322
|
+
getBridgeApproval?: BridgeGetApprovalFn;
|
|
1323
|
+
approveBridge?: BridgeApproveFn;
|
|
1324
|
+
submitBridge?: BridgeSubmitFn;
|
|
1185
1325
|
}
|
|
1186
1326
|
|
|
1187
1327
|
/**
|
|
@@ -1196,7 +1336,7 @@ interface ConnectButtonProps {
|
|
|
1196
1336
|
* 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
|
|
1197
1337
|
* `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
|
|
1198
1338
|
*/
|
|
1199
|
-
declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, sendAccounts, onConnect, onDisconnect, onCopy, onSelectWallet, onBuy, onBuyDisabledMessage, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, walletInfoStyle, sendTransaction, getTransactionReceipt, estimateGas, onReceive, onSend, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
|
|
1339
|
+
declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, sendAccounts, onConnect, onDisconnect, onCopy, onSelectWallet, onBuy, onBuyDisabledMessage, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, walletInfoStyle, sendTransaction, getTransactionReceipt, estimateGas, onReceive, onBridge, onSend, bridgeTokens, bridgeHistory, getBridgeQuote, getBridgeToTokens, getBridgeApproval, approveBridge, submitBridge, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
|
|
1200
1340
|
|
|
1201
1341
|
/**
|
|
1202
1342
|
* Wallet provider icons used by `ConnectButton`. Ported from
|
|
@@ -1282,4 +1422,4 @@ interface SkillsButtonProps {
|
|
|
1282
1422
|
declare const DEFAULT_SKILLS_HREF = "https://skills.cross.nexus";
|
|
1283
1423
|
declare function SkillsButton({ label, href, onClick, className, style, theme, disabled, isLoading, loadingLabel, openInNewTab, type, }: SkillsButtonProps): react_jsx_runtime.JSX.Element;
|
|
1284
1424
|
|
|
1285
|
-
export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, type AppLauncherTriggerStyle, type AppLauncherUsageMode, BINANCE_ICON, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, type ConnectButtonStyle, ConnectorId, type ConnectorMeta, DEFAULT_SKILLS_HREF, 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 GlobalMenuItemUrl, type LpBalanceInfo, type LpBalanceReaderFn, METAMASK_ICON, type OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, 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, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, 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, resolveEnvironment, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
|
|
1425
|
+
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, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, type ConnectButtonStyle, ConnectorId, type ConnectorMeta, DEFAULT_SKILLS_HREF, 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 GlobalMenuItemUrl, type LpBalanceInfo, type LpBalanceReaderFn, METAMASK_ICON, type OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, 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, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, 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, resolveEnvironment, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
|