@konemono/nostr-login 1.7.51 → 1.7.53
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.
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Signer } from './Nostr';
|
|
2
|
+
export declare class AmberDirectSigner implements Signer {
|
|
3
|
+
private _pubkey;
|
|
4
|
+
constructor(pubkey?: string);
|
|
5
|
+
get pubkey(): string;
|
|
6
|
+
set pubkey(v: string);
|
|
7
|
+
nip04: {
|
|
8
|
+
encrypt: (pubkey: string, plaintext: string) => Promise<string>;
|
|
9
|
+
decrypt: (pubkey: string, ciphertext: string) => Promise<string>;
|
|
10
|
+
};
|
|
11
|
+
nip44: {
|
|
12
|
+
encrypt: (pubkey: string, plaintext: string) => Promise<string>;
|
|
13
|
+
decrypt: (pubkey: string, ciphertext: string) => Promise<string>;
|
|
14
|
+
};
|
|
15
|
+
signEvent(event: any): Promise<any>;
|
|
16
|
+
encrypt04(pubkey: string, plaintext: string): Promise<string>;
|
|
17
|
+
decrypt04(pubkey: string, ciphertext: string): Promise<string>;
|
|
18
|
+
encrypt44(pubkey: string, plaintext: string): Promise<string>;
|
|
19
|
+
decrypt44(pubkey: string, ciphertext: string): Promise<string>;
|
|
20
|
+
getPublicKey(): Promise<string>;
|
|
21
|
+
private generateUrl;
|
|
22
|
+
static parseResponse(): {
|
|
23
|
+
type: string;
|
|
24
|
+
id: string;
|
|
25
|
+
result: string;
|
|
26
|
+
} | null;
|
|
27
|
+
}
|
|
@@ -6,6 +6,7 @@ declare class AuthNostrService extends EventEmitter implements Signer {
|
|
|
6
6
|
private ndk;
|
|
7
7
|
private profileNdk;
|
|
8
8
|
private signer;
|
|
9
|
+
private amberSigner;
|
|
9
10
|
private localSigner;
|
|
10
11
|
private params;
|
|
11
12
|
private signerPromise?;
|
|
@@ -26,6 +27,7 @@ declare class AuthNostrService extends EventEmitter implements Signer {
|
|
|
26
27
|
decrypt: (pubkey: string, ciphertext: string) => Promise<string>;
|
|
27
28
|
};
|
|
28
29
|
constructor(params: NostrParams);
|
|
30
|
+
private checkAmberResponse;
|
|
29
31
|
isIframe(): boolean;
|
|
30
32
|
waitReady(): Promise<void>;
|
|
31
33
|
cancelNostrConnect(): void;
|
|
@@ -34,7 +36,7 @@ declare class AuthNostrService extends EventEmitter implements Signer {
|
|
|
34
36
|
link?: string;
|
|
35
37
|
importConnect?: boolean;
|
|
36
38
|
iframeUrl?: string;
|
|
37
|
-
}): Promise<
|
|
39
|
+
}): Promise<any>;
|
|
38
40
|
createNostrConnect(relays?: string[]): Promise<string>;
|
|
39
41
|
getNostrConnectServices(): Promise<[string, ConnectionString[]]>;
|
|
40
42
|
localSignup(name: string, sk?: string): Promise<void>;
|
|
@@ -45,6 +47,7 @@ declare class AuthNostrService extends EventEmitter implements Signer {
|
|
|
45
47
|
setExtension(pubkey: string): void;
|
|
46
48
|
setOTP(pubkey: string, data: string): void;
|
|
47
49
|
setConnect(info: Info): Promise<void>;
|
|
50
|
+
setAmber(info: Info): Promise<void>;
|
|
48
51
|
createAccount(nip05: string): Promise<{
|
|
49
52
|
bunkerUrl: string;
|
|
50
53
|
sk: string | undefined;
|