/** * Solana Context Provider * * Provides Solana configuration (cluster, RPC URL, commitment) to descendant components. * Cluster is fixed at config time and cannot be changed at runtime. */ import { type ReactNode } from 'react'; import type { SolanaCluster, SolanaCommitment, SolanaConfig } from './types'; /** * Solana context value with resolved configuration */ interface SolanaContextValue { /** Active Solana cluster */ cluster: SolanaCluster; /** RPC URL (resolved from config or default) */ rpcUrl: string; /** Transaction commitment level */ commitment: SolanaCommitment; } interface SolanaContextProviderProps { /** Solana configuration from OpenfortWalletConfig */ config: SolanaConfig; /** Child components */ children: ReactNode; } export declare const SolanaContext: import("react").Context; export declare function SolanaContextProvider({ config, children }: SolanaContextProviderProps): import("react/jsx-runtime").JSX.Element; /** * Access the Solana context configuration. * * @throws Error if called outside of a SolanaContextProvider * (i.e., when `walletConfig.solana` is not configured in OpenfortProvider) * * @example * ```tsx * function MyComponent() { * const { cluster, rpcUrl, commitment } = useSolanaContext(); * // Use Solana configuration... * } * ``` */ export declare function useSolanaContext(): SolanaContextValue; export {};