UNPKG

@sphereon/ssi-sdk.agent-config

Version:

21 lines 1.97 kB
import { IAgentContext, ICredentialVerifier, IDataStore, IDataStoreORM, IDIDManager, IKeyManager, IPluginMethodMap, IResolver, ICredentialIssuer, ICredentialStatusVerifier } from '@veramo/core'; /** * Allows to get a type agent context plugin methods based on provided or inferred types and at least one method for these plugin(s) * @param context Tje agent context to check against * @param requiredMethod One or more method the plugin provides, so we can check availability and thus plugin presence */ export declare function contextHasPlugin<Plugins extends IPluginMethodMap>(context: IAgentContext<any>, requiredMethod: string | string[]): context is IAgentContext<Plugins>; /** * The below methods are convenience methods to directly get the appropriate context after calling the respective method * * @param context */ export declare function contextHasKeyManager(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<IKeyManager>; export declare function contextHasDidManager(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<IResolver & IDIDManager>; export declare function contextHasDidResolver(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<IResolver>; export declare function contextHasCredentialIssuer(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<ICredentialIssuer>; export declare function contextHasCredentialVerifier(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<ICredentialVerifier>; export declare function contextHasCredentialStatusVerifier(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<ICredentialStatusVerifier>; export declare function contextHasDataStore(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<IDataStore>; export declare function contextHasDataStoreORM(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<IDataStoreORM>; //# sourceMappingURL=agentContextUtils.d.ts.map