"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChainMemoryStore = void 0;
/**
 * In-memory implementation of the IDlcStore.
 */
class ChainMemoryStore {
    constructor() {
        this._dlcTxs = new Map();
    }
    get dlcTransactionsListCount() {
        return this._dlcTxs.size;
    }
    async findDlcTransactionsList() {
        return Array.from(this._dlcTxs.values());
    }
    async findDlcTransactions(contractId) {
        return this._dlcTxs.get(contractId);
    }
    async saveDlcTransactions(dlcTransactions) {
        this._dlcTxs.set(dlcTransactions.contractId, dlcTransactions);
    }
    async deleteDlcTransactions(contractId) {
        this._dlcTxs.delete(contractId);
    }
}
exports.ChainMemoryStore = ChainMemoryStore;
//# sourceMappingURL=ChainMemoryStore.js.map