@nexus-cross/dapp-ui 1.1.4-beta.5 → 1.3.0-beta.1
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/README.md +6 -1
- package/dist/index.cjs +19 -20
- package/dist/index.d.cts +199 -71
- package/dist/index.d.ts +199 -71
- package/dist/index.js +19 -20
- package/package.json +1 -1
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
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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;
|
|
237
268
|
}
|
|
238
|
-
|
|
239
|
-
|
|
269
|
+
/**
|
|
270
|
+
* game-swap `GET /addresses/:address/portfolio`의 `pools[]` 항목.
|
|
271
|
+
* 풀 단위 정보(예비량/가격)만 담고, 사용자별 LP 잔고는 포함하지 않는다
|
|
272
|
+
* (그것은 주입형 reader의 온체인 read로 보강한다).
|
|
273
|
+
*/
|
|
274
|
+
interface GameSwapPool {
|
|
240
275
|
pair_address: string;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
lot_size: 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;
|
|
256
290
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
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-
|
|
375
|
+
origin: "portfolio-stake";
|
|
333
376
|
payload: {
|
|
334
|
-
|
|
335
|
-
|
|
377
|
+
stakeInfo?: StakeInfo;
|
|
378
|
+
networkStats?: NetworkStats;
|
|
336
379
|
};
|
|
337
380
|
} | {
|
|
338
381
|
category: "portfolio";
|
|
339
|
-
origin: "portfolio-
|
|
382
|
+
origin: "portfolio-game-swap";
|
|
340
383
|
payload: {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
384
|
+
pool: GameSwapPool;
|
|
385
|
+
};
|
|
386
|
+
} | {
|
|
387
|
+
category: "portfolio";
|
|
388
|
+
origin: "portfolio-forge";
|
|
389
|
+
payload: {
|
|
390
|
+
pool: ForgePool;
|
|
391
|
+
tokenDetail?: ForgeTokenDetail;
|
|
345
392
|
};
|
|
346
393
|
} | {
|
|
347
394
|
category: "send";
|
|
@@ -404,11 +451,51 @@ interface SendPageProps {
|
|
|
404
451
|
*/
|
|
405
452
|
estimateGas?: EstimateGasFn;
|
|
406
453
|
onSuccess?: (txHash: `0x${string}`) => void;
|
|
407
|
-
onConfirmSuccess?: () => void;
|
|
454
|
+
onConfirmSuccess?: (txHash?: `0x${string}`) => void;
|
|
408
455
|
onOutlink?: OnOutlink;
|
|
409
456
|
}
|
|
410
457
|
|
|
411
|
-
|
|
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;
|
|
495
|
+
onOutlink?: OnOutlink;
|
|
496
|
+
className?: string;
|
|
497
|
+
}
|
|
498
|
+
declare function SendFlow({ onClose, onBackToWallet, onConfirmSuccess, onSuccess, className, ...rest }: SendFlowProps): react_jsx_runtime.JSX.Element;
|
|
412
499
|
|
|
413
500
|
interface WalletInfoTriggerProps {
|
|
414
501
|
asChild?: boolean;
|
|
@@ -459,6 +546,14 @@ interface WalletInfoProps {
|
|
|
459
546
|
preferredTokens?: PreferredToken[];
|
|
460
547
|
onSelectWallet?: () => void;
|
|
461
548
|
onCopyAddress?: (address: string, success: boolean) => void;
|
|
549
|
+
/** WalletInfo 기본 액션 row의 Buy 클릭 핸들러. */
|
|
550
|
+
onBuy?: () => void;
|
|
551
|
+
/**
|
|
552
|
+
* Buy 카드를 시각적으로 비활성 상태로 표시하고, 사용자가 클릭하면 이
|
|
553
|
+
* 메시지를 토스트로 띄운다. `onBuy`보다 우선. 예: on-ramp가 사용자 국가에서
|
|
554
|
+
* 차단된 경우 안내 메시지 전달용.
|
|
555
|
+
*/
|
|
556
|
+
onBuyDisabledMessage?: string;
|
|
462
557
|
/**
|
|
463
558
|
* 지정 시 기본 Disconnect 버튼이 Footer에 노출됨. `WalletInfo.Footer` 슬롯이
|
|
464
559
|
* 있으면 해당 슬롯이 메인 영역을 대체한다. Terms/Privacy 링크는 둘 중 무엇을
|
|
@@ -487,8 +582,7 @@ interface WalletInfoProps {
|
|
|
487
582
|
onOpenChange?: (open: boolean) => void;
|
|
488
583
|
/**
|
|
489
584
|
* Portfolio 뷰 사용 여부.
|
|
490
|
-
* true면
|
|
491
|
-
* (showBalance=true && showTotalAssets=true 일 때만 클릭 영역이 표시됩니다.)
|
|
585
|
+
* true면 기본 액션 row에 Portfolio 버튼이 표시되며, 클릭 시 내부 Portfolio 뷰로 전환됩니다.
|
|
492
586
|
*/
|
|
493
587
|
showPortfolio?: boolean;
|
|
494
588
|
/** Portfolio 뷰의 헤더 타이틀 (기본 "My Portfolio"). */
|
|
@@ -518,10 +612,22 @@ interface WalletInfoProps {
|
|
|
518
612
|
* `showPortfolio=true`일 때 내부 `WalletPortfolioBody`로도 릴레이된다.
|
|
519
613
|
*/
|
|
520
614
|
onOutlink?: OnOutlink;
|
|
615
|
+
/**
|
|
616
|
+
* game-swap LP 섹션의 사용자별 LP 잔고/지분율을 온체인에서 보강하기 위한
|
|
617
|
+
* 주입형 reader. `showPortfolio=true`일 때 `WalletPortfolioBody`로 릴레이된다.
|
|
618
|
+
* 미주입 시 LP 섹션은 풀 정보만 표시한다.
|
|
619
|
+
*/
|
|
620
|
+
lpBalanceReader?: LpBalanceReaderFn;
|
|
621
|
+
/**
|
|
622
|
+
* Total Assets 카드 직후의 Receive / Send 액션 콜백. (Buy는 위 onBuy prop으로
|
|
623
|
+
* 이미 정의됨.) 각 콜백이 미주입이면 해당 카드는 비활성으로 렌더.
|
|
624
|
+
*/
|
|
625
|
+
onReceive?: () => void;
|
|
626
|
+
onSend?: () => void;
|
|
521
627
|
style?: WalletInfoStyle;
|
|
522
628
|
children: React.ReactNode;
|
|
523
629
|
}
|
|
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;
|
|
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;
|
|
525
631
|
declare const WalletInfo: typeof WalletInfoRoot & {
|
|
526
632
|
Trigger: typeof WalletInfoTrigger;
|
|
527
633
|
Content: typeof WalletInfoContent;
|
|
@@ -723,9 +829,14 @@ interface WalletPortfolioProps {
|
|
|
723
829
|
* 반환값으로 URL 변형 / 취소가 가능하며 async도 지원한다.
|
|
724
830
|
*/
|
|
725
831
|
onOutlink?: OnOutlink;
|
|
832
|
+
/**
|
|
833
|
+
* game-swap LP 섹션이 사용자별 LP 잔고/지분율을 온체인에서 보강하기 위해
|
|
834
|
+
* host(wagmi 보유 측)로부터 주입받는 reader. 미주입 시 풀 정보만 표시한다.
|
|
835
|
+
*/
|
|
836
|
+
lpBalanceReader?: LpBalanceReaderFn;
|
|
726
837
|
children: React.ReactNode;
|
|
727
838
|
}
|
|
728
|
-
declare function WalletPortfolioRoot({ env, theme, walletAddress, open: propOpen, onOpenChange, onOutlink, children, }: WalletPortfolioProps): react_jsx_runtime.JSX.Element;
|
|
839
|
+
declare function WalletPortfolioRoot({ env, theme, walletAddress, open: propOpen, onOpenChange, onOutlink, lpBalanceReader, children, }: WalletPortfolioProps): react_jsx_runtime.JSX.Element;
|
|
729
840
|
declare const WalletPortfolio: typeof WalletPortfolioRoot & {
|
|
730
841
|
Trigger: typeof WalletPortfolioTrigger;
|
|
731
842
|
Content: typeof WalletPortfolioContent;
|
|
@@ -735,10 +846,7 @@ interface WalletPortfolioBodyProps {
|
|
|
735
846
|
env?: Environment;
|
|
736
847
|
theme?: Theme;
|
|
737
848
|
walletAddress: string;
|
|
738
|
-
/**
|
|
739
|
-
* 헤더 좌측 아바타 옆에 표시할 지갑 이름 (예: "Account 1").
|
|
740
|
-
* 전달되지 않으면 텍스트는 숨겨지고 아바타만 표시된다.
|
|
741
|
-
*/
|
|
849
|
+
/** @deprecated Portfolio header now follows the renewed fixed title design. */
|
|
742
850
|
walletName?: string;
|
|
743
851
|
/** 왼쪽 상단 back 버튼 클릭 핸들러. 없으면 back 버튼 숨김. */
|
|
744
852
|
onBack?: () => void;
|
|
@@ -757,8 +865,13 @@ interface WalletPortfolioBodyProps {
|
|
|
757
865
|
* 반환값으로 URL 변형 / 취소가 가능하며 async도 지원한다.
|
|
758
866
|
*/
|
|
759
867
|
onOutlink?: OnOutlink;
|
|
868
|
+
/**
|
|
869
|
+
* game-swap LP 섹션이 사용자별 LP 잔고/지분율을 온체인에서 보강하기 위해
|
|
870
|
+
* host(wagmi 보유 측)로부터 주입받는 reader. 미주입 시 풀 정보만 표시한다.
|
|
871
|
+
*/
|
|
872
|
+
lpBalanceReader?: LpBalanceReaderFn;
|
|
760
873
|
}
|
|
761
|
-
declare function WalletPortfolioBody({ env, theme, walletAddress,
|
|
874
|
+
declare function WalletPortfolioBody({ env, theme, walletAddress, onBack, showHeader, variant, className, onOutlink, lpBalanceReader, }: WalletPortfolioBodyProps): react_jsx_runtime.JSX.Element;
|
|
762
875
|
|
|
763
876
|
declare function CROSSxIcon(): react_jsx_runtime.JSX.Element;
|
|
764
877
|
declare function MetaMaskIcon(): react_jsx_runtime.JSX.Element;
|
|
@@ -834,17 +947,14 @@ declare const SOCIAL_REGISTRY: {
|
|
|
834
947
|
};
|
|
835
948
|
type SocialId = keyof typeof SOCIAL_REGISTRY;
|
|
836
949
|
|
|
950
|
+
/**
|
|
951
|
+
* Per-instance layout overrides applied as inline CSS variables.
|
|
952
|
+
*
|
|
953
|
+
* Colors / typography are driven by the design system (`--ds-*`, published
|
|
954
|
+
* by `CrossConnectKitProvider` from `@nexus-cross/crossx-design-system`) —
|
|
955
|
+
* retheme there, not per modal. Only layout knobs remain here.
|
|
956
|
+
*/
|
|
837
957
|
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
958
|
"--wcm-dialog-width"?: string;
|
|
849
959
|
"--wcm-drawer-max-width"?: string;
|
|
850
960
|
"--wcm-drawer-min-width"?: string;
|
|
@@ -942,10 +1052,13 @@ interface ConnectButtonStyle extends CSSProperties {
|
|
|
942
1052
|
"--cb-font-family"?: string;
|
|
943
1053
|
"--cb-font-size"?: string;
|
|
944
1054
|
"--cb-font-weight"?: string | number;
|
|
1055
|
+
"--cb-line-height"?: string | number;
|
|
1056
|
+
"--cb-letter-spacing"?: string;
|
|
945
1057
|
"--cb-gap"?: string;
|
|
946
1058
|
"--cb-transition"?: string;
|
|
947
1059
|
"--cb-loading-opacity"?: string | number;
|
|
948
1060
|
"--cb-press-scale"?: string | number;
|
|
1061
|
+
"--cb-icon-size"?: string;
|
|
949
1062
|
"--cb-spinner-size"?: string;
|
|
950
1063
|
"--cb-spinner-thumb"?: string;
|
|
951
1064
|
"--cb-spinner-track"?: string;
|
|
@@ -960,6 +1073,7 @@ interface ConnectButtonStyle extends CSSProperties {
|
|
|
960
1073
|
"--cb-pill-font-family"?: string;
|
|
961
1074
|
"--cb-pill-font-size"?: string;
|
|
962
1075
|
"--cb-pill-font-weight"?: string | number;
|
|
1076
|
+
"--cb-pill-line-height"?: string | number;
|
|
963
1077
|
"--cb-pill-gap"?: string;
|
|
964
1078
|
"--cb-pill-icon-size"?: string;
|
|
965
1079
|
"--cb-pill-icon-placeholder-bg"?: string;
|
|
@@ -1012,6 +1126,14 @@ interface ConnectButtonProps {
|
|
|
1012
1126
|
onCopy?: () => void;
|
|
1013
1127
|
/** 지갑 변경 chevron 클릭 핸들러. 지정하지 않으면 chevron이 숨김 처리된다. */
|
|
1014
1128
|
onSelectWallet?: () => void;
|
|
1129
|
+
/** WalletInfo 기본 액션 row의 Buy 클릭 핸들러. */
|
|
1130
|
+
onBuy?: () => void;
|
|
1131
|
+
/**
|
|
1132
|
+
* Buy 카드를 시각적으로 비활성 상태로 표시하고, 사용자가 클릭하면 이 메시지를
|
|
1133
|
+
* 토스트로 띄운다. `onBuy`보다 우선. WalletInfoProps의 동일 prop으로 그대로
|
|
1134
|
+
* 전달된다.
|
|
1135
|
+
*/
|
|
1136
|
+
onBuyDisabledMessage?: string;
|
|
1015
1137
|
/**
|
|
1016
1138
|
* disconnected 버튼 라벨. 기본 'Connect Wallet'.
|
|
1017
1139
|
* 문자열 외에 ReactNode를 넘겨 아이콘-only / 커스텀 마크업을 렌더할 수 있다
|
|
@@ -1054,6 +1176,12 @@ interface ConnectButtonProps {
|
|
|
1054
1176
|
* Est. Tx Fee / Gas Limit / Max. Total Amount 행이 "—"로 표시된다.
|
|
1055
1177
|
*/
|
|
1056
1178
|
estimateGas?: EstimateGasFn;
|
|
1179
|
+
/**
|
|
1180
|
+
* Total Assets 카드 직후의 Receive / Send 콜백. (Buy는 위 onBuy로 정의됨.)
|
|
1181
|
+
* 각 콜백이 미주입이면 해당 카드는 비활성.
|
|
1182
|
+
*/
|
|
1183
|
+
onReceive?: () => void;
|
|
1184
|
+
onSend?: () => void;
|
|
1057
1185
|
}
|
|
1058
1186
|
|
|
1059
1187
|
/**
|
|
@@ -1068,7 +1196,7 @@ interface ConnectButtonProps {
|
|
|
1068
1196
|
* 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
|
|
1069
1197
|
* `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
|
|
1070
1198
|
*/
|
|
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;
|
|
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;
|
|
1072
1200
|
|
|
1073
1201
|
/**
|
|
1074
1202
|
* Wallet provider icons used by `ConnectButton`. Ported from
|
|
@@ -1154,4 +1282,4 @@ interface SkillsButtonProps {
|
|
|
1154
1282
|
declare const DEFAULT_SKILLS_HREF = "https://skills.cross.nexus";
|
|
1155
1283
|
declare function SkillsButton({ label, href, onClick, className, style, theme, disabled, isLoading, loadingLabel, openInNewTab, type, }: SkillsButtonProps): react_jsx_runtime.JSX.Element;
|
|
1156
1284
|
|
|
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,
|
|
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 };
|