import { Connection, Keypair, PublicKey, Transaction } from "@solana/web3.js"; import { Auth, type AuthCredentials } from "./auth"; import type { ClientContext } from "./context"; import { Admin } from "./domain/admin"; import type { FaucetResponse } from "./domain/faucet"; import { Markets } from "./domain/market"; import { Metrics } from "./domain/metrics"; import { Notifications } from "./domain/notification"; import { Orders } from "./domain/order"; import { Orderbooks } from "./domain/orderbook"; import { Positions } from "./domain/position"; import { PriceHistoryClient } from "./domain/price_history"; import { Referrals } from "./domain/referral"; import { Trades } from "./domain/trade"; import { LightconeHttp } from "./http"; import { LightconeEnv } from "./env"; import { Privy } from "./privy"; import { Rpc } from "./rpc"; import { RpcFailoverState } from "./rpcFailover"; import { DepositSource, type PubkeyStr } from "./shared"; import { type ExternalSigner, type SigningStrategy } from "./shared/signing"; import { WsClient, type WsConfig } from "./ws"; declare class AuthState { private credentialsValue; constructor(initial?: AuthCredentials); getCredentials(): AuthCredentials | undefined; setCredentials(credentials: AuthCredentials | undefined): void; clearCaches(): Promise; } export declare class LightconeClient implements ClientContext { readonly http: LightconeHttp; readonly programId: PublicKey; readonly primaryConnection?: Connection; readonly backupConnection?: Connection; readonly rpcFailoverState: RpcFailoverState; private depositSourceValue; private signingStrategyValue?; private orderNonceValue; private readonly wsConfigValue; private readonly authStateStore; /** @deprecated Use primaryConnection — kept for ClientContext compat. */ get connection(): Connection | undefined; constructor(params: { http: LightconeHttp; wsConfig: WsConfig; programId?: PublicKey; primaryConnection?: Connection; backupConnection?: Connection; rpcFailoverState?: RpcFailoverState; depositSource?: DepositSource; signingStrategy?: SigningStrategy; orderNonce?: number; authCredentials?: AuthCredentials; authState?: AuthState; }); get depositSource(): DepositSource; setDepositSource(source: DepositSource): void; get signingStrategy(): SigningStrategy | undefined; setSigningStrategy(strategy: SigningStrategy): void; clearSigningStrategy(): void; orderNonce(): number | undefined; setOrderNonce(nonce: number): void; clearOrderNonce(): void; /** * Get the current `lightcone-token` cookie value, if any. Populated by the SDK * after a successful login, then attached on every authed request. Useful * for forwarding the token through the `*WithCookies` methods, or * persisting the session across processes. */ authToken(): Promise; /** * Clear the cached `lightcone-token`. Subsequent authed calls will go out * without a `Cookie` header (and 401) unless they use a * `*WithCookies` variant. */ clearAuthToken(): Promise; signAndSubmitTx(tx: Transaction): Promise; static builder(): LightconeClientBuilder; markets(): Markets; orderbooks(): Orderbooks; orders(): Orders; positions(): Positions; trades(): Trades; priceHistory(): PriceHistoryClient; notifications(): Notifications; /** * Metrics sub-client — platform / market / orderbook / category / deposit-token * volume metrics, market leaderboard, and time-series history. */ metrics(): Metrics; /** * Request testnet SOL and whitelisted deposit tokens for a wallet. * * Only active on environments whose backend has the faucet enabled (typically * local and staging). * * `POST /api/claim` */ claim(walletAddress: PubkeyStr): Promise; admin(): Admin; auth(): Auth; privy(): Privy; referrals(): Referrals; rpc(): Rpc; wsConfig(): WsConfig; ws(): WsClient; clone(): LightconeClient; } export declare class LightconeClientBuilder { private baseUrlValue; private wsUrlValue; private authCredentials?; private programIdValue; private depositSourceValue; private signingStrategyValue?; private primaryRpcUrlValue?; private backupRpcUrlValue?; /** * Set the deployment environment. Configures the API URL, WebSocket URL, * RPC URL, and program ID for the given environment. * * Individual URL overrides (e.g. `.baseUrl()`) take precedence when * called **after** `.env()`. */ env(environment: LightconeEnv): LightconeClientBuilder; baseUrl(url: string): LightconeClientBuilder; withBaseUrl(url: string): LightconeClientBuilder; wsUrl(url: string): LightconeClientBuilder; withWsUrl(url: string): LightconeClientBuilder; auth(credentials: AuthCredentials): LightconeClientBuilder; withAuth(credentials: AuthCredentials): LightconeClientBuilder; programId(id: PublicKey): LightconeClientBuilder; depositSource(source: DepositSource): LightconeClientBuilder; nativeSigner(keypair: Keypair): LightconeClientBuilder; externalSigner(signer: ExternalSigner): LightconeClientBuilder; privyWalletId(walletId: string): LightconeClientBuilder; rpcUrl(url: string): LightconeClientBuilder; /** Set a backup Solana RPC URL for automatic failover. */ backupRpcUrl(url: string): LightconeClientBuilder; build(): LightconeClient; } export {}; //# sourceMappingURL=client.d.ts.map