@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
@@ -1,16 +1,16 @@
1
- import { h as ClusterType, N as StorageOptions, K as StorageAdapter, O as EnhancedStorageAccountOptions, P as EnhancedStorageClusterOptions, Q as EnhancedStorageWalletOptions } from './standard-shim-CT49DM5l.mjs';
2
- export { x as AccountAddress, A as AccountInfo, R as ClipboardErrorType, T as ClipboardResult, B as CoinGeckoConfig, i as ConnectorClient, d as ConnectorConfig, G as ConnectorDebugMetrics, H as ConnectorDebugState, I as ConnectorEvent, J as ConnectorEventListener, F as ConnectorHealth, e as ConnectorState, U as CopyOptions, t as CreateSolanaClientArgs, D as DefaultConfigOptions, E as ExtendedConnectorConfig, L as Listener, M as MobileWalletAdapterConfig, q as ModifiedClusterUrl, s as SolanaClient, S as SolanaClusterMoniker, n as WalletError, m as WalletErrorType, W as WalletInfo, v as WalletName, g as WalletStandardAccount, f as WalletStandardWallet, Y as copyAddressToClipboard, Z as copySignatureToClipboard, X as copyToClipboard, p as createSolanaClient, a1 as getAddressUrl, a3 as getBlockUrl, ab as getChainIdForWalletStandard, aa as getClusterChainId, $ as getClusterExplorerUrl, a8 as getClusterName, _ as getClusterRpcUrl, a9 as getClusterType, j as getDefaultConfig, k as getDefaultMobileConfig, o as getPublicSolanaRpcUrl, a2 as getTokenUrl, a0 as getTransactionUrl, l as getWalletsRegistry, z as isAccountAddress, V as isClipboardAvailable, a5 as isDevnetCluster, a7 as isLocalCluster, a4 as isMainnetCluster, a6 as isTestnetCluster, y as isWalletName, r as ready } from './standard-shim-CT49DM5l.mjs';
1
+ import { t as ClusterType, ad as StorageOptions, ac as StorageAdapter, ae as EnhancedStorageAccountOptions, af as EnhancedStorageClusterOptions, ag as EnhancedStorageWalletOptions, ah as EnhancedStorageWalletStateOptions, ai as PersistedWalletState, _ as WalletConnectConfig, a0 as WalletConnectTransport } from './standard-shim-CGB88PPO.mjs';
2
+ export { a2 as AccountAddress, A as AccountInfo, as as ClipboardErrorType, at as ClipboardResult, a5 as CoinGeckoConfig, n as ConnectOptions, v as ConnectorClient, d as ConnectorConfig, a7 as ConnectorDebugMetrics, a8 as ConnectorDebugState, aa as ConnectorEvent, ab as ConnectorEventListener, a6 as ConnectorHealth, e as ConnectorState, au as CopyOptions, Z as CreateSolanaClientArgs, D as DefaultConfigOptions, E as ExtendedConnectorConfig, I as INITIAL_WALLET_STATUS, a9 as Listener, M as MobileWalletAdapterConfig, X as ModifiedClusterUrl, R as RegisterMwaConfig, m as SessionAccount, Y as SolanaClient, V as SolanaClusterMoniker, $ as WalletConnectMetadata, ao as WalletConnectSignAllTransactionsParams, ap as WalletConnectSignAllTransactionsResult, aq as WalletConnectSignAndSendTransactionParams, ar as WalletConnectSignAndSendTransactionResult, ak as WalletConnectSignMessageParams, al as WalletConnectSignMessageResult, am as WalletConnectSignTransactionParams, an as WalletConnectSignTransactionResult, aj as WalletConnectSolanaAccount, G as WalletConnector, i as WalletConnectorId, j as WalletConnectorMetadata, Q as WalletError, N as WalletErrorType, W as WalletInfo, a1 as WalletName, k as WalletSession, h as WalletStandardAccount, f as WalletStandardWallet, l as WalletStatus, K as WalletStatusConnected, J as WalletStatusConnecting, H as WalletStatusDisconnected, L as WalletStatusError, ax as copyAddressToClipboard, ay as copySignatureToClipboard, aw as copyToClipboard, o as createConnectorId, U as createSolanaClient, P as createWalletError, aC as getAddressUrl, aE as getBlockUrl, aM as getChainIdForWalletStandard, aL as getClusterChainId, aA as getClusterExplorerUrl, aJ as getClusterName, az as getClusterRpcUrl, aK as getClusterType, g as getDefaultConfig, b as getDefaultMobileConfig, T as getPublicSolanaRpcUrl, aD as getTokenUrl, aB as getTransactionUrl, y as getWalletNameFromConnectorId, w as getWalletsRegistry, a4 as isAccountAddress, av as isClipboardAvailable, q as isConnected, r as isConnecting, aG as isDevnetCluster, s as isDisconnected, aI as isLocalCluster, aF as isMainnetCluster, z as isStatusError, aH as isTestnetCluster, p as isWalletConnectorId, O as isWalletError, a3 as isWalletName, B as isWalletStatusError, x as ready, F as toLegacyWalletState } from './standard-shim-CGB88PPO.mjs';
3
3
  import { z } from 'zod/v4';
