@tuwaio/nova-connect 0.1.1 → 0.1.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.
Files changed (62) hide show
  1. package/dist/ToastError-CSlbvXKT.d.cts +106 -0
  2. package/dist/ToastError-CSlbvXKT.d.ts +106 -0
  3. package/dist/chunk-A2677K5M.cjs +2 -0
  4. package/dist/chunk-A2677K5M.cjs.map +1 -0
  5. package/dist/chunk-LF6FTUUQ.js +2 -0
  6. package/dist/chunk-LF6FTUUQ.js.map +1 -0
  7. package/dist/chunk-MPEJHQKC.js +2 -0
  8. package/dist/chunk-MPEJHQKC.js.map +1 -0
  9. package/dist/{chunk-FNWARYJY.js → chunk-MQGDTFY7.js} +2 -2
  10. package/dist/{chunk-FNWARYJY.js.map → chunk-MQGDTFY7.js.map} +1 -1
  11. package/dist/{chunk-6S5OTERL.cjs → chunk-NMQZA377.cjs} +2 -2
  12. package/dist/{chunk-6S5OTERL.cjs.map → chunk-NMQZA377.cjs.map} +1 -1
  13. package/dist/chunk-OA6MB7CZ.cjs +2 -0
  14. package/dist/chunk-OA6MB7CZ.cjs.map +1 -0
  15. package/dist/chunk-QERPNHKX.cjs +2 -0
  16. package/dist/chunk-QERPNHKX.cjs.map +1 -0
  17. package/dist/chunk-RUYOUU6Q.cjs +6 -0
  18. package/dist/chunk-RUYOUU6Q.cjs.map +1 -0
  19. package/dist/chunk-TAV7EL23.js +2 -0
  20. package/dist/chunk-TAV7EL23.js.map +1 -0
  21. package/dist/chunk-Z2NDRIEI.js +6 -0
  22. package/dist/chunk-Z2NDRIEI.js.map +1 -0
  23. package/dist/components/index.cjs +2 -0
  24. package/dist/components/index.cjs.map +1 -0
  25. package/dist/components/index.d.cts +6430 -0
  26. package/dist/components/index.d.ts +6430 -0
  27. package/dist/components/index.js +2 -0
  28. package/dist/components/index.js.map +1 -0
  29. package/dist/getChainsListByWalletType-CDPECVNS.cjs +2 -0
  30. package/dist/{getChainsListByWalletType-ZU7OPWTP.cjs.map → getChainsListByWalletType-CDPECVNS.cjs.map} +1 -1
  31. package/dist/{getChainsListByWalletType-EO6A7Q5A.js → getChainsListByWalletType-VMQ4BO2B.js} +2 -2
  32. package/dist/{getChainsListByWalletType-EO6A7Q5A.js.map → getChainsListByWalletType-VMQ4BO2B.js.map} +1 -1
  33. package/dist/hooks/index.cjs +2 -0
  34. package/dist/hooks/index.cjs.map +1 -0
  35. package/dist/hooks/index.d.cts +70 -0
  36. package/dist/hooks/index.d.ts +70 -0
  37. package/dist/hooks/index.js +2 -0
  38. package/dist/hooks/index.js.map +1 -0
  39. package/dist/i18n/index.cjs +2 -0
  40. package/dist/i18n/index.cjs.map +1 -0
  41. package/dist/i18n/index.d.cts +15 -0
  42. package/dist/i18n/index.d.ts +15 -0
  43. package/dist/i18n/index.js +2 -0
  44. package/dist/i18n/index.js.map +1 -0
  45. package/dist/index.cjs +1 -5
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.d.cts +13 -7009
  48. package/dist/index.d.ts +13 -7009
  49. package/dist/index.js +1 -5
  50. package/dist/index.js.map +1 -1
  51. package/dist/satellite/index.cjs +2 -0
  52. package/dist/satellite/index.cjs.map +1 -0
  53. package/dist/satellite/index.d.cts +1 -0
  54. package/dist/satellite/index.d.ts +1 -0
  55. package/dist/satellite/index.js +2 -0
  56. package/dist/satellite/index.js.map +1 -0
  57. package/dist/types-D4Vti05g.d.cts +98 -0
  58. package/dist/types-D4Vti05g.d.ts +98 -0
  59. package/dist/useWalletNativeBalance-6RVzdGvM.d.ts +312 -0
  60. package/dist/useWalletNativeBalance-D8Ehciju.d.cts +312 -0
  61. package/package.json +21 -1
  62. package/dist/getChainsListByWalletType-ZU7OPWTP.cjs +0 -2
