@solana/connector 0.1.3 → 0.1.4

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 +460 -1082
  3. package/dist/{chunk-TIW3EQPC.js → chunk-CLXM6UEE.js} +120 -103
  4. package/dist/chunk-CLXM6UEE.js.map +1 -0
  5. package/dist/{chunk-7CKCRY25.js → chunk-D6PZY5G6.js} +69 -77
  6. package/dist/chunk-D6PZY5G6.js.map +1 -0
  7. package/dist/chunk-LUZWUZ5N.js +2012 -0
  8. package/dist/chunk-LUZWUZ5N.js.map +1 -0
  9. package/dist/{chunk-HPENTIPE.mjs → chunk-N3Q2J2FG.mjs} +51 -55
  10. package/dist/chunk-N3Q2J2FG.mjs.map +1 -0
  11. package/dist/chunk-P5MWBDFG.mjs +298 -0
  12. package/dist/chunk-P5MWBDFG.mjs.map +1 -0
  13. package/dist/chunk-RIQH5W7D.js +311 -0
  14. package/dist/chunk-RIQH5W7D.js.map +1 -0
  15. package/dist/chunk-U64YZRJL.mjs +1984 -0
  16. package/dist/chunk-U64YZRJL.mjs.map +1 -0
  17. package/dist/{chunk-TKJSKXSA.mjs → chunk-YTCSTE3Q.mjs} +35 -19
  18. package/dist/chunk-YTCSTE3Q.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-C1tisl9S.d.ts → wallet-standard-shim-Cp4vF4oo.d.mts} +133 -6
  38. package/dist/{wallet-standard-shim-Cg0GVGwu.d.mts → wallet-standard-shim-DC_Z7DS-.d.ts} +133 -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 chunkLUZWUZ5N_js = require('./chunk-LUZWUZ5N.js');
4
+ var chunkCLXM6UEE_js = require('./chunk-CLXM6UEE.js');
5
5
 
6
6
 
7
7
 
