UNPKG

nostr-deploy-server

Version:

Node.js server for hosting static websites under npub subdomains using Nostr protocol and Blossom servers

38 lines 1.17 kB
import { FileResponse } from '../types'; export declare class BlossomHelper { private config; private requestTimeout; private maxFileSizeBytes; constructor(); /** * Fetch file from Blossom servers */ fetchFile(sha256: string, servers: string[], path?: string): Promise<FileResponse | null>; /** * Fetch file from a specific Blossom server */ private fetchFromServer; /** * Fix incorrect MIME types from Blossom servers * This function corrects common MIME type mismatches for major file types */ private fixMimeType; /** * Check if the MIME type is correct for the given file extension */ private isMimeTypeCorrectForExtension; /** * Validate that file content matches the expected file type based on extension * This provides an additional layer of validation by checking file signatures/content */ private validateContentMatchesExtension; /** * Get content type from file path */ private getContentTypeFromPath; /** * Calculate SHA256 hash of content */ private calculateSHA256; } //# sourceMappingURL=blossom.d.ts.map