"use strict";
// Copyright 2017-2020 @polkadot/metadata authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const substrate = __importStar(require("./substrate"));
/** @internal */
function getStorage(registry, metaVersion) {
    return {
        substrate: Object
            .entries(substrate)
            .reduce((storage, [key, fn]) => {
            storage[key] = fn(registry, metaVersion);
            return storage;
        }, {})
    };
}
exports.default = getStorage;
