From 29654a9b910f54dd25acade07ba1eb01ed8cf563 Mon Sep 17 00:00:00 2001 From: SwiftHawk Date: Thu, 13 Jun 2024 14:58:54 +0500 Subject: [PATCH] chore: add comments --- src/controllers/NostrController.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/controllers/NostrController.ts b/src/controllers/NostrController.ts index 920d894..ecc9cc9 100644 --- a/src/controllers/NostrController.ts +++ b/src/controllers/NostrController.ts @@ -378,6 +378,13 @@ export class NostrController extends EventEmitter { throw new Error('Login method is undefined') } + /** + * Decrypts a given content based on the current login method. + * + * @param sender - The sender's public key. + * @param content - The encrypted content to decrypt. + * @returns A promise that resolves to the decrypted content. + */ nip04Decrypt = async (sender: string, content: string) => { const loginMethod = (store.getState().auth as AuthState).loginMethod