8
+ Object.defineProperty(exports, "AccountElement", {
9
+ enumerable: true,
10
+ get: function () { return chunkLUZWUZ5N_js.AccountElement; }
11
+ });
8
12
  Object.defineProperty(exports, "AppProvider", {
9
13
  enumerable: true,
10
- get: function () { return chunkFTD7F7CS_js.UnifiedProvider; }
14
+ get: function () { return chunkLUZWUZ5N_js.UnifiedProvider; }
15
+ });
16
+ Object.defineProperty(exports, "BalanceElement", {
17
+ enumerable: true,
18
+ get: function () { return chunkLUZWUZ5N_js.BalanceElement; }
19
+ });
20
+ Object.defineProperty(exports, "ClusterElement", {
21
+ enumerable: true,
22
+ get: function () { return chunkLUZWUZ5N_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 chunkLUZWUZ5N_js.ConnectorProvider; }
27
+ });
28
+ Object.defineProperty(exports, "DisconnectElement", {
29
+ enumerable: true,
30
+ get: function () { return chunkLUZWUZ5N_js.DisconnectElement; }
31
+ });
32
+ Object.defineProperty(exports, "TokenListElement", {
33
+ enumerable: true,
34
+ get: function () { return chunkLUZWUZ5N_js.TokenListElement; }
35
+ });
36
+ Object.defineProperty(exports, "TransactionHistoryElement", {
37
+ enumerable: true,
38
+ get: function () { return chunkLUZWUZ5N_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 chunkLUZWUZ5N_js.UnifiedProvider; }
43
+ });
44
+ Object.defineProperty(exports, "WalletListElement", {
45
+ enumerable: true,
46
+ get: function () { return chunkLUZWUZ5N_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 chunkLUZWUZ5N_js.useAccount; }
51
+ });
52
+ Object.defineProperty(exports, "useBalance", {
53
+ enumerable: true,
54
+ get: function () { return chunkLUZWUZ5N_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 chunkLUZWUZ5N_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 chunkLUZWUZ5N_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 chunkLUZWUZ5N_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 chunkLUZWUZ5N_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 chunkLUZWUZ5N_js.useGillTransactionSigner; }
75
+ });
76
+ Object.defineProperty(exports, "useKitTransactionSigner", {
77
+ enumerable: true,
78
+ get: function () { return chunkLUZWUZ5N_js.useKitTransactionSigner; }
79
+ });
80
+ Object.defineProperty(exports, "useSolanaClient", {
81
+ enumerable: true,
82
+ get: function () { return chunkLUZWUZ5N_js.useSolanaClient; }
83
+ });
84
+ Object.defineProperty(exports, "useTokens", {
85
+ enumerable: true,
86
+ get: function () { return chunkLUZWUZ5N_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 chunkLUZWUZ5N_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 chunkLUZWUZ5N_js.useTransactionSigner; }
95
+ });
96
+ Object.defineProperty(exports, "useTransactions", {
97
+ enumerable: true,
98
+ get: function () { return chunkLUZWUZ5N_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 chunkLUZWUZ5N_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 chunkCLXM6UEE_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 chunkCLXM6UEE_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-U64YZRJL.mjs';
2
+ export { ConnectorErrorBoundary, withErrorBoundary } from './chunk-YTCSTE3Q.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.js';
1
+ import { c as TransactionActivity, d as TransactionActivityStatus } from './transaction-signer-D9d8nxwb.mjs';
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
  /**
@@ -395,7 +397,7 @@ declare function getDefaultMobileConfig(options: {
395
397
  uri: string;
396
398
  icon: string;
397
399
  };
398
- cluster: "mainnet" | "devnet" | "testnet" | "mainnet-beta";
400
+ cluster: "devnet" | "mainnet" | "testnet" | "mainnet-beta";
399
401
  };
400
402
 
401
403
  declare global {
@@ -912,6 +914,131 @@ declare function copyAddressToClipboard(address: string, options?: Omit<CopyOpti
912
914
  */
913
915
  declare function copySignatureToClipboard(signature: string, options?: Omit<CopyOptions, 'validateType'>): Promise<ClipboardResult>;
914
916
 
917
+ /**
918
+ * @solana/connector - Kit RPC Utilities
919
+ *
920
+ * RPC URL helpers for Solana clusters.
921
+ */
922
+
923
+ /** Solana cluster moniker */
924
+ type SolanaClusterMoniker = 'devnet' | 'localnet' | 'mainnet' | 'testnet';
925
+ /** Localnet URL type */
926
+ type LocalnetUrl = string & {
927
+ '~cluster': 'localnet';
928
+ };
929
+ /** Generic URL type */
930
+ type GenericUrl = string & {};
931
+ /** Union of all cluster URL types */
932
+ type ModifiedClusterUrl = DevnetUrl | GenericUrl | LocalnetUrl | MainnetUrl | TestnetUrl;
933
+ /** URL or moniker that can be used to create a Solana client */
934
+ type SolanaClientUrlOrMoniker = ModifiedClusterUrl | SolanaClusterMoniker | URL;
935
+ /**
936
+ * Get a public Solana RPC endpoint for a cluster based on its moniker
937
+ *
938
+ * Note: These RPC URLs are rate limited and not suitable for production applications.
939
+ * For production, use a dedicated RPC provider like Triton, Helius, QuickNode, or Alchemy.
940
+ *
941
+ * @param cluster - Cluster moniker
942
+ * @returns Public RPC URL for the cluster
943
+ */
944
+ declare function getPublicSolanaRpcUrl(cluster: SolanaClusterMoniker | 'mainnet-beta' | 'localhost'): ModifiedClusterUrl;
945
+
946
+ /**
947
+ * @solana/connector - Kit Client Factory
948
+ *
949
+ * Creates a Solana RPC and WebSocket subscriptions client.
950
+ * Replaces gill's createSolanaClient with a kit-based implementation.
951
+ */
952
+
953
+ /**
954
+ * Configuration for creating a Solana RPC client
955
+ */
956
+ interface CreateSolanaClientRpcConfig {
957
+ /** Custom port for the RPC endpoint */
958
+ port?: number;
959
+ }
960
+ /**
961
+ * Configuration for creating a Solana RPC subscriptions client
962
+ */
963
+ interface CreateSolanaClientRpcSubscriptionsConfig {
964
+ /** Custom port for the WebSocket endpoint */
965
+ port?: number;
966
+ }
967
+ /**
968
+ * Arguments for creating a Solana client
969
+ */
970
+ interface CreateSolanaClientArgs<TClusterUrl extends SolanaClientUrlOrMoniker = string> {
971
+ /** Full RPC URL (for a private RPC endpoint) or the Solana moniker (for a public RPC endpoint) */
972
+ urlOrMoniker: SolanaClientUrlOrMoniker | TClusterUrl;
973
+ /** Configuration used to create the `rpc` client */
974
+ rpcConfig?: CreateSolanaClientRpcConfig;
975
+ /** Configuration used to create the `rpcSubscriptions` client */
976
+ rpcSubscriptionsConfig?: CreateSolanaClientRpcSubscriptionsConfig;
977
+ }
978
+ /**
979
+ * A Solana client with RPC and WebSocket subscription capabilities
980
+ */
981
+ interface SolanaClient<TClusterUrl extends ModifiedClusterUrl | string = string> {
982
+ /** Used to make RPC calls to your RPC provider */
983
+ rpc: Rpc<SolanaRpcApi>;
984
+ /** Used to make RPC websocket calls to your RPC provider */
985
+ rpcSubscriptions: RpcSubscriptions<SolanaRpcSubscriptionsApi>;
986
+ /** Full RPC URL that was used to create this client */
987
+ urlOrMoniker: SolanaClientUrlOrMoniker | TClusterUrl;
988
+ }
989
+ /**
990
+ * Create a Solana `rpc` and `rpcSubscriptions` client
991
+ *
992
+ * @param props - Configuration for the client
993
+ * @returns Solana client with RPC and WebSocket subscription capabilities
994
+ *
995
+ * @example
996
+ * ```ts
997
+ * // Using a cluster moniker
998
+ * const client = createSolanaClient({ urlOrMoniker: 'devnet' });
999
+ *
1000
+ * // Using a custom RPC URL
1001
+ * const client = createSolanaClient({ urlOrMoniker: 'https://my-rpc.example.com' });
1002
+ *
1003
+ * // Making RPC calls
1004
+ * const balance = await client.rpc.getBalance(address).send();
1005
+ * ```
1006
+ */
1007
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<MainnetUrl | 'mainnet'>, 'urlOrMoniker'> & {
1008
+ urlOrMoniker: 'mainnet';
1009
+ }): SolanaClient<MainnetUrl>;
1010
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<DevnetUrl | 'devnet'>, 'urlOrMoniker'> & {
1011
+ urlOrMoniker: 'devnet';
1012
+ }): SolanaClient<DevnetUrl>;
1013
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<TestnetUrl | 'testnet'>, 'urlOrMoniker'> & {
1014
+ urlOrMoniker: 'testnet';
1015
+ }): SolanaClient<TestnetUrl>;
1016
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<LocalnetUrl | 'localnet'>, 'urlOrMoniker'> & {
1017
+ urlOrMoniker: 'localnet';
1018
+ }): SolanaClient<LocalnetUrl>;
1019
+ declare function createSolanaClient<TClusterUrl extends ModifiedClusterUrl>(props: CreateSolanaClientArgs<TClusterUrl>): SolanaClient<TClusterUrl>;
1020
+
1021
+ /**
1022
+ * @solana/connector - Kit Debug Utilities
1023
+ *
1024
+ * Simplified debug logging utilities for the connector.
1025
+ * Replaces gill's debug system with a connector-specific implementation.
1026
+ */
1027
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error';
1028
+ declare global {
1029
+ /**
1030
+ * Whether or not to enable debug mode. When enabled, default log level of `info`
1031
+ */
1032
+ var __CONNECTOR_DEBUG__: boolean | undefined;
1033
+ /**
1034
+ * Set the a desired level of logs to be output in the application
1035
+ *
1036
+ * - Default: `info`
1037
+ * - Options: `debug` | `info` | `warn` | `error`
1038
+ */
1039
+ var __CONNECTOR_DEBUG_LEVEL__: LogLevel | undefined;
1040
+ }
1041
+
915
1042
  interface WalletsRegistry {
916
1043
  get(): readonly Wallet[];
917
1044
  on(event: 'register' | 'unregister', callback: (wallet: Wallet) => void): () => void;
@@ -923,4 +1050,4 @@ type WalletStandardAccount = WalletAccount;
923
1050
  */
924
1051
  declare function getWalletsRegistry(): WalletsRegistry;
925
1052
 
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 };
1053
+ 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 };
@@ -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
  /**
@@ -395,7 +397,7 @@ declare function getDefaultMobileConfig(options: {
395
397
  uri: string;
396
398
  icon: string;
397
399
  };
398
- cluster: "mainnet" | "devnet" | "testnet" | "mainnet-beta";
400
+ cluster: "devnet" | "mainnet" | "testnet" | "mainnet-beta";
399
401
  };
400
402
 
401
403
  declare global {
@@ -912,6 +914,131 @@ declare function copyAddressToClipboard(address: string, options?: Omit<CopyOpti
912
914
  */
