@solana/connector 0.1.9 → 0.2.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.
Files changed (62) hide show
  1. package/README.md +403 -50
  2. package/dist/chunk-4KD6HQQG.js +69 -0
  3. package/dist/chunk-4KD6HQQG.js.map +1 -0
  4. package/dist/chunk-BJAVJQLK.js +230 -0
  5. package/dist/chunk-BJAVJQLK.js.map +1 -0
  6. package/dist/{chunk-5HRJKCIL.js → chunk-BZ2VBJCZ.js} +1061 -424
  7. package/dist/chunk-BZ2VBJCZ.js.map +1 -0
  8. package/dist/{chunk-WDXEP4AJ.js → chunk-EM4KNOKG.js} +658 -190
  9. package/dist/chunk-EM4KNOKG.js.map +1 -0
  10. package/dist/chunk-HN5AJF7F.js +507 -0
  11. package/dist/chunk-HN5AJF7F.js.map +1 -0
  12. package/dist/chunk-HO6QNKFM.mjs +61 -0
  13. package/dist/chunk-HO6QNKFM.mjs.map +1 -0
  14. package/dist/chunk-HPQ5T32K.mjs +178 -0
  15. package/dist/chunk-HPQ5T32K.mjs.map +1 -0
  16. package/dist/{chunk-MAXA3HEP.mjs → chunk-IDTUFDNB.mjs} +962 -344
  17. package/dist/chunk-IDTUFDNB.mjs.map +1 -0
  18. package/dist/{chunk-P5LXUDP6.mjs → chunk-RTXUS5KG.mjs} +579 -119
  19. package/dist/chunk-RTXUS5KG.mjs.map +1 -0
  20. package/dist/{chunk-DSUCH44G.js → chunk-SITQ4JWM.js} +23 -67
  21. package/dist/chunk-SITQ4JWM.js.map +1 -0
  22. package/dist/chunk-UCISIAOG.mjs +501 -0
  23. package/dist/chunk-UCISIAOG.mjs.map +1 -0
  24. package/dist/{chunk-J7DHGLW6.mjs → chunk-ZZTY3O4N.mjs} +21 -61
  25. package/dist/chunk-ZZTY3O4N.mjs.map +1 -0
  26. package/dist/compat.d.mts +1 -1
  27. package/dist/compat.d.ts +1 -1
  28. package/dist/compat.js +10 -9
  29. package/dist/compat.js.map +1 -1
  30. package/dist/compat.mjs +2 -1
  31. package/dist/compat.mjs.map +1 -1
  32. package/dist/headless.d.mts +239 -104
  33. package/dist/headless.d.ts +239 -104
  34. package/dist/headless.js +255 -169
  35. package/dist/headless.mjs +5 -3
  36. package/dist/index.d.mts +4 -4
  37. package/dist/index.d.ts +4 -4
  38. package/dist/index.js +316 -206
  39. package/dist/index.mjs +6 -4
  40. package/dist/react.d.mts +299 -9
  41. package/dist/react.d.ts +299 -9
  42. package/dist/react.js +90 -38
  43. package/dist/react.mjs +2 -2
  44. package/dist/{standard-shim-CT49DM5l.d.mts → standard-shim-CGB88PPO.d.mts} +673 -52
  45. package/dist/{standard-shim-D9guL5fz.d.ts → standard-shim-tmnQelaJ.d.ts} +673 -52
  46. package/dist/{transaction-signer-T-KVQFi8.d.mts → transaction-signer-7NaYmP5w.d.mts} +1 -0
  47. package/dist/{transaction-signer-T-KVQFi8.d.ts → transaction-signer-7NaYmP5w.d.ts} +1 -0
  48. package/dist/walletconnect-447EY3OJ.js +28 -0
  49. package/dist/walletconnect-447EY3OJ.js.map +1 -0
  50. package/dist/walletconnect-U455PO4I.mjs +3 -0
  51. package/dist/walletconnect-U455PO4I.mjs.map +1 -0
  52. package/package.json +6 -2
  53. package/dist/chunk-5HRJKCIL.js.map +0 -1
  54. package/dist/chunk-DSUCH44G.js.map +0 -1
  55. package/dist/chunk-I6TJLYNA.js +0 -535
  56. package/dist/chunk-I6TJLYNA.js.map +0 -1
  57. package/dist/chunk-J7DHGLW6.mjs.map +0 -1
  58. package/dist/chunk-JOBLG62A.mjs +0 -476
  59. package/dist/chunk-JOBLG62A.mjs.map +0 -1
  60. package/dist/chunk-MAXA3HEP.mjs.map +0 -1
  61. package/dist/chunk-P5LXUDP6.mjs.map +0 -1
  62. package/dist/chunk-WDXEP4AJ.js.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,6 +1,8 @@
