@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
41 lines (40 loc) • 1.44 kB
text/typescript
import { DocumentLoaderWithContext } from "./data-integrity/libraries/documentLoader.mjs";
//#region src/modules/vc/W3cCredentialsModuleConfig.d.ts
/**
* W3cCredentialsModuleConfigOptions defines the interface for the options of the W3cCredentialsModuleConfig class.
* This can contain optional parameters that have default values in the config class itself.
*/
interface W3cCredentialsModuleConfigOptions {
/**
* Document loader to use for resolving JSON-LD objects. Takes a {@link AgentContext} as parameter,
* and must return a {@link DocumentLoader} function.
*
* @example
* ```
* const myDocumentLoader = (agentContext: AgentContext) => {
* return async (url) => {
* if (url !== 'https://example.org') throw new Error("I don't know how to load this document")
*
* return {
* contextUrl: null,
* documentUrl: url,
* document: null
* }
* }
* }
* ```
*
*
* @default {@link defaultDocumentLoader}
*/
documentLoader?: DocumentLoaderWithContext;
}
declare class W3cCredentialsModuleConfig {
private options;
constructor(options?: W3cCredentialsModuleConfigOptions);
/** See {@link W3cCredentialsModuleConfigOptions.documentLoader} */
get documentLoader(): DocumentLoaderWithContext;
}
//#endregion
export { W3cCredentialsModuleConfig, W3cCredentialsModuleConfigOptions };
//# sourceMappingURL=W3cCredentialsModuleConfig.d.mts.map