@blockrun/llm 1.0.0 → 1.2.0

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.
package/dist/index.d.cts CHANGED
@@ -205,6 +205,157 @@ interface SmartChatResponse {
205
205
  /** Routing decision metadata */
206
206
  routing: RoutingDecision;
207
207
  }
208
+ interface SearchResult {
209
+ query: string;
210
+ summary: string;
211
+ citations?: Array<Record<string, string>>;
212
+ sources_used?: number;
213
+ model?: string;
214
+ }
215
+ interface ImageEditOptions {
216
+ /** Model ID (default: "openai/gpt-image-1") */
217
+ model?: string;
218
+ /** Optional base64-encoded mask image */
219
+ mask?: string;
220
+ /** Image size (default: "1024x1024") */
221
+ size?: string;
222
+ /** Number of images to generate (default: 1) */
223
+ n?: number;
224
+ }
225
+ interface SearchOptions {
226
+ /** Source types to search (e.g. ["web", "x", "news"]) */
227
+ sources?: string[];
228
+ /** Maximum number of results (default: 10) */
229
+ maxResults?: number;
230
+ /** Start date filter (YYYY-MM-DD) */
231
+ fromDate?: string;
232
+ /** End date filter (YYYY-MM-DD) */
233
+ toDate?: string;
234
+ }
235
+ interface XUser {
236
+ id: string;
237
+ userName: string;
238
+ name: string;
239
+ profilePicture?: string;
240
+ description?: string;
241
+ followers?: number;
242
+ following?: number;
243
+ isBlueVerified?: boolean;
244
+ verifiedType?: string;
245
+ location?: string;
246
+ joined?: string;
247
+ }
248
+ interface XUserLookupResponse {
249
+ users: XUser[];
250
+ not_found?: string[];
251
+ total_requested?: number;
252
+ total_found?: number;
253
+ }
254
+ interface XFollower {
255
+ id: string;
256
+ name?: string;
257
+ screen_name?: string;
258
+ userName?: string;
259
+ location?: string;
260
+ description?: string;
261
+ protected?: boolean;
262
+ verified?: boolean;
263
+ followers_count?: number;
264
+ following_count?: number;
265
+ favourites_count?: number;
266
+ statuses_count?: number;
267
+ created_at?: string;
268
+ profile_image_url_https?: string;
269
+ can_dm?: boolean;
270
+ }
271
+ interface XFollowersResponse {
272
+ followers: XFollower[];
273
+ has_next_page?: boolean;
274
+ next_cursor?: string;
275
+ total_returned?: number;
276
+ username?: string;
277
+ }
278
+ interface XFollowingsResponse {
279
+ followings: XFollower[];
280
+ has_next_page?: boolean;
281
+ next_cursor?: string;
282
+ total_returned?: number;
283
+ username?: string;
284
+ }
285
+ interface XUserInfoResponse {
286
+ data: Record<string, unknown>;
287
+ username?: string;
288
+ }
289
+ interface XVerifiedFollowersResponse {
290
+ followers: XFollower[];
291
+ has_next_page?: boolean;
292
+ next_cursor?: string;
293
+ total_returned?: number;
294
+ }
295
+ interface XTweet {
296
+ id: string;
297
+ text?: string;
298
+ created_at?: string;
299
+ author?: Record<string, unknown>;
300
+ favorite_count?: number;
301
+ retweet_count?: number;
302
+ reply_count?: number;
303
+ view_count?: number;
304
+ lang?: string;
305
+ entities?: Record<string, unknown>;
306
+ media?: Array<Record<string, unknown>>;
307
+ [key: string]: unknown;
308
+ }
309
+ interface XTweetsResponse {
310
+ tweets: XTweet[];
311
+ has_next_page?: boolean;
312
+ next_cursor?: string;
313
+ total_returned?: number;
314
+ }
315
+ interface XMentionsResponse {
316
+ tweets: XTweet[];
317
+ has_next_page?: boolean;
318
+ next_cursor?: string;
319
+ total_returned?: number;
320
+ username?: string;
321
+ }
322
+ interface XTweetLookupResponse {
323
+ tweets: XTweet[];
324
+ not_found?: string[];
325
+ total_requested?: number;
326
+ total_found?: number;
327
+ }
328
+ interface XTweetRepliesResponse {
329
+ replies: XTweet[];
330
+ has_next_page?: boolean;
331
+ next_cursor?: string;
332
+ total_returned?: number;
333
+ }
334
+ interface XTweetThreadResponse {
335
+ tweets: XTweet[];
336
+ has_next_page?: boolean;
337
+ next_cursor?: string;
338
+ total_returned?: number;
339
+ }
340
+ interface XSearchResponse {
341
+ tweets: XTweet[];
342
+ has_next_page?: boolean;
343
+ next_cursor?: string;
344
+ total_returned?: number;
345
+ }
346
+ interface XTrendingResponse {
347
+ data: Record<string, unknown>;
348
+ }
349
+ interface XArticlesRisingResponse {
350
+ data: Record<string, unknown>;
351
+ }
352
+ interface XAuthorAnalyticsResponse {
353
+ data: Record<string, unknown>;
354
+ handle?: string;
355
+ }
356
+ interface XCompareAuthorsResponse {
357
+ data: Record<string, unknown>;
358
+ }
208
359
  declare class BlockrunError extends Error {
209
360
  constructor(message: string);
210
361
  }