1
- export { EnhancedStorage, EnhancedStorageAdapter, SOLANA_CHAIN_IDS, address, chainIdToClusterId, chainIdToClusterType, clusterToChainId, copySignature, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createSignableMessage, createSolanaDevnet, createSolanaLocalnet, createSolanaMainnet, createSolanaTestnet, formatSignature, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getDefaultConfig, getDefaultMobileConfig, getLatestBlockhash, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, isAccountAddress, isKitConnection, isKnownSolanaChain, isLegacyConnection, isSolanaChain, isWalletName, parseConfigOptions, sendRawTransaction, validateConfigOptions, validateKnownSolanaChain } from './chunk-JOBLG62A.mjs';
2
- export { AccountElement, AppProvider, BalanceElement, ClusterElement, ConnectorProvider, DisconnectElement, SkeletonShine, TokenListElement, TransactionHistoryElement, UnifiedProvider, WalletListElement, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useConnector, useConnectorClient, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWalletInfo } from './chunk-P5LXUDP6.mjs';
3
- export { ClipboardErrorType, ConnectorClient, ConnectorErrorBoundary, PUBLIC_RPC_ENDPOINTS, TransactionSignerError, WalletErrorType, copyAddressToClipboard, copySignatureToClipboard, copyToClipboard, createGillTransactionSigner, createKitTransactionSigner, createTransactionSigner, formatAddress, formatBigIntBalance, formatBigIntUsd, formatLamportsToSolSafe, formatNumber, formatSOL, formatTokenAmount, formatTokenBalanceSafe, getAddressUrl, getBlockUrl, getChainIdForWalletStandard, getClusterChainId, getClusterExplorerUrl, getClusterName, getClusterRpcUrl, getClusterType, getDefaultRpcUrl, getNetworkDisplayName, getPolyfillStatus, getTokenUrl, getTransactionUrl, getWalletsRegistry, installPolyfills, isClipboardAvailable, isCryptoAvailable, isDevnet, isDevnetCluster, isLocalCluster, isLocalnet, isMainnet, isMainnetCluster, isPolyfillInstalled, isTestnet, isTestnetCluster, isTransactionSignerError, normalizeNetwork, ready, toClusterId, truncate, withErrorBoundary } from './chunk-MAXA3HEP.mjs';
4
- export { ConfigurationError, ConnectionError, ConnectorError, Errors, LAMPORTS_PER_SOL, NetworkError, TransactionError, ValidationError, base58ToSignatureBytes, createKitSignersFromWallet, createMessageSignerFromWallet, createSolanaClient, createTransactionSendingSignerFromWallet, detectMessageModification, freezeSigner, getExplorerLink, getPublicSolanaRpcUrl, getUserFriendlyMessage, isConfigurationError, isConnectionError, isConnectorError, isFailure, isNetworkError, isSuccess, isTransactionError, isValidationError, lamportsToSol, prepareTransaction, signatureBytesToBase58, solToLamports, toConnectorError, tryCatch, tryCatchSync, updateSignatureDictionary } from './chunk-J7DHGLW6.mjs';
1
+ export { SOLANA_CHAIN_IDS, address, chainIdToClusterId, chainIdToClusterType, clusterToChainId, copySignature, createSignableMessage, createSolanaDevnet, createSolanaLocalnet, createSolanaMainnet, createSolanaTestnet, formatSignature, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getLatestBlockhash, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, isAccountAddress, isKitConnection, isKnownSolanaChain, isLegacyConnection, isSolanaChain, isWalletName, sendRawTransaction, validateKnownSolanaChain } from './chunk-HPQ5T32K.mjs';
2
+ export { AccountElement, AppProvider, BalanceElement, ClusterElement, ConnectorErrorBoundary, ConnectorProvider, DisconnectElement, SkeletonShine, TokenListElement, TransactionHistoryElement, UnifiedProvider, WalletConnectProvider, WalletListElement, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useConnectWallet, useConnector, useConnectorClient, useDisconnectWallet, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWallet, useWalletConnectUri, useWalletConnectors, useWalletInfo, withErrorBoundary } from './chunk-RTXUS5KG.mjs';
3
+ export { ClipboardErrorType, ConnectorClient, EnhancedStorage, EnhancedStorageAdapter, INITIAL_WALLET_STATUS, PUBLIC_RPC_ENDPOINTS, TransactionSignerError, WALLET_STATE_VERSION, clearWalletState, copyAddressToClipboard, copySignatureToClipboard, copyToClipboard, createConnectorId, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createEnhancedStorageWalletState, createGillTransactionSigner, createKitTransactionSigner, createTransactionSigner, formatAddress, formatBigIntBalance, formatBigIntUsd, formatLamportsToSolSafe, formatNumber, formatSOL, formatTokenAmount, formatTokenBalanceSafe, getAddressUrl, getBlockUrl, getChainIdForWalletStandard, getClusterChainId, getClusterExplorerUrl, getClusterName, getClusterRpcUrl, getClusterType, getDefaultConfig, getDefaultMobileConfig, getDefaultRpcUrl, getNetworkDisplayName, getPolyfillStatus, getTokenUrl, getTransactionUrl, getWalletNameFromConnectorId, getWalletsRegistry, installPolyfills, isClipboardAvailable, isConnected, isConnecting, isCryptoAvailable, isDevnet, isDevnetCluster, isDisconnected, isLocalCluster, isLocalnet, isMainnet, isMainnetCluster, isPolyfillInstalled, isStatusError, isTestnet, isTestnetCluster, isTransactionSignerError, isWalletConnectorId, isWalletStatusError, normalizeNetwork, parseConfigOptions, ready, saveWalletState, toClusterId, toLegacyWalletState, truncate, validateConfigOptions } from './chunk-IDTUFDNB.mjs';
4
+ export { isFailure, isSuccess, tryCatch, tryCatchSync } from './chunk-HO6QNKFM.mjs';
5
+ export { createMockWalletConnectTransport, createWalletConnectTransport, createWalletConnectWallet, isWalletConnectAvailable, registerWalletConnectWallet } from './chunk-UCISIAOG.mjs';
6
+ export { ConfigurationError, ConnectionError, ConnectorError, Errors, LAMPORTS_PER_SOL, NetworkError, TransactionError, ValidationError, WalletErrorType, base58ToSignatureBytes, createKitSignersFromWallet, createMessageSignerFromWallet, createSolanaClient, createTransactionSendingSignerFromWallet, createWalletError, detectMessageModification, freezeSigner, getExplorerLink, getPublicSolanaRpcUrl, getUserFriendlyMessage, isConfigurationError, isConnectionError, isConnectorError, isNetworkError, isTransactionError, isValidationError, isWalletError, lamportsToSol, prepareTransaction, signatureBytesToBase58, solToLamports, toConnectorError, updateSignatureDictionary } from './chunk-ZZTY3O4N.mjs';
5
7
  //# sourceMappingURL=index.mjs.map
