@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/compat.d.mts CHANGED
@@ -1,8 +1,10 @@
1
- import { S as SolanaTransaction, j as TransactionSigner } from './transaction-signer-D3csM_Mf.mjs';
1
+ import { S as SolanaTransaction, j as TransactionSigner } from './transaction-signer-D9d8nxwb.mjs';
2
2
  import { Connection, SendOptions } from '@solana/web3.js';
3
3
  import '@wallet-standard/base';
4
4
  import '@wallet-ui/core';
5
- import 'gill';
5
+ import '@solana/addresses';
6
+ import '@solana/keys';
7
+ import '@solana/transaction-messages';
6
8
 
7
9
  /**
8
10
  * Wallet Adapter Compatibility Bridge
package/dist/compat.d.ts CHANGED
@@ -1,8 +1,10 @@
1
- import { S as SolanaTransaction, j as TransactionSigner } from './transaction-signer-D3csM_Mf.js';
1
+ import { S as SolanaTransaction, j as TransactionSigner } from './transaction-signer-D9d8nxwb.js';
2
2
  import { Connection, SendOptions } from '@solana/web3.js';
3
3
  import '@wallet-standard/base';
4
4
  import '@wallet-ui/core';
5
- import 'gill';
5
+ import '@solana/addresses';
6
+ import '@solana/keys';
7
+ import '@solana/transaction-messages';
6
8
 
7
9
  /**
8
10
  * Wallet Adapter Compatibility Bridge
package/dist/compat.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkSMUUAKC3_js = require('./chunk-SMUUAKC3.js');
3
+ var chunkRIQH5W7D_js = require('./chunk-RIQH5W7D.js');
4
4
  var react = require('react');
5
5
 
6
- var logger = chunkSMUUAKC3_js.createLogger("WalletAdapterCompat");
6
+ var logger = chunkRIQH5W7D_js.createLogger("WalletAdapterCompat");
7
7
  function createWalletAdapterCompat(signer, options) {
8
8
  let { disconnect, transformTransaction, onError } = options, handleError = (error, operation) => {
9
9
  onError ? onError(error, operation) : logger.error("Wallet adapter compat error", { operation, error });
@@ -47,7 +47,7 @@ function createWalletAdapterCompat(signer, options) {
47
47
  if (!signer.getCapabilities().canSign)
48
48
  throw new Error("Wallet does not support transaction signing");
49
49
  let signedTx = await signer.signTransaction(tx), rawTransaction;
50
- if (chunkSMUUAKC3_js.isWeb3jsTransaction(signedTx))
50
+ if (chunkRIQH5W7D_js.isWeb3jsTransaction(signedTx))
51
51
  rawTransaction = signedTx.serialize();
52
52
  else if (signedTx instanceof Uint8Array)
53
53
  rawTransaction = signedTx;
package/dist/compat.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { createLogger, isWeb3jsTransaction } from './chunk-5ZUVZZWU.mjs';
1
+ import { createLogger, isWeb3jsTransaction } from './chunk-P5MWBDFG.mjs';
2
2
  import { useMemo } from 'react';
3
3
 
4
4
  var logger = createLogger("WalletAdapterCompat");
@@ -1,12 +1,11 @@
1
- import { i as ClusterType, B as StorageOptions, S as StorageAdapter, F as EnhancedStorageAccountOptions, G as EnhancedStorageClusterOptions, H as EnhancedStorageWalletOptions } from './wallet-standard-shim-Cg0GVGwu.mjs';
2
- export { q as AccountAddress, A as AccountInfo, K as ClipboardErrorType, N as ClipboardResult, j as ConnectorClient, d as ConnectorConfig, v as ConnectorDebugMetrics, x as ConnectorDebugState, y as ConnectorEvent, z as ConnectorEventListener, t as ConnectorHealth, e as ConnectorState, O as CopyOptions, D as DefaultConfigOptions, E as ExtendedConnectorConfig, L as Listener, M as MobileWalletAdapterConfig, a9 as PUBLIC_RPC_ENDPOINTS, a8 as SolanaNetwork, h as UnifiedConfig, U as UnifiedConfigOptions, J as WalletError, I as WalletErrorType, W as WalletInfo, p as WalletName, g as WalletStandardAccount, f as WalletStandardWallet, R as copyAddressToClipboard, T as copySignatureToClipboard, Q as copyToClipboard, n as createConfig, Z as getAddressUrl, $ as getBlockUrl, a7 as getChainIdForWalletStandard, a6 as getClusterChainId, X as getClusterExplorerUrl, a4 as getClusterName, V as getClusterRpcUrl, a5 as getClusterType, l as getDefaultConfig, m as getDefaultMobileConfig, ac as getDefaultRpcUrl, ah as getNetworkDisplayName, _ as getTokenUrl, Y as getTransactionUrl, k as getWalletsRegistry, s as isAccountAddress, P as isClipboardAvailable, ae as isDevnet, a1 as isDevnetCluster, a3 as isLocalCluster, ag as isLocalnet, ad as isMainnet, a0 as isMainnetCluster, af as isTestnet, a2 as isTestnetCluster, o as isUnifiedConfig, r as isWalletName, aa as normalizeNetwork, ab as toClusterId } from './wallet-standard-shim-Cg0GVGwu.mjs';
3
- import { j as TransactionSigner } from './transaction-signer-D3csM_Mf.mjs';
4
- export { l as ConfigurationError, x as ConfigurationErrorCode, k as ConnectionError, v as ConnectionErrorCode, C as ConnectorError, E as Errors, N as NetworkError, y as NetworkErrorCode, a as SignedTransaction, S as SolanaTransaction, c as TransactionActivity, d as TransactionActivityStatus, m as TransactionError, z as TransactionErrorCode, f as TransactionMetadata, e as TransactionMethod, b as TransactionSignerCapabilities, T as TransactionSignerConfig, h as TransactionSignerError, V as ValidationError, w as ValidationErrorCode, g as createTransactionSigner, u as getUserFriendlyMessage, q as isConfigurationError, o as isConnectionError, n as isConnectorError, r as isNetworkError, s as isTransactionError, i as isTransactionSignerError, p as isValidationError, t as toConnectorError } from './transaction-signer-D3csM_Mf.mjs';
5
- import { TransactionModifyingSigner } from 'gill';
1
+ import { i as ClusterType, B as StorageOptions, S as StorageAdapter, F as EnhancedStorageAccountOptions, G as EnhancedStorageClusterOptions, H as EnhancedStorageWalletOptions } from './wallet-standard-shim-Cp4vF4oo.mjs';
2
+ export { q as AccountAddress, A as AccountInfo, T as ClipboardErrorType, V as ClipboardResult, j as ConnectorClient, d as ConnectorConfig, v as ConnectorDebugMetrics, x as ConnectorDebugState, y as ConnectorEvent, z as ConnectorEventListener, t as ConnectorHealth, e as ConnectorState, X as CopyOptions, R as CreateSolanaClientArgs, D as DefaultConfigOptions, E as ExtendedConnectorConfig, L as Listener, M as MobileWalletAdapterConfig, P as ModifiedClusterUrl, af as PUBLIC_RPC_ENDPOINTS, Q as SolanaClient, O as SolanaClusterMoniker, ae as SolanaNetwork, h as UnifiedConfig, U as UnifiedConfigOptions, J as WalletError, I as WalletErrorType, W as WalletInfo, p as WalletName, g as WalletStandardAccount, f as WalletStandardWallet, _ as copyAddressToClipboard, $ as copySignatureToClipboard, Z as copyToClipboard, n as createConfig, N as createSolanaClient, a3 as getAddressUrl, a5 as getBlockUrl, ad as getChainIdForWalletStandard, ac as getClusterChainId, a1 as getClusterExplorerUrl, aa as getClusterName, a0 as getClusterRpcUrl, ab as getClusterType, l as getDefaultConfig, m as getDefaultMobileConfig, ai as getDefaultRpcUrl, an as getNetworkDisplayName, K as getPublicSolanaRpcUrl, a4 as getTokenUrl, a2 as getTransactionUrl, k as getWalletsRegistry, s as isAccountAddress, Y as isClipboardAvailable, ak as isDevnet, a7 as isDevnetCluster, a9 as isLocalCluster, am as isLocalnet, aj as isMainnet, a6 as isMainnetCluster, al as isTestnet, a8 as isTestnetCluster, o as isUnifiedConfig, r as isWalletName, ag as normalizeNetwork, ah as toClusterId } from './wallet-standard-shim-Cp4vF4oo.mjs';
3
+ import { j as TransactionSigner } from './transaction-signer-D9d8nxwb.mjs';
4
+ export { l as ConfigurationError, x as ConfigurationErrorCode, k as ConnectionError, v as ConnectionErrorCode, C as ConnectorError, E as Errors, N as NetworkError, y as NetworkErrorCode, a as SignedTransaction, S as SolanaTransaction, c as TransactionActivity, d as TransactionActivityStatus, m as TransactionError, z as TransactionErrorCode, f as TransactionMetadata, e as TransactionMethod, b as TransactionSignerCapabilities, T as TransactionSignerConfig, h as TransactionSignerError, V as ValidationError, w as ValidationErrorCode, g as createTransactionSigner, u as getUserFriendlyMessage, q as isConfigurationError, o as isConnectionError, n as isConnectorError, r as isNetworkError, s as isTransactionError, i as isTransactionSignerError, p as isValidationError, t as toConnectorError } from './transaction-signer-D9d8nxwb.mjs';
5
+ import { TransactionModifyingSigner, MessageModifyingSigner, TransactionSendingSigner, SignatureDictionary } from '@solana/signers';
6
+ export { MessageModifyingSigner, MessageModifyingSignerConfig, SignableMessage, SignatureDictionary, TransactionSendingSigner, TransactionSendingSignerConfig, createSignableMessage } from '@solana/signers';
6
7
  import { SolanaCluster, SolanaClusterId, Storage } from '@wallet-ui/core';
7
8
  export { SolanaCluster, SolanaClusterId, createSolanaDevnet, createSolanaLocalnet, createSolanaMainnet, createSolanaTestnet } from '@wallet-ui/core';
8
- import { MessageModifyingSigner, TransactionSendingSigner, SignatureDictionary } from '@solana/signers';
9
- export { MessageModifyingSigner, MessageModifyingSignerConfig, SignableMessage, SignatureDictionary, TransactionSendingSigner, TransactionSendingSignerConfig, createSignableMessage } from '@solana/signers';
10
9
  import { Address } from '@solana/addresses';
11
10
  export { Address, address } from '@solana/addresses';
12
11
  import { SignatureBytes } from '@solana/keys';
@@ -15,8 +14,10 @@ export { Transaction } from '@solana/transactions';
15
14
  import { Wallet, WalletAccount } from '@wallet-standard/base';
16
15
  export { Wallet, WalletAccount } from '@wallet-standard/base';
17
16
  import { Connection, SendOptions } from '@solana/web3.js';
17
+ import { TransactionMessage, TransactionMessageWithFeePayer, Rpc, GetLatestBlockhashApi, TransactionMessageWithBlockhashLifetime } from '@solana/kit';
18
18
  import 'react';
19
19
  import 'react/jsx-runtime';
20
+ import '@solana/transaction-messages';
20
21
 
21
22
  /**
22
23
  * @solana/connector - Formatting utilities
@@ -113,10 +114,133 @@ declare function chainIdToClusterType(chainId: string): ClusterType | null;
113
114
  declare function chainIdToClusterId(chainId: string): SolanaClusterId | null;
114
115
 
115
116
  /**
116
- * @solana/connector - Gill/Kit Transaction Signer Adapter
117
+ * @solana/connector - Kit Constants
118
+ *
119
+ * Core Solana constants used throughout the connector.
120
+ * These match the values from @solana/kit ecosystem.
121
+ */
122
+ /** 1 billion lamports per SOL */
123
+ declare const LAMPORTS_PER_SOL = 1000000000;
124
+ /**
125
+ * Convert lamports to SOL
126
+ * @param lamports - Amount in lamports
127
+ * @returns Amount in SOL
128
+ */
129
+ declare function lamportsToSol(lamports: number | bigint): number;
130
+ /**
131
+ * Convert SOL to lamports
132
+ * @param sol - Amount in SOL
133
+ * @returns Amount in lamports
134
+ */
135
+ declare function solToLamports(sol: number): bigint;
136
+
137
+ /**
138
+ * @solana/connector - Kit Explorer Utilities
139
+ *
140
+ * Generate Solana Explorer links for addresses, transactions, and blocks.
141
+ */
142
+ /** Cluster type for explorer links */
143
+ type ExplorerCluster = 'mainnet' | 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet' | 'localhost';
144
+ /** Arguments for generating an explorer link */
145
+ type GetExplorerLinkArgs = {
146
+ address: string;
147
+ cluster?: ExplorerCluster;
148
+ } | {
149
+ transaction: string;
150
+ cluster?: ExplorerCluster;
151
+ } | {
152
+ block: string | number;
153
+ cluster?: ExplorerCluster;
154
+ } | {
155
+ cluster?: ExplorerCluster;
156
+ };
157
+ /**
158
+ * Craft a Solana Explorer link on any cluster
159
+ *
160
+ * @param props - Configuration for the explorer link
161
+ * @returns Solana Explorer URL
162
+ *
163
+ * @example
164
+ * ```ts
165
+ * // Transaction link on mainnet
166
+ * getExplorerLink({ transaction: 'abc123...', cluster: 'mainnet' });
167
+ *
168
+ * // Address link on devnet
169
+ * getExplorerLink({ address: 'abc123...', cluster: 'devnet' });
170
+ *
171
+ * // Block link on testnet
172
+ * getExplorerLink({ block: 12345, cluster: 'testnet' });
173
+ * ```
174
+ */
175
+ declare function getExplorerLink(props?: GetExplorerLinkArgs): string;
176
+
177
+ /**
178
+ * @solana/connector - Kit Transaction Preparation
179
+ *
180
+ * Prepares transactions for sending by setting blockhash.
181
+ * A simplified version that focuses on blockhash management.
182
+ */
183
+
184
+ /**
185
+ * Transaction message types that can be prepared.
186
+ * Requires both a fee payer and a transaction message.
187
+ */
188
+ type PrepareCompilableTransactionMessage = TransactionMessage & TransactionMessageWithFeePayer;
189
+ /**
190
+ * Configuration for preparing a transaction
191
+ */
192
+ interface PrepareTransactionConfig<TMessage extends PrepareCompilableTransactionMessage> {
193
+ /**
194
+ * Transaction to prepare for sending to the blockchain
195
+ */
196
+ transaction: TMessage;
197
+ /**
198
+ * RPC client capable of getting the latest blockhash
199
+ */
200
+ rpc: Rpc<GetLatestBlockhashApi>;
201
+ /**
202
+ * Multiplier applied to the simulated compute unit value obtained from simulation
203
+ * @default 1.1
204
+ * @deprecated Compute unit estimation is not currently supported
205
+ */
206
+ computeUnitLimitMultiplier?: number;
207
+ /**
208
+ * Whether or not you wish to force reset the compute unit limit value (if one is already set)
209
+ * @deprecated Compute unit estimation is not currently supported
210
+ */
211
+ computeUnitLimitReset?: boolean;
212
+ /**
213
+ * Whether or not you wish to force reset the latest blockhash (if one is already set)
214
+ * @default true
215
+ */
216
+ blockhashReset?: boolean;
217
+ }
218
+ /**
219
+ * Prepare a Transaction to be signed and sent to the network. Including:
220
+ * - fetching the latest blockhash (if not already set)
221
+ * - (optional) resetting latest blockhash to the most recent
222
+ *
223
+ * Note: Automatic compute unit estimation is not currently supported in this version.
224
+ * You should set compute unit limits manually if needed.
225
+ *
226
+ * @param config - Configuration for transaction preparation
227
+ * @returns Prepared transaction with blockhash lifetime set
228
+ *
229
+ * @example
230
+ * ```ts
231
+ * const prepared = await prepareTransaction({
232
+ * transaction: myTransaction,
233
+ * rpc: client.rpc,
234
+ * });
235
+ * ```
236
+ */
237
+ declare function prepareTransaction<TMessage extends PrepareCompilableTransactionMessage>(config: PrepareTransactionConfig<TMessage>): Promise<TMessage & TransactionMessageWithBlockhashLifetime>;
238
+
239
+ /**
240
+ * @solana/connector - Kit Transaction Signer Adapter
117
241
  *
118
242
  * Adapter that wraps connector-kit's TransactionSigner to be compatible with
119
- * gill (@solana/kit) TransactionModifyingSigner interface.
243
+ * @solana/kit TransactionModifyingSigner interface.
120
244
  *
121
245
  * This enables connector-kit to work seamlessly with modern Solana libraries
122
246
  * that expect @solana/kit's signer interface.
@@ -126,31 +250,35 @@ declare function chainIdToClusterId(chainId: string): SolanaClusterId | null;
126
250
  */