913
915
  declare function copySignatureToClipboard(signature: string, options?: Omit<CopyOptions, 'validateType'>): Promise<ClipboardResult>;
914
916
 
917
+ /**
918
+ * @solana/connector - Kit RPC Utilities
919
+ *
920
+ * RPC URL helpers for Solana clusters.
921
+ */
922
+
923
+ /** Solana cluster moniker */
924
+ type SolanaClusterMoniker = 'devnet' | 'localnet' | 'mainnet' | 'testnet';
925
+ /** Localnet URL type */
926
+ type LocalnetUrl = string & {
927
+ '~cluster': 'localnet';
928
+ };
929
+ /** Generic URL type */
930
+ type GenericUrl = string & {};
931
+ /** Union of all cluster URL types */
932
+ type ModifiedClusterUrl = DevnetUrl | GenericUrl | LocalnetUrl | MainnetUrl | TestnetUrl;
933
+ /** URL or moniker that can be used to create a Solana client */
934
+ type SolanaClientUrlOrMoniker = ModifiedClusterUrl | SolanaClusterMoniker | URL;
935
+ /**
936
+ * Get a public Solana RPC endpoint for a cluster based on its moniker
937
+ *
938
+ * Note: These RPC URLs are rate limited and not suitable for production applications.
939
+ * For production, use a dedicated RPC provider like Triton, Helius, QuickNode, or Alchemy.
940
+ *
941
+ * @param cluster - Cluster moniker
942
+ * @returns Public RPC URL for the cluster
943
+ */
944
+ declare function getPublicSolanaRpcUrl(cluster: SolanaClusterMoniker | 'mainnet-beta' | 'localhost'): ModifiedClusterUrl;
945
+
946
+ /**
947
+ * @solana/connector - Kit Client Factory
948
+ *
949
+ * Creates a Solana RPC and WebSocket subscriptions client.
950
+ * Replaces gill's createSolanaClient with a kit-based implementation.
951
+ */
952
+
953
+ /**
954
+ * Configuration for creating a Solana RPC client
955
+ */
956
+ interface CreateSolanaClientRpcConfig {
957
+ /** Custom port for the RPC endpoint */
958
+ port?: number;
959
+ }
960
+ /**
961
+ * Configuration for creating a Solana RPC subscriptions client
962
+ */
963
+ interface CreateSolanaClientRpcSubscriptionsConfig {
964
+ /** Custom port for the WebSocket endpoint */
965
+ port?: number;
966
+ }
967
+ /**
968
+ * Arguments for creating a Solana client
969
+ */
970
+ interface CreateSolanaClientArgs<TClusterUrl extends SolanaClientUrlOrMoniker = string> {
971
+ /** Full RPC URL (for a private RPC endpoint) or the Solana moniker (for a public RPC endpoint) */
972
+ urlOrMoniker: SolanaClientUrlOrMoniker | TClusterUrl;
973
+ /** Configuration used to create the `rpc` client */
974
+ rpcConfig?: CreateSolanaClientRpcConfig;
975
+ /** Configuration used to create the `rpcSubscriptions` client */
976
+ rpcSubscriptionsConfig?: CreateSolanaClientRpcSubscriptionsConfig;
977
+ }
978
+ /**
979
+ * A Solana client with RPC and WebSocket subscription capabilities
980
+ */
981
+ interface SolanaClient<TClusterUrl extends ModifiedClusterUrl | string = string> {
982
+ /** Used to make RPC calls to your RPC provider */
983
+ rpc: Rpc<SolanaRpcApi>;
984
+ /** Used to make RPC websocket calls to your RPC provider */
985
+ rpcSubscriptions: RpcSubscriptions<SolanaRpcSubscriptionsApi>;
986
+ /** Full RPC URL that was used to create this client */
987
+ urlOrMoniker: SolanaClientUrlOrMoniker | TClusterUrl;
988
+ }
989
+ /**
990
+ * Create a Solana `rpc` and `rpcSubscriptions` client
991
+ *
992
+ * @param props - Configuration for the client
993
+ * @returns Solana client with RPC and WebSocket subscription capabilities
994
+ *
995
+ * @example
996
+ * ```ts
997
+ * // Using a cluster moniker
998
+ * const client = createSolanaClient({ urlOrMoniker: 'devnet' });
999
+ *
1000
+ * // Using a custom RPC URL
1001
+ * const client = createSolanaClient({ urlOrMoniker: 'https://my-rpc.example.com' });
1002
+ *
1003
+ * // Making RPC calls
1004
+ * const balance = await client.rpc.getBalance(address).send();
1005
+ * ```
1006
+ */
1007
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<MainnetUrl | 'mainnet'>, 'urlOrMoniker'> & {
1008
+ urlOrMoniker: 'mainnet';
1009
+ }): SolanaClient<MainnetUrl>;
1010
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<DevnetUrl | 'devnet'>, 'urlOrMoniker'> & {
1011
+ urlOrMoniker: 'devnet';
1012
+ }): SolanaClient<DevnetUrl>;
1013
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<TestnetUrl | 'testnet'>, 'urlOrMoniker'> & {
1014
+ urlOrMoniker: 'testnet';
1015
+ }): SolanaClient<TestnetUrl>;
1016
+ declare function createSolanaClient(props: Omit<CreateSolanaClientArgs<LocalnetUrl | 'localnet'>, 'urlOrMoniker'> & {
1017
+ urlOrMoniker: 'localnet';
1018
+ }): SolanaClient<LocalnetUrl>;
1019
+ declare function createSolanaClient<TClusterUrl extends ModifiedClusterUrl>(props: CreateSolanaClientArgs<TClusterUrl>): SolanaClient<TClusterUrl>;
1020
+
1021
+ /**
1022
+ * @solana/connector - Kit Debug Utilities
1023
+ *
1024
+ * Simplified debug logging utilities for the connector.
1025
+ * Replaces gill's debug system with a connector-specific implementation.
1026
+ */
1027
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error';
1028
+ declare global {
1029
+ /**
1030
+ * Whether or not to enable debug mode. When enabled, default log level of `info`
1031
+ */
1032
+ var __CONNECTOR_DEBUG__: boolean | undefined;
1033
+ /**
1034
+ * Set the a desired level of logs to be output in the application
1035
+ *
1036
+ * - Default: `info`
1037
+ * - Options: `debug` | `info` | `warn` | `error`
1038
+ */
1039
+ var __CONNECTOR_DEBUG_LEVEL__: LogLevel | undefined;
1040
+ }
1041
+
915
1042
  interface WalletsRegistry {
916
1043
  get(): readonly Wallet[];
917
1044
  on(event: 'register' | 'unregister', callback: (wallet: Wallet) => void): () => void;
@@ -923,4 +1050,4 @@ type WalletStandardAccount = WalletAccount;
923
1050
  */
924
1051
  declare function getWalletsRegistry(): WalletsRegistry;
925
1052
 
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 };
1053
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/connector",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Headless wallet connector client and React provider built on Wallet Standard",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -65,17 +65,17 @@
65
65
  "@nanostores/persistent": "^1.1.0",
