@solana/connector 0.1.3 → 0.1.5

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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +685 -1071
  3. package/dist/chunk-3STZXVXD.mjs +2185 -0
  4. package/dist/chunk-3STZXVXD.mjs.map +1 -0
  5. package/dist/chunk-I64FD2EH.js +312 -0
  6. package/dist/chunk-I64FD2EH.js.map +1 -0
  7. package/dist/{chunk-TIW3EQPC.js → chunk-JUZVCBAI.js} +127 -104
  8. package/dist/chunk-JUZVCBAI.js.map +1 -0
  9. package/dist/{chunk-7CKCRY25.js → chunk-NQXK7PGX.js} +75 -79
  10. package/dist/chunk-NQXK7PGX.js.map +1 -0
  11. package/dist/{chunk-HPENTIPE.mjs → chunk-QKVL45F6.mjs} +57 -57
  12. package/dist/chunk-QKVL45F6.mjs.map +1 -0
  13. package/dist/chunk-QL3IT3TS.mjs +299 -0
  14. package/dist/chunk-QL3IT3TS.mjs.map +1 -0
  15. package/dist/chunk-ULUYX23Q.js +2213 -0
  16. package/dist/chunk-ULUYX23Q.js.map +1 -0
  17. package/dist/{chunk-TKJSKXSA.mjs → chunk-VMSZJPR5.mjs} +42 -20
  18. package/dist/chunk-VMSZJPR5.mjs.map +1 -0
  19. package/dist/compat.d.mts +4 -2
  20. package/dist/compat.d.ts +4 -2
  21. package/dist/compat.js +3 -3
  22. package/dist/compat.mjs +1 -1
  23. package/dist/headless.d.mts +146 -18
  24. package/dist/headless.d.ts +146 -18
  25. package/dist/headless.js +144 -111
  26. package/dist/headless.mjs +3 -2
  27. package/dist/index.d.mts +6 -5
  28. package/dist/index.d.ts +6 -5
  29. package/dist/index.js +207 -126
  30. package/dist/index.mjs +4 -3
  31. package/dist/react.d.mts +707 -67
  32. package/dist/react.d.ts +707 -67
  33. package/dist/react.js +64 -16
  34. package/dist/react.mjs +2 -2
  35. package/dist/{transaction-signer-D3csM_Mf.d.mts → transaction-signer-D9d8nxwb.d.mts} +3 -1
  36. package/dist/{transaction-signer-D3csM_Mf.d.ts → transaction-signer-D9d8nxwb.d.ts} +3 -1
  37. package/dist/{wallet-standard-shim-Cg0GVGwu.d.mts → wallet-standard-shim--YcrQNRt.d.ts} +216 -6
  38. package/dist/{wallet-standard-shim-C1tisl9S.d.ts → wallet-standard-shim-Dx7H8Ctf.d.mts} +216 -6
  39. package/package.json +16 -12
  40. package/dist/chunk-5ZUVZZWU.mjs +0 -180
  41. package/dist/chunk-5ZUVZZWU.mjs.map +0 -1
  42. package/dist/chunk-7CKCRY25.js.map +0 -1
  43. package/dist/chunk-FTD7F7CS.js +0 -314
  44. package/dist/chunk-FTD7F7CS.js.map +0 -1
  45. package/dist/chunk-HPENTIPE.mjs.map +0 -1
  46. package/dist/chunk-MPZFJEJK.mjs +0 -298
  47. package/dist/chunk-MPZFJEJK.mjs.map +0 -1
  48. package/dist/chunk-SMUUAKC3.js +0 -186
  49. package/dist/chunk-SMUUAKC3.js.map +0 -1
  50. package/dist/chunk-TIW3EQPC.js.map +0 -1
  51. package/dist/chunk-TKJSKXSA.mjs.map +0 -1
package/dist/react.js CHANGED
@@ -1,65 +1,113 @@
1
1
  'use strict';
2
2
 
