@konemono/nostr-login 1.10.15 → 1.11.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/dist/index.esm.js +20 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/modules/AuthNostrService.d.ts +14 -4
- package/dist/modules/Nip46.d.ts +52 -11
- package/dist/modules/Signer.d.ts +12 -6
- package/dist/unpkg.js +20 -15
- package/dist/utils/index.d.ts +6 -3
- package/dist/utils/nip44.d.ts +3 -3
- package/package.json +8 -8
- package/src/modules/AuthNostrService.ts +223 -123
- package/src/modules/ModalManager.ts +3 -3
- package/src/modules/Nip46.ts +273 -91
- package/src/modules/NostrExtensionService.ts +2 -0
- package/src/modules/Signer.ts +35 -12
- package/src/utils/index.ts +73 -23
- package/src/utils/nip44.ts +12 -7
- package/test-relay-management.html +407 -0
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Info, RecentType } from 'nostr-login-components/dist/types/types';
|
|
2
|
-
import
|
|
2
|
+
import { RxNostr } from 'rx-nostr';
|
|
3
3
|
import { NostrLoginOptions } from '../types';
|
|
4
|
+
import { PrivateKeySigner } from '../modules/Signer';
|
|
5
|
+
export declare function bytesToHex(bytes: Uint8Array): string;
|
|
6
|
+
export declare function hexToBytes(hex: string): Uint8Array;
|
|
4
7
|
export declare const localStorageSetItem: (key: string, value: string) => void;
|
|
5
8
|
export declare const localStorageGetItem: (key: string) => any;
|
|
6
9
|
export declare const localStorageRemoveItem: (key: string) => void;
|
|
7
|
-
export declare const fetchProfile: (info: Info,
|
|
10
|
+
export declare const fetchProfile: (info: Info, rxNostr: RxNostr) => Promise<any>;
|
|
8
11
|
export declare const prepareSignupRelays: (signupRelays?: string) => string[];
|
|
9
|
-
export declare const createProfile: (info: Info,
|
|
12
|
+
export declare const createProfile: (info: Info, rxNostr: RxNostr, signer: PrivateKeySigner, signupRelays?: string, outboxRelays?: string[]) => Promise<void>;
|
|
10
13
|
export declare const bunkerUrlToInfo: (bunkerUrl: string, sk?: string) => Info;
|
|
11
14
|
export declare const isBunkerUrl: (value: string) => boolean;
|
|
12
15
|
export declare const getBunkerUrl: (value: string, optionsModal: NostrLoginOptions) => Promise<string>;
|
package/dist/utils/nip44.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export declare function encryptNip44(plaintext: string, conversationKey: Uint8Ar
|
|
|
2
2
|
export declare function decryptNip44(payload: string, conversationKey: Uint8Array): string;
|
|
3
3
|
export declare class Nip44 {
|
|
4
4
|
private cache;
|
|
5
|
-
createKey(privkey: string, pubkey: string): Uint8Array;
|
|
5
|
+
createKey(privkey: string | Uint8Array, pubkey: string): Uint8Array;
|
|
6
6
|
private getKey;
|
|
7
|
-
encrypt(privkey: string, pubkey: string, text: string): string;
|
|
8
|
-
decrypt(privkey: string, pubkey: string, data: string): string;
|
|
7
|
+
encrypt(privkey: string | Uint8Array, pubkey: string, text: string): string;
|
|
8
|
+
decrypt(privkey: string | Uint8Array, pubkey: string, data: string): string;
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konemono/nostr-login",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
},
|
|
12
12
|
"author": "a-fralou",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"
|
|
15
|
-
"nostr
|
|
16
|
-
"tseep": "^1.
|
|
14
|
+
"nostr-tools": "^2.19.4",
|
|
15
|
+
"rx-nostr": "^3.6.2",
|
|
16
|
+
"tseep": "^1.3.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@rollup/plugin-commonjs": "^
|
|
20
|
-
"@rollup/plugin-node-resolve": "^
|
|
19
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
20
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
21
21
|
"@rollup/plugin-terser": "^0.4.4",
|
|
22
22
|
"nostr-login-components": "^1.0.3",
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"rollup": "^4.
|
|
23
|
+
"prettier": "^3.7.4",
|
|
24
|
+
"rollup": "^4.55.1",
|
|
25
25
|
"rollup-plugin-typescript2": "^0.36.0"
|
|
26
26
|
},
|
|
27
27
|
"license": "MIT"
|