diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/platform/api.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/platform/api.ts | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/src/platform/api.ts b/packages/taler-wallet-webextension/src/platform/api.ts index 44b5959a8..56d668a97 100644 --- a/packages/taler-wallet-webextension/src/platform/api.ts +++ b/packages/taler-wallet-webextension/src/platform/api.ts @@ -16,20 +16,18 @@ import { CoreApiResponse, - NotificationType, TalerUri, - WalletNotification, + WalletNotification } from "@gnu-taler/taler-util"; import { WalletConfig, - WalletConfigParameter, - WalletOperations, + WalletOperations } from "@gnu-taler/taler-wallet-core"; -import { BackgroundOperations } from "../wxApi.js"; import { ExtensionOperations, MessageFromExtension, } from "../taler-wallet-interaction-loader.js"; +import { BackgroundOperations } from "../wxApi.js"; export interface Permissions { /** @@ -48,9 +46,9 @@ export interface Permissions { * Compatibility API that works on multiple browsers. */ export interface CrossBrowserPermissionsApi { - // containsHostPermissions(): Promise<boolean>; - // requestHostPermissions(): Promise<boolean>; - // removeHostPermissions(): Promise<boolean>; + containsHostPermissions(): Promise<boolean>; + requestHostPermissions(): Promise<boolean>; + removeHostPermissions(): Promise<boolean>; containsClipboardPermissions(): Promise<boolean>; requestClipboardPermissions(): Promise<boolean>; @@ -102,6 +100,7 @@ type WebexWalletConfig = { export interface Settings extends WebexWalletConfig { injectTalerSupport: boolean; + autoOpenByHeader: boolean; advanceMode: boolean; backup: boolean; langSelector: boolean; @@ -112,6 +111,7 @@ export interface Settings extends WebexWalletConfig { export const defaultSettings: Settings = { injectTalerSupport: true, + autoOpenByHeader: true, advanceMode: false, backup: false, langSelector: false, @@ -206,6 +206,15 @@ export interface BackgroundPlatformAPI { message: MessageFromFrontend<Op> & { id: string }, ) => Promise<MessageResponse>, ): void; + + /** + * Backend API + */ + registerTalerHeaderListener( + onHeader: (tabId: number, url: string) => void, + ): void; + + containsTalerHeaderListener(): boolean; } export interface ForegroundPlatformAPI { /** |