3
- var chunkFTD7F7CS_js = require('./chunk-FTD7F7CS.js');
4
- var chunkTIW3EQPC_js = require('./chunk-TIW3EQPC.js');
3
+ var chunkULUYX23Q_js = require('./chunk-ULUYX23Q.js');
4
+ var chunkJUZVCBAI_js = require('./chunk-JUZVCBAI.js');
5
5
 
6
6
 
7
7
 
8
+ Object.defineProperty(exports, "AccountElement", {
9
+ enumerable: true,
10
+ get: function () { return chunkULUYX23Q_js.AccountElement; }
11
+ });
8
12
  Object.defineProperty(exports, "AppProvider", {
9
13
  enumerable: true,
10
- get: function () { return chunkFTD7F7CS_js.UnifiedProvider; }
14
+ get: function () { return chunkULUYX23Q_js.UnifiedProvider; }
15
+ });
16
+ Object.defineProperty(exports, "BalanceElement", {
17
+ enumerable: true,
18
+ get: function () { return chunkULUYX23Q_js.BalanceElement; }
19
+ });
20
+ Object.defineProperty(exports, "ClusterElement", {
21
+ enumerable: true,
22
+ get: function () { return chunkULUYX23Q_js.ClusterElement; }
11
23
  });
12
24
  Object.defineProperty(exports, "ConnectorProvider", {
13
25
  enumerable: true,
14
- get: function () { return chunkFTD7F7CS_js.ConnectorProvider; }
26
+ get: function () { return chunkULUYX23Q_js.ConnectorProvider; }
27
+ });
28
+ Object.defineProperty(exports, "DisconnectElement", {
29
+ enumerable: true,
30
+ get: function () { return chunkULUYX23Q_js.DisconnectElement; }
31
+ });
32
+ Object.defineProperty(exports, "TokenListElement", {
33
+ enumerable: true,
34
+ get: function () { return chunkULUYX23Q_js.TokenListElement; }
35
+ });
36
+ Object.defineProperty(exports, "TransactionHistoryElement", {
37
+ enumerable: true,
38
+ get: function () { return chunkULUYX23Q_js.TransactionHistoryElement; }
15
39
  });
16
40
  Object.defineProperty(exports, "UnifiedProvider", {
17
41
  enumerable: true,
18
- get: function () { return chunkFTD7F7CS_js.UnifiedProvider; }
42
+ get: function () { return chunkULUYX23Q_js.UnifiedProvider; }
43
+ });
44
+ Object.defineProperty(exports, "WalletListElement", {
45
+ enumerable: true,
46
+ get: function () { return chunkULUYX23Q_js.WalletListElement; }
19
47
  });
20
48
  Object.defineProperty(exports, "useAccount", {
21
49
  enumerable: true,
22
- get: function () { return chunkFTD7F7CS_js.useAccount; }
50
+ get: function () { return chunkULUYX23Q_js.useAccount; }
51
+ });
52
+ Object.defineProperty(exports, "useBalance", {
53
+ enumerable: true,
54
+ get: function () { return chunkULUYX23Q_js.useBalance; }
23
55
  });
24
56
  Object.defineProperty(exports, "useCluster", {
25
57
  enumerable: true,
26
- get: function () { return chunkFTD7F7CS_js.useCluster; }
58
+ get: function () { return chunkULUYX23Q_js.useCluster; }
27
59
  });
28
60
  Object.defineProperty(exports, "useConnector", {
29
61
  enumerable: true,
30
- get: function () { return chunkFTD7F7CS_js.useConnector; }
62
+ get: function () { return chunkULUYX23Q_js.useConnector; }
31
63
  });
32
64
  Object.defineProperty(exports, "useConnectorClient", {
33
65
  enumerable: true,
34
- get: function () { return chunkFTD7F7CS_js.useConnectorClient; }
66
+ get: function () { return chunkULUYX23Q_js.useConnectorClient; }
35
67
  });
36
68
  Object.defineProperty(exports, "useGillSolanaClient", {
37
69
  enumerable: true,
38
- get: function () { return chunkFTD7F7CS_js.useGillSolanaClient; }
70
+ get: function () { return chunkULUYX23Q_js.useGillSolanaClient; }
39
71
  });