127
251
 
128
252
  /**
129
- * Create a gill-compatible TransactionPartialSigner from connector-kit's TransactionSigner
253
+ * Create a kit-compatible TransactionPartialSigner from connector-kit's TransactionSigner
130
254
  *
131
255
  * This adapter allows connector-kit to work with modern Solana libraries that use
132
- * @solana/kit's signer interfaces (gill, etc.)
256
+ * @solana/kit's signer interfaces.
133
257
  *
134
258
  * @param connectorSigner - Connector-kit's TransactionSigner instance
135
- * @returns Gill-compatible TransactionPartialSigner
259
+ * @returns Kit-compatible TransactionModifyingSigner
136
260
  *
137
261
  * @example
138
262
  * ```typescript
139
263
  * import { createTransactionSigner } from '@solana/connector';
140
- * import { createGillTransactionSigner } from '@solana/connector/gill';
264
+ * import { createKitTransactionSigner } from '@solana/connector';
141
265
  *
142
266
  * const connectorSigner = createTransactionSigner({ wallet, account });
143
- * const gillSigner = createGillTransactionSigner(connectorSigner);
267
+ * const kitSigner = createKitTransactionSigner(connectorSigner);
144
268
  *
145
- * // Now compatible with gill libraries
269
+ * // Now compatible with @solana/kit libraries
146
270
  * const instruction = getTransferSolInstruction({
147
- * source: gillSigner,
271
+ * source: kitSigner,
148
272
  * destination: address('...'),
149
273
  * amount: 1000000n
150
274
  * });
151
275
  * ```
152
276
  */