@@ -301,7 +452,7 @@ declare class LLMClient {
301
452
  * ```ts
302
453
  * const result = await client.smartChat('What is 2+2?');
303
454
  * console.log(result.response); // '4'
304
- * console.log(result.model); // 'google/gemini-2.5-flash'
455
+ * console.log(result.model); // 'google/gemini-2.5-flash-lite'
305
456
  * console.log(result.routing.savings); // 0.78 (78% savings)
306
457
  * ```
307
458
  *
@@ -344,6 +495,15 @@ declare class LLMClient {
344
495
  * Handle 402 response: parse requirements, sign payment, retry.
345
496
  */
346
497
  private handlePaymentAndRetry;
498
+ /**
499
+ * Make a request with automatic x402 payment handling, returning raw JSON.
500
+ * Used for non-ChatResponse endpoints (X/Twitter, search, image edit, etc.).
501
+ */
502
+ private requestWithPaymentRaw;
503
+ /**
504
+ * Handle 402 response for raw endpoints: parse requirements, sign payment, retry.
505
+ */
506
+ private handlePaymentAndRetryRaw;
347
507
  /**
348
508
  * Fetch with timeout.
349
509
  */
@@ -372,6 +532,165 @@ declare class LLMClient {
372
532
  * }
373
533
  */
374
534
  listAllModels(): Promise<(Model | ImageModel)[]>;
535
+ /**
536
+ * Edit an image using img2img.
537
+ *
538
+ * @param prompt - Text description of the desired edit
539
+ * @param image - Base64-encoded image or URL of the source image
540
+ * @param options - Optional edit parameters
541
+ * @returns ImageResponse with edited image URLs
542
+ */
543
+ imageEdit(prompt: string, image: string, options?: ImageEditOptions): Promise<ImageResponse>;
544
+ /**
545
+ * Standalone search (web, X/Twitter, news).
546
+ *
547
+ * @param query - Search query
548
+ * @param options - Optional search parameters
549
+ * @returns SearchResult with summary and citations
550
+ */
551
+ search(query: string, options?: SearchOptions): Promise<SearchResult>;
552
+ /**
553
+ * Get USDC balance on Base network.
554
+ *
555
+ * Automatically detects mainnet vs testnet based on API URL.
556
+ *
557
+ * @returns USDC balance as a float (6 decimal places normalized)
558
+ *
559
+ * @example
560
+ * const balance = await client.getBalance();
561
+ * console.log(`Balance: $${balance.toFixed(2)} USDC`);
562
+ */
563
+ getBalance(): Promise<number>;
564
+ /**
565
+ * Look up X/Twitter user profiles by username.
566
+ *
567
+ * Powered by AttentionVC. $0.002 per user (min $0.02, max $0.20).
568
+ *
569
+ * @param usernames - Single username or array of usernames (without @)
570
+ */
571
+ xUserLookup(usernames: string | string[]): Promise<XUserLookupResponse>;
572
+ /**
573
+ * Get followers of an X/Twitter user.
574
+ *
575
+ * Powered by AttentionVC. $0.05 per page (~200 accounts).
576
+ *
577
+ * @param username - X/Twitter username (without @)
578
+ * @param cursor - Pagination cursor from previous response
579
+ */
580
+ xFollowers(username: string, cursor?: string): Promise<XFollowersResponse>;
581
+ /**
582
+ * Get accounts an X/Twitter user is following.
583
+ *
584
+ * Powered by AttentionVC. $0.05 per page (~200 accounts).
585
+ *
586
+ * @param username - X/Twitter username (without @)
587
+ * @param cursor - Pagination cursor from previous response
588
+ */
589
+ xFollowings(username: string, cursor?: string): Promise<XFollowingsResponse>;
590
+ /**
591
+ * Get detailed profile info for a single X/Twitter user.
592
+ *
593
+ * Powered by AttentionVC. $0.002 per request.
594
+ *
595
+ * @param username - X/Twitter username (without @)
596
+ */
597
+ xUserInfo(username: string): Promise<XUserInfoResponse>;
598
+ /**
599
+ * Get verified (blue-check) followers of an X/Twitter user.
600
+ *
601
+ * Powered by AttentionVC. $0.048 per page.
602
+ *
603
+ * @param userId - X/Twitter user ID (not username)
604
+ * @param cursor - Pagination cursor from previous response
605
+ */
606
+ xVerifiedFollowers(userId: string, cursor?: string): Promise<XVerifiedFollowersResponse>;
607
+ /**
608
+ * Get tweets posted by an X/Twitter user.
609
+ *
610
+ * Powered by AttentionVC. $0.032 per page.
611
+ *
612
+ * @param username - X/Twitter username (without @)
613
+ * @param includeReplies - Include reply tweets (default: false)
614
+ * @param cursor - Pagination cursor from previous response
615
+ */
616
+ xUserTweets(username: string, includeReplies?: boolean, cursor?: string): Promise<XTweetsResponse>;
617
+ /**
618
+ * Get tweets that mention an X/Twitter user.
619
+ *
620
+ * Powered by AttentionVC. $0.032 per page.
621
+ *
622
+ * @param username - X/Twitter username (without @)
623
+ * @param sinceTime - Start time filter (ISO8601 or Unix timestamp)
624
+ * @param untilTime - End time filter (ISO8601 or Unix timestamp)
625
+ * @param cursor - Pagination cursor from previous response
626
+ */
627
+ xUserMentions(username: string, sinceTime?: string, untilTime?: string, cursor?: string): Promise<XMentionsResponse>;
628
+ /**
629
+ * Fetch full tweet data for up to 200 tweet IDs.
630
+ *
631
+ * Powered by AttentionVC. $0.16 per batch.
632
+ *
633
+ * @param tweetIds - Single tweet ID or array of tweet IDs (max 200)
634
+ */
635
+ xTweetLookup(tweetIds: string | string[]): Promise<XTweetLookupResponse>;
636
+ /**
637
+ * Get replies to a specific tweet.
638
+ *
639
+ * Powered by AttentionVC. $0.032 per page.
640
+ *
641
+ * @param tweetId - The tweet ID to get replies for
642
+ * @param queryType - Sort order: 'Latest' or 'Default'
643
+ * @param cursor - Pagination cursor from previous response
644
+ */
645
+ xTweetReplies(tweetId: string, queryType?: string, cursor?: string): Promise<XTweetRepliesResponse>;
646
+ /**
647
+ * Get the full thread context for a tweet.
648
+ *
649
+ * Powered by AttentionVC. $0.032 per page.
650
+ *
651
+ * @param tweetId - The tweet ID to get thread for
652
+ * @param cursor - Pagination cursor from previous response
653
+ */
654
+ xTweetThread(tweetId: string, cursor?: string): Promise<XTweetThreadResponse>;
655
+ /**
656
+ * Search X/Twitter with advanced query operators.
657
+ *
658
+ * Powered by AttentionVC. $0.032 per page.
659
+ *
660
+ * @param query - Search query (supports Twitter search operators)
661
+ * @param queryType - Sort order: 'Latest', 'Top', or 'Default'
662
+ * @param cursor - Pagination cursor from previous response
663
+ */
664
+ xSearch(query: string, queryType?: string, cursor?: string): Promise<XSearchResponse>;
665
+ /**
666
+ * Get current trending topics on X/Twitter.
667
+ *
668
+ * Powered by AttentionVC. $0.002 per request.
669
+ */
670
+ xTrending(): Promise<XTrendingResponse>;
671
+ /**
672
+ * Get rising/viral articles from X/Twitter.
673
+ *
674
+ * Powered by AttentionVC intelligence layer. $0.05 per request.
675
+ */
676
+ xArticlesRising(): Promise<XArticlesRisingResponse>;
677
+ /**
678
+ * Get author analytics and intelligence metrics for an X/Twitter user.
679
+ *
680
+ * Powered by AttentionVC intelligence layer. $0.02 per request.
681
+ *
682
+ * @param handle - X/Twitter handle (without @)
683
+ */
684
+ xAuthorAnalytics(handle: string): Promise<XAuthorAnalyticsResponse>;
685
+ /**
686
+ * Compare two X/Twitter authors side-by-side with intelligence metrics.
687
+ *
688
+ * Powered by AttentionVC intelligence layer. $0.05 per request.
689
+ *
690
+ * @param handle1 - First X/Twitter handle (without @)
691
+ * @param handle2 - Second X/Twitter handle (without @)
692
+ */
693
+ xCompareAuthors(handle1: string, handle2: string): Promise<XCompareAuthorsResponse>;
375
694
  /**
376
695
  * Get current session spending.
377
696
  *
@@ -467,6 +786,19 @@ declare class ImageClient {
467
786
  * console.log(result.data[0].url);
468
787
  */
469
788
  generate(prompt: string, options?: ImageGenerateOptions): Promise<ImageResponse>;
789
+ /**
790
+ * Edit an image using img2img.
791
+ *
792
+ * @param prompt - Text description of the desired edit
793
+ * @param image - Base64-encoded image or URL of the source image
794
+ * @param options - Optional edit parameters
795
+ * @returns ImageResponse with edited image URLs
796
+ *
797
+ * @example
798
+ * const result = await client.edit('Make it a painting', imageBase64);
799
+ * console.log(result.data[0].url);
800
+ */
801
+ edit(prompt: string, image: string, options?: ImageEditOptions): Promise<ImageResponse>;
470
802
  /**
471
803
  * List available image generation models with pricing.
472
804
  */
@@ -502,6 +834,33 @@ declare class ImageClient {
502
834
 
503
835
  declare const BASE_CHAIN_ID = 8453;
504
836
  declare const USDC_BASE: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
837
+ declare const SOLANA_NETWORK = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
838
+ declare const USDC_SOLANA = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
839
+ interface CreateSolanaPaymentOptions {
840
+ resourceUrl?: string;
841
+ resourceDescription?: string;
842
+ maxTimeoutSeconds?: number;
843
+ extra?: Record<string, unknown>;
844
+ extensions?: Record<string, unknown>;
845
+ rpcUrl?: string;
846
+ }
847
+ /**
848
+ * Create a signed Solana x402 v2 payment payload.
849
+ *
850
+ * This creates an SPL TransferChecked transaction for USDC payment
851
+ * that the CDP facilitator can verify and settle.
852
+ *
853
+ * Requires @solana/web3.js and @solana/spl-token dependencies.
854
+ *
855
+ * @param secretKey - Solana secret key (Uint8Array, 64 bytes)
856
+ * @param fromAddress - Sender wallet address (base58)
857
+ * @param recipient - Payment recipient address (base58)
858
+ * @param amount - Amount in micro USDC (6 decimals)
859
+ * @param feePayer - CDP facilitator fee payer address (base58)
860
+ * @param options - Additional options
861
+ * @returns Base64-encoded signed payment payload
862
+ */
863
+ declare function createSolanaPaymentPayload(secretKey: Uint8Array, fromAddress: string, recipient: string, amount: string, feePayer: string, options?: CreateSolanaPaymentOptions): Promise<string>;
505
864
 
506
865
  /**
507
866
  * BlockRun Wallet Management - Auto-create and manage wallets.
@@ -602,6 +961,116 @@ declare function formatFundingMessageCompact(address: string): string;
602
961
  declare const WALLET_FILE_PATH: string;
603
962
  declare const WALLET_DIR_PATH: string;
604
963
 
964
+ /**
965
+ * BlockRun Solana LLM Client.
966
+ *
967
+ * Usage:
968
+ * import { SolanaLLMClient } from '@blockrun/llm';
969
+ *
970
+ * // SOLANA_WALLET_KEY env var (bs58-encoded Solana secret key)
971
+ * const client = new SolanaLLMClient();
972
+ *
973
+ * // Or pass key directly
974
+ * const client = new SolanaLLMClient({ privateKey: 'your-bs58-key' });
975
+ *
976
+ * const response = await client.chat('openai/gpt-4o', 'gm Solana');
977
+ */
978
+
979
+ interface SolanaLLMClientOptions {
980
+ /** bs58-encoded Solana secret key (64 bytes). Optional if SOLANA_WALLET_KEY env var is set. */
981
+ privateKey?: string;
982
+ /** API endpoint URL (default: https://sol.blockrun.ai/api) */
983
+ apiUrl?: string;
984
+ /** Solana RPC URL (default: https://api.mainnet-beta.solana.com) */
985
+ rpcUrl?: string;
986
+ /** Request timeout in milliseconds (default: 60000) */
987
+ timeout?: number;
988
+ }
989
+ declare class SolanaLLMClient {
990
+ static readonly SOLANA_API_URL = "https://sol.blockrun.ai/api";
991
+ private privateKey;
992
+ private apiUrl;
993
+ private rpcUrl;
994
+ private timeout;
995
+ private sessionTotalUsd;
996
+ private sessionCalls;
997
+ private addressCache;
998
+ constructor(options?: SolanaLLMClientOptions);
999
+ /** Get Solana wallet address (public key in base58). */
1000
+ getWalletAddress(): Promise<string>;
1001
+ /** Simple 1-line chat. */
1002
+ chat(model: string, prompt: string, options?: ChatOptions): Promise<string>;
1003
+ /** Full chat completion (OpenAI-compatible). */
1004
+ chatCompletion(model: string, messages: ChatMessage[], options?: ChatCompletionOptions): Promise<ChatResponse>;
1005
+ /** List available models. */
1006
+ listModels(): Promise<Model[]>;
1007
+ /**
1008
+ * Get Solana USDC balance.
1009
+ *
1010
+ * @returns USDC balance as a float
1011
+ */
1012
+ getBalance(): Promise<number>;
1013
+ /** Edit an image using img2img (Solana payment). */
1014
+ imageEdit(prompt: string, image: string, options?: ImageEditOptions): Promise<ImageResponse>;
1015
+ /** Standalone search (Solana payment). */
1016
+ search(query: string, options?: SearchOptions): Promise<SearchResult>;
1017
+ xUserLookup(usernames: string | string[]): Promise<XUserLookupResponse>;
1018
+ xFollowers(username: string, cursor?: string): Promise<XFollowersResponse>;
1019
+ xFollowings(username: string, cursor?: string): Promise<XFollowingsResponse>;
1020
+ xUserInfo(username: string): Promise<XUserInfoResponse>;
1021
+ xVerifiedFollowers(userId: string, cursor?: string): Promise<XVerifiedFollowersResponse>;
1022
+ xUserTweets(username: string, includeReplies?: boolean, cursor?: string): Promise<XTweetsResponse>;
1023
+ xUserMentions(username: string, sinceTime?: string, untilTime?: string, cursor?: string): Promise<XMentionsResponse>;
1024
+ xTweetLookup(tweetIds: string | string[]): Promise<XTweetLookupResponse>;
1025
+ xTweetReplies(tweetId: string, queryType?: string, cursor?: string): Promise<XTweetRepliesResponse>;
1026
+ xTweetThread(tweetId: string, cursor?: string): Promise<XTweetThreadResponse>;
1027
+ xSearch(query: string, queryType?: string, cursor?: string): Promise<XSearchResponse>;
1028
+ xTrending(): Promise<XTrendingResponse>;
1029
+ xArticlesRising(): Promise<XArticlesRisingResponse>;
1030
+ xAuthorAnalytics(handle: string): Promise<XAuthorAnalyticsResponse>;
1031
+ xCompareAuthors(handle1: string, handle2: string): Promise<XCompareAuthorsResponse>;
1032
+ /** Get session spending. */
1033
+ getSpending(): Spending;
1034
+ /** True if using sol.blockrun.ai. */
1035
+ isSolana(): boolean;
1036
+ private requestWithPayment;
1037
+ private handlePaymentAndRetry;
1038
+ private requestWithPaymentRaw;
1039
+ private handlePaymentAndRetryRaw;
1040
+ private fetchWithTimeout;
1041
+ }
1042
+ /**
1043
+ * Convenience function: create SolanaLLMClient for sol.blockrun.ai.
1044
+ */
1045
+ declare function solanaClient(options?: SolanaLLMClientOptions): SolanaLLMClient;
1046
+
1047
+ declare const SOLANA_WALLET_FILE: string;
1048
+ interface SolanaWalletInfo {
1049
+ privateKey: string;
1050
+ address: string;
1051
+ isNew: boolean;
1052
+ }
1053
+ /**
1054
+ * Create a new Solana wallet.
1055
+ * Requires @solana/web3.js (optional dep).
1056
+ */
1057
+ declare function createSolanaWallet(): {
1058
+ address: string;
1059
+ privateKey: string;
1060
+ };
1061
+ /**
1062
+ * Convert a bs58 private key string to Uint8Array (64 bytes).
1063
+ * Accepts: bs58-encoded 64-byte key (standard Solana format).
1064
+ */
1065
+ declare function solanaKeyToBytes(privateKey: string): Promise<Uint8Array>;
1066
+ /**
1067
+ * Get Solana public key (address) from bs58 private key.
1068
+ */
1069
+ declare function solanaPublicKey(privateKey: string): Promise<string>;
1070
+ declare function saveSolanaWallet(privateKey: string): string;
1071
+ declare function loadSolanaWallet(): string | null;
1072
+ declare function getOrCreateSolanaWallet(): Promise<SolanaWalletInfo>;
1073
+
605
1074
  /**
606
1075
  * OpenAI-compatible API wrapper for BlockRun LLM SDK.
607
1076
  *
@@ -741,4 +1210,4 @@ declare class OpenAI {
741
1210
  getWalletAddress(): string;
742
1211
  }
743
1212
 
744
- export { APIError, BASE_CHAIN_ID, BlockrunError, type ChatChoice, type ChatCompletionOptions, type ChatMessage, type ChatOptions, type ChatResponse, type ChatUsage, type FunctionCall, type FunctionDefinition, ImageClient, type ImageClientOptions, type ImageData, type ImageGenerateOptions, type ImageModel, type ImageResponse, LLMClient, type LLMClientOptions, type Model, type NewsSearchSource, OpenAI, type OpenAIChatCompletionChoice, type OpenAIChatCompletionChunk, type OpenAIChatCompletionParams, type OpenAIChatCompletionResponse, type OpenAIClientOptions, PaymentError, type PaymentLinks, type RoutingDecision, type RoutingProfile, type RoutingTier, type RssSearchSource, type SearchParameters, type SearchSource, type SmartChatOptions, type SmartChatResponse, type Spending, type Tool, type ToolCall, type ToolChoice, USDC_BASE, USDC_BASE_CONTRACT, WALLET_DIR_PATH, WALLET_FILE_PATH, type WalletInfo, type WebSearchSource, type XSearchSource, createWallet, LLMClient as default, formatFundingMessageCompact, formatNeedsFundingMessage, formatWalletCreatedMessage, getEip681Uri, getOrCreateWallet, getPaymentLinks, getWalletAddress, loadWallet, saveWallet, testnetClient };
1213
+ export { APIError, BASE_CHAIN_ID, BlockrunError, type ChatChoice, type ChatCompletionOptions, type ChatMessage, type ChatOptions, type ChatResponse, type ChatUsage, type FunctionCall, type FunctionDefinition, ImageClient, type ImageClientOptions, type ImageData, type ImageEditOptions, type ImageGenerateOptions, type ImageModel, type ImageResponse, LLMClient, type LLMClientOptions, type Model, type NewsSearchSource, OpenAI, type OpenAIChatCompletionChoice, type OpenAIChatCompletionChunk, type OpenAIChatCompletionParams, type OpenAIChatCompletionResponse, type OpenAIClientOptions, PaymentError, type PaymentLinks, type RoutingDecision, type RoutingProfile, type RoutingTier, type RssSearchSource, SOLANA_NETWORK, SOLANA_WALLET_FILE as SOLANA_WALLET_FILE_PATH, type SearchOptions, type SearchParameters, type SearchResult, type SearchSource, type SmartChatOptions, type SmartChatResponse, SolanaLLMClient, type SolanaLLMClientOptions, type SolanaWalletInfo, type Spending, type Tool, type ToolCall, type ToolChoice, USDC_BASE, USDC_BASE_CONTRACT, USDC_SOLANA, WALLET_DIR_PATH, WALLET_FILE_PATH, type WalletInfo, type WebSearchSource, type XArticlesRisingResponse, type XAuthorAnalyticsResponse, type XCompareAuthorsResponse, type XFollower, type XFollowersResponse, type XFollowingsResponse, type XMentionsResponse, type XSearchResponse, type XSearchSource, type XTrendingResponse, type XTweet, type XTweetLookupResponse, type XTweetRepliesResponse, type XTweetThreadResponse, type XTweetsResponse, type XUser, type XUserInfoResponse, type XUserLookupResponse, type XVerifiedFollowersResponse, createSolanaPaymentPayload, createSolanaWallet, createWallet, LLMClient as default, formatFundingMessageCompact, formatNeedsFundingMessage, formatWalletCreatedMessage, getEip681Uri, getOrCreateSolanaWallet, getOrCreateWallet, getPaymentLinks, getWalletAddress, loadSolanaWallet, loadWallet, saveSolanaWallet, saveWallet, solanaClient, solanaKeyToBytes, solanaPublicKey, testnetClient };