@konemono/nostr-login 1.7.35 → 1.7.37

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/src/types.ts CHANGED
@@ -10,6 +10,7 @@ export interface NostrLoginAuthOptions {
10
10
  name?: string;
11
11
  }
12
12
 
13
+ // NOTE: must be a subset of CURRENT_MODULE enum
13
14
  export type StartScreens =
14
15
  | 'welcome'
15
16
  | 'welcome-login'
@@ -26,27 +27,56 @@ export type StartScreens =
26
27
  | 'import';
27
28
 
28
29
  export interface NostrLoginOptions {
30
+ // optional
29
31
  theme?: string;
30
32
  startScreen?: StartScreens;
31
33
  bunkers?: string;
32
34
  onAuth?: (npub: string, options: NostrLoginAuthOptions) => void;
33
35
  perms?: string;
34
36
  darkMode?: boolean;
37
+
38
+ // do not show the banner, modals must be `launch`-ed
35
39
  noBanner?: boolean;
40
+
41
+ // forward reqs to this bunker origin for testing
36
42
  devOverrideBunkerOrigin?: string;
43
+
44
+ // deprecated, use methods=['local']
45
+ // use local signup instead of nostr connect
37
46
  localSignup?: boolean;
47
+
48
+ // allowed auth methods
38
49
  methods?: AuthMethod[];
50
+
51
+ // otp endpoints
39
52
  otpRequestUrl?: string;
40
53
  otpReplyUrl?: string;
54
+
55
+ // welcome screen's title/desc
41
56
  title?: string;
42
57
  description?: string;
58
+
59
+ // comma-separated list of relays added
60
+ // to relay list of new profiles created with local signup
43
61
  signupRelays?: string;
62
+
63
+ // relay list to override hardcoded `OUTBOX_RELAYS` constant
44
64
  outboxRelays?: string[];
65
+
66
+ // dev mode
45
67
  dev?: boolean;
68
+
69
+ // use start.njump.me instead of local signup
46
70
  signupNstart?: boolean;
71
+
72
+ // list of npubs to auto/suggest-follow on signup
47
73
  followNpubs?: string;
74
+
75
+ // when method call auth needed, instead of showing
76
+ // the modal, we start waiting for incoming nip46
77
+ // connection and send the nostrconnect string using
78
+ // nlNeedAuth event
48
79
  customNostrConnect?: boolean;
49
- connectRelays?: string[];
50
80
  }
51
81
 
52
82
  export interface IBanner {
@@ -1,4 +1,4 @@
1
- import { Info, RecentType } from 'nostr-login-components';
1
+ import { Info, RecentType } from 'nostr-login-components/dist/types/types';
2
2
  import NDK, { NDKEvent, NDKRelaySet, NDKSigner, NDKUser } from '@nostr-dev-kit/ndk';
3
3
  import { generatePrivateKey } from 'nostr-tools';
4
4
  import { NostrLoginOptions } from '../types';