6
8
  //# sourceMappingURL=index.mjs.map
package/dist/react.d.mts CHANGED
@@ -1,14 +1,14 @@
1
- import { d as ConnectorConfig, M as MobileWalletAdapterConfig, h as ClusterType, A as AccountInfo, T as ClipboardResult, s as SolanaClient } from './standard-shim-CT49DM5l.mjs';
2
- export { b as ConnectorErrorBoundary, C as ConnectorProvider, c as ConnectorSnapshot, e as ConnectorState, D as DefaultConfigOptions, E as ExtendedConnectorConfig, W as WalletInfo, g as WalletStandardAccount, f as WalletStandardWallet, u as useConnector, a as useConnectorClient, w as withErrorBoundary } from './standard-shim-CT49DM5l.mjs';
1
+ import { d as ConnectorConfig, M as MobileWalletAdapterConfig, Q as WalletError, l as WalletStatus, i as WalletConnectorId, m as SessionAccount, k as WalletSession, j as WalletConnectorMetadata, n as ConnectOptions, t as ClusterType, A as AccountInfo, at as ClipboardResult, Y as SolanaClient } from './standard-shim-CGB88PPO.mjs';
2
+ export { C as ConnectorProvider, c as ConnectorSnapshot, e as ConnectorState, D as DefaultConfigOptions, E as ExtendedConnectorConfig, S as SimplifiedWalletConnectConfig, W as WalletInfo, h as WalletStandardAccount, f as WalletStandardWallet, o as createConnectorId, g as getDefaultConfig, b as getDefaultMobileConfig, q as isConnected, r as isConnecting, s as isDisconnected, p as isWalletConnectorId, u as useConnector, a as useConnectorClient } from './standard-shim-CGB88PPO.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { ReactNode, ComponentType, PropsWithChildren } from 'react';
4
+ import React, { ReactNode, ComponentType, PropsWithChildren, Component, ErrorInfo } from 'react';
5
+ import { Address } from '@solana/addresses';
5
6
  import { SolanaCluster, SolanaClusterId } from '@wallet-ui/core';