4
- import { a as TransactionSigner } from './transaction-signer-T-KVQFi8.mjs';
5
- export { d as ConfigurationError, p as ConfigurationErrorCode, b as ConnectionError, n as ConnectionErrorCode, C as ConnectorError, E as Errors, N as NetworkError, q as NetworkErrorCode, u as SignedTransaction, S as SolanaTransaction, w as TransactionActivity, x as TransactionActivityStatus, e as TransactionError, r as TransactionErrorCode, z as TransactionMetadata, y as TransactionMethod, v as TransactionSignerCapabilities, s as TransactionSignerConfig, T as TransactionSignerError, V as ValidationError, o as ValidationErrorCode, c as createTransactionSigner, m as getUserFriendlyMessage, j as isConfigurationError, g as isConnectionError, f as isConnectorError, k as isNetworkError, l as isTransactionError, i as isTransactionSignerError, h as isValidationError, t as toConnectorError } from './transaction-signer-T-KVQFi8.mjs';
4
+ import { a as TransactionSigner } from './transaction-signer-7NaYmP5w.mjs';
5
+ export { d as ConfigurationError, p as ConfigurationErrorCode, b as ConnectionError, n as ConnectionErrorCode, C as ConnectorError, E as Errors, N as NetworkError, q as NetworkErrorCode, u as SignedTransaction, S as SolanaTransaction, w as TransactionActivity, x as TransactionActivityStatus, e as TransactionError, r as TransactionErrorCode, z as TransactionMetadata, y as TransactionMethod, v as TransactionSignerCapabilities, s as TransactionSignerConfig, T as TransactionSignerError, V as ValidationError, o as ValidationErrorCode, c as createTransactionSigner, m as getUserFriendlyMessage, j as isConfigurationError, g as isConnectionError, f as isConnectorError, k as isNetworkError, l as isTransactionError, i as isTransactionSignerError, h as isValidationError, t as toConnectorError } from './transaction-signer-7NaYmP5w.mjs';
6
6
  import { SolanaCluster, SolanaClusterId, Storage } from '@wallet-ui/core';
7
7
  export { SolanaCluster, SolanaClusterId, createSolanaDevnet, createSolanaLocalnet, createSolanaMainnet, createSolanaTestnet } from '@wallet-ui/core';
8
+ import { Address } from '@solana/addresses';
9
+ export { Address, address } from '@solana/addresses';
8
10
  import { Connection, SendOptions } from '@solana/web3.js';
9
11
  import { MessageModifyingSigner, TransactionSendingSigner, SignatureDictionary, TransactionModifyingSigner } from '@solana/signers';
10
12
  export { MessageModifyingSigner, MessageModifyingSignerConfig, SignableMessage, SignatureDictionary, TransactionSendingSigner, TransactionSendingSignerConfig, createSignableMessage } from '@solana/signers';
11
13
  import { TransactionMessage, TransactionMessageWithFeePayer, Rpc, GetLatestBlockhashApi, TransactionMessageWithBlockhashLifetime } from '@solana/kit';
