@routstr/sdk 0.3.7 → 0.3.8

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.
Files changed (39) hide show
  1. package/dist/client/index.d.mts +411 -0
  2. package/dist/client/index.d.ts +411 -0
  3. package/dist/client/index.js +4883 -0
  4. package/dist/client/index.js.map +1 -0
  5. package/dist/client/index.mjs +4877 -0
  6. package/dist/client/index.mjs.map +1 -0
  7. package/dist/discovery/index.d.mts +213 -0
  8. package/dist/discovery/index.d.ts +213 -0
  9. package/dist/discovery/index.js +738 -0
  10. package/dist/discovery/index.js.map +1 -0
  11. package/dist/discovery/index.mjs +735 -0
  12. package/dist/discovery/index.mjs.map +1 -0
  13. package/dist/index.d.mts +194 -0
  14. package/dist/index.d.ts +194 -0
  15. package/dist/index.js +6307 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/index.mjs +6258 -0
  18. package/dist/index.mjs.map +1 -0
  19. package/dist/interfaces-C-DYd9Jy.d.ts +176 -0
  20. package/dist/interfaces-Csn8Uq04.d.mts +176 -0
  21. package/dist/interfaces-Cv1k2EUK.d.mts +118 -0
  22. package/dist/interfaces-iL7CWeG5.d.ts +118 -0
  23. package/dist/storage/index.d.mts +87 -0
  24. package/dist/storage/index.d.ts +87 -0
  25. package/dist/storage/index.js +1740 -0
  26. package/dist/storage/index.js.map +1 -0
  27. package/dist/storage/index.mjs +1718 -0
  28. package/dist/storage/index.mjs.map +1 -0
  29. package/dist/store-58VcEUoA.d.ts +172 -0
  30. package/dist/store-C6dfj1cc.d.mts +172 -0
  31. package/dist/types-_21yYFZG.d.mts +234 -0
  32. package/dist/types-_21yYFZG.d.ts +234 -0
  33. package/dist/wallet/index.d.mts +245 -0
  34. package/dist/wallet/index.d.ts +245 -0
  35. package/dist/wallet/index.js +1376 -0
  36. package/dist/wallet/index.js.map +1 -0
  37. package/dist/wallet/index.mjs +1373 -0
  38. package/dist/wallet/index.mjs.map +1 -0
  39. package/package.json +1 -1
