@nexus-cross/dapp-ui 1.1.4 → 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.d.cts CHANGED
@@ -9,6 +9,12 @@ type DrawerDirection$1 = "right" | "bottom" | "left";
9
9
 
10
10
  declare function resolveEnvironment(env?: Environment | "staging" | "prd" | "prod" | "stg"): Environment;
11
11
 
12
+ type AppLauncherUsageMode = "dapp-ui" | "connect-kit-react";
13
+ declare function announceAppLauncherUsage(options?: {
14
+ mode?: AppLauncherUsageMode;
15
+ connectKitVersion?: string;
16
+ }): void;
17
+
12
18
  interface AppLauncherProps {
13
19
  env?: Environment;
14
20
  theme?: Theme;
@@ -226,47 +232,86 @@ interface UserDepositInfo {
226
232
  last_updated_time: number;
227
233
  last_withdrawn_block: number;
228
234
  }
229
- interface Billboard {
230
- price: string;
231
- change: string;
232
- rate: number;
233
- high24: string;
234
- low24: string;
235
- baseVolume: string;
236
- quoteVolume: string;
237
- }
238
- interface DexPairInfo {
239
- pair_name: string;
235
+ /**
236
+ * host(wagmi 보유 측)가 공급하는 LP 잔고 reader가 반환하는 단위 정보.
237
+ * 금액은 모두 raw(wei) BigInt로 다루고, 표기 시에만 decimals로 환산한다.
238
+ */
239
+ interface LpBalanceInfo {
240
+ /** 연결 계정의 LP 토큰 잔고 `balanceOf(account)` (raw, wei) */
241
+ balance: bigint;
242
+ /** LP 토큰 총발행량 `totalSupply()` (raw, wei). 없으면 지분율 계산 불가. */
243
+ totalSupply?: bigint;
244
+ /** LP 토큰 decimals (보통 18). 없으면 18로 간주. */
245
+ decimals?: number;
246
+ }
247
+ /**
248
+ * 주입형 LP 잔고 reader. host(wagmi)가 연결 계정 기준으로 주어진 pair(LP)
249
+ * 토큰 주소들의 balanceOf / totalSupply / decimals를 읽어 반환한다.
250
+ * 반환 맵의 key는 소문자 정규화된 pair 주소.
251
+ *
252
+ * dapp-ui는 이 함수 시그니처에만 의존하며 viem/wagmi를 직접 사용하지 않는다.
253
+ * 미주입 시 game-swap LP 섹션은 풀 정보만 표시하고 수량/지분율/가치는 생략한다.
254
+ */
255
+ type LpBalanceReaderFn = (pairAddresses: string[]) => Promise<Record<string, LpBalanceInfo>>;
256
+ /**
257
+ * game-swap `/portfolio` pool 항목의 토큰 참조.
258
+ * NOTE: CROSS 쪽(token_b)은 백엔드가 메타데이터 없이 내려준다 —
259
+ * `symbol: ""`, `name: ""`, `decimals: 0`, `logo_url` 누락. 소비 측에서
260
+ * symbol은 "CROSS"로, decimals는 18로 간주해야 한다 (실응답 확인 기준).
261
+ */
262
+ interface GameSwapTokenRef {
263
+ address: string;
264
+ symbol: string;
265
+ name: string;
266
+ decimals: number;
267
+ logo_url?: string;
268
+ }
269
+ /**
270
+ * game-swap `GET /addresses/:address/portfolio`의 `pools[]` 항목.
271
+ * 풀 단위 정보(예비량/가격)만 담고, 사용자별 LP 잔고는 포함하지 않는다
272
+ * (그것은 주입형 reader의 온체인 read로 보강한다).
273
+ */
274
+ interface GameSwapPool {
240
275
  pair_address: string;
241
- quote_address: string;
242
- base_address: string;
243
- quote_symbol: string;
244
- base_symbol: string;
245
- quote_name: string;
246
- base_name: string;
247
- quote_decimals: number;
248
- base_decimals: number;
249
- icon_image: string;
250
- enabled: boolean;
251
- active: boolean;
252
- status: string;
253
- billboard: Billboard;
254
- tick_size: string;
255
- lot_size: string;
256
- }
257
- interface DexOpenOrder {
258
- order_id: number;
259
- /** 0 = sell (ask), 1 = buy (bid) */
260
- order_side: number;
261
- owner: string;
262
- pair: string;
263
- price: string;
264
- amount: string;
265
- filled: string;
266
- volume: string;
267
- created_at: number;
268
- created_block: number;
269
- created_hash: string;
276
+ token_a?: GameSwapTokenRef;
277
+ token_b?: GameSwapTokenRef;
278
+ /** raw wei */
279
+ reserve_a: string;
280
+ /** raw wei */
281
+ reserve_b: string;
282
+ /** 1 token_a = X token_b(CROSS) */
283
+ last_price: string;
284
+ /** last_price × cross_usd */
285
+ price_usd: string;
286
+ /** CROSS/USD 환율 */
287
+ cross_usd: string;
288
+ /** token_a 24h 변동률 (0.0012 = +0.12%) */
289
+ change_24h: string;
290
+ }
291
+ /**
292
+ * POSA governance API의 staking 요약 정보. `GET /stake/:address`.
293
+ * 금액은 wei가 아니라 CROSS 단위 십진 문자열로 내려온다
294
+ * (예: `"500.0000"`, `"0.000000000000000000"`). 실응답 확인 기준.
295
+ */
296
+ interface StakeInfo {
297
+ address: string;
298
+ /** 현재 스테이킹된 총량 (CROSS 단위 십진 문자열) */
299
+ total_stake: string;
300
+ /** 누적/청구 가능 리워드 (CROSS 단위 십진 문자열) */
301
+ rewards_earned: string;
302
+ /** 위임(delegation) 개수 */
303
+ delegations: number;
304
+ /** 최초 스테이킹 시각 (ISO timestamp). 스테이킹 이력이 없으면 null. */
305
+ first_staked_at: string | null;
306
+ /** 최초 스테이킹 이후 경과 일수. 스테이킹 이력이 없으면 null. */
307
+ days_since_first_stake: number | null;
308
+ }
309
+ /** 네트워크 통계 중 포트폴리오에서 사용하는 필드 (`GET /network/stats`). */
310
+ interface NetworkStats {
311
+ /** 네트워크 APR (백분율 문자열, 예: "12.5") */
312
+ apr: string;
313
+ total_staked: string;
314
+ active_validators: number;
270
315
  }
271
316
  interface ForgePoolToken {
272
317
  address: string;
@@ -299,8 +344,6 @@ interface ForgeTokenDetail {
299
344
  available_supply: string;
300
345
  }
301
346
 
302
- type DexMarket = "cross" | "crossd" | "forge";
303
-
304
347
  /**
305
348
  * dapp-ui가 렌더하는 outlink의 대분류.
306
349
  * `portfolio`는 세부적으로 `origin`으로 더 나뉜다.
@@ -329,19 +372,23 @@ type OutlinkContext = {
329
372
  };
330
373
  } | {
331
374
  category: "portfolio";
332
- origin: "portfolio-forge";
375
+ origin: "portfolio-stake";
333
376
  payload: {
334
- pool: ForgePool;
335
- tokenDetail?: ForgeTokenDetail;
377
+ stakeInfo?: StakeInfo;
378
+ networkStats?: NetworkStats;
379
+ };
380
+ } | {
381
+ category: "portfolio";
382
+ origin: "portfolio-game-swap";
383
+ payload: {
384
+ pool: GameSwapPool;
336
385
  };
337
386
  } | {
338
387
  category: "portfolio";
339
- origin: "portfolio-dex-order";
388
+ origin: "portfolio-forge";
340
389
  payload: {
341
- market: DexMarket;
342
- side: "buy" | "sell";
343
- order: DexOpenOrder;
344
- pair?: DexPairInfo;
390
+ pool: ForgePool;
391
+ tokenDetail?: ForgeTokenDetail;
345
392
  };
346
393
  } | {
347
394
  category: "send";
@@ -404,11 +451,169 @@ interface SendPageProps {
404
451
  */
405
452
  estimateGas?: EstimateGasFn;
406
453
  onSuccess?: (txHash: `0x${string}`) => void;
407
- onConfirmSuccess?: () => void;
454
+ onConfirmSuccess?: (txHash?: `0x${string}`) => void;
455
+ onOutlink?: OnOutlink;
456
+ }
457
+
458
+ interface SendSubmittedInfo {
459
+ txHash: `0x${string}`;
460
+ chainId: number;
461
+ amount: string;
462
+ tokenSymbol: string;
463
+ recipient: `0x${string}`;
464
+ }
465
+ interface SendFailedInfo {
466
+ txHash?: `0x${string}`;
467
+ chainId: number;
468
+ message: string;
469
+ }
470
+
471
+ interface SendFlowProps {
472
+ env?: Environment;
473
+ theme?: Theme;
474
+ walletAddress: string;
475
+ accountName?: string;
476
+ accounts?: SendAccount[];
477
+ /** First step shown when the flow opens. Defaults to `recipient`. */
478
+ initialStep?: "token" | "recipient";
479
+ token: SendAsset;
480
+ tokens?: SendAsset[];
481
+ onTokenChange?: (token: SendAsset) => void;
482
+ sendTransaction?: SendTransactionFn;
483
+ getTransactionReceipt?: GetTransactionReceiptFn;
484
+ estimateGas?: EstimateGasFn;
485
+ getTokenPriceUsd?: (token: SendAsset) => number | undefined;
486
+ onSubmitted?: (info: SendSubmittedInfo) => void;
487
+ onSuccess?: (txHash: `0x${string}`) => void;
488
+ onFailed?: (info: SendFailedInfo) => void;
489
+ /** Close the whole surface (X). */
490
+ onClose?: () => void;
491
+ /** Back out of the first step (return to the wallet view). */
492
+ onBackToWallet?: () => void;
493
+ /** Finished after a successful send. */
494
+ onConfirmSuccess?: (txHash?: `0x${string}`) => void;
408
495
  onOutlink?: OnOutlink;
496
+ className?: string;
409
497
  }
498
+ declare function SendFlow({ onClose, onBackToWallet, onConfirmSuccess, onSuccess, className, ...rest }: SendFlowProps): react_jsx_runtime.JSX.Element;
410
499
 
411
- declare function SendPage({ env, theme, walletAddress, accountName, accounts, token, tokens, onTokenChange, sendTransaction, getTransactionReceipt, estimateGas, onSuccess, onConfirmSuccess, onOutlink, }: SendPageProps): react_jsx_runtime.JSX.Element;
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;
412
617
 
413
618
  interface WalletInfoTriggerProps {
414
619
  asChild?: boolean;
@@ -446,6 +651,12 @@ interface WalletInfoProps {
446
651
  showForgeToken?: boolean;
447
652
  showGameToken?: boolean;
448
653
  showQR?: boolean;
654
+ /**
655
+ * Bridge 액션 노출 여부 (기본 true).
656
+ * - true: 액션 행에 Bridge 버튼, Receive는 상단 QR 버튼으로 표기
657
+ * - false: 액션 행에 Receive 버튼, 상단 QR 버튼 미표기
658
+ */
659
+ showBridge?: boolean;
449
660
  qrLogoSrc?: string;
450
661
  walletAddress: string;
451
662
  accountName?: string;
@@ -459,6 +670,14 @@ interface WalletInfoProps {
459
670
  preferredTokens?: PreferredToken[];
460
671
  onSelectWallet?: () => void;
461
672
  onCopyAddress?: (address: string, success: boolean) => void;
673
+ /** WalletInfo 기본 액션 row의 Buy 클릭 핸들러. */
674
+ onBuy?: () => void;
675
+ /**
676
+ * Buy 카드를 시각적으로 비활성 상태로 표시하고, 사용자가 클릭하면 이
677
+ * 메시지를 토스트로 띄운다. `onBuy`보다 우선. 예: on-ramp가 사용자 국가에서
678
+ * 차단된 경우 안내 메시지 전달용.
679
+ */
680
+ onBuyDisabledMessage?: string;
462
681
  /**
463
682
  * 지정 시 기본 Disconnect 버튼이 Footer에 노출됨. `WalletInfo.Footer` 슬롯이
464
683
  * 있으면 해당 슬롯이 메인 영역을 대체한다. Terms/Privacy 링크는 둘 중 무엇을
@@ -487,8 +706,7 @@ interface WalletInfoProps {
487
706
  onOpenChange?: (open: boolean) => void;
488
707
  /**
489
708
  * Portfolio 뷰 사용 여부.
490
- * true면 Total Assets 섹션이 클릭 가능해지며, 클릭 시 내부 Portfolio 뷰로 전환됩니다.
491
- * (showBalance=true && showTotalAssets=true 일 때만 클릭 영역이 표시됩니다.)
709
+ * true면 기본 액션 row에 Portfolio 버튼이 표시되며, 클릭 시 내부 Portfolio 뷰로 전환됩니다.
492
710
  */
493
711
  showPortfolio?: boolean;
494
712
  /** Portfolio 뷰의 헤더 타이틀 (기본 "My Portfolio"). */
@@ -518,10 +736,30 @@ interface WalletInfoProps {
518
736
  * `showPortfolio=true`일 때 내부 `WalletPortfolioBody`로도 릴레이된다.
519
737
  */
520
738
  onOutlink?: OnOutlink;
739
+ /**
740
+ * game-swap LP 섹션의 사용자별 LP 잔고/지분율을 온체인에서 보강하기 위한
741
+ * 주입형 reader. `showPortfolio=true`일 때 `WalletPortfolioBody`로 릴레이된다.
742
+ * 미주입 시 LP 섹션은 풀 정보만 표시한다.
743
+ */
744
+ lpBalanceReader?: LpBalanceReaderFn;
745
+ bridgeTokens?: BridgeToken[];
746
+ bridgeHistory?: BridgeHistoryItem[];
747
+ getBridgeQuote?: BridgeQuoteFn;
748
+ getBridgeToTokens?: BridgeGetToTokensFn;
749
+ getBridgeApproval?: BridgeGetApprovalFn;
750
+ approveBridge?: BridgeApproveFn;
751
+ submitBridge?: BridgeSubmitFn;
752
+ /**
753
+ * 상단 QR 버튼 / 기본 액션 row의 Bridge / Send 콜백. (Buy는 위 onBuy
754
+ * prop으로 이미 정의됨.) Bridge는 미주입 시 내장 Bridge 화면으로 진입한다.
755
+ */
756
+ onReceive?: () => void;
757
+ onBridge?: () => void;
758
+ onSend?: () => void;
521
759
  style?: WalletInfoStyle;
522
760
  children: React.ReactNode;
523
761
  }
524
- 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, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, sendTransaction, getTransactionReceipt, estimateGas, onOutlink, 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;
525
763
  declare const WalletInfo: typeof WalletInfoRoot & {
526
764
  Trigger: typeof WalletInfoTrigger;
527
765
  Content: typeof WalletInfoContent;
@@ -723,9 +961,14 @@ interface WalletPortfolioProps {
723
961
  * 반환값으로 URL 변형 / 취소가 가능하며 async도 지원한다.
724
962
  */
725
963
  onOutlink?: OnOutlink;
964
+ /**
965
+ * game-swap LP 섹션이 사용자별 LP 잔고/지분율을 온체인에서 보강하기 위해
966
+ * host(wagmi 보유 측)로부터 주입받는 reader. 미주입 시 풀 정보만 표시한다.
967
+ */
968
+ lpBalanceReader?: LpBalanceReaderFn;
726
969
  children: React.ReactNode;
727
970
  }
728
- declare function WalletPortfolioRoot({ env, theme, walletAddress, open: propOpen, onOpenChange, onOutlink, children, }: WalletPortfolioProps): react_jsx_runtime.JSX.Element;
971
+ declare function WalletPortfolioRoot({ env, theme, walletAddress, open: propOpen, onOpenChange, onOutlink, lpBalanceReader, children, }: WalletPortfolioProps): react_jsx_runtime.JSX.Element;
729
972
  declare const WalletPortfolio: typeof WalletPortfolioRoot & {
730
973
  Trigger: typeof WalletPortfolioTrigger;
731
974
  Content: typeof WalletPortfolioContent;
@@ -735,10 +978,7 @@ interface WalletPortfolioBodyProps {
735
978
  env?: Environment;
736
979
  theme?: Theme;
737
980
  walletAddress: string;
738
- /**
739
- * 헤더 좌측 아바타 옆에 표시할 지갑 이름 (예: "Account 1").
740
- * 전달되지 않으면 텍스트는 숨겨지고 아바타만 표시된다.
741
- */
981
+ /** @deprecated Portfolio header now follows the renewed fixed title design. */
742
982
  walletName?: string;
743
983
  /** 왼쪽 상단 back 버튼 클릭 핸들러. 없으면 back 버튼 숨김. */
744
984
  onBack?: () => void;
@@ -757,8 +997,13 @@ interface WalletPortfolioBodyProps {
757
997
  * 반환값으로 URL 변형 / 취소가 가능하며 async도 지원한다.
758
998
  */
759
999
  onOutlink?: OnOutlink;
1000
+ /**
1001
+ * game-swap LP 섹션이 사용자별 LP 잔고/지분율을 온체인에서 보강하기 위해
1002
+ * host(wagmi 보유 측)로부터 주입받는 reader. 미주입 시 풀 정보만 표시한다.
1003
+ */
1004
+ lpBalanceReader?: LpBalanceReaderFn;
760
1005
  }
761
- declare function WalletPortfolioBody({ env, theme, walletAddress, walletName, onBack, showHeader, variant, className, onOutlink, }: WalletPortfolioBodyProps): react_jsx_runtime.JSX.Element;
1006
+ declare function WalletPortfolioBody({ env, theme, walletAddress, onBack, showHeader, variant, className, onOutlink, lpBalanceReader, }: WalletPortfolioBodyProps): react_jsx_runtime.JSX.Element;
762
1007
 
763
1008
  declare function CROSSxIcon(): react_jsx_runtime.JSX.Element;
764
1009
  declare function MetaMaskIcon(): react_jsx_runtime.JSX.Element;
@@ -834,17 +1079,14 @@ declare const SOCIAL_REGISTRY: {
834
1079
  };
835
1080
  type SocialId = keyof typeof SOCIAL_REGISTRY;
836
1081
 
1082
+ /**
1083
+ * Per-instance layout overrides applied as inline CSS variables.
1084
+ *
1085
+ * Colors / typography are driven by the design system (`--ds-*`, published
1086
+ * by `CrossConnectKitProvider` from `@nexus-cross/crossx-design-system`) —
1087
+ * retheme there, not per modal. Only layout knobs remain here.
1088
+ */
837
1089
  interface WalletConnectModalStyle extends CSSProperties {
838
- "--wcm-primary"?: string;
839
- "--wcm-secondary"?: string;
840
- "--wcm-surface-bg"?: string;
841
- "--wcm-surface-default"?: string;
842
- "--wcm-surface-subtle"?: string;
843
- "--wcm-border-default"?: string;
844
- "--wcm-border-subtle"?: string;
845
- "--wcm-texticon-primary"?: string;
846
- "--wcm-texticon-secondary"?: string;
847
- "--wcm-texticon-tertiary"?: string;
848
1090
  "--wcm-dialog-width"?: string;
849
1091
  "--wcm-drawer-max-width"?: string;
850
1092
  "--wcm-drawer-min-width"?: string;
@@ -942,10 +1184,13 @@ interface ConnectButtonStyle extends CSSProperties {
942
1184
  "--cb-font-family"?: string;
943
1185
  "--cb-font-size"?: string;
944
1186
  "--cb-font-weight"?: string | number;
1187
+ "--cb-line-height"?: string | number;
1188
+ "--cb-letter-spacing"?: string;
945
1189
  "--cb-gap"?: string;
946
1190
  "--cb-transition"?: string;
947
1191
  "--cb-loading-opacity"?: string | number;
948
1192
  "--cb-press-scale"?: string | number;
1193
+ "--cb-icon-size"?: string;
949
1194
  "--cb-spinner-size"?: string;
950
1195
  "--cb-spinner-thumb"?: string;
951
1196
  "--cb-spinner-track"?: string;
@@ -960,6 +1205,7 @@ interface ConnectButtonStyle extends CSSProperties {
960
1205
  "--cb-pill-font-family"?: string;
961
1206
  "--cb-pill-font-size"?: string;
962
1207
  "--cb-pill-font-weight"?: string | number;
1208
+ "--cb-pill-line-height"?: string | number;
963
1209
  "--cb-pill-gap"?: string;
964
1210
  "--cb-pill-icon-size"?: string;
965
1211
  "--cb-pill-icon-placeholder-bg"?: string;
@@ -1012,6 +1258,14 @@ interface ConnectButtonProps {
1012
1258
  onCopy?: () => void;
1013
1259
  /** 지갑 변경 chevron 클릭 핸들러. 지정하지 않으면 chevron이 숨김 처리된다. */
1014
1260
  onSelectWallet?: () => void;
1261
+ /** WalletInfo 기본 액션 row의 Buy 클릭 핸들러. */
1262
+ onBuy?: () => void;
1263
+ /**
1264
+ * Buy 카드를 시각적으로 비활성 상태로 표시하고, 사용자가 클릭하면 이 메시지를
1265
+ * 토스트로 띄운다. `onBuy`보다 우선. WalletInfoProps의 동일 prop으로 그대로
1266
+ * 전달된다.
1267
+ */
1268
+ onBuyDisabledMessage?: string;
1015
1269
  /**
1016
1270
  * disconnected 버튼 라벨. 기본 'Connect Wallet'.
1017
1271
  * 문자열 외에 ReactNode를 넘겨 아이콘-only / 커스텀 마크업을 렌더할 수 있다
@@ -1054,6 +1308,20 @@ interface ConnectButtonProps {
1054
1308
  * Est. Tx Fee / Gas Limit / Max. Total Amount 행이 "—"로 표시된다.
1055
1309
  */
1056
1310
  estimateGas?: EstimateGasFn;
1311
+ /**
1312
+ * 상단 QR 버튼 / 기본 액션 row의 Bridge / Send 콜백. (Buy는 위 onBuy로
1313
+ * 정의됨.) Bridge는 미주입 시 WalletInfo 내장 Bridge 화면으로 진입한다.
1314
+ */
1315
+ onReceive?: () => void;
1316
+ onBridge?: () => void;
1317
+ onSend?: () => void;
1318
+ bridgeTokens?: BridgeToken[];
1319
+ bridgeHistory?: BridgeHistoryItem[];
1320
+ getBridgeQuote?: BridgeQuoteFn;
1321
+ getBridgeToTokens?: BridgeGetToTokensFn;
1322
+ getBridgeApproval?: BridgeGetApprovalFn;
1323
+ approveBridge?: BridgeApproveFn;
1324
+ submitBridge?: BridgeSubmitFn;
1057
1325
  }
1058
1326
 
1059
1327
  /**
@@ -1068,7 +1336,7 @@ interface ConnectButtonProps {
1068
1336
  * 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
1069
1337
  * `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
1070
1338
  */
1071
- declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, sendAccounts, onConnect, onDisconnect, onCopy, onSelectWallet, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, walletInfoStyle, sendTransaction, getTransactionReceipt, estimateGas, }: 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;
1072
1340
 
1073
1341
  /**
1074
1342
  * Wallet provider icons used by `ConnectButton`. Ported from
@@ -1154,4 +1422,4 @@ interface SkillsButtonProps {
1154
1422
  declare const DEFAULT_SKILLS_HREF = "https://skills.cross.nexus";
1155
1423
  declare function SkillsButton({ label, href, onClick, className, style, theme, disabled, isLoading, loadingLabel, openInNewTab, type, }: SkillsButtonProps): react_jsx_runtime.JSX.Element;
1156
1424
 
1157
- export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, type AppLauncherTriggerStyle, 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 GasEstimate, type GetTransactionReceiptArgs, type GetTransactionReceiptFn, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemUrl, METAMASK_ICON, type OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, type PreferredToken, type RecentSendAddress, SOCIAL_REGISTRY, type SendAccount, type SendAsset, SendPage, 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, 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 };