12
- import { Address } from '@solana/addresses';
13
- export { Address, address } from '@solana/addresses';
14
14
  import { SignatureBytes } from '@solana/keys';
15
15
  export { SignatureBytes } from '@solana/keys';
16
16
  import { Transaction } from '@solana/transactions';
@@ -22,6 +22,122 @@ import 'react';
22
22
  import '@solana-mobile/wallet-standard-mobile';
23
23
  import '@solana/transaction-messages';
24
24
 
25
+ /**
26
+ * @solana/connector - Configuration Schemas
27
+ *
28
+ * Zod schemas for runtime validation of configuration options.
29
+ * These schemas provide type-safe validation with helpful error messages.
30
+ */
31
+
32
+ declare const defaultConfigOptionsSchema: z.ZodObject<{
33
+ appName: z.ZodString;
34
+ appUrl: z.ZodOptional<z.ZodString>;
35
+ imageProxy: z.ZodOptional<z.ZodString>;
36
+ clusterStorageKey: z.ZodOptional<z.ZodString>;
37
+ autoConnect: z.ZodOptional<z.ZodBoolean>;
38
+ debug: z.ZodOptional<z.ZodBoolean>;
39
+ enableMobile: z.ZodOptional<z.ZodBoolean>;
40
+ persistClusterSelection: z.ZodOptional<z.ZodBoolean>;
41
+ enableErrorBoundary: z.ZodOptional<z.ZodBoolean>;
42
+ network: z.ZodOptional<z.ZodEnum<{
43
+ devnet: "devnet";
44
+ localnet: "localnet";
45
+ mainnet: "mainnet";
46
+ testnet: "testnet";
47
+ "mainnet-beta": "mainnet-beta";
48
+ }>>;
49
+ maxRetries: z.ZodOptional<z.ZodNumber>;
50
+ storage: z.ZodOptional<z.ZodObject<{
51
+ account: z.ZodObject<{
52
+ get: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
53
+ set: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
54
+ }, z.core.$loose>;
55
+ cluster: z.ZodObject<{
56
+ get: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
57
+ set: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
58
+ }, z.core.$loose>;
59
+ wallet: z.ZodObject<{
60
+ get: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
61
+ set: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
62
+ }, z.core.$loose>;
63
+ }, z.core.$strip>>;
64
+ clusters: z.ZodOptional<z.ZodArray<z.ZodObject<{
65
+ id: z.ZodString;
66
+ label: z.ZodString;
67
+ url: z.ZodString;
68
+ urlWs: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strip>>>;
70
+ customClusters: z.ZodOptional<z.ZodArray<z.ZodObject<{
71
+ id: z.ZodString;
72
+ label: z.ZodString;
73
+ url: z.ZodString;
74
+ urlWs: z.ZodOptional<z.ZodString>;
75
+ }, z.core.$strip>>>;
76
+ programLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
77
+ coingecko: z.ZodOptional<z.ZodObject<{
78
+ apiKey: z.ZodOptional<z.ZodString>;
79
+ isPro: z.ZodOptional<z.ZodBoolean>;
80
+ maxRetries: z.ZodOptional<z.ZodNumber>;
81
+ baseDelay: z.ZodOptional<z.ZodNumber>;
82
+ maxTimeout: z.ZodOptional<z.ZodNumber>;
83
+ }, z.core.$strict>>;
84
+ walletConnect: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
85
+ enabled: z.ZodOptional<z.ZodBoolean>;
86
+ projectId: z.ZodString;
87
+ metadata: z.ZodObject<{
88
+ name: z.ZodString;
89
+ description: z.ZodString;
90
+ url: z.ZodString;
91
+ icons: z.ZodArray<z.ZodString>;
92
+ }, z.core.$strip>;
93
+ defaultChain: z.ZodOptional<z.ZodEnum<{
94
+ "solana:mainnet": "solana:mainnet";
95
+ "solana:devnet": "solana:devnet";
96
+ "solana:testnet": "solana:testnet";
97
+ }>>;
98
+ onDisplayUri: z.ZodOptional<z.ZodCustom<(uri: string) => void, (uri: string) => void>>;
99
+ onSessionEstablished: z.ZodOptional<z.ZodCustom<() => void, () => void>>;
100
+ onSessionDisconnected: z.ZodOptional<z.ZodCustom<() => void, () => void>>;
101
+ relayUrl: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strip>]>>;
103
+ onError: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
104
+ }, z.core.$strip>;
105
+ type DefaultConfigOptionsInput = z.input<typeof defaultConfigOptionsSchema>;
106
+ /**
107
+ * Validate configuration options and return a result with helpful errors
108
+ *
109
+ * @example
110
+ * ```ts
111
+ * const result = validateConfigOptions({
112
+ * appName: 'My App',
113
+ * network: 'mainnet',
114
+ * });
115
+ *
116
+ * if (!result.success) {
117
+ * console.error('Config validation failed:', result.error.format());
118
+ * }
119
+ * ```
120
+ */
121
+ declare function validateConfigOptions(options: unknown): z.ZodSafeParseResult<DefaultConfigOptionsInput>;
122
+ /**
123
+ * Parse and validate config options, throwing on error with formatted message
124
+ *
125
+ * @throws {z.ZodError} If validation fails
126
+ *
127
+ * @example
128
+ * ```ts
129
+ * try {
130
+ * const validOptions = parseConfigOptions(userInput);
131
+ * // validOptions is typed and validated
132
+ * } catch (error) {
133
+ * if (error instanceof z.ZodError) {
134
+ * console.error(error.format());
135
+ * }
136
+ * }
137
+ * ```
138
+ */
139
+ declare function parseConfigOptions(options: unknown): DefaultConfigOptionsInput;
140
+
25
141
  /**
26
142
  * @solana/connector - Formatting utilities
27
143
  *
@@ -548,103 +664,6 @@ declare function freezeSigner<T extends object>(signer: T): Readonly<T>;
548
664
  declare function base58ToSignatureBytes(signature: string): SignatureBytes;
549
665
  declare function signatureBytesToBase58(bytes: SignatureBytes): string;
550
666
 
551
- /**
552
- * @solana/connector - Configuration Schemas
553
- *
554
- * Zod schemas for runtime validation of configuration options.
555
- * These schemas provide type-safe validation with helpful error messages.
556
- */
557
-
558
- declare const defaultConfigOptionsSchema: z.ZodObject<{
559
- appName: z.ZodString;
560
- appUrl: z.ZodOptional<z.ZodString>;
561
- imageProxy: z.ZodOptional<z.ZodString>;
562
- clusterStorageKey: z.ZodOptional<z.ZodString>;
563
- autoConnect: z.ZodOptional<z.ZodBoolean>;
564
- debug: z.ZodOptional<z.ZodBoolean>;
565
- enableMobile: z.ZodOptional<z.ZodBoolean>;
566
- persistClusterSelection: z.ZodOptional<z.ZodBoolean>;
567
- enableErrorBoundary: z.ZodOptional<z.ZodBoolean>;
568
- network: z.ZodOptional<z.ZodEnum<{
569
- devnet: "devnet";
570
- localnet: "localnet";
571
- mainnet: "mainnet";
572
- testnet: "testnet";
573
- "mainnet-beta": "mainnet-beta";
574
- }>>;
575
- maxRetries: z.ZodOptional<z.ZodNumber>;
576
- storage: z.ZodOptional<z.ZodObject<{
577
- account: z.ZodObject<{
578
- get: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
579
- set: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
580
- }, z.core.$loose>;
581
- cluster: z.ZodObject<{
582
- get: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
583
- set: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
584
- }, z.core.$loose>;
585
- wallet: z.ZodObject<{
586
- get: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
587
- set: z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>;
588
- }, z.core.$loose>;
589
- }, z.core.$strip>>;
590
- clusters: z.ZodOptional<z.ZodArray<z.ZodObject<{
591
- id: z.ZodString;
592
- label: z.ZodString;
593
- url: z.ZodString;
594
- urlWs: z.ZodOptional<z.ZodString>;
595
- }, z.core.$strip>>>;
596
- customClusters: z.ZodOptional<z.ZodArray<z.ZodObject<{
597
- id: z.ZodString;
598
- label: z.ZodString;
599
- url: z.ZodString;
600
- urlWs: z.ZodOptional<z.ZodString>;
601
- }, z.core.$strip>>>;
602
- programLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
603
- coingecko: z.ZodOptional<z.ZodObject<{
604
- apiKey: z.ZodOptional<z.ZodString>;
605
- isPro: z.ZodOptional<z.ZodBoolean>;
606
- maxRetries: z.ZodOptional<z.ZodNumber>;
607
- baseDelay: z.ZodOptional<z.ZodNumber>;
608
- maxTimeout: z.ZodOptional<z.ZodNumber>;
609
- }, z.core.$strict>>;
610
- onError: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
611
- }, z.core.$strip>;
612
- type DefaultConfigOptionsInput = z.input<typeof defaultConfigOptionsSchema>;
613
- /**
614
- * Validate configuration options and return a result with helpful errors
615
- *
616
- * @example
617
- * ```ts
618
- * const result = validateConfigOptions({
619
- * appName: 'My App',
620
- * network: 'mainnet',
621
- * });
622
- *
623
- * if (!result.success) {
624
- * console.error('Config validation failed:', result.error.format());
625
- * }
626
- * ```
627
- */
628
- declare function validateConfigOptions(options: unknown): z.ZodSafeParseResult<DefaultConfigOptionsInput>;
629
- /**
630
- * Parse and validate config options, throwing on error with formatted message
631
- *
632
- * @throws {z.ZodError} If validation fails
633
- *
634
- * @example
635
- * ```ts
636
- * try {
637
- * const validOptions = parseConfigOptions(userInput);
638
- * // validOptions is typed and validated
639
- * } catch (error) {
640
- * if (error instanceof z.ZodError) {
641
- * console.error(error.format());
642
- * }
643
- * }
644
- * ```
645
- */
646
- declare function parseConfigOptions(options: unknown): DefaultConfigOptionsInput;
647
-
648
667
  /**
649
668
  * Enhanced Storage
650
669
  */