@@ -0,0 +1,172 @@
1
+ import { StoreApi } from 'zustand/vanilla';
2
+ import { D as DiscoveryAdapter } from './interfaces-Cv1k2EUK.mjs';
3
+ import { P as ProviderRegistry, S as StorageAdapter } from './interfaces-Csn8Uq04.mjs';
4
+ import { e as Model, k as ProviderInfo, S as SdkLogger } from './types-_21yYFZG.mjs';
5
+
6
+ interface UsageTrackingEntry {
7
+ id: string;
8
+ timestamp: number;
9
+ modelId: string;
10
+ baseUrl: string;
11
+ requestId: string;
12
+ cost: number;
13
+ satsCost: number;
14
+ promptTokens: number;
15
+ completionTokens: number;
16
+ totalTokens: number;
17
+ client?: string;
18
+ sessionId?: string;
19
+ tags?: string[];
20
+ }
21
+
22
+ interface ListUsageTrackingOptions {
23
+ limit?: number;
24
+ before?: number;
25
+ after?: number;
26
+ modelId?: string;
27
+ baseUrl?: string;
28
+ sessionId?: string;
29
+ client?: string;
30
+ }
31
+ interface UsageTrackingDriver {
32
+ migrate(): Promise<void>;
33
+ append(entry: UsageTrackingEntry): Promise<void>;
34
+ appendMany(entries: UsageTrackingEntry[]): Promise<void>;
35
+ list(options?: ListUsageTrackingOptions): Promise<UsageTrackingEntry[]>;
36
+ count(options?: Omit<ListUsageTrackingOptions, "limit">): Promise<number>;
37
+ deleteOlderThan(timestamp: number): Promise<number>;
38
+ clear(): Promise<void>;
39
+ }
40
+
41
+ interface StorageDriver {
42
+ getItem<T>(key: string, defaultValue: T): Promise<T>;
43
+ setItem<T>(key: string, value: T): Promise<void>;
44
+ removeItem(key: string): Promise<void>;
45
+ }
46
+ interface SdkStorageState {
47
+ modelsFromAllProviders: Record<string, Model[]>;
48
+ lastUsedModel: string | null;
49
+ baseUrlsList: string[];
50
+ disabledProviders: string[];
51
+ mintsFromAllProviders: Record<string, string[]>;
52
+ infoFromAllProviders: Record<string, ProviderInfo>;
53
+ lastModelsUpdate: Record<string, number>;
54
+ lastBaseUrlsUpdate: number | null;
55
+ apiKeys: Array<{
56
+ baseUrl: string;
57
+ key: string;
58
+ balance: number;
59
+ lastUsed: number | null;
60
+ }>;
61
+ childKeys: Array<{
62
+ parentBaseUrl: string;
63
+ childKey: string;
64
+ balance: number;
65
+ balanceLimit?: number;
66
+ validityDate?: number;
67
+ createdAt: number;
68
+ }>;
69
+ xcashuTokens: Record<string, Array<{
70
+ baseUrl: string;
71
+ token: string;
72
+ createdAt: number;
73
+ tryCount: number;
74
+ }>>;
75
+ routstr21Models: string[];
76
+ lastRoutstr21ModelsUpdate: number | null;
77
+ cachedReceiveTokens: Array<{
78
+ token: string;
79
+ amount: number;
80
+ unit: "sat" | "msat";
81
+ createdAt: number;
82
+ }>;
83
+ clientIds: Array<{
84
+ clientId: string;
85
+ name: string;
86
+ apiKey: string;
87
+ createdAt: number;
88
+ lastUsed?: number | null;
89
+ }>;
90
+ /** Set of failed provider URLs */
91
+ failedProviders: string[];
92
+ /** Map of provider URL -> timestamp of last failure */
93
+ lastFailed: Record<string, number>;
94
+ /** Providers currently on cooldown: [baseUrl, timestamp][] */
95
+ providersOnCooldown: Array<{
96
+ baseUrl: string;
97
+ timestamp: number;
98
+ }>;
99
+ }
100
+
101
+ interface SdkStoreOptions {
102
+ driver: StorageDriver;
103
+ }
104
+ interface SdkStorageStore extends SdkStorageState {
105
+ setModelsFromAllProviders: (value: Record<string, Model[]>) => void;
106
+ setLastUsedModel: (value: string | null) => void;
107
+ setBaseUrlsList: (value: string[]) => void;
108
+ setBaseUrlsLastUpdate: (value: number | null) => void;
109
+ setDisabledProviders: (value: string[]) => void;
110
+ setMintsFromAllProviders: (value: Record<string, string[]>) => void;
111
+ setInfoFromAllProviders: (value: Record<string, ProviderInfo>) => void;
112
+ setLastModelsUpdate: (value: Record<string, number>) => void;
113
+ setApiKeys: (value: Array<{
114
+ baseUrl: string;
115
+ key: string;
116
+ balance?: number;
117
+ lastUsed?: number | null;
118
+ }> | ((current: SdkStorageStore["apiKeys"]) => SdkStorageStore["apiKeys"])) => void;
119
+ setChildKeys: (value: Array<{
120
+ parentBaseUrl: string;
121
+ childKey: string;
122
+ balance?: number;
123
+ balanceLimit?: number;
124
+ validityDate?: number;
125
+ createdAt?: number;
126
+ }>) => void;
127
+ setXcashuTokens: (value: Record<string, Array<{
128
+ baseUrl: string;
129
+ token: string;
130
+ createdAt?: number;
131
+ tryCount?: number;
132
+ }>>) => void;
133
+ updateXcashuTokenTryCount: (token: string, tryCount: number) => void;
134
+ setRoutstr21Models: (value: string[]) => void;
135
+ setRoutstr21ModelsLastUpdate: (value: number | null) => void;
136
+ setCachedReceiveTokens: (value: Array<{
137
+ token: string;
138
+ amount: number;
139
+ unit: "sat" | "msat";
140
+ createdAt?: number;
141
+ }>) => void;
142
+ setClientIds: (value: Array<{
143
+ clientId: string;
144
+ name: string;
145
+ apiKey: string;
146
+ createdAt?: number;
147
+ lastUsed?: number | null;
148
+ }> | ((current: SdkStorageStore["clientIds"]) => SdkStorageStore["clientIds"])) => void;
149
+ setFailedProviders: (value: string[]) => void;
150
+ addFailedProvider: (baseUrl: string) => void;
151
+ removeFailedProvider: (baseUrl: string) => void;
152
+ setLastFailed: (value: Record<string, number>) => void;
153
+ setLastFailedTimestamp: (baseUrl: string, timestamp: number) => void;
154
+ setProvidersOnCooldown: (value: Array<{
155
+ baseUrl: string;
156
+ timestamp: number;
157
+ }>) => void;
158
+ addProviderOnCooldown: (baseUrl: string, timestamp: number) => void;
159
+ removeProviderFromCooldown: (baseUrl: string) => void;
160
+ clearProvidersOnCooldown: () => void;
161
+ }
162
+ /** Store type returned after async initialization */
163
+ type SdkStore = StoreApi<SdkStorageStore>;
164
+ declare const createSdkStore: ({ driver, }: SdkStoreOptions) => {
165
+ store: SdkStore;
166
+ hydrate: Promise<void>;
167
+ };
168
+ declare const createDiscoveryAdapterFromStore: (store: SdkStore) => DiscoveryAdapter;
169
+ declare const createStorageAdapterFromStore: (store: SdkStore) => StorageAdapter;
170
+ declare const createProviderRegistryFromStore: (store: SdkStore, logger?: SdkLogger) => ProviderRegistry;
171
+
172
+ export { type ListUsageTrackingOptions as L, type SdkStore as S, type UsageTrackingDriver as U, type StorageDriver as a, type UsageTrackingEntry as b, createDiscoveryAdapterFromStore as c, createProviderRegistryFromStore as d, createSdkStore as e, createStorageAdapterFromStore as f };
@@ -0,0 +1,234 @@
1
+ /**
2
+ * Core types for the Routstr SDK
3
+ * These types are shared across wallet and client modules
4
+ */
5
+ interface SdkLogger {
6
+ log(...args: unknown[]): void;
7
+ warn(...args: unknown[]): void;
8
+ error(...args: unknown[]): void;
9
+ debug(...args: unknown[]): void;
10
+ child(prefix: string): SdkLogger;
11
+ }
12
+ declare const consoleLogger: SdkLogger;
13
+ declare const noopLogger: SdkLogger;
14
+ interface MessageContentType {
15
+ type: "text" | "image_url" | "file";
16
+ text?: string;
17
+ image_url?: {
18
+ url: string;
19
+ storageId?: string;
20
+ };
21
+ file?: {
22
+ url: string;
23
+ name?: string;
24
+ mimeType?: string;
25
+ size?: number;
26
+ };
27
+ hidden?: boolean;
28
+ thinking?: string;
29
+ citations?: string[];
30
+ }
31
+ interface Message {
32
+ role: string;
33
+ content: string | MessageContentType[];
34
+ _eventId?: string;
35
+ _prevId?: string;
36
+ _createdAt?: number;
37
+ _modelId?: string;
38
+ satsSpent?: number;
39
+ }
40
+ interface TransactionHistory {
41
+ type: "spent" | "mint" | "send" | "import" | "refund";
42
+ amount: number;
43
+ timestamp: number;
44
+ status: "success" | "failed";
45
+ model?: string;
46
+ message?: string;
47
+ balance?: number;
48
+ }
49
+ interface ModelPricing {
50
+ prompt: number;
51
+ completion: number;
52
+ request: number;
53
+ image: number;
54
+ web_search: number;
55
+ internal_reasoning: number;
56
+ }
57
+ interface ModelSatsPricing extends ModelPricing {
58
+ max_completion_cost: number;
59
+ max_prompt_cost: number;
60
+ max_cost: number;
61
+ }
62
+ interface ModelArchitecture {
63
+ modality: string;
64
+ input_modalities: readonly string[];
65
+ output_modalities: readonly string[];
66
+ tokenizer: string;
67
+ instruct_type: string | null;
68
+ }
69
+ interface PerRequestLimits {
70
+ readonly prompt_tokens?: number;
71
+ readonly completion_tokens?: number;
72
+ readonly requests_per_minute?: number;
73
+ readonly images_per_minute?: number;
74
+ readonly web_searches_per_minute?: number;
75
+ readonly [key: string]: number | undefined;
76
+ }
77
+ interface Model {
78
+ id: string;
79
+ name: string;
80
+ created?: number;
81
+ description?: string;
82
+ context_length?: number;
83
+ architecture?: ModelArchitecture;
84
+ pricing?: ModelPricing;
85
+ sats_pricing: ModelSatsPricing;
86
+ per_request_limits?: PerRequestLimits;
87
+ }
88
+ /**
89
+ * Result from spending cashu tokens
90
+ */
91
+ interface SpendResult {
92
+ token: string | null;
93
+ status: "success" | "failed";
94
+ balance: number;
95
+ unit?: "sat" | "msat";
96
+ error?: string;
97
+ errorDetails?: {
98
+ required: number;
99
+ available: number;
100
+ maxMintBalance: number;
101
+ maxMintUrl: string;
102
+ };
103
+ }
104
+ /**
105
+ * Result from refund operations
106
+ */
107
+ interface RefundResult {
108
+ success: boolean;
109
+ refundedAmount?: number;
110
+ message?: string;
111
+ requestId?: string;
112
+ }
113
+ /**
114
+ * Result from top up operations
115
+ */
116
+ interface TopUpResult {
117
+ success: boolean;
118
+ toppedUpAmount?: number;
119
+ message?: string;
120
+ requestId?: string;
121
+ recoveredToken?: boolean;
122
+ }
123
+ /**
124
+ * API error verdict for retry logic
125
+ */
126
+ interface APIErrorVerdict {
127
+ retry: boolean;
128
+ reason: string;
129
+ newBaseUrl?: string;
130
+ }
131
+ /**
132
+ * Image data from API response
133
+ */
134
+ interface ImageData {
135
+ type: "image_url";
136
+ image_url: {
137
+ url: string;
138
+ };
139
+ index?: number;
140
+ }
141
+ /**
142
+ * Annotation data from API response
143
+ */
144
+ interface AnnotationData {
145
+ type: "url_citation";
146
+ start_index: number;
147
+ end_index: number;
148
+ url: string;
149
+ title: string;
150
+ }
151
+ /**
152
+ * Usage statistics from API response
153
+ */
154
+ interface UsageStats {
155
+ total_tokens?: number;
156
+ prompt_tokens?: number;
157
+ completion_tokens?: number;
158
+ cost?: number;
159
+ sats_cost?: number;
160
+ }
161
+ /**
162
+ * Result from streaming response processing
163
+ */
164
+ interface StreamingResult {
165
+ content: string;
166
+ thinking?: string;
167
+ images?: ImageData[];
168
+ usage?: UsageStats;
169
+ model?: string;
170
+ responseId?: string;
171
+ finish_reason?: string;
172
+ citations?: string[];
173
+ annotations?: AnnotationData[];
174
+ }
175
+ /**
176
+ * Parameters for fetching AI response
177
+ */
178
+ interface FetchAIResponseParams {
179
+ messageHistory: Message[];
180
+ selectedModel: Model;
181
+ baseUrl: string;
182
+ mintUrl: string;
183
+ balance: number;
184
+ transactionHistory: TransactionHistory[];
185
+ }
186
+ /**
187
+ * Candidate provider for failover
188
+ */
189
+ interface CandidateProvider {
190
+ baseUrl: string;
191
+ model: Model;
192
+ cost: number;
193
+ }
194
+ /**
195
+ * Mint selection result
196
+ */
197
+ interface MintSelection {
198
+ selectedMintUrl: string | null;
199
+ selectedMintBalance: number;
200
+ }
201
+ /**
202
+ * Pending token entry
203
+ */
204
+ interface PendingTokenEntry {
205
+ baseUrl: string;
206
+ amount: number;
207
+ }
208
+ /**
209
+ * Provider information from /v1/info endpoint
210
+ */
211
+ interface ProviderInfo {
212
+ mints?: string[];
213
+ [key: string]: any;
214
+ }
215
+ /**
216
+ * Model discovery result
217
+ */
218
+ interface ModelDiscoveryResult {
219
+ models: Model[];
220
+ bestById: Map<string, {
221
+ model: Model;
222
+ base: string;
223
+ }>;
224
+ totalProcessed: number;
225
+ }
226
+ /**
227
+ * Mint discovery result
228
+ */
229
+ interface MintDiscoveryResult {
230
+ mintsFromProviders: Record<string, string[]>;
231
+ infoFromProviders: Record<string, ProviderInfo>;
232
+ }
233
+
234
+ export { type APIErrorVerdict as A, type CandidateProvider as C, type FetchAIResponseParams as F, type ImageData as I, type Message as M, type PendingTokenEntry as P, type RefundResult as R, type SdkLogger as S, type TopUpResult as T, type UsageStats as U, type AnnotationData as a, type MessageContentType as b, type MintDiscoveryResult as c, type MintSelection as d, type Model as e, type ModelArchitecture as f, type ModelDiscoveryResult as g, type ModelPricing as h, type ModelSatsPricing as i, type PerRequestLimits as j, type ProviderInfo as k, type SpendResult as l, type StreamingResult as m, type TransactionHistory as n, consoleLogger as o, noopLogger as p };
@@ -0,0 +1,234 @@
1
+ /**
2
+ * Core types for the Routstr SDK
3
+ * These types are shared across wallet and client modules
4
+ */
5
+ interface SdkLogger {
6
+ log(...args: unknown[]): void;
7
+ warn(...args: unknown[]): void;
8
+ error(...args: unknown[]): void;
9
+ debug(...args: unknown[]): void;
10
+ child(prefix: string): SdkLogger;
11
+ }
12
+ declare const consoleLogger: SdkLogger;
13
+ declare const noopLogger: SdkLogger;
14
+ interface MessageContentType {
15
+ type: "text" | "image_url" | "file";
16
+ text?: string;
17
+ image_url?: {
18
+ url: string;
19
+ storageId?: string;
20
+ };
21
+ file?: {
22
+ url: string;
23
+ name?: string;
24
+ mimeType?: string;
25
+ size?: number;
26
+ };
27
+ hidden?: boolean;
28
+ thinking?: string;
29
+ citations?: string[];
30
+ }
31
+ interface Message {
32
+ role: string;
33
+ content: string | MessageContentType[];
34
+ _eventId?: string;
35
+ _prevId?: string;
36
+ _createdAt?: number;
37
+ _modelId?: string;
38
+ satsSpent?: number;
39
+ }
40
+ interface TransactionHistory {
41
+ type: "spent" | "mint" | "send" | "import" | "refund";
42
+ amount: number;
43
+ timestamp: number;
44
+ status: "success" | "failed";
45
+ model?: string;
46
+ message?: string;
47
+ balance?: number;
48
+ }
49
+ interface ModelPricing {
50
+ prompt: number;
51
+ completion: number;
52
+ request: number;
53
+ image: number;
54
+ web_search: number;
55
+ internal_reasoning: number;
56
+ }
57
+ interface ModelSatsPricing extends ModelPricing {
58
+ max_completion_cost: number;
59
+ max_prompt_cost: number;
60
+ max_cost: number;
61
+ }
62
+ interface ModelArchitecture {
63
+ modality: string;
64
+ input_modalities: readonly string[];
65
+ output_modalities: readonly string[];
66
+ tokenizer: string;
67
+ instruct_type: string | null;
68
+ }
69
+ interface PerRequestLimits {
70
+ readonly prompt_tokens?: number;
71
+ readonly completion_tokens?: number;
72
+ readonly requests_per_minute?: number;
73
+ readonly images_per_minute?: number;
74
+ readonly web_searches_per_minute?: number;
75
+ readonly [key: string]: number | undefined;
76
+ }
77
+ interface Model {
78
+ id: string;
79
+ name: string;
80
+ created?: number;
81
+ description?: string;
82
+ context_length?: number;
83
+ architecture?: ModelArchitecture;
84
+ pricing?: ModelPricing;
85
+ sats_pricing: ModelSatsPricing;
86
+ per_request_limits?: PerRequestLimits;
87
+ }
88
+ /**
89
+ * Result from spending cashu tokens
90
+ */
91
+ interface SpendResult {
92
+ token: string | null;
93
+ status: "success" | "failed";
94
+ balance: number;
95
+ unit?: "sat" | "msat";
96
+ error?: string;
97
+ errorDetails?: {
98
+ required: number;
99
+ available: number;
100
+ maxMintBalance: number;
101
+ maxMintUrl: string;
102
+ };
103
+ }
104
+ /**
105
+ * Result from refund operations
106
+ */
107
+ interface RefundResult {
108
+ success: boolean;
109
+ refundedAmount?: number;
110
+ message?: string;
111
+ requestId?: string;
112
+ }
113
+ /**
114
+ * Result from top up operations
115
+ */
116
+ interface TopUpResult {
117
+ success: boolean;
118
+ toppedUpAmount?: number;
119
+ message?: string;
120
+ requestId?: string;
121
+ recoveredToken?: boolean;
122
+ }
123
+ /**
124
+ * API error verdict for retry logic
125
+ */
126
+ interface APIErrorVerdict {
127
+ retry: boolean;
128
+ reason: string;
129
+ newBaseUrl?: string;
130
+ }
131
+ /**
132
+ * Image data from API response
133
+ */
134
+ interface ImageData {
135
+ type: "image_url";
136
+ image_url: {
137
+ url: string;
138
+ };
139
+ index?: number;
140
+ }
141
+ /**
142
+ * Annotation data from API response
143
+ */
144
+ interface AnnotationData {
145
+ type: "url_citation";
146
+ start_index: number;
147
+ end_index: number;
148
+ url: string;
149
+ title: string;
150
+ }
151
+ /**
152
+ * Usage statistics from API response
153
+ */
154
+ interface UsageStats {
155
+ total_tokens?: number;
156
+ prompt_tokens?: number;
157
+ completion_tokens?: number;
158
+ cost?: number;
159
+ sats_cost?: number;
160
+ }
161
+ /**
162
+ * Result from streaming response processing
163
+ */
164
+ interface StreamingResult {
165
+ content: string;
166
+ thinking?: string;
167
+ images?: ImageData[];
168
+ usage?: UsageStats;
169
+ model?: string;
170
+ responseId?: string;
171
+ finish_reason?: string;
172
+ citations?: string[];
173
+ annotations?: AnnotationData[];
174
+ }
175
+ /**
176
+ * Parameters for fetching AI response
177
+ */
178
+ interface FetchAIResponseParams {
179
+ messageHistory: Message[];
180
+ selectedModel: Model;
181
+ baseUrl: string;
182
+ mintUrl: string;
183
+ balance: number;
184
+ transactionHistory: TransactionHistory[];
185
+ }
186
+ /**
187
+ * Candidate provider for failover
188
+ */
189
+ interface CandidateProvider {
190
+ baseUrl: string;
191
+ model: Model;
192
+ cost: number;
193
+ }
194
+ /**
195
+ * Mint selection result
196
+ */
197
+ interface MintSelection {
198
+ selectedMintUrl: string | null;
199
+ selectedMintBalance: number;
200
+ }
201
+ /**
202
+ * Pending token entry
203
+ */
204
+ interface PendingTokenEntry {
205
+ baseUrl: string;
206
+ amount: number;
207
+ }
208
+ /**
209
+ * Provider information from /v1/info endpoint
210
+ */
211
+ interface ProviderInfo {
212
+ mints?: string[];
213
+ [key: string]: any;
214
+ }
215
+ /**
216
+ * Model discovery result
217
+ */
218
+ interface ModelDiscoveryResult {
219
+ models: Model[];
220
+ bestById: Map<string, {
221
+ model: Model;
222
+ base: string;
223
+ }>;
224
+ totalProcessed: number;
225
+ }
226
+ /**
227
+ * Mint discovery result
228
+ */
229
+ interface MintDiscoveryResult {
230
+ mintsFromProviders: Record<string, string[]>;
231
+ infoFromProviders: Record<string, ProviderInfo>;
232
+ }
233
+
234
+ export { type APIErrorVerdict as A, type CandidateProvider as C, type FetchAIResponseParams as F, type ImageData as I, type Message as M, type PendingTokenEntry as P, type RefundResult as R, type SdkLogger as S, type TopUpResult as T, type UsageStats as U, type AnnotationData as a, type MessageContentType as b, type MintDiscoveryResult as c, type MintSelection as d, type Model as e, type ModelArchitecture as f, type ModelDiscoveryResult as g, type ModelPricing as h, type ModelSatsPricing as i, type PerRequestLimits as j, type ProviderInfo as k, type SpendResult as l, type StreamingResult as m, type TransactionHistory as n, consoleLogger as o, noopLogger as p };