import BaseController from './BaseController'; import type { IAVMWebProviderConfig, IAVMWebProviderInitOptions, IDisableParams, IDisableResult, IDiscoverParams, IDiscoverResult, IEnableParams, IEnableResult, IPostTransactionsParams, IPostTransactionsResult, ISignMessageParams, ISignMessageResult, ISignTransactionsParams, ISignTransactionsResult, TAVMWebProviderCallback } from "../types"; export default class AVMWebProvider extends BaseController { private constructor(); /** * private methods */ private _addListener; /** * Dispatches an event to the web page with the result/error from the `options.callback` function. * NOTE: the event uses the detail property of the `CustomEvent` but due to Firefox's limitation of only allowing * non-string properties, the response message MUST be a serializable object as it will be stringified to allow * transport. * @see {@link https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts} * @private */ private _sendResponseMessage; /** * public static methods */ static init(providerId: string, { debug }?: IAVMWebProviderInitOptions): AVMWebProvider; /** * public methods */ /** * Listens to `disable` messages sent from clients. * @param {TAVMWebProviderCallback} callback - the callback to handle requests from * the client. * @returns {string} the ID of the listener. */ onDisable(callback: TAVMWebProviderCallback): string; /** * Listens to `discover` messages sent from clients. * @param {TAVMWebProviderCallback} callback - the callback to handle requests from * the client. * @returns {string} the ID of the listener. */ onDiscover(callback: TAVMWebProviderCallback): string; /** * Listens to `enable` messages sent from clients. * @param {TAVMWebProviderCallback} callback - the callback to handle requests from * the client. * @returns {string} the ID of the listener. */ onEnable(callback: TAVMWebProviderCallback): string; /** * Listens to `post_transactions` messages sent from clients. * @param {TAVMWebProviderCallback} callback - the callback to handle requests from * the client. * @returns {string} the ID of the listener. */ onPostTransactions(callback: TAVMWebProviderCallback): string; /** * Listens to `sign_and_post_transactions` messages sent from clients. * @param {TAVMWebProviderCallback} callback - the callback to handle requests from * the client. * @returns {string} the ID of the listener. */ onSignAndPostTransactions(callback: TAVMWebProviderCallback): string; /** * Listens to `sign_message` messages sent from clients. * @param {TAVMWebProviderCallback} callback - the callback to handle requests from * the client. * @returns {string} the ID of the listener. */ onSignMessage(callback: TAVMWebProviderCallback): string; /** * Listens to `sign_transactions` messages sent from clients. * @param {TAVMWebProviderCallback} callback - the callback to handle requests from * the client. * @returns {string} the ID of the listener. */ onSignTransactions(callback: TAVMWebProviderCallback): string; } //# sourceMappingURL=AVMWebProvider.d.ts.map