"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isLocalSrpcStream = isLocalSrpcStream;
exports.getSrpcRegistryMetadata = getSrpcRegistryMetadata;
function isLocalSrpcStream(connection) {
    return '$ws' in connection;
}
/**
 * Normalize a local stream's full metadata and a remote connection's trusted
 * registry projection to one registry-metadata value.
 */
function getSrpcRegistryMetadata(connection, extractLocalRegistryMetadata) {
    if (isLocalSrpcStream(connection))
        return extractLocalRegistryMetadata(connection);
    return connection.meta;
}
//# sourceMappingURL=srpc-registry-metadata.js.map