{"version":3,"file":"error.mjs","sourceRoot":"","sources":["../../src/utils/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,6BAA6B;AAClD,OAAO,EAAE,cAAc,EAAE,wBAAwB;AAGjD;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACtC,KAAc;IAEd,OAAO,CACL,cAAc,CAAC,KAAK,CAAC;QACrB,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC,GAAG,CAAC,YAAY;QAC1C,KAAK,CAAC,OAAO,KAAK,oBAAoB,CACvC,CAAC;AACJ,CAAC","sourcesContent":["import { errorCodes } from '@metamask/rpc-errors';\nimport { isJsonRpcError } from '@metamask/utils';\nimport type { JsonRpcError } from '@metamask/utils';\n\n/**\n * Checks if a value is a JSON-RPC error that indicates an execution reverted error.\n *\n * @param error - The value to check.\n * @returns True if the value is a JSON-RPC error that indicates an execution reverted\n * error, false otherwise.\n */\nexport function isExecutionRevertedError(\n  error: unknown,\n): error is JsonRpcError {\n  return (\n    isJsonRpcError(error) &&\n    error.code === errorCodes.rpc.invalidInput &&\n    error.message === 'execution reverted'\n  );\n}\n"]}