6
7
  export { SolanaCluster, SolanaClusterId } from '@wallet-ui/core';
7
- import { a as TransactionSigner, v as TransactionSignerCapabilities } from './transaction-signer-T-KVQFi8.mjs';
8
+ import { a as TransactionSigner, v as TransactionSignerCapabilities } from './transaction-signer-7NaYmP5w.mjs';
8
9
  import { TransactionModifyingSigner } from '@solana/signers';
9
10
  import { TransactionMessage, TransactionMessageWithFeePayer, TransactionMessageWithBlockhashLifetime } from '@solana/kit';
10
11
  export { Wallet, WalletAccount } from '@wallet-standard/base';
11
- import '@solana/addresses';
12
12
  import '@solana/keys';
13
13
  import '@solana-mobile/wallet-standard-mobile';
14
14
  import '@solana/transaction-messages';
@@ -26,12 +26,291 @@ interface AppProviderProps {
26
26
  props?: Record<string, unknown>;
27
27
  }>;
28
28
  }
29
- declare function AppProvider({ children, connectorConfig, mobile, providers }: AppProviderProps): react_jsx_runtime.JSX.Element;
29
+ /**
30
+ * Main application provider for ConnectorKit
31
+ *
32
+ * Automatically sets up:
33
+ * - Wallet connection management
34
+ * - WalletConnect URI state (when enabled)
35
+ * - Mobile Wallet Adapter (when configured)
36
+ * - Error boundaries (when configured)
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * import { AppProvider, getDefaultConfig } from '@solana/connector/react';
41
+ *
42
+ * const config = getDefaultConfig({
43
+ * appName: 'My App',
44
+ * walletConnect: true, // Auto-detects project ID from env
45
+ * });
46
+ *
47
+ * export function Providers({ children }) {
48
+ * return (
49
+ * <AppProvider connectorConfig={config}>
50
+ * {children}
51
+ * </AppProvider>
52
+ * );
53
+ * }
54
+ * ```
55
+ */
56
+ declare function AppProvider(props: AppProviderProps): react_jsx_runtime.JSX.Element;
30
57
  /** @deprecated Use `AppProvider` instead */
