import { JsonRpcResponse } from '../core/json-rpc'; import { JsonRpcRequestPayload, MagicMessageEvent } from '@magic-sdk/types'; interface StandardizedResponse { id?: string | number; response?: JsonRpcResponse; } export interface StandardizedMagicRequest { msgType: string; payload: JsonRpcRequestPayload | JsonRpcRequestPayload[]; jwt?: string; rt?: string; deviceShare?: string; } /** * Get the originating payload from a batch request using the specified `id`. */ export declare function getRequestPayloadFromBatch(requestPayload: JsonRpcRequestPayload | JsonRpcRequestPayload[], id?: string | number | null): JsonRpcRequestPayload | undefined; /** * Ensures the incoming response follows the expected schema and parses for a * JSON RPC payload ID. */ export declare function standardizeResponse(requestPayload: JsonRpcRequestPayload | JsonRpcRequestPayload[], event: MagicMessageEvent): StandardizedResponse; export declare function debounce void>(func: T, delay: number): (...args: Parameters) => void; export {};