40
72
  Object.defineProperty(exports, "useGillTransactionSigner", {
41
73
  enumerable: true,
42
- get: function () { return chunkFTD7F7CS_js.useGillTransactionSigner; }
74
+ get: function () { return chunkULUYX23Q_js.useGillTransactionSigner; }
75
+ });
76
+ Object.defineProperty(exports, "useKitTransactionSigner", {
77
+ enumerable: true,
78
+ get: function () { return chunkULUYX23Q_js.useKitTransactionSigner; }
79
+ });
80
+ Object.defineProperty(exports, "useSolanaClient", {
81
+ enumerable: true,
82
+ get: function () { return chunkULUYX23Q_js.useSolanaClient; }
83
+ });
84
+ Object.defineProperty(exports, "useTokens", {
85
+ enumerable: true,
86
+ get: function () { return chunkULUYX23Q_js.useTokens; }
43
87
  });
44
88
  Object.defineProperty(exports, "useTransactionPreparer", {
45
89
  enumerable: true,
46
- get: function () { return chunkFTD7F7CS_js.useTransactionPreparer; }
90
+ get: function () { return chunkULUYX23Q_js.useTransactionPreparer; }
47
91
  });
48
92
  Object.defineProperty(exports, "useTransactionSigner", {
49
93
  enumerable: true,
50
- get: function () { return chunkFTD7F7CS_js.useTransactionSigner; }
94
+ get: function () { return chunkULUYX23Q_js.useTransactionSigner; }
95
+ });
96
+ Object.defineProperty(exports, "useTransactions", {
97
+ enumerable: true,
98
+ get: function () { return chunkULUYX23Q_js.useTransactions; }
51
99
  });
52
100
  Object.defineProperty(exports, "useWalletInfo", {
53
101
  enumerable: true,
54
- get: function () { return chunkFTD7F7CS_js.useWalletInfo; }
102
+ get: function () { return chunkULUYX23Q_js.useWalletInfo; }
55
103
  });
56
104
  Object.defineProperty(exports, "ConnectorErrorBoundary", {
57
105
  enumerable: true,
58
- get: function () { return chunkTIW3EQPC_js.ConnectorErrorBoundary; }
106
+ get: function () { return chunkJUZVCBAI_js.ConnectorErrorBoundary; }
59
107
  });
60
108
  Object.defineProperty(exports, "withErrorBoundary", {
61
109
  enumerable: true,
62
- get: function () { return chunkTIW3EQPC_js.withErrorBoundary; }
110
+ get: function () { return chunkJUZVCBAI_js.withErrorBoundary; }
63
111
  });
64
112
  //# sourceMappingURL=react.js.map
65
113
  //# sourceMappingURL=react.js.map
package/dist/react.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { UnifiedProvider as AppProvider, ConnectorProvider, UnifiedProvider, useAccount, useCluster, useConnector, useConnectorClient, useGillSolanaClient, useGillTransactionSigner, useTransactionPreparer, useTransactionSigner, useWalletInfo } from './chunk-MPZFJEJK.mjs';
2
- export { ConnectorErrorBoundary, withErrorBoundary } from './chunk-TKJSKXSA.mjs';
1
+ export { AccountElement, UnifiedProvider as AppProvider, BalanceElement, ClusterElement, ConnectorProvider, DisconnectElement, TokenListElement, TransactionHistoryElement, UnifiedProvider, WalletListElement, useAccount, useBalance, useCluster, useConnector, useConnectorClient, useGillSolanaClient, useGillTransactionSigner, useKitTransactionSigner, useSolanaClient, useTokens, useTransactionPreparer, useTransactionSigner, useTransactions, useWalletInfo } from './chunk-3STZXVXD.mjs';
2
+ export { ConnectorErrorBoundary, withErrorBoundary } from './chunk-VMSZJPR5.mjs';
3
3
  //# sourceMappingURL=react.mjs.map
4
4
  //# sourceMappingURL=react.mjs.map
@@ -1,6 +1,8 @@
1
1
  import { Wallet, WalletAccount } from '@wallet-standard/base';
2
2
  import { SolanaClusterId, SolanaCluster } from '@wallet-ui/core';
