@wuwei-labs/srsly
Version:
TypeScript SDK for SRSLY
37 lines • 1.23 kB
TypeScript
/**
* @purpose Centralized RPC client creation for SRSLY SDK
*
* Provides a single point for creating Solana RPC clients, making it easier
* to add environment-specific configurations or debugging in the future.
*/
import { type Rpc, type SolanaRpcApi } from '@solana/kit';
/**
* Enable or disable RPC debug mode
* When enabled, logs RPC requests to console
*/
export declare function setRpcDebug(enabled: boolean): void;
/**
* Check if RPC debug mode is enabled
*/
export declare function isRpcDebugEnabled(): boolean;
/**
* Create a Solana RPC client
*
* This utility centralizes RPC client creation for the SDK. While it currently
* uses the standard createSolanaRpc approach, having a single point of creation
* makes it easier to:
* - Add debugging/logging
* - Handle environment-specific configurations
* - Implement retry logic or custom transports
*
* @param rpcUrl - The RPC endpoint URL
* @returns A configured Solana RPC client
*
* @example
* ```typescript
* const rpc = createRpc('https://api.devnet.solana.com');
* const account = await rpc.getAccountInfo(address).send();
* ```
*/
export declare function createRpc(rpcUrl: string): Rpc<SolanaRpcApi>;
//# sourceMappingURL=rpc.d.ts.map