UNPKG

@bsv/wallet-toolbox-mobile

Version:
40 lines 926 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LiveIngestorBase = void 0; /** * */ class LiveIngestorBase { static createLiveIngestorBaseOptions(chain) { const options = { chain }; return options; } constructor(options) { this.chain = options.chain; } /** * Release resources. * Override if required. */ async shutdown() { } /** * Allocate resources. * @param storage coordinating storage engine. */ async setStorage(storage) { this.storageEngine = storage; } /** * * @returns coordinating storage engine. */ storage() { if (!this.storageEngine) throw new Error('storageEngine must be set.'); return this.storageEngine; } } exports.LiveIngestorBase = LiveIngestorBase; //# sourceMappingURL=LiveIngestorBase.js.map