@dapplets/dapplet-extension
Version:
The Bridge to the Augmented Web.
33 lines (32 loc) • 1.28 kB
TypeScript
import { Observable } from 'rxjs';
import { JsonRpc } from '../../common/jsonrpc';
import { SandboxInitializationParams } from '../../common/types';
import { IFrameContainer } from './iframeContainer';
/**
* The DappletExecutor class is responsible for executing the code of dapplets
* within a secured and isolated environment. It provides methods to communicate
* with the dapplets and manages their execution.
*/
export declare abstract class DappletExecutor {
private _stateByWidgetId;
private _detachConfigCallbacksById;
private _jsonrpc;
private _eventBusSubscription;
private _worker;
constructor(sandboxContainer: IFrameContainer, dappletScript: string, injectorInitParams: SandboxInitializationParams, jsonrpc: JsonRpc, moduleEventBus: Observable<unknown>);
activate(): Promise<any>;
deactivate(): Promise<void>;
abstract getDependency(name: string): any;
onActionHandler(): void;
onHomeHandler(): void;
onShareLinkHandler(data: any): void;
onWalletsUpdateHandler(): void;
onConnectedAccountsUpdateHandler(): void;
private _eventBusListener;
private _onConfigAttached;
private _onConfigDetached;
private _onStateUpdated;
private _sendRequest;
private _notify;
private _messageListener;
}