@konemono/nostr-login 1.11.0 → 1.11.3
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/index.esm.js +15 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/modules/AuthNostrService.d.ts +4 -14
- package/dist/modules/Nip46.d.ts +26 -64
- package/dist/modules/Signer.d.ts +6 -12
- package/dist/unpkg.js +15 -20
- package/dist/utils/index.d.ts +3 -6
- package/dist/utils/nip44.d.ts +3 -3
- package/package.json +8 -8
- package/src/modules/AuthNostrService.ts +109 -210
- package/src/modules/ModalManager.ts +3 -3
- package/src/modules/Nip46.ts +185 -390
- package/src/modules/NostrExtensionService.ts +0 -2
- package/src/modules/Signer.ts +12 -35
- package/src/utils/index.ts +23 -73
- package/src/utils/nip44.ts +7 -12
- package/test-relay-management.html +0 -407
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NostrLoginOptions, StartScreens, TypeModal } from '../types';
|
|
2
|
-
import { checkNip05, getBunkerUrl, getDarkMode, localStorageRemoveRecent, localStorageSetItem, prepareSignupRelays
|
|
2
|
+
import { checkNip05, getBunkerUrl, getDarkMode, localStorageRemoveRecent, localStorageSetItem, prepareSignupRelays } from '../utils';
|
|
3
3
|
import { AuthNostrService, NostrExtensionService, NostrParams } from '.';
|
|
4
4
|
import { EventEmitter } from 'tseep';
|
|
5
5
|
import { ConnectionString, Info, RecentType } from 'nostr-login-components/dist/types/types';
|
|
@@ -28,7 +28,7 @@ class ModalManager extends EventEmitter {
|
|
|
28
28
|
if (this.launcherPromise) {
|
|
29
29
|
try {
|
|
30
30
|
await this.launcherPromise;
|
|
31
|
-
} catch {
|
|
31
|
+
} catch {}
|
|
32
32
|
this.launcherPromise = undefined;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -281,7 +281,7 @@ class ModalManager extends EventEmitter {
|
|
|
281
281
|
throw new Error('Bad nsec value');
|
|
282
282
|
}
|
|
283
283
|
if (decoded.type !== 'nsec') throw new Error('Bad bech32 type');
|
|
284
|
-
await this.authNostrService.localSignup('',
|
|
284
|
+
await this.authNostrService.localSignup('', decoded.data);
|
|
285
285
|
ok();
|
|
286
286
|
} else if (nsecOrBunker.startsWith('bunker:')) {
|
|
287
287
|
await this.authNostrService.authNip46('login', { name: '', bunkerUrl: nsecOrBunker });
|