applesauce-accounts 0.0.0-next-20250128204825 → 0.0.0-next-20250129183155

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/manager.d.ts CHANGED
@@ -3,8 +3,8 @@ import { BehaviorSubject } from "rxjs";
3
3
  import { IAccount, IAccountConstructor, SerializedAccount } from "./types.js";
4
4
  export declare class AccountManager<Metadata extends unknown = any> {
5
5
  types: Map<string, IAccountConstructor<any, any, Metadata>>;
6
- active$: BehaviorSubject<IAccount<any, any, Metadata> | null>;
7
- get active(): IAccount<any, any, Metadata> | null;
6
+ active$: BehaviorSubject<IAccount<any, any, Metadata> | undefined>;
7
+ get active(): IAccount<any, any, Metadata> | undefined;
8
8
  accounts$: BehaviorSubject<IAccount<any, any, Metadata>[]>;
9
9
  get accounts(): IAccount<any, any, Metadata>[];
10
10
  /** Disable request queueing for any accounts added to this manager */
@@ -26,7 +26,7 @@ export declare class AccountManager<Metadata extends unknown = any> {
26
26
  /** Replaces an account with another */
27
27
  replaceAccount(old: string | IAccount<any, any, Metadata>, account: IAccount<any, any, Metadata>): void;
28
28
  /** Returns the currently active account */
29
- getActive(): IAccount<any, any, Metadata> | null;
29
+ getActive(): IAccount<any, any, Metadata> | undefined;
30
30
  /** Sets the currently active account */
31
31
  setActive(id: string | IAccount<any, any, Metadata>): void;
32
32
  /** Clears the currently active account */
package/dist/manager.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { BehaviorSubject } from "rxjs";
2
2
  export class AccountManager {
3
3
  types = new Map();
4
- active$ = new BehaviorSubject(null);
4
+ active$ = new BehaviorSubject(undefined);
5
5
  get active() {
6
6
  return this.active$.value;
7
7
  }
@@ -82,7 +82,7 @@ export class AccountManager {
82
82
  }
83
83
  /** Clears the currently active account */
84
84
  clearActive() {
85
- this.active$.next(null);
85
+ this.active$.next(undefined);
86
86
  }
87
87
  // Metadata CRUD
88
88
  /** sets the metadata on an account */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "applesauce-accounts",
3
- "version": "0.0.0-next-20250128204825",
3
+ "version": "0.0.0-next-20250129183155",
4
4
  "description": "A simple nostr account management system",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@noble/hashes": "^1.5.0",
36
- "applesauce-signers": "0.0.0-next-20250128204825",
36
+ "applesauce-signers": "0.0.0-next-20250129183155",
37
37
  "nanoid": "^5.0.9",
38
38
  "nostr-tools": "^2.10.3",
39
39
  "rxjs": "^7.8.1"