@nexus-cross/dapp-ui 1.0.1 → 1.0.3-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/dist/index.d.cts CHANGED
@@ -126,6 +126,14 @@ interface SendTransactionArgs {
126
126
  gas?: bigint;
127
127
  }
128
128
  type SendTransactionFn = (args: SendTransactionArgs) => Promise<`0x${string}`>;
129
+ interface GetTransactionReceiptArgs {
130
+ hash: `0x${string}`;
131
+ chainId?: number;
132
+ }
133
+ interface TransactionReceiptResult {
134
+ status?: "success" | "reverted" | "0x1" | "0x0" | number | bigint | boolean;
135
+ }
136
+ type GetTransactionReceiptFn = (args: GetTransactionReceiptArgs) => Promise<TransactionReceiptResult | null | undefined>;
129
137
  interface PoolToken {
130
138
  address: string;
131
139
  symbol: string;
@@ -234,6 +242,44 @@ interface ForgeTokenDetail {
234
242
  available_supply: string;
235
243
  }
236
244
 
245
+ interface SendAsset {
246
+ name: string;
247
+ symbol: string;
248
+ chainId: number;
249
+ address: string;
250
+ quantity: {
251
+ decimals: number;
252
+ numeric: string;
253
+ };
254
+ icon_url: string;
255
+ }
256
+ type SendStatus = "idle" | "submitting" | "confirming" | "success" | "error";
257
+ interface RecentSendAddress {
258
+ address: `0x${string}`;
259
+ updatedAt: number;
260
+ }
261
+ interface SendAccount {
262
+ address: `0x${string}`;
263
+ index?: number;
264
+ name?: string;
265
+ }
266
+ interface SendPageProps {
267
+ env?: Environment;
268
+ theme?: Theme;
269
+ walletAddress: string;
270
+ accountName?: string;
271
+ accounts?: SendAccount[];
272
+ token: SendAsset;
273
+ tokens?: SendAsset[];
274
+ onTokenChange?: (token: SendAsset) => void;
275
+ sendTransaction?: SendTransactionFn;
276
+ getTransactionReceipt?: GetTransactionReceiptFn;
277
+ onSuccess?: (txHash: `0x${string}`) => void;
278
+ onConfirmSuccess?: () => void;
279
+ }
280
+
281
+ declare function SendPage({ env, theme, walletAddress, accounts, token, tokens, onTokenChange, sendTransaction, getTransactionReceipt, onSuccess, onConfirmSuccess, }: SendPageProps): react_jsx_runtime.JSX.Element;
282
+
237
283
  type DexMarket = "cross" | "crossd" | "forge";
238
284
 
239
285
  /**
@@ -333,6 +379,7 @@ interface WalletInfoProps {
333
379
  qrLogoSrc?: string;
334
380
  walletAddress: string;
335
381
  accountName?: string;
382
+ sendAccounts?: SendAccount[];
336
383
  /** 헤더 좌측에 표시될 프로필 이미지 URL. 미지정 시 주소 기반 그라디언트 아바타가 자동 생성됨. */
337
384
  profileImageUrl?: string;
338
385
  /** Resolves connectorName & connectorIconUrl from CONNECTOR_REGISTRY */
@@ -387,6 +434,7 @@ interface WalletInfoProps {
387
434
  * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다.
388
435
  */
389
436
  sendTransaction?: SendTransactionFn;
437
+ getTransactionReceipt?: GetTransactionReceiptFn;
390
438
  /**
391
439
  * Terms/Privacy · 포트폴리오 섹션 등 외부 링크 이동을 가로채는 콜백.
392
440
  * `(url, ctx) => newUrl | null | undefined | Promise<...>` 형태이며
@@ -400,7 +448,7 @@ interface WalletInfoProps {
400
448
  style?: WalletInfoStyle;
401
449
  children: React.ReactNode;
402
450
  }
403
- 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, onOutlink, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
451
+ 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;
404
452
  declare const WalletInfo: typeof WalletInfoRoot & {
405
453
  Trigger: typeof WalletInfoTrigger;
406
454
  Content: typeof WalletInfoContent;
@@ -803,6 +851,8 @@ interface ConnectButtonProps {
803
851
  providerName?: string;
804
852
  /** WalletInfo 헤더에 노출될 계정 라벨 (예: "Account 1", 사용자 지정 이름). */
805
853
  accountName?: string;
854
+ /** Send 주소록의 My Account 탭에 노출할 계정 목록. */
855
+ sendAccounts?: SendAccount[];
806
856
  /** disconnected 상태에서 버튼 클릭 핸들러. */
807
857
  onConnect?: () => void;
808
858
  /** connected 상태에서 WalletInfo 하단 Disconnect 클릭 핸들러. */
@@ -836,6 +886,7 @@ interface ConnectButtonProps {
836
886
  connectorId?: ConnectorId;
837
887
  style?: WalletInfoStyle;
838
888
  sendTransaction?: SendTransactionFn;
889
+ getTransactionReceipt?: GetTransactionReceiptFn;
839
890
  }
840
891
 
841
892
  /**
@@ -850,7 +901,7 @@ interface ConnectButtonProps {
850
901
  * 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
851
902
  * `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
852
903
  */
853
- 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;
904
+ 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, sendTransaction, getTransactionReceipt, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
854
905
 
855
906
  /**
856
907
  * Wallet provider icons used by `ConnectButton`. Ported from
@@ -872,4 +923,4 @@ declare const BINANCE_ICON: string;
872
923
  declare const GOOGLE_ICON: string;
873
924
  declare const APPLE_ICON: string;
874
925
 
875
- 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 OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, 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, resolveEnvironment, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
926
+ 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 GetTransactionReceiptArgs, type GetTransactionReceiptFn, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemUrl, METAMASK_ICON, type OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, type PreferredToken, type RecentSendAddress, type SendAccount, type SendAsset, SendPage, type SendPageProps, type SendStatus, type SendTransactionArgs, type SendTransactionFn, 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 };
package/dist/index.d.ts CHANGED
@@ -126,6 +126,14 @@ interface SendTransactionArgs {
126
126
  gas?: bigint;
127
127
  }
128
128
  type SendTransactionFn = (args: SendTransactionArgs) => Promise<`0x${string}`>;
129
+ interface GetTransactionReceiptArgs {
130
+ hash: `0x${string}`;
131
+ chainId?: number;
132
+ }
133
+ interface TransactionReceiptResult {
134
+ status?: "success" | "reverted" | "0x1" | "0x0" | number | bigint | boolean;
135
+ }
136
+ type GetTransactionReceiptFn = (args: GetTransactionReceiptArgs) => Promise<TransactionReceiptResult | null | undefined>;
129
137
  interface PoolToken {
130
138
  address: string;
131
139
  symbol: string;
@@ -234,6 +242,44 @@ interface ForgeTokenDetail {
234
242
  available_supply: string;
235
243
  }
236
244
 
245
+ interface SendAsset {
246
+ name: string;
247
+ symbol: string;
248
+ chainId: number;
249
+ address: string;
250
+ quantity: {
251
+ decimals: number;
252
+ numeric: string;
253
+ };
254
+ icon_url: string;
255
+ }
256
+ type SendStatus = "idle" | "submitting" | "confirming" | "success" | "error";
257
+ interface RecentSendAddress {
258
+ address: `0x${string}`;
259
+ updatedAt: number;
260
+ }
261
+ interface SendAccount {
262
+ address: `0x${string}`;
263
+ index?: number;
264
+ name?: string;
265
+ }
266
+ interface SendPageProps {
267
+ env?: Environment;
268
+ theme?: Theme;
269
+ walletAddress: string;
270
+ accountName?: string;
271
+ accounts?: SendAccount[];
272
+ token: SendAsset;
273
+ tokens?: SendAsset[];
274
+ onTokenChange?: (token: SendAsset) => void;
275
+ sendTransaction?: SendTransactionFn;
276
+ getTransactionReceipt?: GetTransactionReceiptFn;
277
+ onSuccess?: (txHash: `0x${string}`) => void;
278
+ onConfirmSuccess?: () => void;
279
+ }
280
+
281
+ declare function SendPage({ env, theme, walletAddress, accounts, token, tokens, onTokenChange, sendTransaction, getTransactionReceipt, onSuccess, onConfirmSuccess, }: SendPageProps): react_jsx_runtime.JSX.Element;
282
+
237
283
  type DexMarket = "cross" | "crossd" | "forge";
238
284
 
239
285
  /**
@@ -333,6 +379,7 @@ interface WalletInfoProps {
333
379
  qrLogoSrc?: string;
334
380
  walletAddress: string;
335
381
  accountName?: string;
382
+ sendAccounts?: SendAccount[];
336
383
  /** 헤더 좌측에 표시될 프로필 이미지 URL. 미지정 시 주소 기반 그라디언트 아바타가 자동 생성됨. */
337
384
  profileImageUrl?: string;
338
385
  /** Resolves connectorName & connectorIconUrl from CONNECTOR_REGISTRY */
@@ -387,6 +434,7 @@ interface WalletInfoProps {
387
434
  * wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다.
388
435
  */
389
436
  sendTransaction?: SendTransactionFn;
437
+ getTransactionReceipt?: GetTransactionReceiptFn;
390
438
  /**
391
439
  * Terms/Privacy · 포트폴리오 섹션 등 외부 링크 이동을 가로채는 콜백.
392
440
  * `(url, ctx) => newUrl | null | undefined | Promise<...>` 형태이며
@@ -400,7 +448,7 @@ interface WalletInfoProps {
400
448
  style?: WalletInfoStyle;
401
449
  children: React.ReactNode;
402
450
  }
403
- 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, onOutlink, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
451
+ 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;
404
452
  declare const WalletInfo: typeof WalletInfoRoot & {
405
453
  Trigger: typeof WalletInfoTrigger;
406
454
  Content: typeof WalletInfoContent;
@@ -803,6 +851,8 @@ interface ConnectButtonProps {
803
851
  providerName?: string;
804
852
  /** WalletInfo 헤더에 노출될 계정 라벨 (예: "Account 1", 사용자 지정 이름). */
805
853
  accountName?: string;
854
+ /** Send 주소록의 My Account 탭에 노출할 계정 목록. */
855
+ sendAccounts?: SendAccount[];
806
856
  /** disconnected 상태에서 버튼 클릭 핸들러. */
807
857
  onConnect?: () => void;
808
858
  /** connected 상태에서 WalletInfo 하단 Disconnect 클릭 핸들러. */
@@ -836,6 +886,7 @@ interface ConnectButtonProps {
836
886
  connectorId?: ConnectorId;
837
887
  style?: WalletInfoStyle;
838
888
  sendTransaction?: SendTransactionFn;
889
+ getTransactionReceipt?: GetTransactionReceiptFn;
839
890
  }
840
891
 
841
892
  /**
@@ -850,7 +901,7 @@ interface ConnectButtonProps {
850
901
  * 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
851
902
  * `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
852
903
  */
853
- 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;
904
+ 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, sendTransaction, getTransactionReceipt, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
854
905
 
855
906
  /**
856
907
  * Wallet provider icons used by `ConnectButton`. Ported from
@@ -872,4 +923,4 @@ declare const BINANCE_ICON: string;
872
923
  declare const GOOGLE_ICON: string;
873
924
  declare const APPLE_ICON: string;
874
925
 
875
- 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 OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, 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, resolveEnvironment, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
926
+ 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 GetTransactionReceiptArgs, type GetTransactionReceiptFn, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemUrl, METAMASK_ICON, type OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, type PreferredToken, type RecentSendAddress, type SendAccount, type SendAsset, SendPage, type SendPageProps, type SendStatus, type SendTransactionArgs, type SendTransactionFn, 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 };