153
- declare function createGillTransactionSigner<TAddress extends string = string>(connectorSigner: TransactionSigner): TransactionModifyingSigner<TAddress>;
277
+ declare function createKitTransactionSigner<TAddress extends string = string>(connectorSigner: TransactionSigner): TransactionModifyingSigner<TAddress>;
278
+ /**
279
+ * @deprecated Use `createKitTransactionSigner` instead. This alias is provided for backward compatibility.
280
+ */
281
+ declare const createGillTransactionSigner: typeof createKitTransactionSigner;
154
282
 
155
283
  /**
156
284
  * Enhanced Storage
@@ -512,4 +640,4 @@ declare function formatSignature(signature: string, chars?: number): string;
512
640
  */
513
641
  declare function copySignature(signature: string): Promise<boolean>;
514
642
 
515
- export { ClusterType, type Commitment, type DualConnection, EnhancedStorage, EnhancedStorageAccountOptions, EnhancedStorageAdapter, EnhancedStorageClusterOptions, EnhancedStorageWalletOptions, type ExplorerOptions, type ExplorerType, type KitSignersFromWallet, SOLANA_CHAIN_IDS, StorageAdapter, StorageOptions, TransactionSigner, base58ToSignatureBytes, chainIdToClusterId, chainIdToClusterType, clusterToChainId, copySignature, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createGillTransactionSigner, createKitSignersFromWallet, createMessageSignerFromWallet, createTransactionSendingSignerFromWallet, detectMessageModification, formatAddress, formatNumber, formatSOL, formatSignature, formatTokenAmount, freezeSigner, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getLatestBlockhash, getPolyfillStatus, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, installPolyfills, isCryptoAvailable, isKitConnection, isKnownSolanaChain, isLegacyConnection, isPolyfillInstalled, isSolanaChain, sendRawTransaction, signatureBytesToBase58, truncate, updateSignatureDictionary, validateKnownSolanaChain };
643
+ export { ClusterType, type Commitment, type DualConnection, EnhancedStorage, EnhancedStorageAccountOptions, EnhancedStorageAdapter, EnhancedStorageClusterOptions, EnhancedStorageWalletOptions, type ExplorerOptions, type ExplorerType, type GetExplorerLinkArgs, type KitSignersFromWallet, LAMPORTS_PER_SOL, type PrepareTransactionConfig, SOLANA_CHAIN_IDS, StorageAdapter, StorageOptions, TransactionSigner, base58ToSignatureBytes, chainIdToClusterId, chainIdToClusterType, clusterToChainId, copySignature, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createGillTransactionSigner, createKitSignersFromWallet, createKitTransactionSigner, createMessageSignerFromWallet, createTransactionSendingSignerFromWallet, detectMessageModification, formatAddress, formatNumber, formatSOL, formatSignature, formatTokenAmount, freezeSigner, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getExplorerLink, getLatestBlockhash, getPolyfillStatus, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, installPolyfills, isCryptoAvailable, isKitConnection, isKnownSolanaChain, isLegacyConnection, isPolyfillInstalled, isSolanaChain, lamportsToSol, prepareTransaction, sendRawTransaction, signatureBytesToBase58, solToLamports, truncate, updateSignatureDictionary, validateKnownSolanaChain };
@@ -1,12 +1,11 @@
1
- import { i as ClusterType, B as StorageOptions, S as StorageAdapter, F as EnhancedStorageAccountOptions, G as EnhancedStorageClusterOptions, H as EnhancedStorageWalletOptions } from './wallet-standard-shim-C1tisl9S.js';
2
- export { q as AccountAddress, A as AccountInfo, K as ClipboardErrorType, N as ClipboardResult, j as ConnectorClient, d as ConnectorConfig, v as ConnectorDebugMetrics, x as ConnectorDebugState, y as ConnectorEvent, z as ConnectorEventListener, t as ConnectorHealth, e as ConnectorState, O as CopyOptions, D as DefaultConfigOptions, E as ExtendedConnectorConfig, L as Listener, M as MobileWalletAdapterConfig, a9 as PUBLIC_RPC_ENDPOINTS, a8 as SolanaNetwork, h as UnifiedConfig, U as UnifiedConfigOptions, J as WalletError, I as WalletErrorType, W as WalletInfo, p as WalletName, g as WalletStandardAccount, f as WalletStandardWallet, R as copyAddressToClipboard, T as copySignatureToClipboard, Q as copyToClipboard, n as createConfig, Z as getAddressUrl, $ as getBlockUrl, a7 as getChainIdForWalletStandard, a6 as getClusterChainId, X as getClusterExplorerUrl, a4 as getClusterName, V as getClusterRpcUrl, a5 as getClusterType, l as getDefaultConfig, m as getDefaultMobileConfig, ac as getDefaultRpcUrl, ah as getNetworkDisplayName, _ as getTokenUrl, Y as getTransactionUrl, k as getWalletsRegistry, s as isAccountAddress, P as isClipboardAvailable, ae as isDevnet, a1 as isDevnetCluster, a3 as isLocalCluster, ag as isLocalnet, ad as isMainnet, a0 as isMainnetCluster, af as isTestnet, a2 as isTestnetCluster, o as isUnifiedConfig, r as isWalletName, aa as normalizeNetwork, ab as toClusterId } from './wallet-standard-shim-C1tisl9S.js';
3
- import { j as TransactionSigner } from './transaction-signer-D3csM_Mf.js';
4
- export { l as ConfigurationError, x as ConfigurationErrorCode, k as ConnectionError, v as ConnectionErrorCode, C as ConnectorError, E as Errors, N as NetworkError, y as NetworkErrorCode, a as SignedTransaction, S as SolanaTransaction, c as TransactionActivity, d as TransactionActivityStatus, m as TransactionError, z as TransactionErrorCode, f as TransactionMetadata, e as TransactionMethod, b as TransactionSignerCapabilities, T as TransactionSignerConfig, h as TransactionSignerError, V as ValidationError, w as ValidationErrorCode, g as createTransactionSigner, u as getUserFriendlyMessage, q as isConfigurationError, o as isConnectionError, n as isConnectorError, r as isNetworkError, s as isTransactionError, i as isTransactionSignerError, p as isValidationError, t as toConnectorError } from './transaction-signer-D3csM_Mf.js';
5
- import { TransactionModifyingSigner } from 'gill';
1
+ import { i as ClusterType, B as StorageOptions, S as StorageAdapter, F as EnhancedStorageAccountOptions, G as EnhancedStorageClusterOptions, H as EnhancedStorageWalletOptions } from './wallet-standard-shim-DC_Z7DS-.js';
2
+ export { q as AccountAddress, A as AccountInfo, T as ClipboardErrorType, V as ClipboardResult, j as ConnectorClient, d as ConnectorConfig, v as ConnectorDebugMetrics, x as ConnectorDebugState, y as ConnectorEvent, z as ConnectorEventListener, t as ConnectorHealth, e as ConnectorState, X as CopyOptions, R as CreateSolanaClientArgs, D as DefaultConfigOptions, E as ExtendedConnectorConfig, L as Listener, M as MobileWalletAdapterConfig, P as ModifiedClusterUrl, af as PUBLIC_RPC_ENDPOINTS, Q as SolanaClient, O as SolanaClusterMoniker, ae as SolanaNetwork, h as UnifiedConfig, U as UnifiedConfigOptions, J as WalletError, I as WalletErrorType, W as WalletInfo, p as WalletName, g as WalletStandardAccount, f as WalletStandardWallet, _ as copyAddressToClipboard, $ as copySignatureToClipboard, Z as copyToClipboard, n as createConfig, N as createSolanaClient, a3 as getAddressUrl, a5 as getBlockUrl, ad as getChainIdForWalletStandard, ac as getClusterChainId, a1 as getClusterExplorerUrl, aa as getClusterName, a0 as getClusterRpcUrl, ab as getClusterType, l as getDefaultConfig, m as getDefaultMobileConfig, ai as getDefaultRpcUrl, an as getNetworkDisplayName, K as getPublicSolanaRpcUrl, a4 as getTokenUrl, a2 as getTransactionUrl, k as getWalletsRegistry, s as isAccountAddress, Y as isClipboardAvailable, ak as isDevnet, a7 as isDevnetCluster, a9 as isLocalCluster, am as isLocalnet, aj as isMainnet, a6 as isMainnetCluster, al as isTestnet, a8 as isTestnetCluster, o as isUnifiedConfig, r as isWalletName, ag as normalizeNetwork, ah as toClusterId } from './wallet-standard-shim-DC_Z7DS-.js';
3
+ import { j as TransactionSigner } from './transaction-signer-D9d8nxwb.js';
4
+ export { l as ConfigurationError, x as ConfigurationErrorCode, k as ConnectionError, v as ConnectionErrorCode, C as ConnectorError, E as Errors, N as NetworkError, y as NetworkErrorCode, a as SignedTransaction, S as SolanaTransaction, c as TransactionActivity, d as TransactionActivityStatus, m as TransactionError, z as TransactionErrorCode, f as TransactionMetadata, e as TransactionMethod, b as TransactionSignerCapabilities, T as TransactionSignerConfig, h as TransactionSignerError, V as ValidationError, w as ValidationErrorCode, g as createTransactionSigner, u as getUserFriendlyMessage, q as isConfigurationError, o as isConnectionError, n as isConnectorError, r as isNetworkError, s as isTransactionError, i as isTransactionSignerError, p as isValidationError, t as toConnectorError } from './transaction-signer-D9d8nxwb.js';
5
+ import { TransactionModifyingSigner, MessageModifyingSigner, TransactionSendingSigner, SignatureDictionary } from '@solana/signers';
6
+ export { MessageModifyingSigner, MessageModifyingSignerConfig, SignableMessage, SignatureDictionary, TransactionSendingSigner, TransactionSendingSignerConfig, createSignableMessage } from '@solana/signers';
6
7
  import { SolanaCluster, SolanaClusterId, Storage } from '@wallet-ui/core';
7
8
  export { SolanaCluster, SolanaClusterId, createSolanaDevnet, createSolanaLocalnet, createSolanaMainnet, createSolanaTestnet } from '@wallet-ui/core';
8
- import { MessageModifyingSigner, TransactionSendingSigner, SignatureDictionary } from '@solana/signers';
9
- export { MessageModifyingSigner, MessageModifyingSignerConfig, SignableMessage, SignatureDictionary, TransactionSendingSigner, TransactionSendingSignerConfig, createSignableMessage } from '@solana/signers';
10
9
  import { Address } from '@solana/addresses';
11
10
  export { Address, address } from '@solana/addresses';
12
11
  import { SignatureBytes } from '@solana/keys';
@@ -15,8 +14,10 @@ export { Transaction } from '@solana/transactions';
15
14
  import { Wallet, WalletAccount } from '@wallet-standard/base';
16
15
  export { Wallet, WalletAccount } from '@wallet-standard/base';
17
16
  import { Connection, SendOptions } from '@solana/web3.js';
17
+ import { TransactionMessage, TransactionMessageWithFeePayer, Rpc, GetLatestBlockhashApi, TransactionMessageWithBlockhashLifetime } from '@solana/kit';
18
18
  import 'react';
19
19
  import 'react/jsx-runtime';
20
+ import '@solana/transaction-messages';
20
21
 
21
22
  /**
22
23
  * @solana/connector - Formatting utilities
@@ -113,10 +114,133 @@ declare function chainIdToClusterType(chainId: string): ClusterType | null;
113
114
  declare function chainIdToClusterId(chainId: string): SolanaClusterId | null;
114
115
 
115
116
  /**
116
- * @solana/connector - Gill/Kit Transaction Signer Adapter
117
+ * @solana/connector - Kit Constants
118
+ *
119
+ * Core Solana constants used throughout the connector.
120
+ * These match the values from @solana/kit ecosystem.
121
+ */
122
+ /** 1 billion lamports per SOL */
123
+ declare const LAMPORTS_PER_SOL = 1000000000;
124
+ /**
125
+ * Convert lamports to SOL
126
+ * @param lamports - Amount in lamports
127
+ * @returns Amount in SOL
128
+ */
129
+ declare function lamportsToSol(lamports: number | bigint): number;
130
+ /**
131
+ * Convert SOL to lamports
132
+ * @param sol - Amount in SOL
133
+ * @returns Amount in lamports
134
+ */
135
+ declare function solToLamports(sol: number): bigint;
136
+
137
+ /**
138
+ * @solana/connector - Kit Explorer Utilities
139
+ *
140
+ * Generate Solana Explorer links for addresses, transactions, and blocks.
141
+ */
142
+ /** Cluster type for explorer links */
143
+ type ExplorerCluster = 'mainnet' | 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet' | 'localhost';
144
+ /** Arguments for generating an explorer link */
145
+ type GetExplorerLinkArgs = {
146
+ address: string;
147
+ cluster?: ExplorerCluster;
148
+ } | {
149
+ transaction: string;
150
+ cluster?: ExplorerCluster;
151
+ } | {
152
+ block: string | number;
153
+ cluster?: ExplorerCluster;
154
+ } | {
155
+ cluster?: ExplorerCluster;
156
+ };
157
+ /**
158
+ * Craft a Solana Explorer link on any cluster
159
+ *
160
+ * @param props - Configuration for the explorer link
161
+ * @returns Solana Explorer URL
162
+ *
163
+ * @example
164
+ * ```ts
165
+ * // Transaction link on mainnet
166
+ * getExplorerLink({ transaction: 'abc123...', cluster: 'mainnet' });
167
+ *
168
+ * // Address link on devnet
169
+ * getExplorerLink({ address: 'abc123...', cluster: 'devnet' });
170
+ *
171
+ * // Block link on testnet
172
+ * getExplorerLink({ block: 12345, cluster: 'testnet' });
173
+ * ```
174
+ */
175
+ declare function getExplorerLink(props?: GetExplorerLinkArgs): string;
176
+
177
+ /**
178
+ * @solana/connector - Kit Transaction Preparation
179
+ *
180
+ * Prepares transactions for sending by setting blockhash.
181
+ * A simplified version that focuses on blockhash management.
182
+ */
183
+
184
+ /**
185
+ * Transaction message types that can be prepared.
186
+ * Requires both a fee payer and a transaction message.
187
+ */
188
+ type PrepareCompilableTransactionMessage = TransactionMessage & TransactionMessageWithFeePayer;
189
+ /**
190
+ * Configuration for preparing a transaction
191
+ */
192
+ interface PrepareTransactionConfig<TMessage extends PrepareCompilableTransactionMessage> {
193
+ /**
194
+ * Transaction to prepare for sending to the blockchain
195
+ */
196
+ transaction: TMessage;
197
+ /**
198
+ * RPC client capable of getting the latest blockhash
199
+ */
200
+ rpc: Rpc<GetLatestBlockhashApi>;
201
+ /**
202
+ * Multiplier applied to the simulated compute unit value obtained from simulation
203
+ * @default 1.1
204
+ * @deprecated Compute unit estimation is not currently supported
205
+ */
206
+ computeUnitLimitMultiplier?: number;
207
+ /**
208
+ * Whether or not you wish to force reset the compute unit limit value (if one is already set)
209
+ * @deprecated Compute unit estimation is not currently supported
210
+ */
211
+ computeUnitLimitReset?: boolean;
212
+ /**
213
+ * Whether or not you wish to force reset the latest blockhash (if one is already set)
214
+ * @default true
215
+ */
216
+ blockhashReset?: boolean;
217
+ }
218
+ /**
219
+ * Prepare a Transaction to be signed and sent to the network. Including:
220
+ * - fetching the latest blockhash (if not already set)
221
+ * - (optional) resetting latest blockhash to the most recent
222
+ *
223
+ * Note: Automatic compute unit estimation is not currently supported in this version.
224
+ * You should set compute unit limits manually if needed.
225
+ *
226
+ * @param config - Configuration for transaction preparation
227
+ * @returns Prepared transaction with blockhash lifetime set
228
+ *
229
+ * @example
230
+ * ```ts
231
+ * const prepared = await prepareTransaction({
232
+ * transaction: myTransaction,
233
+ * rpc: client.rpc,
234
+ * });
235
+ * ```
236
+ */
237
+ declare function prepareTransaction<TMessage extends PrepareCompilableTransactionMessage>(config: PrepareTransactionConfig<TMessage>): Promise<TMessage & TransactionMessageWithBlockhashLifetime>;
238
+
239
+ /**
240
+ * @solana/connector - Kit Transaction Signer Adapter
117
241
  *
118
242
  * Adapter that wraps connector-kit's TransactionSigner to be compatible with
119
- * gill (@solana/kit) TransactionModifyingSigner interface.
243
+ * @solana/kit TransactionModifyingSigner interface.
120
244
  *
121
245
  * This enables connector-kit to work seamlessly with modern Solana libraries
122
246
  * that expect @solana/kit's signer interface.
@@ -126,31 +250,35 @@ declare function chainIdToClusterId(chainId: string): SolanaClusterId | null;
126
250
  */
127
251
 
128
252
  /**
129
- * Create a gill-compatible TransactionPartialSigner from connector-kit's TransactionSigner
253
+ * Create a kit-compatible TransactionPartialSigner from connector-kit's TransactionSigner
130
254
  *
131
255
  * This adapter allows connector-kit to work with modern Solana libraries that use
132
- * @solana/kit's signer interfaces (gill, etc.)
256
+ * @solana/kit's signer interfaces.
133
257
  *
134
258
  * @param connectorSigner - Connector-kit's TransactionSigner instance
135
- * @returns Gill-compatible TransactionPartialSigner
259
+ * @returns Kit-compatible TransactionModifyingSigner
136
260
  *
137
261
  * @example
138
262
  * ```typescript
139
263
  * import { createTransactionSigner } from '@solana/connector';
140
- * import { createGillTransactionSigner } from '@solana/connector/gill';
264
+ * import { createKitTransactionSigner } from '@solana/connector';
141
265
  *
142
266
  * const connectorSigner = createTransactionSigner({ wallet, account });
143
- * const gillSigner = createGillTransactionSigner(connectorSigner);
267
+ * const kitSigner = createKitTransactionSigner(connectorSigner);
144
268
  *
145
- * // Now compatible with gill libraries
269
+ * // Now compatible with @solana/kit libraries
146
270
  * const instruction = getTransferSolInstruction({
147
- * source: gillSigner,
271
+ * source: kitSigner,
148
272
  * destination: address('...'),
149
273
  * amount: 1000000n
150
274
  * });
151
275
  * ```
152
276
  */
153
- declare function createGillTransactionSigner<TAddress extends string = string>(connectorSigner: TransactionSigner): TransactionModifyingSigner<TAddress>;
277
+ declare function createKitTransactionSigner<TAddress extends string = string>(connectorSigner: TransactionSigner): TransactionModifyingSigner<TAddress>;
278
+ /**
279
+ * @deprecated Use `createKitTransactionSigner` instead. This alias is provided for backward compatibility.
280
+ */
281
+ declare const createGillTransactionSigner: typeof createKitTransactionSigner;
154
282
 
155
283
  /**
156
284
  * Enhanced Storage
@@ -512,4 +640,4 @@ declare function formatSignature(signature: string, chars?: number): string;
512
640
  */
513
641
  declare function copySignature(signature: string): Promise<boolean>;
514
642
 
515
- export { ClusterType, type Commitment, type DualConnection, EnhancedStorage, EnhancedStorageAccountOptions, EnhancedStorageAdapter, EnhancedStorageClusterOptions, EnhancedStorageWalletOptions, type ExplorerOptions, type ExplorerType, type KitSignersFromWallet, SOLANA_CHAIN_IDS, StorageAdapter, StorageOptions, TransactionSigner, base58ToSignatureBytes, chainIdToClusterId, chainIdToClusterType, clusterToChainId, copySignature, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createGillTransactionSigner, createKitSignersFromWallet, createMessageSignerFromWallet, createTransactionSendingSignerFromWallet, detectMessageModification, formatAddress, formatNumber, formatSOL, formatSignature, formatTokenAmount, freezeSigner, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getLatestBlockhash, getPolyfillStatus, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, installPolyfills, isCryptoAvailable, isKitConnection, isKnownSolanaChain, isLegacyConnection, isPolyfillInstalled, isSolanaChain, sendRawTransaction, signatureBytesToBase58, truncate, updateSignatureDictionary, validateKnownSolanaChain };
643
+ export { ClusterType, type Commitment, type DualConnection, EnhancedStorage, EnhancedStorageAccountOptions, EnhancedStorageAdapter, EnhancedStorageClusterOptions, EnhancedStorageWalletOptions, type ExplorerOptions, type ExplorerType, type GetExplorerLinkArgs, type KitSignersFromWallet, LAMPORTS_PER_SOL, type PrepareTransactionConfig, SOLANA_CHAIN_IDS, StorageAdapter, StorageOptions, TransactionSigner, base58ToSignatureBytes, chainIdToClusterId, chainIdToClusterType, clusterToChainId, copySignature, createEnhancedStorageAccount, createEnhancedStorageCluster, createEnhancedStorageWallet, createGillTransactionSigner, createKitSignersFromWallet, createKitTransactionSigner, createMessageSignerFromWallet, createTransactionSendingSignerFromWallet, detectMessageModification, formatAddress, formatNumber, formatSOL, formatSignature, formatTokenAmount, freezeSigner, getAllExplorerUrls, getChainIdFromCluster, getChainIdFromClusterId, getChainIdFromClusterType, getChainIdFromConnection, getClusterIdFromChainId, getClusterTypeFromChainId, getClusterTypeFromConnection, getExplorerLink, getLatestBlockhash, getPolyfillStatus, getSolanaExplorerUrl, getSolanaFmUrl, getSolscanUrl, getXrayUrl, installPolyfills, isCryptoAvailable, isKitConnection, isKnownSolanaChain, isLegacyConnection, isPolyfillInstalled, isSolanaChain, lamportsToSol, prepareTransaction, sendRawTransaction, signatureBytesToBase58, solToLamports, truncate, updateSignatureDictionary, validateKnownSolanaChain };