import type { IJsonLdContext, IParseOptions, JsonLdContext, JsonLdContextNormalized } from "jsonld-context-parser"; import { ContextParser, FetchDocumentLoader } from "jsonld-context-parser"; import { JsonLdParser } from "jsonld-streaming-parser"; import { Store } from "n3"; import type { JsonLd } from "../common/common"; /** * A JSON-LD document loader with the standard context for VCs pre-loaded */ export declare class CachedFetchDocumentLoader extends FetchDocumentLoader { private readonly allowContextFetching; private contexts; constructor(contexts?: Record, allowContextFetching?: boolean, ...args: ConstructorParameters); load(url: string): Promise; } export interface ParseOptions { baseIRI?: string; contexts?: Record; allowContextFetching?: boolean; } export declare class CachingContextParser extends ContextParser { private cachedParsing; private contextMap; private contextHashMap; private mapIndex; private cmap; parse(context: JsonLdContext, options?: IParseOptions): Promise; } /** * Our internal JsonLd Parser with a cached VC context */ export declare class CachedJsonLdParser extends JsonLdParser { constructor(options?: ParseOptions); } /** * Gets an N3 store from a JSON-LD string * @param response A JSON-LD string * @param options An optional fetch function for dereferencing remote contexts * @returns A store containing the Quads in the JSON-LD response */ export declare function jsonLdStringToStore(data: string, options?: ParseOptions): Promise>; /** * Gets an N3 store from a JSON-LD as an Object * @param response JSON-LD as an Object * @param options An optional fetch function for dereferencing remote contexts * @returns A store containing the Quads in the JSON-LD response */ export declare function jsonLdToStore(data: unknown, options?: ParseOptions): Promise>;