UNPKG

@bsv/wallet-toolbox

Version:

BRC100 conforming wallet, wallet storage and wallet signer components

42 lines 985 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.log = () => { }; this.chain = options.chain; } /** * Release resources. * Override if required. */ async shutdown() { } /** * Allocate resources. * @param storage coordinating storage engine. */ async setStorage(storage, log) { this.storageEngine = storage; this.log = log; } /** * * @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