@@ -674,6 +693,24 @@ declare class EnhancedStorage<T> extends Storage<T> {
674
693
  declare function createEnhancedStorageAccount(options?: EnhancedStorageAccountOptions): EnhancedStorage<string | undefined>;
675
694
  declare function createEnhancedStorageCluster(options?: EnhancedStorageClusterOptions): EnhancedStorage<SolanaClusterId>;
676
695
  declare function createEnhancedStorageWallet(options?: EnhancedStorageWalletOptions): EnhancedStorage<string | undefined>;
696
+ /**
697
+ * Current version of the persisted wallet state format.
698
+ * Increment when making breaking changes to the state structure.
699
+ */
700
+ declare const WALLET_STATE_VERSION = 1;
701
+ /**
702
+ * Create storage for vNext wallet state (connector ID + account + autoconnect).
703
+ * Handles migration from legacy wallet name storage automatically.
704
+ */
705
+ declare function createEnhancedStorageWalletState(options?: EnhancedStorageWalletStateOptions): EnhancedStorage<PersistedWalletState | null>;
706
+ /**
707
+ * Helper to save wallet state after successful connection
708
+ */
709
+ declare function saveWalletState(storage: StorageAdapter<PersistedWalletState | null>, connectorId: string, account?: string, autoConnect?: boolean): void;
710
+ /**
711
+ * Helper to clear wallet state (on disconnect)
712
+ */
713
+ declare function clearWalletState(storage: StorageAdapter<PersistedWalletState | null>): void;
677
714
  declare class EnhancedStorageAdapter<T> implements StorageAdapter<T> {
678
715
  private storage;
679
716
  constructor(storage: EnhancedStorage<T>);
@@ -689,6 +726,104 @@ declare class EnhancedStorageAdapter<T> implements StorageAdapter<T> {
689
726
  onError(handler: (error: Error) => void): this;
690
727
  }
691
728
 
729
+ /**
730
+ * WalletConnect Wallet Standard Shim
731
+ *
732
+ * Creates a Wallet Standard-compatible wallet that proxies all operations
733
+ * to WalletConnect Solana JSON-RPC methods.
734
+ *
735
+ * @see https://docs.walletconnect.network/wallet-sdk/chain-support/solana
736
+ */
737
+
738
+ /**
739
+ * Create a Wallet Standard-compatible wallet that uses WalletConnect
740
+ */
741
+ declare function createWalletConnectWallet(config: WalletConnectConfig, transport: WalletConnectTransport): Wallet;
742
+
743
+ /**
744
+ * WalletConnect Universal Provider Adapter
745
+ *
746
+ * Provides a thin adapter around @walletconnect/universal-provider that:
747
+ * - Lazily imports the provider (optional dependency)
748
+ * - Handles display_uri events and forwards to onDisplayUri callback
749
+ * - Implements the WalletConnectTransport interface
750
+ *
751
+ * @see https://docs.walletconnect.network/wallet-sdk/chain-support/solana
752
+ */
753
+
754
+ /**
755
+ * Create a WalletConnect transport adapter
756
+ *
757
+ * This adapter lazily loads @walletconnect/universal-provider and implements
758
+ * the WalletConnectTransport interface for use with the WalletConnect wallet shim.
759
+ */
760
+ declare function createWalletConnectTransport(config: WalletConnectConfig): Promise<WalletConnectTransport>;
761
+ /**
762
+ * Create a mock transport for testing purposes
763
+ *
764
+ * This allows testing the WalletConnect wallet shim without actual WalletConnect
765
+ * network dependencies.
766
+ */
767
+ declare function createMockWalletConnectTransport(mockImplementation?: Partial<WalletConnectTransport>): WalletConnectTransport;
768
+
769
+ /**
770
+ * WalletConnect Registration Helper
771
+ *
772
+ * Registers the WalletConnect wallet shim into the Wallet Standard registry,
773
+ * making it available to ConnectorKit's wallet detection system.
774
+ */
775
+
776
+ /**
777
+ * Result of registering the WalletConnect wallet
778
+ */
779
+ interface WalletConnectRegistration {
780
+ /** The registered wallet instance */
781
+ wallet: Wallet;
782
+ /** Function to unregister the wallet from the registry */
783
+ unregister: () => void;
784
+ }
785
+ /**
786
+ * Register a WalletConnect wallet into the Wallet Standard registry
787
+ *
788
+ * This function:
789
+ * 1. Creates a WalletConnect transport adapter
790
+ * 2. Creates a Wallet Standard-compatible wallet shim
791
+ * 3. Registers the wallet with the Wallet Standard registry
792
+ *
793
+ * The wallet will appear in ConnectorKit's wallet list as "WalletConnect"
794
+ * and can be selected like any other wallet.
795
+ *
796
+ * @param config - WalletConnect configuration
797
+ * @returns Registration result with wallet and unregister function
798
+ *
799
+ * @example
800
+ * ```typescript
801
+ * const { wallet, unregister } = await registerWalletConnectWallet({
802
+ * projectId: 'your-project-id',
803
+ * metadata: {
804
+ * name: 'My App',
805
+ * description: 'My Solana App',
806
+ * url: 'https://myapp.com',
807
+ * icons: ['https://myapp.com/icon.png'],
808
+ * },
809
+ * onDisplayUri: (uri) => {
810
+ * // Show QR code with this URI
811
+ * },
812
+ * });
813
+ *
814
+ * // Later, to remove from registry:
815
+ * unregister();
816
+ * ```
817
+ */
818
+ declare function registerWalletConnectWallet(config: WalletConnectConfig): Promise<WalletConnectRegistration>;
819
+ /**
820
+ * Check if WalletConnect dependencies are available
821
+ *
822
+ * This function checks if @walletconnect/universal-provider can be imported.
823
+ * Useful for conditionally showing WalletConnect options in UI.
824
+ */
825
+ declare function isWalletConnectAvailable(): Promise<boolean>;
826
+
692
827
  /**
693
828
  * @solana/connector - Kit Transaction Signer Adapter
694
829
  *
@@ -1028,4 +1163,4 @@ declare function formatSignature(signature: string, chars?: number): string;
1028
1163
  */
1029
1164
  declare function copySignature(signature: string): Promise<boolean>;
1030
1165
 
1031
- export { ClusterType, type Commitment, type DualConnection, EnhancedStorage, EnhancedStorageAccountOptions, EnhancedStorageAdapter, EnhancedStorageClusterOptions, EnhancedStorageWalletOptions, type ExplorerOptions, type ExplorerType, type Failure, type GetExplorerLinkArgs, type KitSignersFromWallet, LAMPORTS_PER_SOL, PUBLIC_RPC_ENDPOINTS, type PrepareTransactionConfig, type Result, SOLANA_CHAIN_IDS, type SolanaNetwork, StorageAdapter, StorageOptions, type Success, TransactionSigner, base58ToSignatureBytes, chainIdToClusterId, chainIdToClusterType, clusterToChainId, copySignature, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createGillTransactionSigner, createKitSignersFromWallet, createKitTransactionSigner, createMessageSignerFromWallet, createTransactionSendingSignerFromWallet, detectMessageModification, formatAddress, formatBigIntBalance, formatBigIntUsd, formatLamportsToSolSafe, formatNumber, formatSOL, formatSignature, formatTokenAmount, formatTokenBalanceSafe, freezeSigner, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getDefaultRpcUrl, getExplorerLink, getLatestBlockhash, getNetworkDisplayName, getPolyfillStatus, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, installPolyfills, isCryptoAvailable, isDevnet, isFailure, isKitConnection, isKnownSolanaChain, isLegacyConnection, isLocalnet, isMainnet, isPolyfillInstalled, isSolanaChain, isSuccess, isTestnet, lamportsToSol, normalizeNetwork, parseConfigOptions, prepareTransaction, sendRawTransaction, signatureBytesToBase58, solToLamports, toClusterId, truncate, tryCatch, tryCatchSync, updateSignatureDictionary, validateConfigOptions, validateKnownSolanaChain };
1166
+ export { ClusterType, type Commitment, type DualConnection, EnhancedStorage, EnhancedStorageAccountOptions, EnhancedStorageAdapter, EnhancedStorageClusterOptions, EnhancedStorageWalletOptions, EnhancedStorageWalletStateOptions, type ExplorerOptions, type ExplorerType, type Failure, type GetExplorerLinkArgs, type KitSignersFromWallet, LAMPORTS_PER_SOL, PUBLIC_RPC_ENDPOINTS, PersistedWalletState, type PrepareTransactionConfig, type Result, SOLANA_CHAIN_IDS, type SolanaNetwork, StorageAdapter, StorageOptions, type Success, TransactionSigner, WALLET_STATE_VERSION, WalletConnectConfig, type WalletConnectRegistration, WalletConnectTransport, base58ToSignatureBytes, chainIdToClusterId, chainIdToClusterType, clearWalletState, clusterToChainId, copySignature, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createEnhancedStorageWalletState, createGillTransactionSigner, createKitSignersFromWallet, createKitTransactionSigner, createMessageSignerFromWallet, createMockWalletConnectTransport, createTransactionSendingSignerFromWallet, createWalletConnectTransport, createWalletConnectWallet, detectMessageModification, formatAddress, formatBigIntBalance, formatBigIntUsd, formatLamportsToSolSafe, formatNumber, formatSOL, formatSignature, formatTokenAmount, formatTokenBalanceSafe, freezeSigner, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getDefaultRpcUrl, getExplorerLink, getLatestBlockhash, getNetworkDisplayName, getPolyfillStatus, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, installPolyfills, isCryptoAvailable, isDevnet, isFailure, isKitConnection, isKnownSolanaChain, isLegacyConnection, isLocalnet, isMainnet, isPolyfillInstalled, isSolanaChain, isSuccess, isTestnet, isWalletConnectAvailable, lamportsToSol, normalizeNetwork, parseConfigOptions, prepareTransaction, registerWalletConnectWallet, saveWalletState, sendRawTransaction, signatureBytesToBase58, solToLamports, toClusterId, truncate, tryCatch, tryCatchSync, updateSignatureDictionary, validateConfigOptions, validateKnownSolanaChain };