/** * Client-Side IPFS Service * * Handles decentralized storage via Pinata IPFS from the browser * Stores payment metadata and merchant profiles on IPFS */ export interface IPFSConfig { pinataApiKey?: string; pinataSecretKey?: string; pinataGateway?: string; } export interface IPFSUploadResponse { ipfsHash: string; url: string; timestamp: number; } export declare class IPFSService { private config; private static readonly DEFAULT_GATEWAY; private static readonly PINATA_API_URL; constructor(config?: IPFSConfig); /** * Check if IPFS service is configured with API keys */ isConfigured(): boolean; /** * Upload JSON data to IPFS via Pinata */ uploadJSON(data: any, name?: string): Promise; /** * Upload file to IPFS via Pinata */ uploadFile(file: File, name?: string): Promise; /** * Fetch JSON data from IPFS */ fetchJSON(ipfsHash: string): Promise; /** * Store payment intent metadata on IPFS */ storePaymentMetadata(metadata: { paymentIntentId: string; merchantAddress: string; amount: number; currency: string; cryptoAmount: string; description?: string; orderDetails?: any; customFields?: Record; }): Promise; /** * Store payment link metadata on IPFS */ storePaymentLinkMetadata(metadata: { linkId: string; merchantAddress: string; amount?: number; currency: string; title: string; description?: string; imageUrl?: string; successUrl?: string; cancelUrl?: string; expiresAt?: number; maxUses?: number; }): Promise; /** * Store merchant profile on IPFS */ storeMerchantProfile(profile: { merchantAddress: string; businessName: string; description?: string; logo?: string; website?: string; contactEmail?: string; socialLinks?: { twitter?: string; discord?: string; telegram?: string; github?: string; }; webhookUrl?: string; }): Promise; /** * Store subscription metadata on IPFS */ storeSubscriptionMetadata(metadata: { subscriptionId: string; merchantAddress: string; planName: string; description?: string; amountPerPeriod: string; interval: number; intervalUnit: 'day' | 'week' | 'month' | 'year'; trialPeriod?: number; features?: string[]; }): Promise; /** * Fetch payment metadata from IPFS */ fetchPaymentMetadata(ipfsHash: string): Promise; /** * Fetch payment link metadata from IPFS */ fetchPaymentLinkMetadata(ipfsHash: string): Promise; /** * Fetch merchant profile from IPFS */ fetchMerchantProfile(ipfsHash: string): Promise; /** * Fetch subscription metadata from IPFS */ fetchSubscriptionMetadata(ipfsHash: string): Promise; /** * Generate IPFS URL from hash */ getIPFSUrl(hash: string): string; /** * Extract IPFS hash from URL */ extractIPFSHash(url: string): string | null; /** * Pin existing IPFS hash (if you have the content) */ pinHash(ipfsHash: string, name?: string): Promise; /** * Test connection to Pinata API */ testConnection(): Promise; } //# sourceMappingURL=ipfs.service.d.ts.map