66
66
  "@solana-mobile/wallet-standard-mobile": "^0.4.3",
67
67
  "@solana/webcrypto-ed25519-polyfill": "^4.0.0",
68
- "@solana/addresses": "^3.0.0",
69
- "@solana/keys": "^3.0.0",
70
- "@solana/kit": "^3.0.0",
71
- "@solana/signers": "^3.0.0",
72
- "@solana/transactions": "^3.0.0",
68
+ "@solana/addresses": "^5.0.0",
69
+ "@solana/codecs": "^5.0.0",
70
+ "@solana/keys": "^5.0.0",
71
+ "@solana/kit": "^5.0.0",
72
+ "@solana/signers": "^5.0.0",
73
+ "@solana/transaction-messages": "^5.0.0",
74
+ "@solana/transactions": "^5.0.0",
73
75
  "@wallet-standard/app": "^1.1.0",
74
76
  "@wallet-standard/base": "^1.1.0",
75
77
  "@wallet-standard/features": "^1.1.0",
76
- "@wallet-ui/core": "^2.0.0",
77
- "bs58": "^6.0.0",
78
- "gill": "^0.12.0"
78
+ "@wallet-ui/core": "^2.1.0"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@testing-library/jest-dom": "^6.9.1",
@@ -85,11 +85,15 @@
85
85
  "@vitest/coverage-v8": "^3.2.4",
86
86
  "@vitest/ui": "^3.2.4",
87
87
  "happy-dom": "^20.0.7",
88
- "react": "19.2.0",
89
- "react-dom": "19.2.0",
88
+ "react": "^19.2.1",
89
+ "react-dom": "^19.2.1",
90
90
  "tsup": "^8.5.0",
91
91
  "typescript": "^5.9.3",
92
92
  "vitest": "^3.2.4"
93
93
  },
94
- "license": "MIT"
94
+ "license": "MIT",
95
+ "repository": {
96
+ "type": "git",
97
+ "url": "https://github.com/solana-foundation/connectorkit"
98
+ }
95
99
  }