3
- import { Signature, Address, TransactionMessage } from 'gill';
3
+ import { Address } from '@solana/addresses';
4
+ import { Signature } from '@solana/keys';
5
+ import { TransactionMessage } from '@solana/transaction-messages';
4
6
  import { Transaction, VersionedTransaction } from '@solana/web3.js';
5
7
 
6
8
  /**
@@ -1,6 +1,8 @@
1
1
  import { Wallet, WalletAccount } from '@wallet-standard/base';
2
2
  import { SolanaClusterId, SolanaCluster } from '@wallet-ui/core';
3
- import { Signature, Address, TransactionMessage } from 'gill';
3
+ import { Address } from '@solana/addresses';
4
+ import { Signature } from '@solana/keys';
5
+ import { TransactionMessage } from '@solana/transaction-messages';
4
6
  import { Transaction, VersionedTransaction } from '@solana/web3.js';
5
7
 
6
8
  /**
@@ -1,9 +1,11 @@
1
- import { c as TransactionActivity, d as TransactionActivityStatus } from './transaction-signer-D3csM_Mf.mjs';
1
+ import { c as TransactionActivity, d as TransactionActivityStatus } from './transaction-signer-D9d8nxwb.js';
2
2
  import { SolanaClusterId, SolanaCluster } from '@wallet-ui/core';
3
3
  import { Wallet, WalletAccount } from '@wallet-standard/base';
4
- import { Address, Signature } from 'gill';
4
+ import { Address } from '@solana/addresses';
5
5
  import React, { ReactNode, Component, ErrorInfo } from 'react';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
+ import { Signature } from '@solana/keys';
8
+ import { DevnetUrl, MainnetUrl, TestnetUrl, Rpc, SolanaRpcApi, RpcSubscriptions, SolanaRpcSubscriptionsApi } from '@solana/kit';
7
9
 
8
10
  /**
9
11
  * Wallet-related types
@@ -21,7 +23,7 @@ type WalletName = string & {
21
23
  * Account address as a branded string for type safety
22
24
  * Represents a Solana address (base58-encoded public key)
23
25
  *
24
- * @deprecated Use `Address` from 'gill' instead for consistent address typing
26
+ * @deprecated Use `Address` from '@solana/addresses' instead for consistent address typing
25
27
  */
26
28
  type AccountAddress = string & {
27
29
  readonly __brand: 'AccountAddress';
@@ -33,7 +35,7 @@ declare function isWalletName(value: string): value is WalletName;
33
35
  /**
34
36
  * Type guard to check if a string is a valid account address
35
37
  *
36
- * @deprecated Use `isAddress` from 'gill' instead for proper address validation
38
+ * @deprecated Use `isAddress` from '@solana/addresses' instead for proper address validation
37
39
  */
38
40
  declare function isAccountAddress(value: string): value is AccountAddress;
39
41
  /**
@@ -114,6 +116,48 @@ interface AccountInfo {
114
116
  raw: WalletAccount;
115
117
  }
116
118
 
119
+ /**
120
+ * CoinGecko API configuration for price fetching.
121
+ *
122
+ * Rate Limits (as of 2024):
123
+ * - Free tier (no API key): 10-30 requests/minute (varies by endpoint)
124
+ * - Demo tier (free API key): 30 requests/minute
125
+ * - Paid tiers: Higher limits based on plan
126
+ *
127
+ * @see https://docs.coingecko.com/reference/introduction
128
+ */
129
+ interface CoinGeckoConfig {
130
+ /**
131
+ * CoinGecko API key for higher rate limits.
132
+ * Get a free Demo API key at https://www.coingecko.com/en/api/pricing
133
+ * - Without key: ~10-30 requests/minute (public rate limit)
134
+ * - With Demo key: 30 requests/minute
135
+ */
136
+ apiKey?: string;
137
+ /**
138
+ * Whether the API key is for the Pro API (api.coingecko.com with x-cg-pro-api-key header)
139
+ * or the Demo API (api.coingecko.com with x-cg-demo-api-key header).
140
+ * @default false (uses Demo API header)
141
+ */
142
+ isPro?: boolean;
143
+ /**
144
+ * Maximum number of retry attempts when rate limited (429 response).
145
+ * @default 3
146
+ */
147
+ maxRetries?: number;
148
+ /**
149
+ * Base delay in milliseconds for exponential backoff.
150
+ * Actual delay = baseDelay * 2^attempt + random jitter
151
+ * @default 1000 (1 second)
152
+ */
153
+ baseDelay?: number;
154
+ /**
155
+ * Maximum total timeout in milliseconds for all retry attempts combined.
156
+ * Prevents blocking the caller for too long.
157
+ * @default 30000 (30 seconds)
158
+ */
159
+ maxTimeout?: number;
160
+ }
117
161
  /**
118
162
  * Core connector state
119
163
  */
@@ -149,6 +193,19 @@ interface ConnectorConfig {
149
193
  persistSelection?: boolean;
150
194
  initialCluster?: SolanaClusterId;
151
195
  };
196
+ /**
197
+ * Image proxy URL prefix for token images.
198
+ * When set, token image URLs will be transformed to: `${imageProxy}${encodeURIComponent(originalUrl)}`
199
+ * This prevents direct image fetching which can leak user IPs to untrusted hosts.
200
+ * @example '/_next/image?w=64&q=75&url=' // Next.js Image Optimization
201
+ * @example '/cdn-cgi/image/width=64,quality=75/' // Cloudflare Image Resizing
202
+ */
203
+ imageProxy?: string;
204
+ /**
205
+ * CoinGecko API configuration for token price fetching.
206
+ * Configure API key for higher rate limits and retry behavior for 429 responses.
207
+ */
208
+ coingecko?: CoinGeckoConfig;
152
209
  }
