@routstr/sdk 0.2.6 → 0.2.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.
@@ -1,6 +1,6 @@
1
1
  import { M as Model, a as Message, T as TransactionHistory, l as StreamingResult } from '../types-BYj_8c5c.mjs';
2
2
  import { P as ProviderRegistry, W as WalletAdapter, S as StorageAdapter, a as StreamingCallbacks } from '../interfaces-C5fLD3jB.mjs';
3
- import { U as UsageTrackingDriver, S as SdkStore } from '../store-C5lnyX8k.mjs';
3
+ import { S as SdkStore, U as UsageTrackingDriver } from '../store-DGeLPv9E.mjs';
4
4
  import { ServerResponse } from 'http';
5
5
  import { CashuSpender, BalanceManager } from '../wallet/index.mjs';
6
6
  import { Transform } from 'stream';
@@ -35,7 +35,19 @@ declare class ProviderManager {
35
35
  private providersOnCoolDown;
36
36
  /** Cooldown duration in milliseconds (5 minutes) */
37
37
  private static readonly COOLDOWN_DURATION_MS;
38
- constructor(providerRegistry: ProviderRegistry);
38
+ /** Optional persistent store for failure tracking */
39
+ private store;
40
+ /** Instance ID for debugging */
41
+ private readonly instanceId;
42
+ constructor(providerRegistry: ProviderRegistry, store?: SdkStore);
43
+ /**
44
+ * Hydrate in-memory state from persistent store
45
+ */
46
+ private hydrateFromStore;
47
+ /**
48
+ * Get instance ID for debugging
49
+ */
50
+ getInstanceId(): string;
39
51
  /**
40
52
  * Clean up expired cooldown entries
41
53
  */
@@ -184,6 +196,8 @@ interface RouteRequestToNodeResponseParams extends RouteRequestParams {
184
196
  interface RoutstrClientConfig {
185
197
  usageTrackingDriver?: UsageTrackingDriver;
186
198
  sdkStore?: SdkStore;
199
+ /** Optional: shared ProviderManager instance for consistent failure tracking across requests */
200
+ providerManager?: ProviderManager;
187
201
  }
188
202
  declare class RoutstrClient {
189
203
  private walletAdapter;
@@ -1,6 +1,6 @@
1
1
  import { M as Model, a as Message, T as TransactionHistory, l as StreamingResult } from '../types-BYj_8c5c.js';
2
2
  import { P as ProviderRegistry, W as WalletAdapter, S as StorageAdapter, a as StreamingCallbacks } from '../interfaces-B62Rw-dd.js';
3
- import { U as UsageTrackingDriver, S as SdkStore } from '../store-BJlwiDX5.js';
3
+ import { S as SdkStore, U as UsageTrackingDriver } from '../store-h7m23ffq.js';
4
4
  import { ServerResponse } from 'http';
5
5
  import { CashuSpender, BalanceManager } from '../wallet/index.js';
6
6
  import { Transform } from 'stream';
@@ -35,7 +35,19 @@ declare class ProviderManager {
35
35
  private providersOnCoolDown;
36
36
  /** Cooldown duration in milliseconds (5 minutes) */
37
37
  private static readonly COOLDOWN_DURATION_MS;
38
- constructor(providerRegistry: ProviderRegistry);
38
+ /** Optional persistent store for failure tracking */
39
+ private store;
40
+ /** Instance ID for debugging */
41
+ private readonly instanceId;
42
+ constructor(providerRegistry: ProviderRegistry, store?: SdkStore);
43
+ /**
44
+ * Hydrate in-memory state from persistent store
45
+ */
46
+ private hydrateFromStore;
47
+ /**
48
+ * Get instance ID for debugging
49
+ */
50
+ getInstanceId(): string;
39
51
  /**
40
52
  * Clean up expired cooldown entries
41
53
  */
@@ -184,6 +196,8 @@ interface RouteRequestToNodeResponseParams extends RouteRequestParams {
184
196
  interface RoutstrClientConfig {
185
197
  usageTrackingDriver?: UsageTrackingDriver;
186
198
  sdkStore?: SdkStore;
199
+ /** Optional: shared ProviderManager instance for consistent failure tracking across requests */
200
+ providerManager?: ProviderManager;
187
201
  }
188
202
  declare class RoutstrClient {
189
203
  private walletAdapter;