{"version":3,"file":"client-request.cjs","sourceRoot":"","sources":["../../../src/types/handlers/client-request.ts"],"names":[],"mappings":"","sourcesContent":["import type { Json, JsonRpcParams, JsonRpcRequest } from '@metamask/utils';\n\n/**\n * The `onClientRequest` handler, which is called when a Snap receives a JSON-RPC\n * request from the client exclusively.\n *\n * @param args - The request arguments.\n * @param args.request - The JSON-RPC request sent to the snap. This includes\n * the method name and parameters.\n * @returns The response to the JSON-RPC request. This must be a\n * JSON-serializable value. In order to return an error, throw a `SnapError`\n * instead.\n */\nexport type OnClientRequestHandler<\n  Params extends JsonRpcParams = JsonRpcParams,\n> = (args: { request: JsonRpcRequest<Params> }) => Promise<Json>;\n"]}