{"version":3,"file":"revoke-session.mjs","sourceRoot":"","sources":["../../../src/middleware/multichain/revoke-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,4CAA4C;AAOpF;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAwB,EACxB,KAAgC;IAEhC,KAAK,CAAC,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;IACtD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { Caip25EndowmentPermissionName } from '@metamask/chain-agnostic-permission';\nimport { type JsonRpcRequest } from '@metamask/utils';\n\nexport type RevokeSessionHandlerHooks = {\n  revokePermission: (permissionName: string) => void;\n};\n\n/**\n * A handler that implements a simplified version of `wallet_revokeSession`.\n *\n * @param _request - Incoming JSON-RPC request. Unused for this handler.\n * @param hooks - The method hooks.\n * @returns The JSON-RPC response.\n */\nexport function revokeSessionHandler(\n  _request: JsonRpcRequest,\n  hooks: RevokeSessionHandlerHooks,\n) {\n  hooks.revokePermission(Caip25EndowmentPermissionName);\n  return true;\n}\n"]}