shogun-core 5.2.2 → 5.3.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.
@@ -182,7 +182,7 @@ declare class DataBase {
182
182
  * @param pair Optional SEA pair for Web3 login
183
183
  * @returns Promise resolving to signup result
184
184
  */
185
- signUp(username: string, password: string, pair?: ISEAPair | null): Promise<SignUpResult>;
185
+ signUp(username: string, password: string, pair?: ISEAPair | null, retryCount?: number, maxRetries?: number): Promise<SignUpResult>;
186
186
  /**
187
187
  * Creates a new user in Gun with pair-based authentication (for Web3/plugins)
188
188
  */
@@ -270,9 +270,17 @@ declare class DataBase {
270
270
  */
271
271
  updateUserLastSeen(userPub: string): Promise<void>;
272
272
  /**
273
- * Performs authentication with Gun
273
+ * Resets Gun.js authentication state to allow new auth operations
274
+ */
275
+ private resetAuthState;
276
+ /**
277
+ * Performs authentication with Gun with retry mechanism
274
278
  */
275
279
  private performAuthentication;
280
+ /**
281
+ * Internal authentication method with timeout
282
+ */
283
+ private performAuthenticationInternal;
276
284
  /**
277
285
  * Builds login result object
278
286
  */
@@ -388,6 +396,24 @@ declare class DataBase {
388
396
  * Check if user is authenticated
389
397
  */
390
398
  isAuthenticated(): boolean;
399
+ /**
400
+ * Check if an authentication operation is currently in progress
401
+ */
402
+ isAuthInProgress(): boolean;
403
+ /**
404
+ * Force reset authentication state (useful for debugging or recovery)
405
+ */
406
+ forceResetAuthState(): void;
407
+ /**
408
+ * Aggressive cleanup for problematic users
409
+ * This method performs a complete reset of all authentication state
410
+ */
411
+ aggressiveAuthCleanup(): void;
412
+ /**
413
+ * Creates a completely fresh authentication context
414
+ * This is a more aggressive approach when normal reset doesn't work
415
+ */
416
+ private createFreshAuthContext;
391
417
  }
392
418
  declare const createGun: (config: any) => IGunInstance<any>;
393
419
  export { Gun, DataBase, SEA, RxJS, crypto, GunErrors, derive, createGun };
@@ -54,10 +54,11 @@ export interface IdentityRetrievalResult {
54
54
  */
55
55
  export declare class CryptoIdentityManager {
56
56
  private core;
57
+ private db;
57
58
  private pgpManager;
58
59
  private mlsManager;
59
60
  private sframeManager;
60
- constructor(core: IShogunCore);
61
+ constructor(core: IShogunCore, db?: any);
61
62
  /**
62
63
  * Genera tutte le identità crypto disponibili per un utente
63
64
  * @param username - Nome utente
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shogun-core",
3
- "version": "5.2.2",
3
+ "version": "5.3.0",
4
4
  "description": "SHOGUN CORE - Core library for Shogun Ecosystem",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",