@nexus-cross/dapp-ui 1.1.1-beta.1 → 1.1.1-beta.2
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 +15 -15
- package/dist/index.d.cts +43 -3
- package/dist/index.d.ts +43 -3
- package/dist/index.js +15 -15
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -134,6 +134,36 @@ interface TransactionReceiptResult {
|
|
|
134
134
|
status?: "success" | "reverted" | "0x1" | "0x0" | number | bigint | boolean;
|
|
135
135
|
}
|
|
136
136
|
type GetTransactionReceiptFn = (args: GetTransactionReceiptArgs) => Promise<TransactionReceiptResult | null | undefined>;
|
|
137
|
+
/**
|
|
138
|
+
* Send 확인 단계에서 표시할 가스/수수료 추정 정보를 가져오는 콜백.
|
|
139
|
+
*
|
|
140
|
+
* Send 확인 화면 표기 정책 (crossy-sdk-js `docs/06-gas-fee.md` 기준):
|
|
141
|
+
* - `maxFeePerGas` 채움 → Dynamic(EIP-1559) 모드로 표기
|
|
142
|
+
* · Est. Tx Fee = `gasLimit × maxFeePerGas` (native)
|
|
143
|
+
* · Max Priority Fee = `maxPriorityFeePerGas` (Gwei)
|
|
144
|
+
* · Max Gas Fee = `maxFeePerGas` (Gwei)
|
|
145
|
+
* · Gas Limit = `gasLimit`
|
|
146
|
+
* - `gasPrice`만 채움 → Legacy 모드로 표기
|
|
147
|
+
* · Est. Tx Fee = `gasLimit × gasPrice` (native)
|
|
148
|
+
* · Gas Price = `gasPrice` (Gwei)
|
|
149
|
+
* · Gas Limit = `gasLimit`
|
|
150
|
+
*
|
|
151
|
+
* 둘 다 채워지면 Dynamic 우선. 둘 다 비어있으면 해당 행은 "—"로 표시된다.
|
|
152
|
+
*/
|
|
153
|
+
interface EstimateGasArgs {
|
|
154
|
+
to: `0x${string}`;
|
|
155
|
+
value?: bigint;
|
|
156
|
+
data?: `0x${string}`;
|
|
157
|
+
chainId?: number;
|
|
158
|
+
from?: `0x${string}`;
|
|
159
|
+
}
|
|
160
|
+
interface GasEstimate {
|
|
161
|
+
gasLimit: bigint;
|
|
162
|
+
gasPrice?: bigint;
|
|
163
|
+
maxFeePerGas?: bigint;
|
|
164
|
+
maxPriorityFeePerGas?: bigint;
|
|
165
|
+
}
|
|
166
|
+
type EstimateGasFn = (args: EstimateGasArgs) => Promise<GasEstimate>;
|
|
137
167
|
interface PoolToken {
|
|
138
168
|
address: string;
|
|
139
169
|
symbol: string;
|
|
@@ -320,7 +350,7 @@ interface SendAsset {
|
|
|
320
350
|
};
|
|
321
351
|
icon_url: string;
|
|
322
352
|
}
|
|
323
|
-
type SendStatus = "idle" | "submitting" | "confirming" | "success" | "error";
|
|
353
|
+
type SendStatus = "idle" | "review" | "submitting" | "confirming" | "success" | "error";
|
|
324
354
|
interface RecentSendAddress {
|
|
325
355
|
address: `0x${string}`;
|
|
326
356
|
updatedAt: number;
|
|
@@ -341,12 +371,17 @@ interface SendPageProps {
|
|
|
341
371
|
onTokenChange?: (token: SendAsset) => void;
|
|
342
372
|
sendTransaction?: SendTransactionFn;
|
|
343
373
|
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
374
|
+
/**
|
|
375
|
+
* 확인 단계에서 표시할 가스/수수료 추정 함수. 주입되지 않으면 Gas/Est.Time/Max.Gas 행은 "—"로 표시된다.
|
|
376
|
+
* 사용자가 Send 버튼을 눌러 확인 화면에 진입할 때 한 번 호출된다.
|
|
377
|
+
*/
|
|
378
|
+
estimateGas?: EstimateGasFn;
|
|
344
379
|
onSuccess?: (txHash: `0x${string}`) => void;
|
|
345
380
|
onConfirmSuccess?: () => void;
|
|
346
381
|
onOutlink?: OnOutlink;
|
|
347
382
|
}
|
|
348
383
|
|
|
349
|
-
declare function SendPage({ env, theme, walletAddress, accounts, token, tokens, onTokenChange, sendTransaction, getTransactionReceipt, onSuccess, onConfirmSuccess, onOutlink, }: SendPageProps): react_jsx_runtime.JSX.Element;
|
|
384
|
+
declare function SendPage({ env, theme, walletAddress, accountName, accounts, token, tokens, onTokenChange, sendTransaction, getTransactionReceipt, estimateGas, onSuccess, onConfirmSuccess, onOutlink, }: SendPageProps): react_jsx_runtime.JSX.Element;
|
|
350
385
|
|
|
351
386
|
interface WalletInfoTriggerProps {
|
|
352
387
|
asChild?: boolean;
|
|
@@ -443,6 +478,11 @@ interface WalletInfoProps {
|
|
|
443
478
|
*/
|
|
444
479
|
sendTransaction?: SendTransactionFn;
|
|
445
480
|
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
481
|
+
/**
|
|
482
|
+
* Send 확인 단계에서 표시할 가스/수수료 추정 함수.
|
|
483
|
+
* 주입되지 않으면 확인 화면의 Gas/Est.Time/Max.Gas 행은 "—"로 표시된다.
|
|
484
|
+
*/
|
|
485
|
+
estimateGas?: EstimateGasFn;
|
|
446
486
|
/**
|
|
447
487
|
* Terms/Privacy · 포트폴리오 섹션 등 외부 링크 이동을 가로채는 콜백.
|
|
448
488
|
* `(url, ctx) => newUrl | null | undefined | Promise<...>` 형태이며
|
|
@@ -456,7 +496,7 @@ interface WalletInfoProps {
|
|
|
456
496
|
style?: WalletInfoStyle;
|
|
457
497
|
children: React.ReactNode;
|
|
458
498
|
}
|
|
459
|
-
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, onOutlink, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
|
|
499
|
+
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;
|
|
460
500
|
declare const WalletInfo: typeof WalletInfoRoot & {
|
|
461
501
|
Trigger: typeof WalletInfoTrigger;
|
|
462
502
|
Content: typeof WalletInfoContent;
|
package/dist/index.d.ts
CHANGED
|
@@ -134,6 +134,36 @@ interface TransactionReceiptResult {
|
|
|
134
134
|
status?: "success" | "reverted" | "0x1" | "0x0" | number | bigint | boolean;
|
|
135
135
|
}
|
|
136
136
|
type GetTransactionReceiptFn = (args: GetTransactionReceiptArgs) => Promise<TransactionReceiptResult | null | undefined>;
|
|
137
|
+
/**
|
|
138
|
+
* Send 확인 단계에서 표시할 가스/수수료 추정 정보를 가져오는 콜백.
|
|
139
|
+
*
|
|
140
|
+
* Send 확인 화면 표기 정책 (crossy-sdk-js `docs/06-gas-fee.md` 기준):
|
|
141
|
+
* - `maxFeePerGas` 채움 → Dynamic(EIP-1559) 모드로 표기
|
|
142
|
+
* · Est. Tx Fee = `gasLimit × maxFeePerGas` (native)
|
|
143
|
+
* · Max Priority Fee = `maxPriorityFeePerGas` (Gwei)
|
|
144
|
+
* · Max Gas Fee = `maxFeePerGas` (Gwei)
|
|
145
|
+
* · Gas Limit = `gasLimit`
|
|
146
|
+
* - `gasPrice`만 채움 → Legacy 모드로 표기
|
|
147
|
+
* · Est. Tx Fee = `gasLimit × gasPrice` (native)
|
|
148
|
+
* · Gas Price = `gasPrice` (Gwei)
|
|
149
|
+
* · Gas Limit = `gasLimit`
|
|
150
|
+
*
|
|
151
|
+
* 둘 다 채워지면 Dynamic 우선. 둘 다 비어있으면 해당 행은 "—"로 표시된다.
|
|
152
|
+
*/
|
|
153
|
+
interface EstimateGasArgs {
|
|
154
|
+
to: `0x${string}`;
|
|
155
|
+
value?: bigint;
|
|
156
|
+
data?: `0x${string}`;
|
|
157
|
+
chainId?: number;
|
|
158
|
+
from?: `0x${string}`;
|
|
159
|
+
}
|
|
160
|
+
interface GasEstimate {
|
|
161
|
+
gasLimit: bigint;
|
|
162
|
+
gasPrice?: bigint;
|
|
163
|
+
maxFeePerGas?: bigint;
|
|
164
|
+
maxPriorityFeePerGas?: bigint;
|
|
165
|
+
}
|
|
166
|
+
type EstimateGasFn = (args: EstimateGasArgs) => Promise<GasEstimate>;
|
|
137
167
|
interface PoolToken {
|
|
138
168
|
address: string;
|
|
139
169
|
symbol: string;
|
|
@@ -320,7 +350,7 @@ interface SendAsset {
|
|
|
320
350
|
};
|
|
321
351
|
icon_url: string;
|
|
322
352
|
}
|
|
323
|
-
type SendStatus = "idle" | "submitting" | "confirming" | "success" | "error";
|
|
353
|
+
type SendStatus = "idle" | "review" | "submitting" | "confirming" | "success" | "error";
|
|
324
354
|
interface RecentSendAddress {
|
|
325
355
|
address: `0x${string}`;
|
|
326
356
|
updatedAt: number;
|
|
@@ -341,12 +371,17 @@ interface SendPageProps {
|
|
|
341
371
|
onTokenChange?: (token: SendAsset) => void;
|
|
342
372
|
sendTransaction?: SendTransactionFn;
|
|
343
373
|
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
374
|
+
/**
|
|
375
|
+
* 확인 단계에서 표시할 가스/수수료 추정 함수. 주입되지 않으면 Gas/Est.Time/Max.Gas 행은 "—"로 표시된다.
|
|
376
|
+
* 사용자가 Send 버튼을 눌러 확인 화면에 진입할 때 한 번 호출된다.
|
|
377
|
+
*/
|
|
378
|
+
estimateGas?: EstimateGasFn;
|
|
344
379
|
onSuccess?: (txHash: `0x${string}`) => void;
|
|
345
380
|
onConfirmSuccess?: () => void;
|
|
346
381
|
onOutlink?: OnOutlink;
|
|
347
382
|
}
|
|
348
383
|
|
|
349
|
-
declare function SendPage({ env, theme, walletAddress, accounts, token, tokens, onTokenChange, sendTransaction, getTransactionReceipt, onSuccess, onConfirmSuccess, onOutlink, }: SendPageProps): react_jsx_runtime.JSX.Element;
|
|
384
|
+
declare function SendPage({ env, theme, walletAddress, accountName, accounts, token, tokens, onTokenChange, sendTransaction, getTransactionReceipt, estimateGas, onSuccess, onConfirmSuccess, onOutlink, }: SendPageProps): react_jsx_runtime.JSX.Element;
|
|
350
385
|
|
|
351
386
|
interface WalletInfoTriggerProps {
|
|
352
387
|
asChild?: boolean;
|
|
@@ -443,6 +478,11 @@ interface WalletInfoProps {
|
|
|
443
478
|
*/
|
|
444
479
|
sendTransaction?: SendTransactionFn;
|
|
445
480
|
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
481
|
+
/**
|
|
482
|
+
* Send 확인 단계에서 표시할 가스/수수료 추정 함수.
|
|
483
|
+
* 주입되지 않으면 확인 화면의 Gas/Est.Time/Max.Gas 행은 "—"로 표시된다.
|
|
484
|
+
*/
|
|
485
|
+
estimateGas?: EstimateGasFn;
|
|
446
486
|
/**
|
|
447
487
|
* Terms/Privacy · 포트폴리오 섹션 등 외부 링크 이동을 가로채는 콜백.
|
|
448
488
|
* `(url, ctx) => newUrl | null | undefined | Promise<...>` 형태이며
|
|
@@ -456,7 +496,7 @@ interface WalletInfoProps {
|
|
|
456
496
|
style?: WalletInfoStyle;
|
|
457
497
|
children: React.ReactNode;
|
|
458
498
|
}
|
|
459
|
-
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, onOutlink, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
|
|
499
|
+
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;
|
|
460
500
|
declare const WalletInfo: typeof WalletInfoRoot & {
|
|
461
501
|
Trigger: typeof WalletInfoTrigger;
|
|
462
502
|
Content: typeof WalletInfoContent;
|