@nexus-cross/dapp-ui 1.0.0-beta.1 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -109,6 +109,22 @@ interface TokenStatsResponse {
109
109
  data: TokenStats[];
110
110
  }
111
111
 
112
+ /**
113
+ * 포트폴리오 내부에서 트랜잭션을 실제로 서명/브로드캐스트할 때 호출하는 콜백.
114
+ *
115
+ * 주입되는 지갑 스택(wagmi, viem, 자체 SDK 등)에 관계없이 동일한 계약으로
116
+ * 동작시키기 위한 최소 공통 시그니처다. wagmi의 `sendTransactionAsync`를
117
+ * 그대로 전달해도 호환된다.
118
+ */
119
+ interface SendTransactionArgs {
120
+ to: `0x${string}`;
121
+ value?: bigint;
122
+ data?: `0x${string}`;
123
+ chainId?: number;
124
+ gas?: bigint;
125
+ }
126
+ type SendTransactionFn = (args: SendTransactionArgs) => Promise<`0x${string}`>;
127
+
112
128
  interface WalletInfoTriggerProps {
113
129
  asChild?: boolean;
114
130
  className?: string;
@@ -161,11 +177,19 @@ interface WalletInfoProps {
161
177
  onDisconnect?: () => void;
162
178
  /** 기본 Disconnect 버튼 라벨 (기본 "Disconnect"). */
163
179
  disconnectLabel?: string;
164
- /** Footer 하단 Terms 링크 URL. 지정 시에만 노출. */
180
+ /**
181
+ * Footer 하단 Terms 링크 URL.
182
+ * 미지정 시 CROSS 에코시스템 기본 URL로 폴백되어 자동 노출된다.
183
+ * 숨기려면 빈 문자열(`""`)을 전달.
184
+ */
165
185
  termsUrl?: string;
166
186
  /** Terms 링크 라벨 (기본 "Terms of Service"). */
167
187
  termsLabel?: string;
168
- /** Footer 하단 Privacy 링크 URL. 지정 시에만 노출. */
188
+ /**
189
+ * Footer 하단 Privacy 링크 URL.
190
+ * 미지정 시 CROSS 에코시스템 기본 URL로 폴백되어 자동 노출된다.
191
+ * 숨기려면 빈 문자열(`""`)을 전달.
192
+ */
169
193
  privacyUrl?: string;
170
194
  /** Privacy 링크 라벨 (기본 "Privacy Policy"). */
171
195
  privacyLabel?: string;
@@ -183,10 +207,17 @@ interface WalletInfoProps {
183
207
  showTotalAssets?: boolean;
184
208
  /** Total Assets 라벨 텍스트 (기본 "Total Assets USD"). */
185
209
  totalAssetsLabel?: string;
210
+ /**
211
+ * 외부(dApp)에서 주입하는 트랜잭션 전송 함수.
212
+ * `showPortfolio=true`일 때 내부 `WalletPortfolioBody`로 그대로 전달되어
213
+ * 포트폴리오 섹션에서 토큰 전송 액션을 실행할 때 호출된다.
214
+ * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다.
215
+ */
216
+ sendTransaction?: SendTransactionFn;
186
217
  style?: WalletInfoStyle;
187
218
  children: React.ReactNode;
188
219
  }
189
- declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
220
+ declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, sendTransaction, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
190
221
  declare const WalletInfo: typeof WalletInfoRoot & {
191
222
  Trigger: typeof WalletInfoTrigger;
192
223
  Content: typeof WalletInfoContent;
@@ -383,9 +414,16 @@ interface WalletPortfolioProps {
383
414
  walletAddress: string;
384
415
  open?: boolean;
385
416
  onOpenChange?: (open: boolean) => void;
417
+ /**
418
+ * 외부(dApp)에서 주입하는 트랜잭션 전송 함수.
419
+ * 포트폴리오 내부에서 구성한 트랜잭션 페이로드를 실제 서명/브로드캐스트할 때
420
+ * 이 함수가 호출된다. 연결된 지갑 스택(wagmi, viem, 자체 SDK 등)에
421
+ * 종속되지 않도록 외부에서 주입한다.
422
+ */
423
+ sendTransaction?: SendTransactionFn;
386
424
  children: React.ReactNode;
387
425
  }
388
- declare function WalletPortfolioRoot({ env, theme, walletAddress, open: propOpen, onOpenChange, children, }: WalletPortfolioProps): react_jsx_runtime.JSX.Element;
426
+ declare function WalletPortfolioRoot({ env, theme, walletAddress, open: propOpen, onOpenChange, sendTransaction, children, }: WalletPortfolioProps): react_jsx_runtime.JSX.Element;
389
427
  declare const WalletPortfolio: typeof WalletPortfolioRoot & {
390
428
  Trigger: typeof WalletPortfolioTrigger;
391
429
  Content: typeof WalletPortfolioContent;
@@ -407,8 +445,14 @@ interface WalletPortfolioBodyProps {
407
445
  */
408
446
  variant?: "fullscreen" | "embed" | "none";
409
447
  className?: string;
448
+ /**
449
+ * 외부(dApp)에서 주입하는 트랜잭션 전송 함수.
450
+ * `WalletPortfolio` 루트에서 사용할 때는 루트의 prop을 통해 자동으로 전달되며,
451
+ * `WalletPortfolioBody`를 단독 embed로 사용하는 경우 직접 전달해야 한다.
452
+ */
453
+ sendTransaction?: SendTransactionFn;
410
454
  }
411
- declare function WalletPortfolioBody({ env, theme, walletAddress, onBack, showHeader, variant, className, }: WalletPortfolioBodyProps): react_jsx_runtime.JSX.Element;
455
+ declare function WalletPortfolioBody({ env, theme, walletAddress, onBack, showHeader, variant, className, sendTransaction, }: WalletPortfolioBodyProps): react_jsx_runtime.JSX.Element;
412
456
 
413
457
  declare function CROSSxIcon(): react_jsx_runtime.JSX.Element;
414
458
  declare function MetaMaskIcon(): react_jsx_runtime.JSX.Element;
@@ -534,4 +578,105 @@ interface WalletDetectResult {
534
578
  }
535
579
  declare function useWalletDetect(): WalletDetectResult;
536
580
 
537
- export { AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, CONNECTOR_REGISTRY, type ChainId, ConnectorId, type ConnectorMeta, type DrawerDirection$1 as DrawerDirection, type Environment, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemUrl, type PreferredToken, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, 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, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
581
+ /**
582
+ * Resolved wallet provider — determines which icon + display name appears
583
+ * in the connected pill.
584
+ *
585
+ * - `google` / `apple`: crossy-sdk 2.0 OAuth login types (embedded wallet)
586
+ * - `cross`: generic CROSSx mark (covers CROSSx 1.0 extension/app + 2.0
587
+ * embedded when no OAuth provider is attached)
588
+ * - `metamask` / `binance`: external wallets
589
+ */
590
+ type WalletProvider = "google" | "apple" | "cross" | "metamask" | "binance";
591
+ interface ConnectButtonProps {
592
+ /** 사용자가 Connect 버튼을 눌러 연결이 진행 중. 스피너 버튼으로 전환된다. */
593
+ isConnecting?: boolean;
594
+ /**
595
+ * 0x… 지갑 주소. 지정되면 connected pill로 렌더링된다. 없으면
596
+ * disconnected 버튼("Connect Wallet")으로 떨어진다.
597
+ */
598
+ address?: string;
599
+ /**
600
+ * 트리거 pill에 표시될 provider 아이콘 키.
601
+ *
602
+ * `address`가 있는데 `provider`가 `undefined`면 SDK 조회 중인 전이
603
+ * 상태로 취급해 placeholder 원을 띄운다(`pending` 플래시 방지).
604
+ */
605
+ provider?: WalletProvider;
606
+ /**
607
+ * 트리거 버튼 aria-label에 포함될 provider 표시 이름. 미지정 시
608
+ * `provider`로부터 기본값이 유추된다 (예: 'Google', 'CROSSx').
609
+ */
610
+ providerName?: string;
611
+ /** WalletInfo 헤더에 노출될 계정 라벨 (예: "Account 1", 사용자 지정 이름). */
612
+ accountName?: string;
613
+ /** disconnected 상태에서 버튼 클릭 핸들러. */
614
+ onConnect?: () => void;
615
+ /** connected 상태에서 WalletInfo 하단 Disconnect 클릭 핸들러. */
616
+ onDisconnect?: () => void;
617
+ /**
618
+ * 주소 복사 성공 콜백. WalletInfo의 `onCopyAddress(address, success)` 에서
619
+ * `success === true`일 때만 호출된다.
620
+ */
621
+ onCopy?: () => void;
622
+ /** 지갑 변경 chevron 클릭 핸들러. 지정하지 않으면 chevron이 숨김 처리된다. */
623
+ onSelectWallet?: () => void;
624
+ /** disconnected 버튼 라벨. 기본 'Connect Wallet'. */
625
+ label?: string;
626
+ /** isConnecting 상태 라벨. 기본 'Connecting...'. */
627
+ connectingLabel?: string;
628
+ /** WalletInfo 내장 Disconnect 버튼 라벨. 기본 'Disconnect'. */
629
+ disconnectLabel?: string;
630
+ /**
631
+ * 외부(호출부)에서 주입하는 className. disconnected / connecting /
632
+ * connected(트리거 pill)에 공통으로 적용된다. 지정하면 기본 inline
633
+ * 스타일이 비활성화되어 Tailwind 등 외부 스타일 시스템으로 완전히
634
+ * 오버라이드할 수 있다.
635
+ */
636
+ className?: string;
637
+ theme?: Theme;
638
+ env?: Environment;
639
+ showBalance?: boolean;
640
+ showPortfolio?: boolean;
641
+ drawerDirection?: DrawerDirection$1;
642
+ modal?: boolean;
643
+ connectorId?: ConnectorId;
644
+ style?: WalletInfoStyle;
645
+ sendTransaction?: SendTransactionFn;
646
+ }
647
+
648
+ /**
649
+ * 3-state wallet connect button. Caller drives the visual state:
650
+ *
651
+ * - `isConnecting === true` → 스피너 disabled 버튼
652
+ * - `address` 있음 → WalletInfo + connected pill
653
+ * - `address`가 있는데 `provider` 없음 → SDK 조회 전이 상태, placeholder 원
654
+ * - 둘 다 없음 → "Connect Wallet" 버튼
655
+ *
656
+ * view-only: wagmi / connect-kit 같은 web3 의존성은 갖지 않으며 모든
657
+ * 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
658
+ * `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
659
+ */
660
+ declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, onConnect, onDisconnect, onCopy, onSelectWallet, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, sendTransaction, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
661
+
662
+ /**
663
+ * Wallet provider icons used by `ConnectButton`. Ported from
664
+ * `@nexus-cross/connect-kit-wagmi` so dapp-ui stays a self-contained,
665
+ * bundler-agnostic module (no SVG loader required) and doesn't pull in a
666
+ * web3 dependency for icon assets.
667
+ *
668
+ * Each icon is an inline `data:image/svg+xml` URI so it can be consumed
669
+ * directly by `<img src={...}>`.
670
+ *
671
+ * Source references mirror the ones in `connect-kit-wagmi/src/wallets/icons.ts`:
672
+ * wallet-crossx.svg → CROSSX_ICON (cross / cross-extension / cross-embedded fallback)
673
+ * wallet-metamask.svg → METAMASK_ICON
674
+ * wallet-binance.svg → BINANCE_ICON
675
+ */
676
+ declare const CROSSX_ICON: string;
677
+ declare const METAMASK_ICON: string;
678
+ declare const BINANCE_ICON: string;
679
+ declare const GOOGLE_ICON: string;
680
+ declare const APPLE_ICON: string;
681
+
682
+ export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, BINANCE_ICON, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, ConnectorId, type ConnectorMeta, type DrawerDirection$1 as DrawerDirection, type Environment, GOOGLE_ICON, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemUrl, METAMASK_ICON, type PreferredToken, type SendTransactionArgs, type SendTransactionFn, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, 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, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
package/dist/index.d.ts CHANGED
@@ -109,6 +109,22 @@ interface TokenStatsResponse {
109
109
  data: TokenStats[];
110
110
  }
111
111
 
112
+ /**
113
+ * 포트폴리오 내부에서 트랜잭션을 실제로 서명/브로드캐스트할 때 호출하는 콜백.
114
+ *
115
+ * 주입되는 지갑 스택(wagmi, viem, 자체 SDK 등)에 관계없이 동일한 계약으로
116
+ * 동작시키기 위한 최소 공통 시그니처다. wagmi의 `sendTransactionAsync`를
117
+ * 그대로 전달해도 호환된다.
118
+ */
119
+ interface SendTransactionArgs {
120
+ to: `0x${string}`;
121
+ value?: bigint;
122
+ data?: `0x${string}`;
123
+ chainId?: number;
124
+ gas?: bigint;
125
+ }
126
+ type SendTransactionFn = (args: SendTransactionArgs) => Promise<`0x${string}`>;
127
+
112
128
  interface WalletInfoTriggerProps {
113
129
  asChild?: boolean;
114
130
  className?: string;
@@ -161,11 +177,19 @@ interface WalletInfoProps {
161
177
  onDisconnect?: () => void;
162
178
  /** 기본 Disconnect 버튼 라벨 (기본 "Disconnect"). */
163
179
  disconnectLabel?: string;
164
- /** Footer 하단 Terms 링크 URL. 지정 시에만 노출. */
180
+ /**
181
+ * Footer 하단 Terms 링크 URL.
182
+ * 미지정 시 CROSS 에코시스템 기본 URL로 폴백되어 자동 노출된다.
183
+ * 숨기려면 빈 문자열(`""`)을 전달.
184
+ */
165
185
  termsUrl?: string;
166
186
  /** Terms 링크 라벨 (기본 "Terms of Service"). */
167
187
  termsLabel?: string;
168
- /** Footer 하단 Privacy 링크 URL. 지정 시에만 노출. */
188
+ /**
189
+ * Footer 하단 Privacy 링크 URL.
190
+ * 미지정 시 CROSS 에코시스템 기본 URL로 폴백되어 자동 노출된다.
191
+ * 숨기려면 빈 문자열(`""`)을 전달.
192
+ */
169
193
  privacyUrl?: string;
170
194
  /** Privacy 링크 라벨 (기본 "Privacy Policy"). */
171
195
  privacyLabel?: string;
@@ -183,10 +207,17 @@ interface WalletInfoProps {
183
207
  showTotalAssets?: boolean;
184
208
  /** Total Assets 라벨 텍스트 (기본 "Total Assets USD"). */
185
209
  totalAssetsLabel?: string;
210
+ /**
211
+ * 외부(dApp)에서 주입하는 트랜잭션 전송 함수.
212
+ * `showPortfolio=true`일 때 내부 `WalletPortfolioBody`로 그대로 전달되어
213
+ * 포트폴리오 섹션에서 토큰 전송 액션을 실행할 때 호출된다.
214
+ * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다.
215
+ */
216
+ sendTransaction?: SendTransactionFn;
186
217
  style?: WalletInfoStyle;
187
218
  children: React.ReactNode;
188
219
  }
189
- declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
220
+ declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, sendTransaction, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
190
221
  declare const WalletInfo: typeof WalletInfoRoot & {
191
222
  Trigger: typeof WalletInfoTrigger;
192
223
  Content: typeof WalletInfoContent;
@@ -383,9 +414,16 @@ interface WalletPortfolioProps {
383
414
  walletAddress: string;
384
415
  open?: boolean;
385
416
  onOpenChange?: (open: boolean) => void;
417
+ /**
418
+ * 외부(dApp)에서 주입하는 트랜잭션 전송 함수.
419
+ * 포트폴리오 내부에서 구성한 트랜잭션 페이로드를 실제 서명/브로드캐스트할 때
420
+ * 이 함수가 호출된다. 연결된 지갑 스택(wagmi, viem, 자체 SDK 등)에
421
+ * 종속되지 않도록 외부에서 주입한다.
422
+ */
423
+ sendTransaction?: SendTransactionFn;
386
424
  children: React.ReactNode;
387
425
  }
388
- declare function WalletPortfolioRoot({ env, theme, walletAddress, open: propOpen, onOpenChange, children, }: WalletPortfolioProps): react_jsx_runtime.JSX.Element;
426
+ declare function WalletPortfolioRoot({ env, theme, walletAddress, open: propOpen, onOpenChange, sendTransaction, children, }: WalletPortfolioProps): react_jsx_runtime.JSX.Element;
389
427
  declare const WalletPortfolio: typeof WalletPortfolioRoot & {
390
428
  Trigger: typeof WalletPortfolioTrigger;
391
429
  Content: typeof WalletPortfolioContent;
@@ -407,8 +445,14 @@ interface WalletPortfolioBodyProps {
407
445
  */
408
446
  variant?: "fullscreen" | "embed" | "none";
409
447
  className?: string;
448
+ /**
449
+ * 외부(dApp)에서 주입하는 트랜잭션 전송 함수.
450
+ * `WalletPortfolio` 루트에서 사용할 때는 루트의 prop을 통해 자동으로 전달되며,
451
+ * `WalletPortfolioBody`를 단독 embed로 사용하는 경우 직접 전달해야 한다.
452
+ */
453
+ sendTransaction?: SendTransactionFn;
410
454
  }
411
- declare function WalletPortfolioBody({ env, theme, walletAddress, onBack, showHeader, variant, className, }: WalletPortfolioBodyProps): react_jsx_runtime.JSX.Element;
455
+ declare function WalletPortfolioBody({ env, theme, walletAddress, onBack, showHeader, variant, className, sendTransaction, }: WalletPortfolioBodyProps): react_jsx_runtime.JSX.Element;
412
456
 
413
457
  declare function CROSSxIcon(): react_jsx_runtime.JSX.Element;
414
458
  declare function MetaMaskIcon(): react_jsx_runtime.JSX.Element;
@@ -534,4 +578,105 @@ interface WalletDetectResult {
534
578
  }
535
579
  declare function useWalletDetect(): WalletDetectResult;
536
580
 
537
- export { AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, CONNECTOR_REGISTRY, type ChainId, ConnectorId, type ConnectorMeta, type DrawerDirection$1 as DrawerDirection, type Environment, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemUrl, type PreferredToken, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, 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, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
581
+ /**
582
+ * Resolved wallet provider — determines which icon + display name appears
583
+ * in the connected pill.
584
+ *
585
+ * - `google` / `apple`: crossy-sdk 2.0 OAuth login types (embedded wallet)
586
+ * - `cross`: generic CROSSx mark (covers CROSSx 1.0 extension/app + 2.0
587
+ * embedded when no OAuth provider is attached)
588
+ * - `metamask` / `binance`: external wallets
589
+ */
590
+ type WalletProvider = "google" | "apple" | "cross" | "metamask" | "binance";
591
+ interface ConnectButtonProps {
592
+ /** 사용자가 Connect 버튼을 눌러 연결이 진행 중. 스피너 버튼으로 전환된다. */
593
+ isConnecting?: boolean;
594
+ /**
595
+ * 0x… 지갑 주소. 지정되면 connected pill로 렌더링된다. 없으면
596
+ * disconnected 버튼("Connect Wallet")으로 떨어진다.
597
+ */
598
+ address?: string;
599
+ /**
600
+ * 트리거 pill에 표시될 provider 아이콘 키.
601
+ *
602
+ * `address`가 있는데 `provider`가 `undefined`면 SDK 조회 중인 전이
603
+ * 상태로 취급해 placeholder 원을 띄운다(`pending` 플래시 방지).
604
+ */
605
+ provider?: WalletProvider;
606
+ /**
607
+ * 트리거 버튼 aria-label에 포함될 provider 표시 이름. 미지정 시
608
+ * `provider`로부터 기본값이 유추된다 (예: 'Google', 'CROSSx').
609
+ */
610
+ providerName?: string;
611
+ /** WalletInfo 헤더에 노출될 계정 라벨 (예: "Account 1", 사용자 지정 이름). */
612
+ accountName?: string;
613
+ /** disconnected 상태에서 버튼 클릭 핸들러. */
614
+ onConnect?: () => void;
615
+ /** connected 상태에서 WalletInfo 하단 Disconnect 클릭 핸들러. */
616
+ onDisconnect?: () => void;
617
+ /**
618
+ * 주소 복사 성공 콜백. WalletInfo의 `onCopyAddress(address, success)` 에서
619
+ * `success === true`일 때만 호출된다.
620
+ */
621
+ onCopy?: () => void;
622
+ /** 지갑 변경 chevron 클릭 핸들러. 지정하지 않으면 chevron이 숨김 처리된다. */
623
+ onSelectWallet?: () => void;
624
+ /** disconnected 버튼 라벨. 기본 'Connect Wallet'. */
625
+ label?: string;
626
+ /** isConnecting 상태 라벨. 기본 'Connecting...'. */
627
+ connectingLabel?: string;
628
+ /** WalletInfo 내장 Disconnect 버튼 라벨. 기본 'Disconnect'. */
629
+ disconnectLabel?: string;
630
+ /**
631
+ * 외부(호출부)에서 주입하는 className. disconnected / connecting /
632
+ * connected(트리거 pill)에 공통으로 적용된다. 지정하면 기본 inline
633
+ * 스타일이 비활성화되어 Tailwind 등 외부 스타일 시스템으로 완전히
634
+ * 오버라이드할 수 있다.
635
+ */
636
+ className?: string;
637
+ theme?: Theme;
638
+ env?: Environment;
639
+ showBalance?: boolean;
640
+ showPortfolio?: boolean;
641
+ drawerDirection?: DrawerDirection$1;
642
+ modal?: boolean;
643
+ connectorId?: ConnectorId;
644
+ style?: WalletInfoStyle;
645
+ sendTransaction?: SendTransactionFn;
646
+ }
647
+
648
+ /**
649
+ * 3-state wallet connect button. Caller drives the visual state:
650
+ *
651
+ * - `isConnecting === true` → 스피너 disabled 버튼
652
+ * - `address` 있음 → WalletInfo + connected pill
653
+ * - `address`가 있는데 `provider` 없음 → SDK 조회 전이 상태, placeholder 원
654
+ * - 둘 다 없음 → "Connect Wallet" 버튼
655
+ *
656
+ * view-only: wagmi / connect-kit 같은 web3 의존성은 갖지 않으며 모든
657
+ * 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
658
+ * `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
659
+ */
660
+ declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, onConnect, onDisconnect, onCopy, onSelectWallet, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, sendTransaction, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
661
+
662
+ /**
663
+ * Wallet provider icons used by `ConnectButton`. Ported from
664
+ * `@nexus-cross/connect-kit-wagmi` so dapp-ui stays a self-contained,
665
+ * bundler-agnostic module (no SVG loader required) and doesn't pull in a
666
+ * web3 dependency for icon assets.
667
+ *
668
+ * Each icon is an inline `data:image/svg+xml` URI so it can be consumed
669
+ * directly by `<img src={...}>`.
670
+ *
671
+ * Source references mirror the ones in `connect-kit-wagmi/src/wallets/icons.ts`:
672
+ * wallet-crossx.svg → CROSSX_ICON (cross / cross-extension / cross-embedded fallback)
673
+ * wallet-metamask.svg → METAMASK_ICON
674
+ * wallet-binance.svg → BINANCE_ICON
675
+ */
676
+ declare const CROSSX_ICON: string;
677
+ declare const METAMASK_ICON: string;
678
+ declare const BINANCE_ICON: string;
679
+ declare const GOOGLE_ICON: string;
680
+ declare const APPLE_ICON: string;
681
+
682
+ export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, BINANCE_ICON, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, ConnectorId, type ConnectorMeta, type DrawerDirection$1 as DrawerDirection, type Environment, GOOGLE_ICON, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemUrl, METAMASK_ICON, type PreferredToken, type SendTransactionArgs, type SendTransactionFn, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, 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, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };