@solana/connector 0.2.2 → 0.2.3

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkTRSJSU33_js = require('./chunk-TRSJSU33.js');
3
+ var chunkULEPN4NL_js = require('./chunk-ULEPN4NL.js');
4
4
  var chunkBF67LVVM_js = require('./chunk-BF67LVVM.js');
5
5
  var core = require('@wallet-ui/core');
6
6
  var signers = require('@solana/signers');
@@ -63,7 +63,7 @@ var SOLANA_CHAIN_IDS = {
63
63
  "solana:testnet": SOLANA_CHAIN_IDS.testnet
64
64
  };
65
65
  function getChainIdFromCluster(cluster) {
66
- let clusterType = chunkTRSJSU33_js.getClusterType(cluster);
66
+ let clusterType = chunkULEPN4NL_js.getClusterType(cluster);
67
67
  return clusterType === "localnet" || clusterType === "custom" ? null : getChainIdFromClusterType(clusterType);
68
68
  }
69
69
  function getChainIdFromClusterId(clusterId) {
@@ -226,5 +226,5 @@ exports.isSolanaChain = isSolanaChain;
226
226
  exports.isWalletName = isWalletName;
227
227
  exports.sendRawTransaction = sendRawTransaction;
228
228
  exports.validateKnownSolanaChain = validateKnownSolanaChain;
229
- //# sourceMappingURL=chunk-I2XX5FUG.js.map
230
- //# sourceMappingURL=chunk-I2XX5FUG.js.map
229
+ //# sourceMappingURL=chunk-X2X5TFXS.js.map
230
+ //# sourceMappingURL=chunk-X2X5TFXS.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/wallets.ts","../src/lib/connection/types.ts","../src/lib/connection/helpers.ts","../src/utils/chain.ts","../src/lib/utils/explorer-urls.ts"],"names":["getClusterType","getExplorerLink"],"mappings":";;;;;;;;;AA2BO,SAAS,aAAa,KAAA,EAAoC;AAC7D,EAAA,OAAO,OAAO,KAAA,IAAU,QAAA,IAAY,KAAA,CAAM,MAAA,GAAS,CAAA;AACvD;AAOO,SAAS,iBAAiB,KAAA,EAAwC;AAErE,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A,IACH,iBAAA,EAAmB,oBAAA,CAAqB,SAAA,EAAW,OAAO,CAAA;AAAA,IAC1D,OAAA,EAAS,aAAA,CAAc,SAAA,EAAW,OAAO,CAAA;AAAA,IACzC,IAAA,EAAM,WAAW,SAAS,CAAA;AAAA,IAC1B,WAAA,EAAa,cAAA,CAAe,SAAA,EAAW,OAAO;AAAA,GAClD;AACJ;AAKO,SAAS,eAAA,CAAgB,SAAA,EAAmB,KAAA,GAAQ,CAAA,EAAW;AAClE,EAAA,OAAI,UAAU,MAAA,IAAU,KAAA,GAAQ,CAAA,GAAU,SAAA,GACnC,GAAG,SAAA,CAAU,KAAA,CAAM,CAAA,EAAG,KAAK,CAAC,CAAA,GAAA,EAAM,SAAA,CAAU,KAAA,CAAM,CAAC,KAAK,CAAC,CAAA,CAAA;AACpE;AAQA,eAAsB,cAAc,SAAA,EAAqC;AACrE,EAAA,IAAI;AACA,IAAA,OAAA,MAAM,SAAA,CAAU,SAAA,CAAU,SAAA,CAAU,SAAS,CAAA,EACtC,IAAA;AAAA,EACX,CAAA,CAAA,MAAQ;AACJ,IAAA,OAAO,KAAA;AAAA,EACX;AACJ","file":"chunk-I2XX5FUG.js","sourcesContent":["/**\n * Wallet-related types\n * Re-exports from @wallet-standard/base and custom wallet types\n */\n\nimport type { Wallet, WalletAccount } from '@wallet-standard/base';\n\n// Re-export standard types\nexport type { Wallet, WalletAccount };\n\n/**\n * Wallet name as a branded string for type safety\n * Represents the unique identifier for a wallet (e.g., \"Phantom\", \"Solflare\")\n */\nexport type WalletName = string & { readonly __brand: 'WalletName' };\n\n/**\n * Account address as a branded string for type safety\n * Represents a Solana address (base58-encoded public key)\n *\n * @deprecated Use `Address` from '@solana/addresses' instead for consistent address typing\n */\nexport type AccountAddress = string & { readonly __brand: 'AccountAddress' };\n\n/**\n * Type guard to check if a string is a valid wallet name\n */\nexport function isWalletName(value: string): value is WalletName {\n return typeof value === 'string' && value.length > 0;\n}\n\n/**\n * Type guard to check if a string is a valid account address\n *\n * @deprecated Use `isAddress` from '@solana/addresses' instead for proper address validation\n */\nexport function isAccountAddress(value: string): value is AccountAddress {\n // Basic validation: Solana addresses are typically 32-44 characters\n return typeof value === 'string' && value.length >= 32 && value.length <= 44;\n}\n\n/**\n * Extended wallet information with capability metadata\n */\nexport interface WalletInfo {\n /** The Wallet Standard wallet object */\n wallet: Wallet;\n /** Whether the wallet extension is installed */\n installed: boolean;\n /** Precomputed capability flag for UI convenience */\n connectable?: boolean;\n}\n","import type { Connection } from '@solana/web3.js';\n\nexport type Commitment = 'processed' | 'confirmed' | 'finalized';\n\nexport interface KitSendTransactionOptions {\n commitment?: Commitment;\n skipPreflight?: boolean;\n maxRetries?: number;\n}\n\nexport type KitRpc = {\n getLatestBlockhash(options?: { commitment?: Commitment }): {\n send(): Promise<{ value: { blockhash: string; lastValidBlockHeight: number } }>;\n };\n sendTransaction(\n bytes: Uint8Array | string,\n options?: KitSendTransactionOptions,\n ): {\n send(): Promise<string>;\n };\n send?: () => unknown;\n};\n\nexport type DualConnection = Connection | KitRpc;\n\nexport function isLegacyConnection(conn: DualConnection): conn is Connection {\n return 'rpcEndpoint' in conn && typeof (conn as Connection).rpcEndpoint === 'string';\n}\n\nexport function isKitConnection(conn: DualConnection): conn is KitRpc {\n if ('rpcEndpoint' in conn) {\n return false;\n }\n\n const asKitRpc = conn as KitRpc;\n return typeof asKitRpc.getLatestBlockhash === 'function' && typeof asKitRpc.sendTransaction === 'function';\n}\n","/**\n * @solana/connector - Connection Helpers\n *\n * Abstraction layer for working with both legacy @solana/web3.js Connection\n * and modern Kit/gill Rpc objects.\n */\n\nimport type { SendOptions } from '@solana/web3.js';\nimport type { DualConnection, Commitment, KitRpc } from './types';\nimport { isLegacyConnection, isKitConnection } from './types';\n\n/**\n * Get latest blockhash from either legacy Connection or Kit Rpc\n *\n * Abstracts the differences between web3.js 1.x and Kit/gill APIs.\n *\n * @param connection - Legacy Connection or Kit Rpc\n * @param commitment - Optional commitment level (default: 'confirmed')\n * @returns Latest blockhash and last valid block height\n *\n * @example\n * ```typescript\n * // Works with both Connection and Rpc\n * const { blockhash, lastValidBlockHeight } = await getLatestBlockhash(connection);\n * ```\n */\nexport async function getLatestBlockhash(\n connection: DualConnection,\n commitment: Commitment = 'confirmed',\n): Promise<{ blockhash: string; lastValidBlockHeight: number }> {\n if (isLegacyConnection(connection)) {\n // Legacy Connection API\n return await connection.getLatestBlockhash(commitment);\n }\n\n if (isKitConnection(connection)) {\n // Kit/gill Rpc API - returns { value: { blockhash, lastValidBlockHeight } }\n const rpc = connection as KitRpc;\n const result = await rpc.getLatestBlockhash({ commitment }).send();\n return result.value;\n }\n\n throw new Error('Unsupported connection type');\n}\n\n/**\n * Send raw transaction bytes to either legacy Connection or Kit Rpc\n *\n * Abstracts the differences between web3.js 1.x and Kit/gill APIs.\n *\n * @param connection - Legacy Connection or Kit Rpc\n * @param bytes - Raw transaction bytes\n * @param options - Optional send options (skipPreflight, maxRetries, etc.)\n * @returns Transaction signature string\n *\n * @example\n * ```typescript\n * // Works with both Connection and Rpc\n * const signature = await sendRawTransaction(connection, transactionBytes, {\n * skipPreflight: false,\n * maxRetries: 3\n * });\n * ```\n */\nexport async function sendRawTransaction(\n connection: DualConnection,\n bytes: Uint8Array,\n options?: SendOptions & { commitment?: Commitment },\n): Promise<string> {\n if (isLegacyConnection(connection)) {\n // Legacy Connection API\n return await connection.sendRawTransaction(bytes, options);\n }\n\n if (isKitConnection(connection)) {\n // Kit/gill Rpc API\n // Note: gill's sendTransaction expects different options format\n const rpc = connection as KitRpc;\n // Convert Uint8Array to base64 string\n const base64String = Buffer.from(bytes).toString('base64');\n const result = await rpc\n .sendTransaction(base64String as Uint8Array | string, {\n ...(options?.commitment ? { commitment: options.commitment } : {}),\n ...(options?.skipPreflight !== undefined ? { skipPreflight: options.skipPreflight } : {}),\n ...(options?.maxRetries !== undefined ? { maxRetries: options.maxRetries } : {}),\n })\n .send();\n\n // Kit Rpc returns signature string directly\n return result;\n }\n\n throw new Error('Unsupported connection type');\n}\n","import type { SolanaCluster, SolanaClusterId } from '@wallet-ui/core';\nimport type { Connection } from '@solana/web3.js';\nimport type { ClusterType } from './cluster';\nimport { getClusterType, isMainnetCluster, isDevnetCluster, isTestnetCluster } from './cluster';\n\nexport const SOLANA_CHAIN_IDS = {\n mainnet: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n devnet: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n testnet: 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z',\n} as const;\n\nconst CHAIN_ID_TO_CLUSTER_TYPE: Record<string, ClusterType> = {\n [SOLANA_CHAIN_IDS.mainnet]: 'mainnet',\n [SOLANA_CHAIN_IDS.devnet]: 'devnet',\n [SOLANA_CHAIN_IDS.testnet]: 'testnet',\n};\n\nconst CLUSTER_ID_TO_CHAIN_ID: Partial<Record<SolanaClusterId, string>> = {\n 'solana:mainnet': SOLANA_CHAIN_IDS.mainnet,\n 'solana:mainnet-beta': SOLANA_CHAIN_IDS.mainnet,\n 'solana:devnet': SOLANA_CHAIN_IDS.devnet,\n 'solana:testnet': SOLANA_CHAIN_IDS.testnet,\n};\n\nexport function getChainIdFromCluster(cluster: SolanaCluster): `solana:${string}` | null {\n const clusterType = getClusterType(cluster);\n\n if (clusterType === 'localnet' || clusterType === 'custom') {\n return null;\n }\n\n return getChainIdFromClusterType(clusterType);\n}\n\nexport function getChainIdFromClusterId(clusterId: SolanaClusterId): `solana:${string}` | null {\n return (CLUSTER_ID_TO_CHAIN_ID[clusterId] as `solana:${string}` | undefined) || null;\n}\n\nexport function getChainIdFromClusterType(type: ClusterType): `solana:${string}` | null {\n switch (type) {\n case 'mainnet':\n return SOLANA_CHAIN_IDS.mainnet;\n case 'devnet':\n return SOLANA_CHAIN_IDS.devnet;\n case 'testnet':\n return SOLANA_CHAIN_IDS.testnet;\n case 'localnet':\n case 'custom':\n return null;\n }\n}\n\nexport function getClusterTypeFromChainId(chainId: string): ClusterType | null {\n return CHAIN_ID_TO_CLUSTER_TYPE[chainId] || null;\n}\n\nexport function getClusterIdFromChainId(chainId: string): SolanaClusterId | null {\n const clusterType = getClusterTypeFromChainId(chainId);\n if (!clusterType) {\n return null;\n }\n\n switch (clusterType) {\n case 'mainnet':\n return 'solana:mainnet';\n case 'devnet':\n return 'solana:devnet';\n case 'testnet':\n return 'solana:testnet';\n default:\n return null;\n }\n}\n\nexport function isSolanaChain(chain: string): chain is `solana:${string}` {\n return chain.startsWith('solana:');\n}\n\nexport function isKnownSolanaChain(chain: string): boolean {\n return (\n chain === SOLANA_CHAIN_IDS.mainnet || chain === SOLANA_CHAIN_IDS.devnet || chain === SOLANA_CHAIN_IDS.testnet\n );\n}\n\nexport function validateKnownSolanaChain(chain: string): asserts chain is `solana:${string}` {\n if (!isSolanaChain(chain)) {\n throw new Error(`Invalid chain format: expected 'solana:...', got '${chain}'`);\n }\n\n if (!isKnownSolanaChain(chain)) {\n throw new Error(`Unknown Solana chain: ${chain}. Known chains: ${Object.values(SOLANA_CHAIN_IDS).join(', ')}`);\n }\n}\n\nexport function getClusterTypeFromConnection(connection: Connection | null): ClusterType | null {\n if (!connection) {\n return null;\n }\n\n const rpcUrl = connection.rpcEndpoint || '';\n\n if (rpcUrl.includes('mainnet') || rpcUrl.includes('api.mainnet-beta')) {\n return 'mainnet';\n }\n\n if (rpcUrl.includes('testnet')) {\n return 'testnet';\n }\n\n if (rpcUrl.includes('devnet')) {\n return 'devnet';\n }\n\n if (rpcUrl.includes('localhost') || rpcUrl.includes('127.0.0.1')) {\n return 'localnet';\n }\n\n return 'custom';\n}\n\nexport function getChainIdFromConnection(\n connection: Connection | null,\n network?: 'mainnet' | 'devnet' | 'testnet',\n): `solana:${string}` | null {\n if (network) {\n return getChainIdFromClusterType(network);\n }\n\n const clusterType = getClusterTypeFromConnection(connection);\n if (!clusterType) {\n return null;\n }\n\n return getChainIdFromClusterType(clusterType);\n}\n\nexport function clusterToChainId(cluster: SolanaCluster): `solana:${string}` | null {\n return getChainIdFromCluster(cluster);\n}\n\nexport function chainIdToClusterType(chainId: string): ClusterType | null {\n return getClusterTypeFromChainId(chainId);\n}\n\nexport function chainIdToClusterId(chainId: string): SolanaClusterId | null {\n return getClusterIdFromChainId(chainId);\n}\n","/**\n * @solana/connector - Explorer URL Utilities\n *\n * Generate URLs for various Solana block explorers to view transactions,\n * accounts, and other on-chain data.\n */\n\nimport { getExplorerLink } from '../kit';\n\nexport type ExplorerType = 'solana-explorer' | 'solscan' | 'xray' | 'solana-fm';\n\nexport interface ExplorerOptions {\n /** Cluster to use for the explorer link */\n cluster?: string;\n /** Custom RPC URL for localnet */\n customUrl?: string;\n}\n\n/**\n * Generate Solana Explorer URL for a transaction signature\n */\nexport function getSolanaExplorerUrl(signature: string, options: ExplorerOptions = {}): string {\n const { cluster = 'mainnet', customUrl } = options;\n const normalizedCluster = cluster === 'mainnet-beta' ? 'mainnet' : cluster;\n\n // Handle localnet with custom URL - gill doesn't support this specific case\n if (normalizedCluster === 'localnet') {\n const url = customUrl || 'http://localhost:8899';\n return `https://explorer.solana.com/tx/${signature}?cluster=custom&customUrl=${encodeURIComponent(url)}`;\n }\n\n // Map to valid gill cluster types (custom clusters default to devnet)\n const validClusters = ['mainnet', 'devnet', 'testnet'] as const;\n const explorerCluster = validClusters.includes(normalizedCluster as 'mainnet' | 'devnet' | 'testnet')\n ? (normalizedCluster as 'mainnet' | 'devnet' | 'testnet')\n : 'devnet';\n\n // Use gill's getExplorerLink for standard clusters\n return getExplorerLink({\n transaction: signature,\n cluster: explorerCluster,\n });\n}\n\n/**\n * Generate Solscan URL for a transaction signature\n */\nexport function getSolscanUrl(signature: string, options: ExplorerOptions = {}): string {\n const { cluster = 'mainnet' } = options;\n const normalizedCluster = cluster === 'mainnet-beta' ? 'mainnet' : cluster;\n\n if (normalizedCluster === 'mainnet') {\n return `https://solscan.io/tx/${signature}`;\n }\n\n if (normalizedCluster === 'localnet') {\n return `https://solscan.io/tx/${signature}?cluster=custom`;\n }\n\n return `https://solscan.io/tx/${signature}?cluster=${normalizedCluster}`;\n}\n\n/**\n * Generate XRAY (Helius) URL for a transaction signature\n * Note: XRAY works best with mainnet transactions\n */\nexport function getXrayUrl(signature: string): string {\n return `https://xray.helius.xyz/tx/${signature}`;\n}\n\n/**\n * Generate SolanaFM URL for a transaction signature\n */\nexport function getSolanaFmUrl(signature: string, options: ExplorerOptions = {}): string {\n const { cluster = 'mainnet' } = options;\n const normalizedCluster = cluster === 'mainnet-beta' ? 'mainnet' : cluster;\n\n if (normalizedCluster === 'mainnet') {\n return `https://solana.fm/tx/${signature}`;\n }\n\n return `https://solana.fm/tx/${signature}?cluster=${normalizedCluster}`;\n}\n\n/**\n * Get all explorer URLs for a transaction\n */\nexport function getAllExplorerUrls(signature: string, options: ExplorerOptions = {}): Record<ExplorerType, string> {\n return {\n 'solana-explorer': getSolanaExplorerUrl(signature, options),\n solscan: getSolscanUrl(signature, options),\n xray: getXrayUrl(signature),\n 'solana-fm': getSolanaFmUrl(signature, options),\n };\n}\n\n/**\n * Format a transaction signature for display (truncated)\n */\nexport function formatSignature(signature: string, chars = 8): string {\n if (signature.length <= chars * 2) return signature;\n return `${signature.slice(0, chars)}...${signature.slice(-chars)}`;\n}\n\n/**\n * Copy signature to clipboard with enhanced error handling\n *\n * @deprecated Use copySignatureToClipboard from utils/clipboard instead\n * This is maintained for backwards compatibility but will be removed in a future version\n */\nexport async function copySignature(signature: string): Promise<boolean> {\n try {\n await navigator.clipboard.writeText(signature);\n return true;\n } catch {\n return false;\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/types/wallets.ts","../src/lib/connection/types.ts","../src/lib/connection/helpers.ts","../src/utils/chain.ts","../src/lib/utils/explorer-urls.ts"],"names":["getClusterType","getExplorerLink"],"mappings":";;;;;;;;;AA2BO,SAAS,aAAa,KAAA,EAAoC;AAC7D,EAAA,OAAO,OAAO,KAAA,IAAU,QAAA,IAAY,KAAA,CAAM,MAAA,GAAS,CAAA;AACvD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A2B,EAAC,EAAiC;AAC/G,EAAA,OAAO;AAAA,IACH,iBAAA,EAAmB,oBAAA,CAAqB,SAAA,EAAW,OAAO,CAAA;AAAA,IAC1D,OAAA,EAAS,aAAA,CAAc,SAAA,EAAW,OAAO,CAAA;AAAA,IACzC,IAAA,EAAM,WAAW,SAAS,CAAA;AAAA,IAC1B,WAAA,EAAa,cAAA,CAAe,SAAA,EAAW,OAAO;AAAA,GAClD;AACJ;AAKO,SAAS,eAAA,CAAgB,SAAA,EAAmB,KAAA,GAAQ,CAAA,EAAW;AAClE,EAAA,OAAI,UAAU,MAAA,IAAU,KAAA,GAAQ,CAAA,GAAU,SAAA,GACnC,GAAG,SAAA,CAAU,KAAA,CAAM,CAAA,EAAG,KAAK,CAAC,CAAA,GAAA,EAAM,SAAA,CAAU,KAAA,CAAM,CAAC,KAAK,CAAC,CAAA,CAAA;AACpE;AAQA,eAAsB,cAAc,SAAA,EAAqC;AACrE,EAAA,IAAI;AACA,IAAA,OAAA,MAAM,SAAA,CAAU,SAAA,CAAU,SAAA,CAAU,SAAS,CAAA,EACtC,IAAA;AAAA,EACX,CAAA,CAAA,MAAQ;AACJ,IAAA,OAAO,KAAA;AAAA,EACX;AACJ","file":"chunk-X2X5TFXS.js","sourcesContent":["/**\n * Wallet-related types\n * Re-exports from @wallet-standard/base and custom wallet types\n */\n\nimport type { Wallet, WalletAccount } from '@wallet-standard/base';\n\n// Re-export standard types\nexport type { Wallet, WalletAccount };\n\n/**\n * Wallet name as a branded string for type safety\n * Represents the unique identifier for a wallet (e.g., \"Phantom\", \"Solflare\")\n */\nexport type WalletName = string & { readonly __brand: 'WalletName' };\n\n/**\n * Account address as a branded string for type safety\n * Represents a Solana address (base58-encoded public key)\n *\n * @deprecated Use `Address` from '@solana/addresses' instead for consistent address typing\n */\nexport type AccountAddress = string & { readonly __brand: 'AccountAddress' };\n\n/**\n * Type guard to check if a string is a valid wallet name\n */\nexport function isWalletName(value: string): value is WalletName {\n return typeof value === 'string' && value.length > 0;\n}\n\n/**\n * Type guard to check if a string is a valid account address\n *\n * @deprecated Use `isAddress` from '@solana/addresses' instead for proper address validation\n */\nexport function isAccountAddress(value: string): value is AccountAddress {\n // Basic validation: Solana addresses are typically 32-44 characters\n return typeof value === 'string' && value.length >= 32 && value.length <= 44;\n}\n\n/**\n * Extended wallet information with capability metadata\n */\nexport interface WalletInfo {\n /** The Wallet Standard wallet object */\n wallet: Wallet;\n /** Whether the wallet extension is installed */\n installed: boolean;\n /** Precomputed capability flag for UI convenience */\n connectable?: boolean;\n}\n","import type { Connection } from '@solana/web3.js';\n\nexport type Commitment = 'processed' | 'confirmed' | 'finalized';\n\nexport interface KitSendTransactionOptions {\n commitment?: Commitment;\n skipPreflight?: boolean;\n maxRetries?: number;\n}\n\nexport type KitRpc = {\n getLatestBlockhash(options?: { commitment?: Commitment }): {\n send(): Promise<{ value: { blockhash: string; lastValidBlockHeight: number } }>;\n };\n sendTransaction(\n bytes: Uint8Array | string,\n options?: KitSendTransactionOptions,\n ): {\n send(): Promise<string>;\n };\n send?: () => unknown;\n};\n\nexport type DualConnection = Connection | KitRpc;\n\nexport function isLegacyConnection(conn: DualConnection): conn is Connection {\n return 'rpcEndpoint' in conn && typeof (conn as Connection).rpcEndpoint === 'string';\n}\n\nexport function isKitConnection(conn: DualConnection): conn is KitRpc {\n if ('rpcEndpoint' in conn) {\n return false;\n }\n\n const asKitRpc = conn as KitRpc;\n return typeof asKitRpc.getLatestBlockhash === 'function' && typeof asKitRpc.sendTransaction === 'function';\n}\n","/**\n * @solana/connector - Connection Helpers\n *\n * Abstraction layer for working with both legacy @solana/web3.js Connection\n * and modern Kit/gill Rpc objects.\n */\n\nimport type { SendOptions } from '@solana/web3.js';\nimport type { DualConnection, Commitment, KitRpc } from './types';\nimport { isLegacyConnection, isKitConnection } from './types';\n\n/**\n * Get latest blockhash from either legacy Connection or Kit Rpc\n *\n * Abstracts the differences between web3.js 1.x and Kit/gill APIs.\n *\n * @param connection - Legacy Connection or Kit Rpc\n * @param commitment - Optional commitment level (default: 'confirmed')\n * @returns Latest blockhash and last valid block height\n *\n * @example\n * ```typescript\n * // Works with both Connection and Rpc\n * const { blockhash, lastValidBlockHeight } = await getLatestBlockhash(connection);\n * ```\n */\nexport async function getLatestBlockhash(\n connection: DualConnection,\n commitment: Commitment = 'confirmed',\n): Promise<{ blockhash: string; lastValidBlockHeight: number }> {\n if (isLegacyConnection(connection)) {\n // Legacy Connection API\n return await connection.getLatestBlockhash(commitment);\n }\n\n if (isKitConnection(connection)) {\n // Kit/gill Rpc API - returns { value: { blockhash, lastValidBlockHeight } }\n const rpc = connection as KitRpc;\n const result = await rpc.getLatestBlockhash({ commitment }).send();\n return result.value;\n }\n\n throw new Error('Unsupported connection type');\n}\n\n/**\n * Send raw transaction bytes to either legacy Connection or Kit Rpc\n *\n * Abstracts the differences between web3.js 1.x and Kit/gill APIs.\n *\n * @param connection - Legacy Connection or Kit Rpc\n * @param bytes - Raw transaction bytes\n * @param options - Optional send options (skipPreflight, maxRetries, etc.)\n * @returns Transaction signature string\n *\n * @example\n * ```typescript\n * // Works with both Connection and Rpc\n * const signature = await sendRawTransaction(connection, transactionBytes, {\n * skipPreflight: false,\n * maxRetries: 3\n * });\n * ```\n */\nexport async function sendRawTransaction(\n connection: DualConnection,\n bytes: Uint8Array,\n options?: SendOptions & { commitment?: Commitment },\n): Promise<string> {\n if (isLegacyConnection(connection)) {\n // Legacy Connection API\n return await connection.sendRawTransaction(bytes, options);\n }\n\n if (isKitConnection(connection)) {\n // Kit/gill Rpc API\n // Note: gill's sendTransaction expects different options format\n const rpc = connection as KitRpc;\n // Convert Uint8Array to base64 string\n const base64String = Buffer.from(bytes).toString('base64');\n const result = await rpc\n .sendTransaction(base64String as Uint8Array | string, {\n ...(options?.commitment ? { commitment: options.commitment } : {}),\n ...(options?.skipPreflight !== undefined ? { skipPreflight: options.skipPreflight } : {}),\n ...(options?.maxRetries !== undefined ? { maxRetries: options.maxRetries } : {}),\n })\n .send();\n\n // Kit Rpc returns signature string directly\n return result;\n }\n\n throw new Error('Unsupported connection type');\n}\n","import type { SolanaCluster, SolanaClusterId } from '@wallet-ui/core';\nimport type { Connection } from '@solana/web3.js';\nimport type { ClusterType } from './cluster';\nimport { getClusterType, isMainnetCluster, isDevnetCluster, isTestnetCluster } from './cluster';\n\nexport const SOLANA_CHAIN_IDS = {\n mainnet: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n devnet: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n testnet: 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z',\n} as const;\n\nconst CHAIN_ID_TO_CLUSTER_TYPE: Record<string, ClusterType> = {\n [SOLANA_CHAIN_IDS.mainnet]: 'mainnet',\n [SOLANA_CHAIN_IDS.devnet]: 'devnet',\n [SOLANA_CHAIN_IDS.testnet]: 'testnet',\n};\n\nconst CLUSTER_ID_TO_CHAIN_ID: Partial<Record<SolanaClusterId, string>> = {\n 'solana:mainnet': SOLANA_CHAIN_IDS.mainnet,\n 'solana:mainnet-beta': SOLANA_CHAIN_IDS.mainnet,\n 'solana:devnet': SOLANA_CHAIN_IDS.devnet,\n 'solana:testnet': SOLANA_CHAIN_IDS.testnet,\n};\n\nexport function getChainIdFromCluster(cluster: SolanaCluster): `solana:${string}` | null {\n const clusterType = getClusterType(cluster);\n\n if (clusterType === 'localnet' || clusterType === 'custom') {\n return null;\n }\n\n return getChainIdFromClusterType(clusterType);\n}\n\nexport function getChainIdFromClusterId(clusterId: SolanaClusterId): `solana:${string}` | null {\n return (CLUSTER_ID_TO_CHAIN_ID[clusterId] as `solana:${string}` | undefined) || null;\n}\n\nexport function getChainIdFromClusterType(type: ClusterType): `solana:${string}` | null {\n switch (type) {\n case 'mainnet':\n return SOLANA_CHAIN_IDS.mainnet;\n case 'devnet':\n return SOLANA_CHAIN_IDS.devnet;\n case 'testnet':\n return SOLANA_CHAIN_IDS.testnet;\n case 'localnet':\n case 'custom':\n return null;\n }\n}\n\nexport function getClusterTypeFromChainId(chainId: string): ClusterType | null {\n return CHAIN_ID_TO_CLUSTER_TYPE[chainId] || null;\n}\n\nexport function getClusterIdFromChainId(chainId: string): SolanaClusterId | null {\n const clusterType = getClusterTypeFromChainId(chainId);\n if (!clusterType) {\n return null;\n }\n\n switch (clusterType) {\n case 'mainnet':\n return 'solana:mainnet';\n case 'devnet':\n return 'solana:devnet';\n case 'testnet':\n return 'solana:testnet';\n default:\n return null;\n }\n}\n\nexport function isSolanaChain(chain: string): chain is `solana:${string}` {\n return chain.startsWith('solana:');\n}\n\nexport function isKnownSolanaChain(chain: string): boolean {\n return (\n chain === SOLANA_CHAIN_IDS.mainnet || chain === SOLANA_CHAIN_IDS.devnet || chain === SOLANA_CHAIN_IDS.testnet\n );\n}\n\nexport function validateKnownSolanaChain(chain: string): asserts chain is `solana:${string}` {\n if (!isSolanaChain(chain)) {\n throw new Error(`Invalid chain format: expected 'solana:...', got '${chain}'`);\n }\n\n if (!isKnownSolanaChain(chain)) {\n throw new Error(`Unknown Solana chain: ${chain}. Known chains: ${Object.values(SOLANA_CHAIN_IDS).join(', ')}`);\n }\n}\n\nexport function getClusterTypeFromConnection(connection: Connection | null): ClusterType | null {\n if (!connection) {\n return null;\n }\n\n const rpcUrl = connection.rpcEndpoint || '';\n\n if (rpcUrl.includes('mainnet') || rpcUrl.includes('api.mainnet-beta')) {\n return 'mainnet';\n }\n\n if (rpcUrl.includes('testnet')) {\n return 'testnet';\n }\n\n if (rpcUrl.includes('devnet')) {\n return 'devnet';\n }\n\n if (rpcUrl.includes('localhost') || rpcUrl.includes('127.0.0.1')) {\n return 'localnet';\n }\n\n return 'custom';\n}\n\nexport function getChainIdFromConnection(\n connection: Connection | null,\n network?: 'mainnet' | 'devnet' | 'testnet',\n): `solana:${string}` | null {\n if (network) {\n return getChainIdFromClusterType(network);\n }\n\n const clusterType = getClusterTypeFromConnection(connection);\n if (!clusterType) {\n return null;\n }\n\n return getChainIdFromClusterType(clusterType);\n}\n\nexport function clusterToChainId(cluster: SolanaCluster): `solana:${string}` | null {\n return getChainIdFromCluster(cluster);\n}\n\nexport function chainIdToClusterType(chainId: string): ClusterType | null {\n return getClusterTypeFromChainId(chainId);\n}\n\nexport function chainIdToClusterId(chainId: string): SolanaClusterId | null {\n return getClusterIdFromChainId(chainId);\n}\n","/**\n * @solana/connector - Explorer URL Utilities\n *\n * Generate URLs for various Solana block explorers to view transactions,\n * accounts, and other on-chain data.\n */\n\nimport { getExplorerLink } from '../kit';\n\nexport type ExplorerType = 'solana-explorer' | 'solscan' | 'xray' | 'solana-fm';\n\nexport interface ExplorerOptions {\n /** Cluster to use for the explorer link */\n cluster?: string;\n /** Custom RPC URL for localnet */\n customUrl?: string;\n}\n\n/**\n * Generate Solana Explorer URL for a transaction signature\n */\nexport function getSolanaExplorerUrl(signature: string, options: ExplorerOptions = {}): string {\n const { cluster = 'mainnet', customUrl } = options;\n const normalizedCluster = cluster === 'mainnet-beta' ? 'mainnet' : cluster;\n\n // Handle localnet with custom URL - gill doesn't support this specific case\n if (normalizedCluster === 'localnet') {\n const url = customUrl || 'http://localhost:8899';\n return `https://explorer.solana.com/tx/${signature}?cluster=custom&customUrl=${encodeURIComponent(url)}`;\n }\n\n // Map to valid gill cluster types (custom clusters default to devnet)\n const validClusters = ['mainnet', 'devnet', 'testnet'] as const;\n const explorerCluster = validClusters.includes(normalizedCluster as 'mainnet' | 'devnet' | 'testnet')\n ? (normalizedCluster as 'mainnet' | 'devnet' | 'testnet')\n : 'devnet';\n\n // Use gill's getExplorerLink for standard clusters\n return getExplorerLink({\n transaction: signature,\n cluster: explorerCluster,\n });\n}\n\n/**\n * Generate Solscan URL for a transaction signature\n */\nexport function getSolscanUrl(signature: string, options: ExplorerOptions = {}): string {\n const { cluster = 'mainnet' } = options;\n const normalizedCluster = cluster === 'mainnet-beta' ? 'mainnet' : cluster;\n\n if (normalizedCluster === 'mainnet') {\n return `https://solscan.io/tx/${signature}`;\n }\n\n if (normalizedCluster === 'localnet') {\n return `https://solscan.io/tx/${signature}?cluster=custom`;\n }\n\n return `https://solscan.io/tx/${signature}?cluster=${normalizedCluster}`;\n}\n\n/**\n * Generate XRAY (Helius) URL for a transaction signature\n * Note: XRAY works best with mainnet transactions\n */\nexport function getXrayUrl(signature: string): string {\n return `https://xray.helius.xyz/tx/${signature}`;\n}\n\n/**\n * Generate SolanaFM URL for a transaction signature\n */\nexport function getSolanaFmUrl(signature: string, options: ExplorerOptions = {}): string {\n const { cluster = 'mainnet' } = options;\n const normalizedCluster = cluster === 'mainnet-beta' ? 'mainnet' : cluster;\n\n if (normalizedCluster === 'mainnet') {\n return `https://solana.fm/tx/${signature}`;\n }\n\n return `https://solana.fm/tx/${signature}?cluster=${normalizedCluster}`;\n}\n\n/**\n * Get all explorer URLs for a transaction\n */\nexport function getAllExplorerUrls(signature: string, options: ExplorerOptions = {}): Record<ExplorerType, string> {\n return {\n 'solana-explorer': getSolanaExplorerUrl(signature, options),\n solscan: getSolscanUrl(signature, options),\n xray: getXrayUrl(signature),\n 'solana-fm': getSolanaFmUrl(signature, options),\n };\n}\n\n/**\n * Format a transaction signature for display (truncated)\n */\nexport function formatSignature(signature: string, chars = 8): string {\n if (signature.length <= chars * 2) return signature;\n return `${signature.slice(0, chars)}...${signature.slice(-chars)}`;\n}\n\n/**\n * Copy signature to clipboard with enhanced error handling\n *\n * @deprecated Use copySignatureToClipboard from utils/clipboard instead\n * This is maintained for backwards compatibility but will be removed in a future version\n */\nexport async function copySignature(signature: string): Promise<boolean> {\n try {\n await navigator.clipboard.writeText(signature);\n return true;\n } catch {\n return false;\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { t as ClusterType, ad as StorageOptions, ac as StorageAdapter, ae as EnhancedStorageAccountOptions, af as EnhancedStorageClusterOptions, ag as EnhancedStorageWalletOptions, ah as EnhancedStorageWalletStateOptions, ai as PersistedWalletState, _ as WalletConnectConfig, a0 as WalletConnectTransport } from './standard-shim-Cz4UNS7t.mjs';
2
- export { a2 as AccountAddress, A as AccountInfo, as as ClipboardErrorType, at as ClipboardResult, a5 as CoinGeckoConfig, n as ConnectOptions, v as ConnectorClient, d as ConnectorConfig, a7 as ConnectorDebugMetrics, a8 as ConnectorDebugState, aa as ConnectorEvent, ab as ConnectorEventListener, a6 as ConnectorHealth, e as ConnectorState, au as CopyOptions, Z as CreateSolanaClientArgs, D as DefaultConfigOptions, E as ExtendedConnectorConfig, I as INITIAL_WALLET_STATUS, a9 as Listener, M as MobileWalletAdapterConfig, X as ModifiedClusterUrl, R as RegisterMwaConfig, m as SessionAccount, Y as SolanaClient, V as SolanaClusterMoniker, $ as WalletConnectMetadata, ao as WalletConnectSignAllTransactionsParams, ap as WalletConnectSignAllTransactionsResult, aq as WalletConnectSignAndSendTransactionParams, ar as WalletConnectSignAndSendTransactionResult, ak as WalletConnectSignMessageParams, al as WalletConnectSignMessageResult, am as WalletConnectSignTransactionParams, an as WalletConnectSignTransactionResult, aj as WalletConnectSolanaAccount, G as WalletConnector, i as WalletConnectorId, j as WalletConnectorMetadata, Q as WalletError, N as WalletErrorType, W as WalletInfo, a1 as WalletName, k as WalletSession, h as WalletStandardAccount, f as WalletStandardWallet, l as WalletStatus, K as WalletStatusConnected, J as WalletStatusConnecting, H as WalletStatusDisconnected, L as WalletStatusError, ax as copyAddressToClipboard, ay as copySignatureToClipboard, aw as copyToClipboard, o as createConnectorId, U as createSolanaClient, P as createWalletError, aC as getAddressUrl, aE as getBlockUrl, aM as getChainIdForWalletStandard, aL as getClusterChainId, aA as getClusterExplorerUrl, aJ as getClusterName, az as getClusterRpcUrl, aK as getClusterType, g as getDefaultConfig, b as getDefaultMobileConfig, T as getPublicSolanaRpcUrl, aD as getTokenUrl, aB as getTransactionUrl, y as getWalletNameFromConnectorId, w as getWalletsRegistry, a4 as isAccountAddress, av as isClipboardAvailable, q as isConnected, r as isConnecting, aG as isDevnetCluster, s as isDisconnected, aI as isLocalCluster, aF as isMainnetCluster, z as isStatusError, aH as isTestnetCluster, p as isWalletConnectorId, O as isWalletError, a3 as isWalletName, B as isWalletStatusError, x as ready, F as toLegacyWalletState } from './standard-shim-Cz4UNS7t.mjs';
1
+ import { v as ClusterType, ae as StorageOptions, ad as StorageAdapter, af as EnhancedStorageAccountOptions, ag as EnhancedStorageClusterOptions, ah as EnhancedStorageWalletOptions, ai as EnhancedStorageWalletStateOptions, aj as PersistedWalletState, $ as WalletConnectConfig, a1 as WalletConnectTransport } from './standard-shim-n5phZB1d.mjs';
2
+ export { a3 as AccountAddress, A as AccountInfo, at as ClipboardErrorType, au as ClipboardResult, a6 as CoinGeckoConfig, o as ConnectOptions, w as ConnectorClient, d as ConnectorConfig, a8 as ConnectorDebugMetrics, a9 as ConnectorDebugState, ab as ConnectorEvent, ac as ConnectorEventListener, a7 as ConnectorHealth, e as ConnectorState, av as CopyOptions, _ as CreateSolanaClientArgs, D as DefaultConfigOptions, E as ExtendedConnectorConfig, I as INITIAL_WALLET_STATUS, aa as Listener, M as MobileWalletAdapterConfig, Y as ModifiedClusterUrl, R as RegisterMwaConfig, n as SessionAccount, Z as SolanaClient, X as SolanaClusterMoniker, a0 as WalletConnectMetadata, ap as WalletConnectSignAllTransactionsParams, aq as WalletConnectSignAllTransactionsResult, ar as WalletConnectSignAndSendTransactionParams, as as WalletConnectSignAndSendTransactionResult, al as WalletConnectSignMessageParams, am as WalletConnectSignMessageResult, an as WalletConnectSignTransactionParams, ao as WalletConnectSignTransactionResult, ak as WalletConnectSolanaAccount, H as WalletConnector, j as WalletConnectorId, k as WalletConnectorMetadata, f as WalletDisplayConfig, T as WalletError, O as WalletErrorType, W as WalletInfo, a2 as WalletName, l as WalletSession, i as WalletStandardAccount, h as WalletStandardWallet, m as WalletStatus, L as WalletStatusConnected, K as WalletStatusConnecting, J as WalletStatusDisconnected, N as WalletStatusError, ay as copyAddressToClipboard, az as copySignatureToClipboard, ax as copyToClipboard, p as createConnectorId, V as createSolanaClient, Q as createWalletError, aD as getAddressUrl, aF as getBlockUrl, aN as getChainIdForWalletStandard, aM as getClusterChainId, aB as getClusterExplorerUrl, aK as getClusterName, aA as getClusterRpcUrl, aL as getClusterType, g as getDefaultConfig, b as getDefaultMobileConfig, U as getPublicSolanaRpcUrl, aE as getTokenUrl, aC as getTransactionUrl, z as getWalletNameFromConnectorId, x as getWalletsRegistry, a5 as isAccountAddress, aw as isClipboardAvailable, r as isConnected, s as isConnecting, aH as isDevnetCluster, t as isDisconnected, aJ as isLocalCluster, aG as isMainnetCluster, B as isStatusError, aI as isTestnetCluster, q as isWalletConnectorId, P as isWalletError, a4 as isWalletName, F as isWalletStatusError, y as ready, G as toLegacyWalletState } from './standard-shim-n5phZB1d.mjs';
3
3
  import * as _wallet_standard_base from '@wallet-standard/base';
4
4
  import { Wallet, WalletAccount } from '@wallet-standard/base';
5
5
  export { Wallet, WalletAccount } from '@wallet-standard/base';
@@ -95,6 +95,11 @@ declare const defaultConfigOptionsSchema: z.ZodObject<{
95
95
  relayUrl: z.ZodOptional<z.ZodString>;
96
96
  }, z.core.$strip>]>>;
97
97
  additionalWallets: z.ZodOptional<z.ZodArray<z.ZodCustom<_wallet_standard_base.Wallet, _wallet_standard_base.Wallet>>>;
98
+ wallets: z.ZodOptional<z.ZodObject<{
99
+ allowList: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
100
+ denyList: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
101
+ featured: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
102
+ }, z.core.$strip>>;
98
103
  onError: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
99
104
  }, z.core.$strip>;
100
105
  type DefaultConfigOptionsInput = z.input<typeof defaultConfigOptionsSchema>;
@@ -1,5 +1,5 @@
1
- import { t as ClusterType, ad as StorageOptions, ac as StorageAdapter, ae as EnhancedStorageAccountOptions, af as EnhancedStorageClusterOptions, ag as EnhancedStorageWalletOptions, ah as EnhancedStorageWalletStateOptions, ai as PersistedWalletState, _ as WalletConnectConfig, a0 as WalletConnectTransport } from './standard-shim-Cg6fmjK_.js';
2
- export { a2 as AccountAddress, A as AccountInfo, as as ClipboardErrorType, at as ClipboardResult, a5 as CoinGeckoConfig, n as ConnectOptions, v as ConnectorClient, d as ConnectorConfig, a7 as ConnectorDebugMetrics, a8 as ConnectorDebugState, aa as ConnectorEvent, ab as ConnectorEventListener, a6 as ConnectorHealth, e as ConnectorState, au as CopyOptions, Z as CreateSolanaClientArgs, D as DefaultConfigOptions, E as ExtendedConnectorConfig, I as INITIAL_WALLET_STATUS, a9 as Listener, M as MobileWalletAdapterConfig, X as ModifiedClusterUrl, R as RegisterMwaConfig, m as SessionAccount, Y as SolanaClient, V as SolanaClusterMoniker, $ as WalletConnectMetadata, ao as WalletConnectSignAllTransactionsParams, ap as WalletConnectSignAllTransactionsResult, aq as WalletConnectSignAndSendTransactionParams, ar as WalletConnectSignAndSendTransactionResult, ak as WalletConnectSignMessageParams, al as WalletConnectSignMessageResult, am as WalletConnectSignTransactionParams, an as WalletConnectSignTransactionResult, aj as WalletConnectSolanaAccount, G as WalletConnector, i as WalletConnectorId, j as WalletConnectorMetadata, Q as WalletError, N as WalletErrorType, W as WalletInfo, a1 as WalletName, k as WalletSession, h as WalletStandardAccount, f as WalletStandardWallet, l as WalletStatus, K as WalletStatusConnected, J as WalletStatusConnecting, H as WalletStatusDisconnected, L as WalletStatusError, ax as copyAddressToClipboard, ay as copySignatureToClipboard, aw as copyToClipboard, o as createConnectorId, U as createSolanaClient, P as createWalletError, aC as getAddressUrl, aE as getBlockUrl, aM as getChainIdForWalletStandard, aL as getClusterChainId, aA as getClusterExplorerUrl, aJ as getClusterName, az as getClusterRpcUrl, aK as getClusterType, g as getDefaultConfig, b as getDefaultMobileConfig, T as getPublicSolanaRpcUrl, aD as getTokenUrl, aB as getTransactionUrl, y as getWalletNameFromConnectorId, w as getWalletsRegistry, a4 as isAccountAddress, av as isClipboardAvailable, q as isConnected, r as isConnecting, aG as isDevnetCluster, s as isDisconnected, aI as isLocalCluster, aF as isMainnetCluster, z as isStatusError, aH as isTestnetCluster, p as isWalletConnectorId, O as isWalletError, a3 as isWalletName, B as isWalletStatusError, x as ready, F as toLegacyWalletState } from './standard-shim-Cg6fmjK_.js';
1
+ import { v as ClusterType, ae as StorageOptions, ad as StorageAdapter, af as EnhancedStorageAccountOptions, ag as EnhancedStorageClusterOptions, ah as EnhancedStorageWalletOptions, ai as EnhancedStorageWalletStateOptions, aj as PersistedWalletState, $ as WalletConnectConfig, a1 as WalletConnectTransport } from './standard-shim-BB0Lkg_C.js';
2
+ export { a3 as AccountAddress, A as AccountInfo, at as ClipboardErrorType, au as ClipboardResult, a6 as CoinGeckoConfig, o as ConnectOptions, w as ConnectorClient, d as ConnectorConfig, a8 as ConnectorDebugMetrics, a9 as ConnectorDebugState, ab as ConnectorEvent, ac as ConnectorEventListener, a7 as ConnectorHealth, e as ConnectorState, av as CopyOptions, _ as CreateSolanaClientArgs, D as DefaultConfigOptions, E as ExtendedConnectorConfig, I as INITIAL_WALLET_STATUS, aa as Listener, M as MobileWalletAdapterConfig, Y as ModifiedClusterUrl, R as RegisterMwaConfig, n as SessionAccount, Z as SolanaClient, X as SolanaClusterMoniker, a0 as WalletConnectMetadata, ap as WalletConnectSignAllTransactionsParams, aq as WalletConnectSignAllTransactionsResult, ar as WalletConnectSignAndSendTransactionParams, as as WalletConnectSignAndSendTransactionResult, al as WalletConnectSignMessageParams, am as WalletConnectSignMessageResult, an as WalletConnectSignTransactionParams, ao as WalletConnectSignTransactionResult, ak as WalletConnectSolanaAccount, H as WalletConnector, j as WalletConnectorId, k as WalletConnectorMetadata, f as WalletDisplayConfig, T as WalletError, O as WalletErrorType, W as WalletInfo, a2 as WalletName, l as WalletSession, i as WalletStandardAccount, h as WalletStandardWallet, m as WalletStatus, L as WalletStatusConnected, K as WalletStatusConnecting, J as WalletStatusDisconnected, N as WalletStatusError, ay as copyAddressToClipboard, az as copySignatureToClipboard, ax as copyToClipboard, p as createConnectorId, V as createSolanaClient, Q as createWalletError, aD as getAddressUrl, aF as getBlockUrl, aN as getChainIdForWalletStandard, aM as getClusterChainId, aB as getClusterExplorerUrl, aK as getClusterName, aA as getClusterRpcUrl, aL as getClusterType, g as getDefaultConfig, b as getDefaultMobileConfig, U as getPublicSolanaRpcUrl, aE as getTokenUrl, aC as getTransactionUrl, z as getWalletNameFromConnectorId, x as getWalletsRegistry, a5 as isAccountAddress, aw as isClipboardAvailable, r as isConnected, s as isConnecting, aH as isDevnetCluster, t as isDisconnected, aJ as isLocalCluster, aG as isMainnetCluster, B as isStatusError, aI as isTestnetCluster, q as isWalletConnectorId, P as isWalletError, a4 as isWalletName, F as isWalletStatusError, y as ready, G as toLegacyWalletState } from './standard-shim-BB0Lkg_C.js';
3
3
  import * as _wallet_standard_base from '@wallet-standard/base';
4
4
  import { Wallet, WalletAccount } from '@wallet-standard/base';
5
5
  export { Wallet, WalletAccount } from '@wallet-standard/base';
@@ -95,6 +95,11 @@ declare const defaultConfigOptionsSchema: z.ZodObject<{
95
95
  relayUrl: z.ZodOptional<z.ZodString>;
96
96
  }, z.core.$strip>]>>;
97
97
  additionalWallets: z.ZodOptional<z.ZodArray<z.ZodCustom<_wallet_standard_base.Wallet, _wallet_standard_base.Wallet>>>;
98
+ wallets: z.ZodOptional<z.ZodObject<{
99
+ allowList: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
100
+ denyList: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
101
+ featured: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
102
+ }, z.core.$strip>>;
98
103
  onError: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
99
104
  }, z.core.$strip>;
100
105
  type DefaultConfigOptionsInput = z.input<typeof defaultConfigOptionsSchema>;