import { IInjectedMessageData, IInjectedProviderRequest } from "@cryptkeeperzk/types"; import { EventHandler, EventName } from "../event"; export declare class Handler { /** * Nonce used for message communication. */ private nonce; /** * EventEmitter for handling events. */ private emitter; /** * Stores promises associated with message nonces. */ private requestsPromises; /** * EventEmitter for handling events. */ protected connectedOrigin?: string; /** * Creates an instance of CryptKeeperInjectedProvider. * * @constructor */ constructor(connectedOrigin?: string); on(eventName: EventName, cb: EventHandler): void; emit(eventName: EventName, payload?: unknown): void; cleanListeners(): void; /** * Sends a message to the extension. * * @param {IInjectedProviderRequest} message - The message to send. * @returns {Promise} A Promise that resolves to the response from the extension. */ protected post(message: IInjectedProviderRequest): Promise; /** * Handles incoming messages from the extension. * * @param {IInjectedMessageData} event - The message event. * @returns {unknown} The result of handling the event. */ eventResponser: (event: MessageEvent) => unknown; } //# sourceMappingURL=index.d.ts.map