153
210
  /**
154
211
  * Health check information for connector diagnostics
@@ -322,6 +379,10 @@ declare class ConnectorClient {
322
379
  getHealth(): ConnectorHealth;
323
380
  getDebugMetrics(): ConnectorDebugMetrics;
324
381
  getDebugState(): ConnectorDebugState;
382
+ /**
383
+ * Get the current connector configuration
384
+ */
385
+ getConfig(): ConnectorConfig;
325
386
  resetDebugMetrics(): void;
326
387
  destroy(): void;
327
388
  }
@@ -355,6 +416,20 @@ interface DefaultConfigOptions {
355
416
  maxRetries?: number;
356
417
  /** Custom error handler */
357
418
  onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
419
+ /**
420
+ * Image proxy URL prefix for token images.
421
+ * When set, token image URLs will be transformed to: `${imageProxy}${encodeURIComponent(originalUrl)}`
422
+ * This prevents direct image fetching which can leak user IPs to untrusted hosts.
423
+ * @example '/_next/image?w=64&q=75&url=' // Next.js Image Optimization
424
+ * @example '/cdn-cgi/image/width=64,quality=75/' // Cloudflare Image Resizing
425
+ */
426
+ imageProxy?: string;
427
+ /**
428
+ * CoinGecko API configuration for token price fetching.
429
+ * Configure API key for higher rate limits and retry behavior for 429 responses.
430
+ * @see https://docs.coingecko.com/reference/introduction for rate limit details
431
+ */
432
+ coingecko?: CoinGeckoConfig;
358
433
  }
359
434
  /** Extended ConnectorConfig with app metadata */
360
435
  interface ExtendedConnectorConfig extends ConnectorConfig {
@@ -377,6 +452,16 @@ interface ExtendedConnectorConfig extends ConnectorConfig {
377
452
  /** Custom fallback component */
378
453
  fallback?: (error: Error, retry: () => void) => React.ReactNode;
379
454
  };
455
+ /**
456
+ * Image proxy URL prefix for token images.
457
+ * When set, token image URLs will be transformed to: `${imageProxy}${encodeURIComponent(originalUrl)}`
458
+ * This prevents direct image fetching which can leak user IPs to untrusted hosts.
459
+ */
460
+ imageProxy?: string;
461
+ /**
462
+ * CoinGecko API configuration for token price fetching.
463
+ */
464
+ coingecko?: CoinGeckoConfig;
380
465
  }
