@sphereon/wellknown-dids-client
Version:
Well-known DID client allows to create and verify DID Domain configuration resources
71 lines (70 loc) • 2.84 kB
TypeScript
import { ICredentialValidation, IDescriptorValidation, IDomainLinkageValidation, IResourceValidation, IVerifierConfig, IVerifyDomainLinkageArgs, IVerifyDomainLinkageCredentialArgs, IVerifyEndpointDescriptorArgs, IVerifyResourceArgs, StrictPropertyCheck } from '../types';
export declare class WellKnownDidVerifier {
private readonly config?;
/** Verifier constructor */
constructor(config?: IVerifierConfig);
/**
* Verifies the domain linkage from a DID document.
*
* @param args The arguments for verifying domain linkage.
* @return {IDomainLinkageValidation}, The validation result.
*/
verifyDomainLinkage(args: IVerifyDomainLinkageArgs): Promise<IDomainLinkageValidation>;
/**
* Verifies the endpoint descriptor.
*
* @param args The arguments to verify the descriptor.
* @return {IDescriptorValidation}, The validation result.
*/
verifyEndpointDescriptor(args: IVerifyEndpointDescriptorArgs): Promise<IDescriptorValidation>;
/**
* Verifies the DID configuration resource.
*
* @param args The arguments to verify the resource.
* @return {IResourceValidation}, The validation result.
*/
verifyResource<T extends IVerifyResourceArgs>(args: T & StrictPropertyCheck<T, IVerifyResourceArgs, 'Only allowed properties of IVerifyResourceArgs'>): Promise<IResourceValidation>;
/**
* Verifies the domain linkage credential.
*
* @param args The domain linkage credential. Types can be JWT or JSONLD.
* @return {ICredentialValidation}, The validation result.
*/
verifyDomainLinkageCredential(args: IVerifyDomainLinkageCredentialArgs): Promise<ICredentialValidation>;
/**
* Verifies the endpoint descriptor object structure.
*
* @param descriptor The endpoint descriptor.
*/
private verifyEndpointDescriptorStructure;
/**
* Verifies the structure of a JWT domain linkage credential.
*
* @param token The JWT token.
*/
private verifyJsonWebTokenProofFormat;
/**
* Verifies the structure of a JWT domain linkage credential header.
*
* @param header The JWT header.
*/
private verifyJsonWebTokenProofHeaderStructure;
/**
* Verifies the structure of a JWT domain linkage credential payload.
*
* @param payload The JWT payload.
*/
private verifyJsonWebTokenProofPayloadStructure;
/**
* Verifies the structure of a domain linkage credential.
*
* @param credential The domain linkage credential.
*/
private verifyDomainLinkageCredentialStructure;
/**
* Retrieves the origins of an endpoint descriptor.
*
* @param descriptor The endpoint descriptor.
*/
private getOrigins;
}