import { SignatureMethod } from '../types'; export interface EventEmitter { postMessage: (message: unknown, targetOrigin: string) => void; } export declare const eventEmitter: (targetWindow: Window) => EventEmitter; export declare enum CivicSignEventTypeResponse { RESPONSE_PUBLIC_KEY = "RESPONSE_PUBLIC_KEY", RESPONSE_DID = "RESPONSE_DID", RESPONSE_SIGNED_PROOF = "RESPONSE_SIGNED_PROOF", RESPONSE_SIGNED_MESSAGE = "RESPONSE_SIGNED_MESSAGE" } export declare enum CivicSignEventTypeRequest { REQUEST_PUBLIC_KEY = "REQUEST_PUBLIC_KEY", REQUEST_DID = "REQUEST_DID", REQUEST_SIGNED_PROOF = "REQUEST_SIGNED_PROOF", REQUEST_SIGNED_MESSAGE = "REQUEST_SIGNED_MESSAGE" } export type CivicSignEventTypeRequestMessage = { request: CivicSignEventTypeRequest; payload?: Uint8Array | string; }; export interface RemoteSign { sendPublicKey: (publicKey: string) => void; sendDid: (did: string) => void; sendSignedProof: (proof: string, signatureMethod: SignatureMethod) => void; sendSignedMessage: (message: Uint8Array) => void; } export type CivicSignResponseEvent = { event: CivicSignEventTypeResponse; data: string; instanceId: string; }; export declare class RemoteSignWindowEventEmitter implements RemoteSign { readonly instanceId: string; private targetWindow; constructor(targetWindow: EventEmitter, instanceId: string); sendPublicKey(publicKey: string): void; sendDid(did: string): void; sendSignedProof(proof: string, signatureMethod: SignatureMethod): void; sendSignedMessage(message: Uint8Array): void; private emit; } export declare const remoteSignWindowEventEmitterImplementation: (instanceId: string, iframeBaseId?: string) => RemoteSignWindowEventEmitter | null;