@@ -0,0 +1,2 @@
1
+ export{y as AboutWallets,a as ChainListRenderer,p as ChainSelector,M as ConnectButton,B as ConnectCard,K as ConnectedContent,x as ConnectedModal,q as ConnectedModalFooter,v as ConnectedModalMainContent,s as ConnectedModalNameAndBalance,w as ConnectedModalTxHistory,z as Connecting,C as ConnectorsBlock,E as ConnectorsSelections,D as Disclaimer,F as GetWallet,u as IconButton,G as ImpersonateForm,H as NetworkSelections,I as NetworkTabs,A as RecentBadge,o as ScrollableChainList,n as SelectContentAnimated,J as StatusIcon,l as ToBottomButton,m as ToTopButton,N as ToastError,L as WaitForConnectionContent,r as WalletAvatar,t as WalletIcon}from'../chunk-Z2NDRIEI.js';import'../chunk-MQGDTFY7.js';import'../chunk-LF6FTUUQ.js';import'../chunk-TAV7EL23.js';import'../chunk-MPEJHQKC.js';//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkNMQZA377_cjs=require('./chunk-NMQZA377.cjs');Object.defineProperty(exports,"getAdapterStatus",{enumerable:true,get:function(){return chunkNMQZA377_cjs.k}});Object.defineProperty(exports,"getAllAdaptersStatus",{enumerable:true,get:function(){return chunkNMQZA377_cjs.l}});Object.defineProperty(exports,"getAvailableSolanaClusters",{enumerable:true,get:function(){return chunkNMQZA377_cjs.g}});Object.defineProperty(exports,"getChainsListByWalletType",{enumerable:true,get:function(){return chunkNMQZA377_cjs.a}});Object.defineProperty(exports,"getChainsListByWalletTypeSync",{enumerable:true,get:function(){return chunkNMQZA377_cjs.b}});Object.defineProperty(exports,"getWalletChains",{enumerable:true,get:function(){return chunkNMQZA377_cjs.i}});Object.defineProperty(exports,"isEvmChainList",{enumerable:true,get:function(){return chunkNMQZA377_cjs.c}});Object.defineProperty(exports,"isEvmChainListSync",{enumerable:true,get:function(){return chunkNMQZA377_cjs.e}});Object.defineProperty(exports,"isSolanaChainList",{enumerable:true,get:function(){return chunkNMQZA377_cjs.d}});Object.defineProperty(exports,"isSolanaChainListSync",{enumerable:true,get:function(){return chunkNMQZA377_cjs.f}});Object.defineProperty(exports,"isValidSolanaCluster",{enumerable:true,get:function(){return chunkNMQZA377_cjs.h}});Object.defineProperty(exports,"preloadChainAdapters",{enumerable:true,get:function(){return chunkNMQZA377_cjs.j}});//# sourceMappingURL=getChainsListByWalletType-CDPECVNS.cjs.map
2
+ //# sourceMappingURL=getChainsListByWalletType-CDPECVNS.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"getChainsListByWalletType-ZU7OPWTP.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"getChainsListByWalletType-CDPECVNS.cjs"}
@@ -1,2 +1,2 @@
1
- export{k as getAdapterStatus,l as getAllAdaptersStatus,g as getAvailableSolanaClusters,a as getChainsListByWalletType,b as getChainsListByWalletTypeSync,i as getWalletChains,c as isEvmChainList,e as isEvmChainListSync,d as isSolanaChainList,f as isSolanaChainListSync,h as isValidSolanaCluster,j as preloadChainAdapters}from'./chunk-FNWARYJY.js';//# sourceMappingURL=getChainsListByWalletType-EO6A7Q5A.js.map
2
- //# sourceMappingURL=getChainsListByWalletType-EO6A7Q5A.js.map
1
+ export{k as getAdapterStatus,l as getAllAdaptersStatus,g as getAvailableSolanaClusters,a as getChainsListByWalletType,b as getChainsListByWalletTypeSync,i as getWalletChains,c as isEvmChainList,e as isEvmChainListSync,d as isSolanaChainList,f as isSolanaChainListSync,h as isValidSolanaCluster,j as preloadChainAdapters}from'./chunk-MQGDTFY7.js';//# sourceMappingURL=getChainsListByWalletType-VMQ4BO2B.js.map
2
+ //# sourceMappingURL=getChainsListByWalletType-VMQ4BO2B.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"getChainsListByWalletType-EO6A7Q5A.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"getChainsListByWalletType-VMQ4BO2B.js"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkA2677K5M_cjs=require('../chunk-A2677K5M.cjs');require('../chunk-QERPNHKX.cjs'),require('../chunk-OA6MB7CZ.cjs');Object.defineProperty(exports,"NovaConnectLabelsContext",{enumerable:true,get:function(){return chunkA2677K5M_cjs.g}});Object.defineProperty(exports,"NovaConnectProviderContext",{enumerable:true,get:function(){return chunkA2677K5M_cjs.c}});Object.defineProperty(exports,"NovaConnectProviderError",{enumerable:true,get:function(){return chunkA2677K5M_cjs.b}});Object.defineProperty(exports,"createLabelsSubset",{enumerable:true,get:function(){return chunkA2677K5M_cjs.o}});Object.defineProperty(exports,"getLabelWithFallback",{enumerable:true,get:function(){return chunkA2677K5M_cjs.n}});Object.defineProperty(exports,"hasLabel",{enumerable:true,get:function(){return chunkA2677K5M_cjs.k}});Object.defineProperty(exports,"isDefaultLabels",{enumerable:true,get:function(){return chunkA2677K5M_cjs.m}});Object.defineProperty(exports,"useGetWalletNameAndAvatar",{enumerable:true,get:function(){return chunkA2677K5M_cjs.a}});Object.defineProperty(exports,"useHasNovaConnectContext",{enumerable:true,get:function(){return chunkA2677K5M_cjs.e}});Object.defineProperty(exports,"useLabelsByCategory",{enumerable:true,get:function(){return chunkA2677K5M_cjs.l}});Object.defineProperty(exports,"useNovaConnect",{enumerable:true,get:function(){return chunkA2677K5M_cjs.d}});Object.defineProperty(exports,"useNovaConnectLabel",{enumerable:true,get:function(){return chunkA2677K5M_cjs.i}});Object.defineProperty(exports,"useNovaConnectLabels",{enumerable:true,get:function(){return chunkA2677K5M_cjs.h}});Object.defineProperty(exports,"useNovaConnectLabelsSubset",{enumerable:true,get:function(){return chunkA2677K5M_cjs.j}});Object.defineProperty(exports,"useNovaConnectOptional",{enumerable:true,get:function(){return chunkA2677K5M_cjs.f}});Object.defineProperty(exports,"useWalletNativeBalance",{enumerable:true,get:function(){return chunkA2677K5M_cjs.p}});//# sourceMappingURL=index.cjs.map
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,70 @@
1
+ export { B as ButtonTxStatus, C as ConnectContentType, a as ConnectedContentType, L as LabelCategory, p as NativeBalanceResult, g as NovaConnectLabelsContext, d as NovaConnectProviderContext, c as NovaConnectProviderError, b as NovaConnectProviderProps, N as NovaConnectProviderType, W as WalletBalance, o as createLabelsSubset, n as getLabelWithFallback, k as hasLabel, m as isDefaultLabels, e as useHasNovaConnectContext, l as useLabelsByCategory, u as useNovaConnect, i as useNovaConnectLabel, h as useNovaConnectLabels, j as useNovaConnectLabelsSubset, f as useNovaConnectOptional, q as useWalletNativeBalance } from '../useWalletNativeBalance-D8Ehciju.cjs';
2
+ import 'react';
3
+ import '@tuwaio/orbit-core';
4
+ import '../types-D4Vti05g.cjs';
5
+
6
+ interface WalletNameAndAvatarData {
7
+ /** The resolved name from the Name Service (e.g., ENS, like "alice.eth"), or null if not found. */
8
+ ensName: string | null;
9
+ /** The URL of the avatar associated with the name, or null if not found. */
10
+ ensAvatar: string | null;
11
+ /** True while the name service data is being fetched. */
12
+ isLoading: boolean;
13
+ /** A truncated version of the name for display, or the abbreviated address if no name. */
14
+ ensNameAbbreviated: string | undefined;
15
+ /** Error message if the name resolution failed. */
16
+ error: string | null;
17
+ /** Function to retry the name resolution manually. */
18
+ retry: () => void;
19
+ }
20
+ interface UseGetWalletNameAndAvatarOptions {
21
+ /** Number of characters to show on each side when abbreviating (default: 12) */
22
+ abbreviateSymbols?: number;
23
+ /** Maximum length before abbreviation is applied (default: 30) */
24
+ maxNameLength?: number;
25
+ /** Whether to automatically retry on failure (default: false) */
26
+ autoRetry?: boolean;
27
+ /** Retry delay in milliseconds (default: 3000) */
28
+ retryDelay?: number;
29
+ }
30
+ /**
31
+ * A custom hook to fetch the Name Service (e.g., ENS) name and avatar
32
+ * for the currently active wallet.
33
+ *
34
+ * This hook automatically detects the active wallet and its corresponding
35
+ * adapter via the `useSatelliteConnectStore` and attempts to resolve the
36
+ * wallet address to a human-readable name and avatar.
37
+ *
38
+ * @param options Configuration options for the hook
39
+ * @returns An object containing the resolved name, avatar, loading state, and utility functions
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * import { useGetWalletNameAndAvatar } from './useGetWalletNameAndAvatar';
44
+ *
45
+ * function DisplayWalletInfo() {
46
+ * const { ensName, ensAvatar, isLoading, ensNameAbbreviated, error, retry } = useGetWalletNameAndAvatar({
47
+ * abbreviateSymbols: 8,
48
+ * maxNameLength: 25
49
+ * });
50
+ *
51
+ * if (isLoading) {
52
+ * return <div>Resolving name...</div>;
53
+ * }
54
+ *
55
+ * if (error) {
56
+ * return <div>Error: {error} <button onClick={retry}>Retry</button></div>;
57
+ * }
58
+ *
59
+ * return (
60
+ * <div className="wallet-info">
61
+ * {ensAvatar && <img src={ensAvatar} alt="Wallet Avatar" />}
62
+ * <p title={ensName || ''}>{ensNameAbbreviated || 'No Name Found'}</p>
63
+ * </div>
64
+ * );
65
+ * }
66
+ * ```
67
+ */
68
+ declare function useGetWalletNameAndAvatar(options: UseGetWalletNameAndAvatarOptions): WalletNameAndAvatarData;
69
+
70
+ export { type WalletNameAndAvatarData, useGetWalletNameAndAvatar };
@@ -0,0 +1,70 @@
1
+ export { B as ButtonTxStatus, C as ConnectContentType, a as ConnectedContentType, L as LabelCategory, p as NativeBalanceResult, g as NovaConnectLabelsContext, d as NovaConnectProviderContext, c as NovaConnectProviderError, b as NovaConnectProviderProps, N as NovaConnectProviderType, W as WalletBalance, o as createLabelsSubset, n as getLabelWithFallback, k as hasLabel, m as isDefaultLabels, e as useHasNovaConnectContext, l as useLabelsByCategory, u as useNovaConnect, i as useNovaConnectLabel, h as useNovaConnectLabels, j as useNovaConnectLabelsSubset, f as useNovaConnectOptional, q as useWalletNativeBalance } from '../useWalletNativeBalance-6RVzdGvM.js';
2
+ import 'react';
3
+ import '@tuwaio/orbit-core';
4
+ import '../types-D4Vti05g.js';
5
+
6
+ interface WalletNameAndAvatarData {
7
+ /** The resolved name from the Name Service (e.g., ENS, like "alice.eth"), or null if not found. */
8
+ ensName: string | null;
9
+ /** The URL of the avatar associated with the name, or null if not found. */
10
+ ensAvatar: string | null;
11
+ /** True while the name service data is being fetched. */
12
+ isLoading: boolean;
13
+ /** A truncated version of the name for display, or the abbreviated address if no name. */
14
+ ensNameAbbreviated: string | undefined;
15
+ /** Error message if the name resolution failed. */
16
+ error: string | null;
17
+ /** Function to retry the name resolution manually. */
18
+ retry: () => void;
19
+ }
20
+ interface UseGetWalletNameAndAvatarOptions {
21
+ /** Number of characters to show on each side when abbreviating (default: 12) */
22
+ abbreviateSymbols?: number;
23
+ /** Maximum length before abbreviation is applied (default: 30) */
24
+ maxNameLength?: number;
25
+ /** Whether to automatically retry on failure (default: false) */
26
+ autoRetry?: boolean;
27
+ /** Retry delay in milliseconds (default: 3000) */
28
+ retryDelay?: number;
29
+ }
30
+ /**
31
+ * A custom hook to fetch the Name Service (e.g., ENS) name and avatar
32
+ * for the currently active wallet.
33
+ *
34
+ * This hook automatically detects the active wallet and its corresponding
35
+ * adapter via the `useSatelliteConnectStore` and attempts to resolve the
36
+ * wallet address to a human-readable name and avatar.
37
+ *
38
+ * @param options Configuration options for the hook
39
+ * @returns An object containing the resolved name, avatar, loading state, and utility functions
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * import { useGetWalletNameAndAvatar } from './useGetWalletNameAndAvatar';
44
+ *
45
+ * function DisplayWalletInfo() {
46
+ * const { ensName, ensAvatar, isLoading, ensNameAbbreviated, error, retry } = useGetWalletNameAndAvatar({
47
+ * abbreviateSymbols: 8,
48
+ * maxNameLength: 25
49
+ * });
50
+ *
51
+ * if (isLoading) {
52
+ * return <div>Resolving name...</div>;
53
+ * }
54
+ *
55
+ * if (error) {
56
+ * return <div>Error: {error} <button onClick={retry}>Retry</button></div>;
57
+ * }
58
+ *
59
+ * return (
60
+ * <div className="wallet-info">
61
+ * {ensAvatar && <img src={ensAvatar} alt="Wallet Avatar" />}
62
+ * <p title={ensName || ''}>{ensNameAbbreviated || 'No Name Found'}</p>
63
+ * </div>
64
+ * );
65
+ * }
66
+ * ```
67
+ */
68
+ declare function useGetWalletNameAndAvatar(options: UseGetWalletNameAndAvatarOptions): WalletNameAndAvatarData;
69
+
70
+ export { type WalletNameAndAvatarData, useGetWalletNameAndAvatar };
@@ -0,0 +1,2 @@
1
+ export{g as NovaConnectLabelsContext,c as NovaConnectProviderContext,b as NovaConnectProviderError,o as createLabelsSubset,n as getLabelWithFallback,k as hasLabel,m as isDefaultLabels,a as useGetWalletNameAndAvatar,e as useHasNovaConnectContext,l as useLabelsByCategory,d as useNovaConnect,i as useNovaConnectLabel,h as useNovaConnectLabels,j as useNovaConnectLabelsSubset,f as useNovaConnectOptional,p as useWalletNativeBalance}from'../chunk-LF6FTUUQ.js';import'../chunk-TAV7EL23.js';import'../chunk-MPEJHQKC.js';//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkQERPNHKX_cjs=require('../chunk-QERPNHKX.cjs');Object.defineProperty(exports,"defaultLabels",{enumerable:true,get:function(){return chunkQERPNHKX_cjs.a}});Object.defineProperty(exports,"ukrainianLabels",{enumerable:true,get:function(){return chunkQERPNHKX_cjs.b}});//# sourceMappingURL=index.cjs.map
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,15 @@
1
+ import { N as NovaConnectLabels } from '../types-D4Vti05g.cjs';
2
+
3
+ /**
4
+ * Default English translations for NovaConnect component
5
+ * All text strings extracted from component files
6
+ */
7
+ declare const defaultLabels: NovaConnectLabels;
8
+
9
+ /**
10
+ * Українські переклади для компонента NovaConnect
11
+ * Всі текстові рядки витягнуті з файлів компонентів
12
+ */
13
+ declare const ukrainianLabels: NovaConnectLabels;
14
+
15
+ export { NovaConnectLabels, defaultLabels, ukrainianLabels };
@@ -0,0 +1,15 @@
1
+ import { N as NovaConnectLabels } from '../types-D4Vti05g.js';
2
+
3
+ /**
4
+ * Default English translations for NovaConnect component
5
+ * All text strings extracted from component files
6
+ */
7
+ declare const defaultLabels: NovaConnectLabels;
8
+
9
+ /**
10
+ * Українські переклади для компонента NovaConnect
11
+ * Всі текстові рядки витягнуті з файлів компонентів
12
+ */
13
+ declare const ukrainianLabels: NovaConnectLabels;
14
+
15
+ export { NovaConnectLabels, defaultLabels, ukrainianLabels };
@@ -0,0 +1,2 @@
1
+ export{a as defaultLabels,b as ukrainianLabels}from'../chunk-TAV7EL23.js';//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}