jazz-svelte 0.10.12 → 0.10.14

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.
@@ -3,7 +3,9 @@ export declare function usePassphraseAuth({ wordlist, }: {
3
3
  wordlist: string[];
4
4
  }): {
5
5
  logIn: (passphrase: string) => Promise<void>;
6
- signUp: () => Promise<string>;
6
+ signUp: (name?: string) => Promise<string>;
7
+ registerNewAccount: (passphrase: string, name: string) => Promise<import("jazz-tools").ID<import("jazz-tools").Account>>;
8
+ generateRandomPassphrase: () => string;
7
9
  readonly passphrase: string;
8
10
  readonly state: "anonymous" | "signedIn";
9
11
  };
@@ -6,7 +6,7 @@ import { PassphraseAuth } from "jazz-tools";
6
6
  export function usePassphraseAuth({ wordlist, }) {
7
7
  const context = getJazzContext();
8
8
  const authSecretStorage = getAuthSecretStorage();
9
- const auth = new PassphraseAuth(context.current.node.crypto, context.current.authenticate, authSecretStorage, wordlist);
9
+ const auth = new PassphraseAuth(context.current.node.crypto, context.current.authenticate, context.current.register, authSecretStorage, wordlist);
10
10
  let passphrase = $state(auth.passphrase);
11
11
  $effect(untrack(() => {
12
12
  auth.loadCurrentAccountPassphrase();
@@ -19,6 +19,8 @@ export function usePassphraseAuth({ wordlist, }) {
19
19
  return {
20
20
  logIn: auth.logIn,
21
21
  signUp: auth.signUp,
22
+ registerNewAccount: auth.registerNewAccount,
23
+ generateRandomPassphrase: auth.generateRandomPassphrase,
22
24
  get passphrase() {
23
25
  return passphrase;
24
26
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jazz-svelte",
3
- "version": "0.10.12",
3
+ "version": "0.10.14",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",
@@ -51,9 +51,9 @@
51
51
  "vitest": "3.0.5"
52
52
  },
53
53
  "dependencies": {
54
- "cojson": "0.10.8",
55
- "jazz-tools": "0.10.12",
56
- "jazz-browser": "0.10.12"
54
+ "jazz-tools": "0.10.14",
55
+ "jazz-browser": "0.10.14",
56
+ "cojson": "0.10.8"
57
57
  },
58
58
  "scripts": {
59
59
  "dev": "vite dev",