UNPKG

@zkp2p/reclaim-witness-sdk

Version:

<div> <div> <img src="https://raw.githubusercontent.com/reclaimprotocol/.github/main/assets/banners/Attestor-Core.png" /> </div> </div>

15 lines (14 loc) 820 B
import { ClaimTunnelResponse } from '../proto/api'; import { CommunicationBridge, CreateClaimResponse, WindowRPCAppClient } from '../window-rpc/types'; export declare function getCurrentMemoryUsage(): Promise<{ available: boolean; content: string; }>; export declare function generateRpcRequestId(): string; /** * The window RPC will be served from the same origin as the API server. * so we can get the API server's origin from the location. */ export declare function getWsApiUrlFromLocation(): string; export declare function mapToCreateClaimResponse(res: ClaimTunnelResponse): CreateClaimResponse; export declare function waitForResponse<T extends keyof WindowRPCAppClient>(type: T, requestId: string, bridge: CommunicationBridge, timeoutMs?: number): Promise<Awaited<ReturnType<WindowRPCAppClient[T]>>>;