{
  "version": 3,
  "sources": ["../src/ADR62.ts"],
  "sourcesContent": ["import { keccak256 } from 'ethereum-cryptography/keccak.js'\nimport { toHex } from 'ethereum-cryptography/utils.js'\n\n/**\n * Calculates the metadata hash. Uses the keys to determine which fields of the metadata object will be used for the result.\n * @public\n */\nexport function keccak256Hash(metadata: Record<string, unknown>, keys: string[]): string {\n  const partialMetadata = JSON.stringify(pick(metadata, keys))\n  const data = new TextEncoder().encode(partialMetadata)\n  const hash = keccak256(data)\n  return toHex(hash)\n}\n\nconst pick = (obj: Record<string, unknown>, keys: string[]) =>\n  Object.fromEntries(keys.filter((key) => Object.hasOwn(obj, key)).map((key) => [key, obj[key]]))\n"],
  "mappings": ";AAAA,SAAS,iBAAiB;AAC1B,SAAS,aAAa;AAMf,SAAS,cAAc,UAAmC,MAAwB;AACvF,QAAM,kBAAkB,KAAK,UAAU,KAAK,UAAU,IAAI,CAAC;AAC3D,QAAM,OAAO,IAAI,YAAY,EAAE,OAAO,eAAe;AACrD,QAAM,OAAO,UAAU,IAAI;AAC3B,SAAO,MAAM,IAAI;AACnB;AAEA,IAAM,OAAO,CAAC,KAA8B,SAC1C,OAAO,YAAY,KAAK,OAAO,CAAC,QAAQ,OAAO,OAAO,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC;",
  "names": []
}
