UNPKG

mcard-js

Version:

A JavaScript implementation of MCard - A data model for persistently storing content with cryptographic hashing and timestamping

36 lines (35 loc) 880 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; // Service for MCard storage operations class McardStorageService { constructor(engine) { this.engine = engine; } async saveMcards(mcards) { if (!this.engine) { throw new Error('Storage engine not initialized'); } try { return await this.engine.saveMcards(mcards); } catch (error) { console.error('Error saving mcards:', error); throw error; } } async loadMcards() { if (!this.engine) { throw new Error('Storage engine not initialized'); } try { return await this.engine.loadMcards(); } catch (error) { console.error('Error loading mcards:', error); throw error; } } } var _default = exports.default = McardStorageService; //# sourceMappingURL=mcardStorageService.js.map