import type { SimpleWebAuthnLogger } from '../helpers/logging.js'; import type { ConvenienceMDSPayload, ProviderMetadata } from '../metadata/convenienceMDSTypes.js'; import type { Uint8Array_ } from '../types/index.js'; import { BaseMDSService } from './helpers/baseMDSService.js'; interface ConvenienceMetadataService { /** * @param opts.mdsServers An array of URLs to FIDO Alliance Convenience Metadata * Service (C-MDS)-compatible servers. Defaults to the official FIDO Convenience MDS * @param opts.payloads An array of local Convenience Metadata Service payloads. Metadata loaded * in this way will be loaded but not refreshed. When combined with `mdsServers`, metadata * for the same AAGUID downloaded from a convenience MDS server will replace the local metadata * and get refreshed from then on * @param opts.logger An instance of `SimpleWebAuthnLogger` that allows for capturing * ConvenienceMetadataService log output in a project-specific way */ initialize(opts?: { mdsServers?: string[]; payloads?: ConvenienceMDSPayload[]; logger?: SimpleWebAuthnLogger; }): Promise; /** * Get localized names and icons for the credential provider associated with the given AAGUID. */ getProviderMetadata(aaguid: string | Uint8Array_): Promise; } export declare class BaseConvenienceMetadataService extends BaseMDSService implements ConvenienceMetadataService { constructor(); initialize(opts?: { mdsServers?: string[]; payloads?: ConvenienceMDSPayload[]; logger?: SimpleWebAuthnLogger; }): Promise; /** * Download the convenience metadata, which is surprisingly just a JSON document, and cache it */ protected downloadAndCache(url: string, no: number): Promise; /** * Refresh failures cause that server's refresh to be re-attempted at a later date */ protected handleRefreshFailure(url: string): void; /** * Cache the AAGUID-keyed entries in a Convenience MDS payload. Returns the number of entries * cached (so you can `count += cacheConvenienceMDS(...)`) */ private cacheConvenienceMDS; /** * Get a collection of metadata about a credential manager, including localized name(s) and * light and dark iconography when available. Returns `undefined` if no such metadata has been * registered with a Convenience MDS. */ getProviderMetadata(aaguid: string | Uint8Array_): Promise; } /** * A basic service for coordinating interactions with the FIDO Convenience Metadata Service. This * includes metadata download and parsing, and on-demand requesting and caching of provider details. * * https://fidoalliance.org/metadata/ */ export declare const ConvenienceMetadataService: ConvenienceMetadataService; export {}; //# sourceMappingURL=convenienceMetadataService.d.ts.map