31
58
  declare const UnifiedProvider: typeof AppProvider;
32
59
  /** @deprecated Use `AppProviderProps` instead */
33
60
  type UnifiedProviderProps = AppProviderProps;
34
61
 
62
+ /**
63
+ * WalletConnect URI context value
64
+ * Used to share the WalletConnect pairing URI between components
65
+ */
66
+ interface WalletConnectContextValue {
67
+ /** The current WalletConnect URI for QR code display */
68
+ uri: string | null;
69
+ /** Set the URI (called internally when display_uri event fires) */
70
+ setUri: (uri: string | null) => void;
71
+ /** Clear the URI (called when session is established or disconnected) */
72
+ clearUri: () => void;
73
+ }
74
+ /**
75
+ * Provider component for WalletConnect URI state
76
+ *
77
+ * This is automatically wrapped by AppProvider when WalletConnect is enabled.
78
+ * You typically don't need to use this directly.
79
+ */
80
+ declare function WalletConnectProvider({ children }: {
81
+ children: ReactNode;
82
+ }): react_jsx_runtime.JSX.Element;
83
+ /**
84
+ * Hook to access the WalletConnect URI for QR code display
85
+ *
86
+ * @example
87
+ * ```tsx
88
+ * import { useWalletConnectUri } from '@solana/connector/react';
89
+ *
90
+ * function WalletModal() {
91
+ * const { uri, clearUri } = useWalletConnectUri();
92
+ *
93
+ * return uri ? (
94
+ * <QRCodeSVG value={uri} />
95
+ * ) : (
96
+ * <Spinner />
97
+ * );
98
+ * }
99
+ * ```
100
+ */
101
+ declare function useWalletConnectUri(): WalletConnectContextValue;
102
+
103
+ interface ErrorBoundaryState {
104
+ hasError: boolean;
105
+ error: Error | null;
106
+ errorInfo: ErrorInfo | null;
107
+ errorId: string;
108
+ retryCount: number;
109
+ }
110
+ interface ErrorBoundaryProps {
111
+ children: ReactNode;
112
+ fallback?: (error: WalletError, retry: () => void) => ReactNode;
113
+ onError?: (error: Error, errorInfo: ErrorInfo) => void;
114
+ maxRetries?: number;
115
+ enableRecovery?: boolean;
116
+ }
117
+ declare class ConnectorErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
118
+ private retryTimeouts;
119
+ constructor(props: ErrorBoundaryProps);
120
+ static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
121
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
122
+ componentWillUnmount(): void;
123
+ retry: () => void;
124
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
125
+ }
126
+ declare function withErrorBoundary<P extends object>(Component: React.ComponentType<P>, errorBoundaryProps?: Omit<ErrorBoundaryProps, 'children'>): {
127
+ (props: P): react_jsx_runtime.JSX.Element;
128
+ displayName: string;
129
+ };
130
+
131
+ /**
132
+ * useWallet - vNext wallet status hook
133
+ *
134
+ * Provides access to the wallet status state machine and derived values.
135
+ * This is the primary hook for checking wallet connection state in vNext.
136
+ *
137
+ * @example
138
+ * ```tsx
139
+ * const { status, isConnected, isConnecting, account, accounts } = useWallet();
140
+ *
141
+ * if (status === 'connected') {
142
+ * console.log('Connected account:', account);
143
+ * }
144
+ * ```
145
+ */
146
+
147
+ /**
148
+ * Return type for useWallet hook
149
+ */
150
+ interface UseWalletReturn {
151
+ /**
152
+ * Current wallet status ('disconnected' | 'connecting' | 'connected' | 'error')
153
+ */
154
+ status: WalletStatus['status'];
155
+ /**
156
+ * Full wallet status object for advanced usage
157
+ */
158
+ walletStatus: WalletStatus;
159
+ /**
160
+ * Whether a wallet is connected
161
+ */
162
+ isConnected: boolean;
163
+ /**
164
+ * Whether a wallet connection is in progress
165
+ */
166
+ isConnecting: boolean;
167
+ /**
168
+ * Whether an error occurred
169
+ */
170
+ isError: boolean;
171
+ /**
172
+ * Error object if status is 'error'
173
+ */
174
+ error: Error | null;
175
+ /**
176
+ * Connected connector ID (null if not connected)
177
+ */
178
+ connectorId: WalletConnectorId | null;
179
+ /**
180
+ * Currently selected account address (null if not connected)
181
+ */
182
+ account: Address | null;
183
+ /**
184
+ * All available accounts (empty if not connected)
185
+ */
186
+ accounts: SessionAccount[];
187
+ /**
188
+ * Active session (null if not connected)
189
+ */
190
+ session: WalletSession | null;
191
+ }
192
+ /**
193
+ * Hook to access the current wallet status and connection state.
194
+ * This is the primary hook for checking wallet state in vNext.
195
+ */
196
+ declare function useWallet(): UseWalletReturn;
197
+
198
+ /**
199
+ * useWalletConnectors - vNext wallet connectors hook
200
+ *
201
+ * Provides access to available wallet connectors and their metadata.
202
+ *
203
+ * @example
204
+ * ```tsx
205
+ * const connectors = useWalletConnectors();
206
+ *
207
+ * return (
208
+ * <ul>
209
+ * {connectors.map(connector => (
210
+ * <li key={connector.id}>
211
+ * <img src={connector.icon} alt={connector.name} />
212
+ * {connector.name}
213
+ * </li>
214
+ * ))}
215
+ * </ul>
216
+ * );
217
+ * ```
218
+ */
219
+
220
+ /**
221
+ * Hook to access available wallet connectors.
222
+ * Returns an array of connector metadata (id, name, icon, ready state).
223
+ */
224
+ declare function useWalletConnectors(): WalletConnectorMetadata[];
225
+
226
+ /**
227
+ * useConnectWallet - vNext wallet connection hook
228
+ *
229
+ * Provides a function to connect to a wallet by connector ID.
230
+ *
231
+ * @example
232
+ * ```tsx
233
+ * const { connect, isConnecting, error } = useConnectWallet();
234
+ *
235
+ * return (
236
+ * <button
237
+ * onClick={() => connect('wallet-standard:phantom')}
238
+ * disabled={isConnecting}
239
+ * >
240
+ * {isConnecting ? 'Connecting...' : 'Connect Phantom'}
241
+ * </button>
242
+ * );
243
+ * ```
244
+ */
245
+
246
+ /**
247
+ * Return type for useConnectWallet hook
248
+ */
249
+ interface UseConnectWalletReturn {
250
+ /**
251
+ * Connect to a wallet by connector ID.
252
+ *
253
+ * @param connectorId - Stable connector identifier (e.g., 'wallet-standard:phantom')
254
+ * @param options - Connection options (silent mode, preferred account)
255
+ */
256
+ connect: (connectorId: WalletConnectorId, options?: ConnectOptions) => Promise<void>;
257
+ /**
258
+ * Whether a connection is currently in progress
259
+ */
260
+ isConnecting: boolean;
261
+ /**
262
+ * Error from the last connection attempt (null if none)
263
+ */
264
+ error: Error | null;
265
+ /**
266
+ * Reset the error state
267
+ */
268
+ resetError: () => void;
269
+ }
270
+ /**
271
+ * Hook to connect to a wallet by connector ID.
272
+ * Uses the vNext connectWallet API with silent-first support.
273
+ */
274
+ declare function useConnectWallet(): UseConnectWalletReturn;
275
+
276
+ /**
277
+ * useDisconnectWallet - vNext wallet disconnection hook
278
+ *
279
+ * Provides a function to disconnect the current wallet.
280
+ *
281
+ * @example
282
+ * ```tsx
283
+ * const { disconnect, isDisconnecting } = useDisconnectWallet();
284
+ *
285
+ * return (
286
+ * <button
287
+ * onClick={() => disconnect()}
288
+ * disabled={isDisconnecting}
289
+ * >
290
+ * {isDisconnecting ? 'Disconnecting...' : 'Disconnect'}
291
+ * </button>
292
+ * );
293
+ * ```
294
+ */
295
+ /**
296
+ * Return type for useDisconnectWallet hook
297
+ */
298
+ interface UseDisconnectWalletReturn {
299
+ /**
300
+ * Disconnect the current wallet session.
301
+ */
302
+ disconnect: () => Promise<void>;
303
+ /**
304
+ * Whether a disconnection is currently in progress
305
+ */
306
+ isDisconnecting: boolean;
307
+ }
308
+ /**
309
+ * Hook to disconnect the current wallet.
310
+ * Uses the vNext disconnectWallet API.
311
+ */
312
+ declare function useDisconnectWallet(): UseDisconnectWalletReturn;
313
+
35
314
  /**
36
315
  * @solana/connector - useCluster hook
37
316
  *
@@ -110,12 +389,15 @@ declare function useAccount(): UseAccountReturn;
110
389
  *
111
390
  * React hook for getting information about the connected wallet
112
391
  */
