@sphereon/ssi-sdk.mdl-mdoc
Version:
68 lines • 3.81 kB
TypeScript
import { IAgentPlugin } from '@veramo/core';
import { ImDLMdoc } from '../types/ImDLMdoc';
export declare const mdocSupportMethods: Array<string>;
/**
* The MDLMdoc class implements the IAgentPlugin interface, providing methods for
* verification and information retrieval related to X.509 certificates and mDL (mobile
* driver's license) documents.
*/
export declare class MDLMdoc implements IAgentPlugin {
readonly schema: any;
readonly methods: ImDLMdoc;
private readonly trustAnchors;
private opts;
constructor(args?: {
trustAnchors?: string[];
opts?: {
trustRootWhenNoAnchors?: boolean;
allowSingleNoCAChainElement?: boolean;
blindlyTrustedAnchors?: string[];
};
});
/**
* Processes and verifies the provided mdoc, generates device response and presentation submission tokens.
*
* @param {MdocOid4vpPresentArgs} args - An object containing arguments for mdoc oid4vp holder presentation.
* @param {IRequiredContext} _context - Required context for the operation.
* @return {Promise<MdocOid4VPPresentationAuth>} A promise that resolves to an object containing vp_token and presentation_submission.
*/
private mdocOid4vpHolderPresent;
/**
* Verifies on the Relying Party (RP) side for mdoc (mobile document) OIDC4VP (OpenID Connect for Verifiable Presentations).
*
* @param {MdocOid4vpRPVerifyArgs} args - The arguments required for verification, including the vp_token, presentation_submission, and trustAnchors.
* @param {IRequiredContext} _context - The required context for this method.
* @return {Promise<MdocOid4vpRPVerifyResult>} - A promise that resolves to an object containing error status,
* validated documents, and the original presentation submission.
*/
private mdocOid4vpRPVerify;
/**
* Verifies the issuer-signed Mobile Document (mDoc) using the provided arguments and context.
*
* @param {MdocVerifyIssuerSignedArgs} args - The arguments required for verification, including input and key information.
* @param {IRequiredContext} context - The context encompassing necessary dependencies and configurations.
* @return {Promise<IVerifySignatureResult<KeyType>>} A promise that resolves to the result of the signature verification, including key information if available.
*/
private mdocVerifyIssuerSigned;
/**
* Verifies an X.509 certificate chain against a set of trust anchors.
*
* @param {VerifyCertificateChainArgs} args - The arguments required for verifying the certificate chain.
* This includes the certificate chain to be verified and any additional trust anchors to be used.
* @param {IRequiredContext} _context - The context required for verification, including necessary dependencies and settings.
* @return {Promise<X509ValidationResult>} A promise that resolves to the result of the validation process, indicating the success or failure of the certificate chain verification.
*/
private x509VerifyCertificateChain;
/**
* Extracts information from a list of X509 certificates.
*
* @param {GetX509CertificateInfoArgs} args - Arguments required to retrieve certificate information,
* including the certificates and optional Subject Alternative Name (SAN) type filter.
* @param {IRequiredContext} context - The context required for the operation, which may include
* logging, configuration, and other operational details.
* @return {Promise<CertificateInfo[]>} A promise that resolves with an array of certificate
* information objects, each containing details extracted from individual certificates.
*/
private x509GetCertificateInfo;
}
//# sourceMappingURL=mDLMdoc.d.ts.map