{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/restricted/caveats/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,8BAA8B,EAC9B,qCAAqC,EACtC,iCAA6B;AAC9B,OAAO,EACL,oCAAoC,EACpC,2CAA2C,EAC5C,uCAAmC;AACpC,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,sBAAkB;AAC5E,OAAO,EAAE,sBAAsB,EAAE,+BAA2B;AAC5D,OAAO,EAAE,wBAAwB,EAAE,iCAA6B;AAChE,OAAO,EAAE,sBAAsB,EAAE,+BAA2B;AAC5D,OAAO,EAAE,iBAAiB,EAAE,0BAAsB;AAElD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,GAAG,2CAA2C;IAC9C,GAAG,qCAAqC;IACxC,GAAG,0BAA0B;CACrB,CAAC;AAEX,MAAM,CAAC,MAAM,aAAa,GAGtB;IACF,CAAC,sBAAsB,CAAC,UAAU,CAAC,EAAE,oCAAoC;IACzE,CAAC,wBAAwB,CAAC,UAAU,CAAC,EAAE,oCAAoC;IAC3E,CAAC,sBAAsB,CAAC,UAAU,CAAC,EAAE,8BAA8B;IACnE,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,mBAAmB;CACpD,CAAC","sourcesContent":["import type { PermissionConstraint } from '@metamask/permission-controller';\nimport type { Json } from '@metamask/utils';\n\nimport {\n  permittedCoinTypesCaveatMapper,\n  PermittedCoinTypesCaveatSpecification,\n} from './permittedCoinTypes';\nimport {\n  permittedDerivationPathsCaveatMapper,\n  PermittedDerivationPathsCaveatSpecification,\n} from './permittedDerivationPaths';\nimport { snapIdsCaveatMapper, SnapIdsCaveatSpecification } from './snapIds';\nimport { getBip32EntropyBuilder } from '../getBip32Entropy';\nimport { getBip32PublicKeyBuilder } from '../getBip32PublicKey';\nimport { getBip44EntropyBuilder } from '../getBip44Entropy';\nimport { invokeSnapBuilder } from '../invokeSnap';\n\nexport const caveatSpecifications = {\n  ...PermittedDerivationPathsCaveatSpecification,\n  ...PermittedCoinTypesCaveatSpecification,\n  ...SnapIdsCaveatSpecification,\n} as const;\n\nexport const caveatMappers: Record<\n  string,\n  (value: Json) => Pick<PermissionConstraint, 'caveats'>\n> = {\n  [getBip32EntropyBuilder.targetName]: permittedDerivationPathsCaveatMapper,\n  [getBip32PublicKeyBuilder.targetName]: permittedDerivationPathsCaveatMapper,\n  [getBip44EntropyBuilder.targetName]: permittedCoinTypesCaveatMapper,\n  [invokeSnapBuilder.targetName]: snapIdsCaveatMapper,\n};\n"]}