@konemono/nostr-login 1.9.13 → 1.9.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.
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/modules/AuthNostrService.d.ts +4 -0
- package/dist/modules/nip46/Nip46Adapter.d.ts +2 -10
- package/dist/modules/nip46/Nip46Client.d.ts +1 -16
- package/dist/modules/nip46/types.d.ts +0 -8
- package/dist/unpkg.js +5 -5
- package/package.json +1 -1
- package/src/modules/AmberDirectSigner.ts +4 -18
- package/src/modules/AuthNostrService.ts +151 -6
- package/src/modules/nip46/Nip46Adapter.ts +26 -83
- package/src/modules/nip46/Nip46Client.ts +4 -119
- package/src/modules/nip46/types.ts +15 -23
- package/tsconfig.json +1 -1
|
@@ -1,34 +1,26 @@
|
|
|
1
1
|
export interface Nip46Request {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
id: string;
|
|
3
|
+
method: string;
|
|
4
|
+
params: string[];
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export interface Nip46Response {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
id: string;
|
|
9
|
+
result?: string;
|
|
10
|
+
error?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export interface PendingRequest {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
resolve: (result: string) => void;
|
|
15
|
+
reject: (error: Error) => void;
|
|
16
|
+
timer: NodeJS.Timeout;
|
|
17
|
+
method: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export interface Nip46ClientOptions {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
iframeConfig?: {
|
|
27
|
-
origin: string;
|
|
28
|
-
port?: MessagePort;
|
|
29
|
-
};
|
|
30
|
-
retryConfig?: {
|
|
31
|
-
maxRetries: number;
|
|
32
|
-
retryDelayMs: number;
|
|
33
|
-
};
|
|
21
|
+
localPrivateKey: string;
|
|
22
|
+
remotePubkey: string;
|
|
23
|
+
relays: string[];
|
|
24
|
+
timeoutMs?: number;
|
|
25
|
+
useNip44?: boolean;
|
|
34
26
|
}
|
package/tsconfig.json
CHANGED