@konemono/nostr-login 1.14.0 → 1.15.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.
- package/README.md +1 -0
- package/dist/const/index.d.ts +9 -1
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/modules/AuthNostrService.d.ts +2 -1
- package/dist/modules/Nip46.d.ts +1 -0
- package/dist/modules/Nostr.d.ts +6 -1
- package/dist/modules/RelayHealthManager.d.ts +30 -0
- package/dist/modules/nip46/IframeNostrRpc.d.ts +15 -0
- package/dist/modules/nip46/Nip46Signer.d.ts +35 -0
- package/dist/modules/nip46/NostrRpc.d.ts +30 -0
- package/dist/modules/nip46/ReadyListener.d.ts +7 -0
- package/dist/modules/nip46/RelayPool.d.ts +59 -0
- package/dist/modules/nip46/errors.d.ts +6 -0
- package/dist/modules/nip46/index.d.ts +8 -0
- package/dist/modules/nip46/types.d.ts +25 -18
- package/dist/types.d.ts +1 -1
- package/dist/unpkg.js +5 -5
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/nostrJson.d.ts +1 -0
- package/package.json +2 -2
- package/src/const/index.ts +27 -1
- package/src/iife-module.ts +2 -2
- package/src/index.ts +1 -4
- package/src/modules/AuthNostrService.ts +17 -100
- package/src/modules/BannerManager.ts +10 -10
- package/src/modules/ModalManager.ts +6 -5
- package/src/modules/Nip46.ts +22 -7
- package/src/modules/Nostr.ts +1 -2
- package/src/modules/NostrExtensionService.ts +11 -16
- package/src/modules/ProcessManager.ts +1 -2
- package/src/modules/RelayHealthManager.ts +101 -0
- package/src/modules/nip46/IframeNostrRpc.ts +92 -0
- package/src/modules/nip46/Nip46Signer.ts +175 -0
- package/src/modules/nip46/NostrRpc.ts +295 -0
- package/src/modules/nip46/ReadyListener.ts +36 -0
- package/src/modules/nip46/RelayPool.ts +219 -0
- package/src/modules/nip46/errors.ts +15 -0
- package/src/modules/nip46/index.ts +12 -0
- package/src/modules/nip46/types.ts +36 -0
- package/src/types.ts +3 -1
- package/src/utils/index.ts +4 -7
- package/src/utils/nostrJson.ts +21 -0
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@ This library is a powerful `window.nostr` provider with NIP-46 (Nostr Connect) s
|
|
|
7
7
|
|
|
8
8
|
### Fork Enhancements
|
|
9
9
|
|
|
10
|
+
- **rx-nostr based relay management** — Replaced raw WebSocket handling with [rx-nostr](https://github.com/penpenpng/rx-nostr) v3: automatic reconnection with exponential backoff, lazy-keep connection strategy, reactive connection monitoring via `createConnectionStateObservable()`, and `cast()` for best-effort event publishing
|
|
10
11
|
- **Multiple NIP-46 relay support** — Add/remove/reset relays from the UI
|
|
11
12
|
- **QR code scanning** — Scan `bunker://` or `nostrconnect://` QR codes with camera
|
|
12
13
|
- **NIP-46 signing retry** — Auto-retry (up to 3 times) with forced reconnection on relay disconnect/timeout
|
package/dist/const/index.d.ts
CHANGED
|
@@ -2,4 +2,12 @@ export declare const CALL_TIMEOUT = 5000;
|
|
|
2
2
|
export declare const AUTH_URL_CALL_TIMEOUT = 120000;
|
|
3
3
|
export declare const DEFAULT_NIP46_RELAYS: string[];
|
|
4
4
|
export declare const NIP46_REQUEST_TIMEOUT = 30000;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const OUTBOX_RELAYS: string[];
|
|
6
|
+
export declare const DEFAULT_SIGNUP_RELAYS: string[];
|
|
7
|
+
export declare const NOSTRCONNECT_APPS: {
|
|
8
|
+
name: string;
|
|
9
|
+
domain?: string;
|
|
10
|
+
canImport?: boolean;
|
|
11
|
+
img: string;
|
|
12
|
+
link: string;
|
|
13
|
+
}[];
|