diff --git a/lib/articlePublisher.ts b/lib/articlePublisher.ts index 2361030..e7d1841 100644 --- a/lib/articlePublisher.ts +++ b/lib/articlePublisher.ts @@ -103,7 +103,7 @@ export class ArticlePublisher { * Send private content to a user after payment confirmation * Returns detailed result with message event ID and verification status */ - private logSendResult(result: import('./articlePublisherHelpers').SendContentResult, articleId: string, recipientPubkey: string) { + private logSendResult(result: import('./articlePublisherHelpers').SendContentResult, articleId: string, recipientPubkey: string): void { if (result.success) { console.log('Private content sent successfully', { articleId, diff --git a/lib/nostr.ts b/lib/nostr.ts index f68fc20..d76c574 100644 --- a/lib/nostr.ts +++ b/lib/nostr.ts @@ -26,11 +26,11 @@ class NostrService { } } - private initializePool() { + private initializePool(): void { this.pool = new SimplePool() } - setPrivateKey(privateKey: string) { + setPrivateKey(privateKey: string): void { this.privateKey = privateKey try { const decoded = nip19.decode(privateKey) @@ -50,7 +50,7 @@ class NostrService { return this.publicKey } - setPublicKey(publicKey: string) { + setPublicKey(publicKey: string): void { this.publicKey = publicKey try { const decoded = nip19.decode(publicKey) @@ -85,7 +85,7 @@ class NostrService { } } - private createArticleSubscription(pool: SimplePool, limit: number) { + private createArticleSubscription(pool: SimplePool, limit: number): ReturnType { // Subscribe to both 'publication' and 'author' type events // Authors are identified by tag type='author' in the tag system // Filter by service='zapwall.fr' to only get notes from this platform @@ -127,7 +127,7 @@ class NostrService { const sub = this.createArticleSubscription(this.pool, limit) - sub.on('event', async (event: Event) => { + sub.on('event', async (event: Event): Promise => { try { // Try to parse as regular article first let article = await parseArticleFromEvent(event) @@ -146,7 +146,7 @@ class NostrService { } }) - return () => { + return (): void => { sub.unsub() } }