import type { JsonRpcEngineEndCallback } from "@metamask/json-rpc-engine"; import type { Messenger } from "@metamask/messenger"; import type { StartTraceParams, TraceContext, TraceRequest } from "@metamask/snaps-sdk"; import type { InferMatching } from "@metamask/snaps-utils"; import type { PendingJsonRpcResponse } from "@metamask/utils"; import type { JsonRpcRequestWithOrigin, SnapControllerGetSnapAction } from "../types.mjs"; import type { MethodHooksObject } from "../utils.mjs"; export type StartTraceMethodHooks = { /** * Start a performance trace in Sentry. * * @param request - The trace request object. * @returns The performance trace context. */ startTrace: (request: TraceRequest) => TraceContext; }; export type StartTraceMethodActions = SnapControllerGetSnapAction; declare const StartTraceParametersStruct: import("@metamask/superstruct").Struct<{ name: string; id?: string | undefined; data?: Record | undefined; parentContext?: import("@metamask/snaps-sdk").Json | undefined; startTime?: number | undefined; tags?: Record | undefined; }, { data: import("@metamask/superstruct").ExactOptionalStruct, null>; id: import("@metamask/superstruct").ExactOptionalStruct; name: import("@metamask/superstruct").Struct; parentContext: import("@metamask/superstruct").ExactOptionalStruct; startTime: import("@metamask/superstruct").ExactOptionalStruct; tags: import("@metamask/superstruct").ExactOptionalStruct, null>; }>; export type StartTraceParameters = InferMatching; /** * Handler for the `snap_startTrace` method. * * @internal */ export declare const startTraceHandler: { implementation: typeof getStartTraceImplementation; hookNames: MethodHooksObject; actionNames: "SnapController:getSnap"[]; }; /** * The `snap_startTrace` method implementation. This method is used to start a * performance trace in Sentry. It is only available to preinstalled Snaps. * * @param request - The JSON-RPC request object. * @param response - The JSON-RPC response object. * @param _next - The `json-rpc-engine` "next" callback. Not used by this * function. * @param end - The `json-rpc-engine` "end" callback. * @param hooks - The RPC method hooks. * @param hooks.startTrace - The hook function to start a performance trace. * @param messenger - The messenger used to call controller actions. * @returns Nothing. */ declare function getStartTraceImplementation(request: JsonRpcRequestWithOrigin, response: PendingJsonRpcResponse, _next: unknown, end: JsonRpcEngineEndCallback, { startTrace }: StartTraceMethodHooks, messenger: Messenger): void; export {}; //# sourceMappingURL=startTrace.d.mts.map