const [minified, commonTrees, tokens] = JSON.parse(`[{"relay":{"1":{"0":{"DownwardMessageQueues":0}},"2":{"0":0},"3":{"0":0},"4":{"0":0},"5":{"0":0},"6":{}},"parachain":{"1":{"7":{"HrmpOutboundMessages":1,"UpwardMessages":2}},"2":{"7":0},"3":{"7":0},"4":{"7":{"SelfParaId":3}},"5":{"7":0},"6":{}}},[{}],["Dmp","storage","tx","events","constants","viewFns","apis","ParachainSystem"]]`);
const replaceTokens = (obj) => Object.fromEntries(
  Object.entries(obj).map(([key, value]) => {
    const unwrappedValue = typeof value === "object" ? replaceTokens(value) : value;
    const numericKey = Number(key);
    if (Number.isNaN(numericKey)) {
      return [key, unwrappedValue];
    }
    return [tokens[numericKey], unwrappedValue];
  })
);
const tokenizedCommonTrees = commonTrees.map(replaceTokens);
const unwrap = (obj, depth) => depth === 0 ? obj : Object.fromEntries(
  Object.entries(obj).map(([key, value]) => [
    key,
    unwrap(
      typeof value === "object" ? value : tokenizedCommonTrees[value],
      depth - 1
    )
  ])
);
const getChainDescriptors = (key) => unwrap(replaceTokens(minified[key]), 2);
const Relay = getChainDescriptors("relay");
const Parachain = getChainDescriptors("parachain");

export { Parachain, Relay };
//# sourceMappingURL=descriptors-CVixQzDI.js.map
