import BaseController from './BaseController'; import type { IAVMWebClientConfig, IAVMWebClientInitOptions, IDisableParams, IDisableResult, IDiscoverParams, IDiscoverResult, IEnableParams, IEnableResult, IPostTransactionsParams, IPostTransactionsResult, ISignMessageParams, ISignMessageResult, ISignTransactionsParams, ISignTransactionsResult, TAVMWebClientCallback } from "../types"; export default class AVMWebClient extends BaseController { private _requestIds; private constructor(); /** * public static methods */ static init({ debug }?: IAVMWebClientInitOptions): AVMWebClient; /** * private methods */ private _addListener; private _sendRequestMessage; /** * public methods */ /** * Sends a request to remove the client from providers. * @param {IDisableParams} params - [optional] params that specify which provider, network and/or specific session IDs. * @returns {string} the ID of the request message. */ disable(params?: IDisableParams): string; /** * Sends a request to get information relating to available providers. This should be called before interacting with * any providers to ensure networks and methods are supported. * @param {IDiscoverParams} params - [optional] params that specify which provider to target. * @returns {string} the ID of the request message. */ discover(params?: IDiscoverParams): string; /** * Enables to a client with providers. If the ID of the provider and/or network is specified, that provider/network is * used, otherwise the all providers available providers are used. * @param {IEnableParams} params - [optional] params that specify the provider and/or the network. * @returns {string} the ID of the request message. */ enable(params?: IEnableParams): string; /** * Listens to `disable` messages sent from providers. * @param {TAVMWebClientCallback} callback - callback that is called when a response message * is received. * @returns {string} the ID of the listener. */ onDisable(callback: TAVMWebClientCallback): string; /** * Listens to `discover` messages sent from providers. * @param {TAVMWebClientCallback} callback - callback that is called when a response message * is received. * @returns {string} the ID of the listener. */ onDiscover(callback: TAVMWebClientCallback): string; /** * Listens to `enable` messages sent from providers. * @param {TAVMWebClientCallback} callback - callback that is called when a response message * is received. * @returns {string} the ID of the listener. */ onEnable(callback: TAVMWebClientCallback): string; /** * Listens to `post_transactions` messages sent from providers. * @param {TAVMWebClientCallback} callback - callback that is called when a response * message is received. * @returns {string} the ID of the listener. */ onPostTransactions(callback: TAVMWebClientCallback): string; /** * Listens to `sign_and_post_transactions` messages sent from providers. * @param {TAVMWebClientCallback} callback - callback that is called when a response * message is received. */ onSignAndPostTransactions(callback: TAVMWebClientCallback): string; /** * Listens to `sign_message` messages sent from providers. * @param {TAVMWebClientCallback | null} callback - callback that is called when a response * message is received. * @returns {string} the ID of the listener. */ onSignMessage(callback: TAVMWebClientCallback): string; /** * Listens to `sign_transactions` messages sent from providers. * @param {TAVMWebClientCallback | null} callback - callback that is called when a response * message is received. * @returns {string} the ID of the listener. */ onSignTransactions(callback: TAVMWebClientCallback): string; /** * Request providers to post a list of signed transactions to the network. * @param {IPostTransactionsParams} params - params that specify the provider and the signed transactions. * @returns {string} the ID of the request message */ postTransactions(params: IPostTransactionsParams): string; /** * Sends a list of unsigned transactions to be signed and posted to the network by the provider. * @param {ISignTransactionsParams} params - params that specify the unsigned transactions and the provider. * @returns {string} the ID of the request message */ signAndPostTransactions(params: ISignTransactionsParams): string; /** * Sends a UTF-8 encoded message to be signed by the provider. * @param {ISignMessageParams} params - params that specify the message to sign, the signer and the provider. * @returns {string} the ID of the request message */ signMessage(params: ISignMessageParams): string; /** * Sends a list of unsigned transactions to be signed by the provider. * @param {ISignTransactionsParams} params - params that specify the unsigned transactions and the provider. * @returns {string} the ID of the request message */ signTransactions(params: ISignTransactionsParams): string; } //# sourceMappingURL=AVMWebClient.d.ts.map