381
466
  /**
382
467
  * Creates a default connector configuration with sensible defaults for Solana applications
@@ -395,7 +480,7 @@ declare function getDefaultMobileConfig(options: {
395
480
  uri: string;
396
481
  icon: string;
397
482
  };
398
- cluster: "mainnet" | "devnet" | "testnet" | "mainnet-beta";
483
+ cluster: "devnet" | "mainnet" | "testnet" | "mainnet-beta";
399
484
  };
400
485
 
401
486
  declare global {
@@ -912,6 +997,131 @@ declare function copyAddressToClipboard(address: string, options?: Omit<CopyOpti
912
997
  */
913
998
  declare function copySignatureToClipboard(signature: string, options?: Omit<CopyOptions, 'validateType'>): Promise<ClipboardResult>;
914
999
 
1000
+ /**
1001
+ * @solana/connector - Kit RPC Utilities
1002
+ *
1003
+ * RPC URL helpers for Solana clusters.
1004
+ */
1005
+
1006
+ /** Solana cluster moniker */
1007
+ type SolanaClusterMoniker = 'devnet' | 'localnet' | 'mainnet' | 'testnet';
1008
+ /** Localnet URL type */
1009
+ type LocalnetUrl = string & {
1010
+ '~cluster': 'localnet';
1011
+ };
1012
+ /** Generic URL type */
1013
+ type GenericUrl = string & {};
1014
+ /** Union of all cluster URL types */
1015
+ type ModifiedClusterUrl = DevnetUrl | GenericUrl | LocalnetUrl | MainnetUrl | TestnetUrl;
1016
+ /** URL or moniker that can be used to create a Solana client */
1017
+ type SolanaClientUrlOrMoniker = ModifiedClusterUrl | SolanaClusterMoniker | URL;
1018
+ /**
1019
+ * Get a public Solana RPC endpoint for a cluster based on its moniker
1020
+ *
1021
+ * Note: These RPC URLs are rate limited and not suitable for production applications.
1022
+ * For production, use a dedicated RPC provider like Triton, Helius, QuickNode, or Alchemy.
1023
+ *
1024
+ * @param cluster - Cluster moniker
1025
+ * @returns Public RPC URL for the cluster
1026
+ */
1027
+ declare function getPublicSolanaRpcUrl(cluster: SolanaClusterMoniker | 'mainnet-beta' | 'localhost'): ModifiedClusterUrl;
1028
+
1029
+ /**
1030
+ * @solana/connector - Kit Client Factory
1031
+ *
1032
+ * Creates a Solana RPC and WebSocket subscriptions client.
1033
+ * Replaces gill's createSolanaClient with a kit-based implementation.
1034
+ */
1035
+
1036
+ /**
1037
+ * Configuration for creating a Solana RPC client
1038
+ */
1039
+ interface CreateSolanaClientRpcConfig {
1040
+ /** Custom port for the RPC endpoint */
1041
+ port?: number;
1042
+ }
1043
+ /**
1044
+ * Configuration for creating a Solana RPC subscriptions client
1045
+ */
1046
+ interface CreateSolanaClientRpcSubscriptionsConfig {
1047
+ /** Custom port for the WebSocket endpoint */
1048
+ port?: number;
1049
+ }
1050
+ /**
1051
+ * Arguments for creating a Solana client
1052
+ */
1053
+ interface CreateSolanaClientArgs<TClusterUrl extends SolanaClientUrlOrMoniker = string> {
1054
+ /** Full RPC URL (for a private RPC endpoint) or the Solana moniker (for a public RPC endpoint) */
1055
+ urlOrMoniker: SolanaClientUrlOrMoniker | TClusterUrl;
1056
+ /** Configuration used to create the `rpc` client */
1057
+ rpcConfig?: CreateSolanaClientRpcConfig;
1058
+ /** Configuration used to create the `rpcSubscriptions` client */
1059
+ rpcSubscriptionsConfig?: CreateSolanaClientRpcSubscriptionsConfig;
1060
+ }
1061
+ /**
1062
+ * A Solana client with RPC and WebSocket subscription capabilities
1063
+ */
1064
+ interface SolanaClient<TClusterUrl extends ModifiedClusterUrl | string = string> {
1065
+ /** Used to make RPC calls to your RPC provider */
1066
+ rpc: Rpc<SolanaRpcApi>;
1067
+ /** Used to make RPC websocket calls to your RPC provider */
1068
+ rpcSubscriptions: RpcSubscriptions<SolanaRpcSubscriptionsApi>;
1069
+ /** Full RPC URL that was used to create this client */
1070
+ urlOrMoniker: SolanaClientUrlOrMoniker | TClusterUrl;
1071
+ }
1072
+ /**
1073
+ * Create a Solana `rpc` and `rpcSubscriptions` client
1074
+ *
1075
+ * @param props - Configuration for the client
1076
+ * @returns Solana client with RPC and WebSocket subscription capabilities
1077
+ *
1078
+ * @example
1079
+ * ```ts
1080
+ * // Using a cluster moniker
1081
+ * const client = createSolanaClient({ urlOrMoniker: 'devnet' });
1082
+ *
1083
+ * // Using a custom RPC URL
1084
+ * const client = createSolanaClient({ urlOrMoniker: 'https://my-rpc.example.com' });
1085
+ *
1086
+ * // Making RPC calls
1087
+ * const balance = await client.rpc.getBalance(address).send();
1088
+ * ```
1089
+ */
1090
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<MainnetUrl | 'mainnet'>, 'urlOrMoniker'> & {
1091
+ urlOrMoniker: 'mainnet';
1092
+ }): SolanaClient<MainnetUrl>;
1093
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<DevnetUrl | 'devnet'>, 'urlOrMoniker'> & {
1094
+ urlOrMoniker: 'devnet';
1095
+ }): SolanaClient<DevnetUrl>;
1096
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<TestnetUrl | 'testnet'>, 'urlOrMoniker'> & {
1097
+ urlOrMoniker: 'testnet';
1098
+ }): SolanaClient<TestnetUrl>;
1099
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<LocalnetUrl | 'localnet'>, 'urlOrMoniker'> & {
1100
+ urlOrMoniker: 'localnet';
1101
+ }): SolanaClient<LocalnetUrl>;
1102
+ declare function createSolanaClient<TClusterUrl extends ModifiedClusterUrl>(props: CreateSolanaClientArgs<TClusterUrl>): SolanaClient<TClusterUrl>;
1103
+
1104
+ /**
1105
+ * @solana/connector - Kit Debug Utilities
1106
+ *
1107
+ * Simplified debug logging utilities for the connector.
1108
+ * Replaces gill's debug system with a connector-specific implementation.
1109
+ */
1110
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error';
1111
+ declare global {
1112
+ /**
1113
+ * Whether or not to enable debug mode. When enabled, default log level of `info`
1114
+ */
1115
+ var __CONNECTOR_DEBUG__: boolean | undefined;
1116
+ /**
1117
+ * Set the a desired level of logs to be output in the application
1118
+ *
1119
+ * - Default: `info`
1120
+ * - Options: `debug` | `info` | `warn` | `error`
1121
+ */
1122
+ var __CONNECTOR_DEBUG_LEVEL__: LogLevel | undefined;
1123
+ }
1124
+
915
1125
  interface WalletsRegistry {
916
1126
  get(): readonly Wallet[];
917
1127
  on(event: 'register' | 'unregister', callback: (wallet: Wallet) => void): () => void;
@@ -923,4 +1133,4 @@ type WalletStandardAccount = WalletAccount;
923
1133
  */
924
1134
  declare function getWalletsRegistry(): WalletsRegistry;
925
1135
 
926
- export { getBlockUrl as $, type AccountInfo as A, type StorageOptions as B, ConnectorProvider as C, type DefaultConfigOptions as D, type ExtendedConnectorConfig as E, type EnhancedStorageAccountOptions as F, type EnhancedStorageClusterOptions as G, type EnhancedStorageWalletOptions as H, WalletErrorType as I, type WalletError as J, ClipboardErrorType as K, type Listener as L, type MobileWalletAdapterConfig as M, type ClipboardResult as N, type CopyOptions as O, isClipboardAvailable as P, copyToClipboard as Q, copyAddressToClipboard as R, type StorageAdapter as S, copySignatureToClipboard as T, type UnifiedConfigOptions as U, getClusterRpcUrl as V, type WalletInfo as W, getClusterExplorerUrl as X, getTransactionUrl as Y, getAddressUrl as Z, getTokenUrl as _, useConnectorClient as a, isMainnetCluster as a0, isDevnetCluster as a1, isTestnetCluster as a2, isLocalCluster as a3, getClusterName as a4, getClusterType as a5, getClusterChainId as a6, getChainIdForWalletStandard as a7, type SolanaNetwork as a8, PUBLIC_RPC_ENDPOINTS as a9, normalizeNetwork as aa, toClusterId as ab, getDefaultRpcUrl as ac, isMainnet as ad, isDevnet as ae, isTestnet as af, isLocalnet as ag, getNetworkDisplayName as ah, ConnectorErrorBoundary as b, type ConnectorSnapshot as c, type ConnectorConfig as d, type ConnectorState as e, type WalletStandardWallet as f, type WalletStandardAccount as g, type UnifiedConfig as h, type ClusterType as i, ConnectorClient as j, getWalletsRegistry as k, getDefaultConfig as l, getDefaultMobileConfig as m, createConfig as n, isUnifiedConfig as o, type WalletName as p, type AccountAddress as q, isWalletName as r, isAccountAddress as s, type ConnectorHealth as t, useConnector as u, type ConnectorDebugMetrics as v, withErrorBoundary as w, type ConnectorDebugState as x, type ConnectorEvent as y, type ConnectorEventListener as z };
1136
+ export { copySignatureToClipboard as $, type AccountInfo as A, type StorageOptions as B, ConnectorProvider as C, type DefaultConfigOptions as D, type ExtendedConnectorConfig as E, type EnhancedStorageAccountOptions as F, type EnhancedStorageClusterOptions as G, type EnhancedStorageWalletOptions as H, WalletErrorType as I, type WalletError as J, getPublicSolanaRpcUrl as K, type Listener as L, type MobileWalletAdapterConfig as M, createSolanaClient as N, type SolanaClusterMoniker as O, type ModifiedClusterUrl as P, type SolanaClient as Q, type CreateSolanaClientArgs as R, type StorageAdapter as S, ClipboardErrorType as T, type UnifiedConfigOptions as U, type ClipboardResult as V, type WalletInfo as W, type CopyOptions as X, isClipboardAvailable as Y, copyToClipboard as Z, copyAddressToClipboard as _, useConnectorClient as a, getClusterRpcUrl as a0, getClusterExplorerUrl as a1, getTransactionUrl as a2, getAddressUrl as a3, getTokenUrl as a4, getBlockUrl as a5, isMainnetCluster as a6, isDevnetCluster as a7, isTestnetCluster as a8, isLocalCluster as a9, getClusterName as aa, getClusterType as ab, getClusterChainId as ac, getChainIdForWalletStandard as ad, type SolanaNetwork as ae, PUBLIC_RPC_ENDPOINTS as af, normalizeNetwork as ag, toClusterId as ah, getDefaultRpcUrl as ai, isMainnet as aj, isDevnet as ak, isTestnet as al, isLocalnet as am, getNetworkDisplayName as an, ConnectorErrorBoundary as b, type ConnectorSnapshot as c, type ConnectorConfig as d, type ConnectorState as e, type WalletStandardWallet as f, type WalletStandardAccount as g, type UnifiedConfig as h, type ClusterType as i, ConnectorClient as j, getWalletsRegistry as k, getDefaultConfig as l, getDefaultMobileConfig as m, createConfig as n, isUnifiedConfig as o, type WalletName as p, type AccountAddress as q, isWalletName as r, isAccountAddress as s, type ConnectorHealth as t, useConnector as u, type ConnectorDebugMetrics as v, withErrorBoundary as w, type ConnectorDebugState as x, type ConnectorEvent as y, type ConnectorEventListener as z };