"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogStoreClientSystemMessagesInjectionToken = exports.systemStreamFromClient = void 0;
const protocol_1 = require("@streamr/protocol");
const utils_1 = require("@streamr/utils");
const rxjs_1 = require("rxjs");
function systemStreamFromClient(client, config) {
    const nodeManagerAddress = (0, utils_1.toEthereumAddress)(config.contracts.logStoreNodeManagerChainAddress);
    const systemStreamId = (0, protocol_1.toStreamID)('/system', nodeManagerAddress);
    return (0, rxjs_1.defer)(() => client.getStream(systemStreamId));
}
exports.systemStreamFromClient = systemStreamFromClient;
exports.LogStoreClientSystemMessagesInjectionToken = Symbol('LogStoreClientSystemMessagesInjectionToken');
//# sourceMappingURL=systemStreamUtils.js.map