392
+
113
393
  /**
114
394
  * Simplified wallet information for display purposes
115
395
  */
116
396
  interface WalletDisplayInfo {
117
397
  /** Wallet name */
118
398
  name: string;
399
+ /** Stable connector ID for vNext API */
400
+ connectorId: WalletConnectorId;
119
401
  /** Wallet icon/logo URL if available */
120
402
  icon?: string;
121
403
  /** Whether the wallet extension is installed */
@@ -1130,12 +1412,18 @@ declare namespace ClusterElement {
1130
1412
  interface WalletListElementRenderProps {
1131
1413
  wallets: WalletDisplayInfo[];
1132
1414
  installedWallets: WalletDisplayInfo[];
1415
+ /** @deprecated Use `connectById` for vNext API */
1133
1416
  select: (walletName: string) => Promise<void>;
1417
+ /** Connect by connector ID (vNext API) */
1418
+ connectById: (connectorId: WalletConnectorId) => Promise<void>;
1134
1419
  connecting: boolean;
1135
1420
  }
1136
1421
  interface WalletListElementWalletProps {
1137
1422
  wallet: WalletDisplayInfo;
1423
+ /** @deprecated Use `connect` for clearer naming */
1138
1424
  select: () => Promise<void>;
1425
+ /** Connect to this wallet (vNext API) */
1426
+ connect: () => Promise<void>;
1139
1427
  connecting: boolean;
1140
1428
  }
1141
1429
  interface WalletListElementProps {
@@ -1147,8 +1435,10 @@ interface WalletListElementProps {
1147
1435
  variant?: 'list' | 'grid' | 'compact';
1148
1436
  /** Show wallet status badge */
1149
1437
  showStatus?: boolean;
1150
- /** Callback when a wallet is selected */
1438
+ /** @deprecated Use `onConnect` for vNext API */
1151
1439
  onSelect?: (walletName: string) => void;
1440
+ /** Callback when a wallet is connected (vNext API) */
1441
+ onConnect?: (connectorId: WalletConnectorId) => void;
1152
1442
  /** Custom render function for full control */
1153
1443
  render?: (props: WalletListElementRenderProps) => ReactNode;
1154
1444
  /** Custom render function for individual wallet items */
@@ -1200,7 +1490,7 @@ interface WalletListElementProps {
1200
1490
  * />
1201
1491
  * ```
1202
1492
  */
1203
- declare function WalletListElement({ installedOnly, className, variant, showStatus, onSelect, render, renderWallet, }: WalletListElementProps): react_jsx_runtime.JSX.Element;
1493
+ declare function WalletListElement({ installedOnly, className, variant, showStatus, onSelect, onConnect, render, renderWallet, }: WalletListElementProps): react_jsx_runtime.JSX.Element;
1204
1494
  declare namespace WalletListElement {
1205
1495
  var displayName: string;
1206
1496
  }
@@ -1400,4 +1690,4 @@ declare namespace SkeletonShine {
1400
1690
  var displayName: string;
1401
1691
  }
1402
1692
 
1403
- export { AccountElement, type AccountElementProps, type AccountElementRenderProps, AccountInfo, AppProvider, type AppProviderProps, BalanceElement, type BalanceElementProps, type BalanceElementRenderProps, ClusterElement, type ClusterElementProps, type ClusterElementRenderProps, ClusterType, ConnectorConfig, DisconnectElement, type DisconnectElementProps, MobileWalletAdapterConfig, SkeletonShine, type Token, type TokenBalance, TokenListElement, type TokenListElementProps, type TokenListElementRenderProps, TransactionHistoryElement, type TransactionHistoryElementProps, type TransactionHistoryElementRenderProps, type TransactionInfo, type TransactionPrepareOptions, type TransactionsQueryKeyOptions, UnifiedProvider, type UnifiedProviderProps, type UseAccountReturn, type UseBalanceOptions, type UseBalanceReturn, type UseClusterReturn, type UseGillSolanaClientReturn, type UseGillTransactionSignerReturn, type UseKitTransactionSignerReturn, type UseSolanaClientReturn, type UseTokensOptions, type UseTokensReturn, type UseTransactionPreparerReturn, type UseTransactionSignerReturn, type UseTransactionsOptions, type UseTransactionsReturn, type UseWalletInfoReturn, type WalletDisplayInfo, WalletListElement, type WalletListElementProps, type WalletListElementRenderProps, type WalletListElementWalletProps, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWalletInfo };
1693
+ export { AccountElement, type AccountElementProps, type AccountElementRenderProps, AccountInfo, AppProvider, type AppProviderProps, BalanceElement, type BalanceElementProps, type BalanceElementRenderProps, ClusterElement, type ClusterElementProps, type ClusterElementRenderProps, ClusterType, ConnectOptions, ConnectorConfig, ConnectorErrorBoundary, DisconnectElement, type DisconnectElementProps, MobileWalletAdapterConfig, SessionAccount, SkeletonShine, type Token, type TokenBalance, TokenListElement, type TokenListElementProps, type TokenListElementRenderProps, TransactionHistoryElement, type TransactionHistoryElementProps, type TransactionHistoryElementRenderProps, type TransactionInfo, type TransactionPrepareOptions, type TransactionsQueryKeyOptions, UnifiedProvider, type UnifiedProviderProps, type UseAccountReturn, type UseBalanceOptions, type UseBalanceReturn, type UseClusterReturn, type UseConnectWalletReturn, type UseDisconnectWalletReturn, type UseGillSolanaClientReturn, type UseGillTransactionSignerReturn, type UseKitTransactionSignerReturn, type UseSolanaClientReturn, type UseTokensOptions, type UseTokensReturn, type UseTransactionPreparerReturn, type UseTransactionSignerReturn, type UseTransactionsOptions, type UseTransactionsReturn, type UseWalletInfoReturn, type UseWalletReturn, type WalletConnectContextValue, WalletConnectProvider, WalletConnectorId, WalletConnectorMetadata, type WalletDisplayInfo, WalletListElement, type WalletListElementProps, type WalletListElementRenderProps, type WalletListElementWalletProps, WalletSession, WalletStatus, clearSharedQueryCache, clearTokenCaches, getBalanceQueryKey, getTokensQueryKey, getTransactionsQueryKey, getWalletAssetsQueryKey, invalidateSharedQuery, useAccount, useBalance, useCluster, useConnectWallet, useDisconnectWallet, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWallet, useWalletConnectUri, useWalletConnectors, useWalletInfo, withErrorBoundary };