@routstr/sdk 0.1.1 → 0.1.2

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.
@@ -1,5 +1,5 @@
1
1
  import { M as Model, a as Message, T as TransactionHistory, l as StreamingResult } from '../types-BlHjmWRK.mjs';
2
- import { P as ProviderRegistry, W as WalletAdapter, S as StorageAdapter, a as StreamingCallbacks } from '../interfaces-BOfiz3Tt.mjs';
2
+ import { P as ProviderRegistry, W as WalletAdapter, S as StorageAdapter, a as StreamingCallbacks } from '../interfaces-B85Wx7ni.mjs';
3
3
  import { CashuSpender, BalanceManager } from '../wallet/index.mjs';
4
4
 
5
5
  /**
@@ -115,6 +115,7 @@ interface FetchOptions {
115
115
  */
116
116
  type AlertLevel = "max" | "min";
117
117
  type RoutstrClientMode = "xcashu" | "lazyrefund" | "apikeys";
118
+ type DebugLevel = "DEBUG" | "WARN" | "ERROR";
118
119
  interface RouteRequestParams {
119
120
  path: string;
120
121
  method: string;
@@ -134,11 +135,15 @@ declare class RoutstrClient {
134
135
  private providerManager;
135
136
  private alertLevel;
136
137
  private mode;
138
+ private debugLevel;
137
139
  constructor(walletAdapter: WalletAdapter, storageAdapter: StorageAdapter, providerRegistry: ProviderRegistry, alertLevel: AlertLevel, mode?: RoutstrClientMode);
138
140
  /**
139
141
  * Get the current client mode
140
142
  */
141
143
  getMode(): RoutstrClientMode;
144
+ getDebugLevel(): DebugLevel;
145
+ setDebugLevel(level: DebugLevel): void;
146
+ private _log;
142
147
  /**
143
148
  * Get the CashuSpender instance
144
149
  */
@@ -285,4 +290,4 @@ declare class StreamProcessor {
285
290
  private _mergeImages;
286
291
  }
287
292
 
288
- export { type AlertLevel, type FetchOptions, type ModelProviderPrice, ProviderManager, type RouteRequestParams, RoutstrClient, type RoutstrClientMode, type StreamCallbacks, StreamProcessor };
293
+ export { type AlertLevel, type DebugLevel, type FetchOptions, type ModelProviderPrice, ProviderManager, type RouteRequestParams, RoutstrClient, type RoutstrClientMode, type StreamCallbacks, StreamProcessor };
@@ -1,5 +1,5 @@
1
1
  import { M as Model, a as Message, T as TransactionHistory, l as StreamingResult } from '../types-BlHjmWRK.js';
2
- import { P as ProviderRegistry, W as WalletAdapter, S as StorageAdapter, a as StreamingCallbacks } from '../interfaces-BbAtkq7z.js';
2
+ import { P as ProviderRegistry, W as WalletAdapter, S as StorageAdapter, a as StreamingCallbacks } from '../interfaces-BVNyAmKu.js';
3
3
  import { CashuSpender, BalanceManager } from '../wallet/index.js';
4
4
 
5
5
  /**
@@ -115,6 +115,7 @@ interface FetchOptions {
115
115
  */
116
116
  type AlertLevel = "max" | "min";
117
117
  type RoutstrClientMode = "xcashu" | "lazyrefund" | "apikeys";
118
+ type DebugLevel = "DEBUG" | "WARN" | "ERROR";
118
119
  interface RouteRequestParams {
119
120
  path: string;
120
121
  method: string;
@@ -134,11 +135,15 @@ declare class RoutstrClient {
134
135
  private providerManager;
135
136
  private alertLevel;
136
137
  private mode;
138
+ private debugLevel;
137
139
  constructor(walletAdapter: WalletAdapter, storageAdapter: StorageAdapter, providerRegistry: ProviderRegistry, alertLevel: AlertLevel, mode?: RoutstrClientMode);
138
140
  /**
139
141
  * Get the current client mode
140
142
  */
141
143
  getMode(): RoutstrClientMode;
144
+ getDebugLevel(): DebugLevel;
145
+ setDebugLevel(level: DebugLevel): void;
146
+ private _log;
142
147
  /**
143
148
  * Get the CashuSpender instance
144
149
  */
@@ -285,4 +290,4 @@ declare class StreamProcessor {
285
290
  private _mergeImages;
286
291
  }
287
292
 
288
- export { type AlertLevel, type FetchOptions, type ModelProviderPrice, ProviderManager, type RouteRequestParams, RoutstrClient, type RoutstrClientMode, type StreamCallbacks, StreamProcessor };
293
+ export { type AlertLevel, type DebugLevel, type FetchOptions, type ModelProviderPrice, ProviderManager, type RouteRequestParams, RoutstrClient, type RoutstrClientMode, type StreamCallbacks, StreamProcessor };