UNPKG

test-keyguard-client

Version:

Nimiq Keyguard client library dev test

29 lines (28 loc) 1.08 kB
import { KeyguardCommand } from './KeyguardCommand'; declare enum BehaviorType { REDIRECT = 0, IFRAME = 1 } export declare class RequestBehavior { static getAllowedOrigin(endpoint: string): string; private readonly _type; constructor(type: BehaviorType); request(endpoint: string, command: KeyguardCommand, args: any[]): Promise<any>; readonly type: BehaviorType; } export declare class RedirectRequestBehavior extends RequestBehavior { static getRequestUrl(endpoint: string, command: KeyguardCommand): string; private readonly _targetUrl; private readonly _localState; constructor(targetUrl?: string, localState?: any); request(endpoint: string, command: KeyguardCommand, args: any[]): Promise<any>; } export declare class IFrameRequestBehavior extends RequestBehavior { private static IFRAME_PATH_SUFFIX; private _iframe; private _client; constructor(); request(endpoint: string, command: KeyguardCommand, args: any[]): Promise<any>; createIFrame(endpoint: string): Promise<HTMLIFrameElement>; } export {};