import { ConnectionString, Info } from 'nostr-login-components/dist/types/types'; import { NostrParams } from './'; import { EventEmitter } from 'tseep'; import { Signer } from './Nostr'; declare class AuthNostrService extends EventEmitter implements Signer { private ndk; private profileNdk; private signer; private localSigner; private params; private signerPromise?; private signerErrCallback?; private readyPromise?; private readyCallback?; private nip44Codec; private nostrConnectKey; private nostrConnectSecret; private iframe?; private starterReady?; nip04: { encrypt: (pubkey: string, plaintext: string) => Promise; decrypt: (pubkey: string, ciphertext: string) => Promise; }; nip44: { encrypt: (pubkey: string, plaintext: string) => Promise; decrypt: (pubkey: string, ciphertext: string) => Promise; }; constructor(params: NostrParams); isIframe(): boolean; waitReady(): Promise; cancelNostrConnect(): void; nostrConnect(relay?: string, { domain, link, iframeUrl, importConnect, }?: { domain?: string; link?: string; importConnect?: boolean; iframeUrl?: string; }): Promise; createNostrConnect(relay?: string): Promise; getNostrConnectServices(): Promise<[string, ConnectionString[]]>; localSignup(name: string, sk?: string): Promise; setLocal(info: Info, signup?: boolean): Promise; prepareImportUrl(url: string): string; importAndConnect(cs: ConnectionString): Promise; setReadOnly(pubkey: string): void; setExtension(pubkey: string): void; setOTP(pubkey: string, data: string): void; setConnect(info: Info): Promise; createAccount(nip05: string): Promise<{ bunkerUrl: string; sk: string | undefined; }>; private releaseSigner; logout(keepSigner?: boolean): Promise; private setUserInfo; exportKeys(): "" | `nsec1${string}`; private onAuth; private createIframe; sendNeedAuth(): Promise; isAuthing(): boolean; startAuth(): Promise; endAuth(): Promise; resetAuth(): void; private listen; connect(info: Info, perms?: string): Promise; initSigner(info: Info, { listen, connect, eventToAddAccount }?: { listen?: boolean | undefined; connect?: boolean | undefined; eventToAddAccount?: boolean | undefined; }): Promise; authNip46(type: 'login' | 'signup', { name, bunkerUrl, sk, domain, iframeUrl }: { name: string; bunkerUrl: string; sk?: string; domain?: string; iframeUrl?: string; }): Promise; signEvent(event: any): Promise; private codec_call; encrypt04(pubkey: string, plaintext: string): Promise; decrypt04(pubkey: string, ciphertext: string): Promise; encrypt44(pubkey: string, plaintext: string): Promise; decrypt44(pubkey: string, ciphertext: string): Promise; } export default AuthNostrService;