import { InteractionService } from "../interaction"; import { Env } from "@keplr-wallet/router"; import { AllPermissionDataPerOrigin, PermissionOptions } from "./types"; import { KVStore } from "@keplr-wallet/common"; import { ChainsService } from "../chains"; export declare class PermissionService { protected readonly kvStore: KVStore; protected readonly interactionService: InteractionService; protected readonly chainsService: ChainsService; protected permissionMap: Map; protected privilegedOrigins: Map; protected currentChainIdForEVMByOriginMap: Map; protected currentChainIdForStarknetByOriginMap: Map; protected currentBaseChainIdForBitcoinByOriginMap: Map; constructor(kvStore: KVStore, privilegedOrigins: string[], interactionService: InteractionService, chainsService: ChainsService); init(): Promise; protected readonly onChainRemoved: (chainId: string) => void; getAllPermissionDataPerOrigin(): AllPermissionDataPerOrigin; clearAllPermissions(): void; checkOrGrantBasicAccessPermission(env: Env, chainIds: string | string[], origin: string, options?: PermissionOptions): Promise; checkOrGrantPermission(env: Env, chainIds: string[], type: string, origin: string, options?: PermissionOptions): Promise; checkOrGrantGlobalPermission(env: Env, type: string, origin: string): Promise; grantPermission(env: Env, chainIds: string[], type: string, origins: string[], options?: PermissionOptions): Promise; grantBasicAccessPermission(env: Env, chainIds: string[], origins: string[], options?: PermissionOptions): Promise; grantGlobalPermission(env: Env, type: string, origins: string[]): Promise; checkPermission(env: Env, chainId: string, type: string, origin: string): void; checkBasicAccessPermission(env: Env, chainIds: string[], origin: string): void; hasBasicAccessPermission(env: Env, chainIds: string[], origin: string): boolean; checkGlobalPermission(env: Env, type: string, origin: string): void; isPrivilegedOrigins(origin: string): boolean; hasPermission(chainId: string, type: string, origin: string): boolean; hasGlobalPermission(type: string, origin: string): boolean; getPermissionOrigins: (chainId: string, type: string) => string[]; getGlobalPermissionOrigins: (type: string) => string[]; getOriginPermittedChains: (origin: string, type: string) => string[]; addPermission(chainIds: string[], type: string, origins: string[]): void; addGlobalPermission(type: string, origins: string[]): void; removePermission(chainId: string, type: string, origins: string[]): void; removeAllSpecificTypePermission(origins: string[], type: string): void; removeAllTypePermission(origins: string[]): void; removeAllTypePermissionToChainId(chainId: string, origins: string[]): void; removeGlobalPermission(type: string, origins: string[]): void; removeAllTypeGlobalPermission(origins: string[]): void; removeAllPermissions(chainId: string): void; getCurrentChainIdForEVM(origin: string): string | undefined; setCurrentChainIdForEVM(origins: string[], chainId: string): void; updateCurrentChainIdForEVM(env: Env, origin: string, chainId: string): Promise; getCurrentChainIdForStarknet(origin: string): string | undefined; setCurrentChainIdForStarknet(origins: string[], chainId: string): void; updateCurrentChainIdForStarknet(env: Env, origin: string, chainId: string): Promise; getCurrentBaseChainIdForBitcoin(origin: string): string | undefined; setCurrentBaseChainIdForBitcoin(origins: string[], chainId: string): void; updateCurrentBaseChainIdForBitcoin(env: Env, origin: string, chainId: string): Promise; }