UNPKG

@veramo/credential-status

Version:

Veramo plugin for resolving a credential status

482 lines 17.8 kB
import { IAgentPlugin, ICredentialStatusVerifier } from '@veramo/core-types'; import { StatusMethod } from 'credential-status'; /** * This plugin implements the {@link @veramo/core-types#ICredentialStatusVerifier | ICredentialStatusVerifier} * interface. * * This aggregates some {@link credential-status#StatusMethod | credential status implementations} to provide a second * layer of validation when verifying Verifiable Credentials. * * This is used for the discovery of information about the current status of a verifiable credential, such as whether * it is suspended or revoked. The precise contents of the credential status information is determined by the specific * `credentialStatus` type definition. * * The results provided by this plugin depend on whether the {@link credential-status#StatusMethod | StatusMethod} * required by the credential is installed. * * @see {@link credential-status#Status} * * @beta This API may change without a BREAKING CHANGE notice. */ export declare class CredentialStatusPlugin implements IAgentPlugin { private readonly status; readonly schema: { components: { schemas: { ICheckCredentialStatusArgs: { type: string; properties: { resolutionOptions: { type: string; properties: { publicKeyFormat: { type: string; }; accept: { type: string; }; }; description: string; }; credential: { $ref: string; description: string; }; didDocumentOverride: { $ref: string; description: string; }; }; required: string[]; description: string; }; VerifiableCredential: { type: string; properties: { proof: { $ref: string; }; issuer: { $ref: string; }; credentialSubject: { $ref: string; }; type: { anyOf: ({ type: string; items: { type: string; }; } | { type: string; items?: undefined; })[]; }; "@context": { $ref: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; credentialStatus: { $ref: string; }; id: { type: string; }; }; required: string[]; description: string; }; ProofType: { type: string; properties: { type: { type: string; }; proofValue: { type: string; }; }; description: string; }; IssuerType: { anyOf: ({ type: string; properties: { id: { type: string; }; }; required: string[]; } | { type: string; properties?: undefined; required?: undefined; })[]; description: string; }; CredentialSubject: { type: string; properties: { id: { type: string; }; }; description: string; }; ContextType: { anyOf: ({ type: string; items?: undefined; } | { type: string; items: { anyOf: { type: string; }[]; }; })[]; description: string; }; CredentialStatusReference: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string[]; description: string; }; DIDDocument: { type: string; properties: { authentication: { type: string; items: { anyOf: ({ type: string; $ref?: undefined; } | { $ref: string; type?: undefined; })[]; }; }; assertionMethod: { type: string; items: { anyOf: ({ type: string; $ref?: undefined; } | { $ref: string; type?: undefined; })[]; }; }; keyAgreement: { type: string; items: { anyOf: ({ type: string; $ref?: undefined; } | { $ref: string; type?: undefined; })[]; }; }; capabilityInvocation: { type: string; items: { anyOf: ({ type: string; $ref?: undefined; } | { $ref: string; type?: undefined; })[]; }; }; capabilityDelegation: { type: string; items: { anyOf: ({ type: string; $ref?: undefined; } | { $ref: string; type?: undefined; })[]; }; }; "@context": { anyOf: ({ type: string; const: string; items?: undefined; } | { type: string; const?: undefined; items?: undefined; } | { type: string; items: { type: string; }; const?: undefined; })[]; }; id: { type: string; }; alsoKnownAs: { type: string; items: { type: string; }; }; controller: { anyOf: ({ type: string; items?: undefined; } | { type: string; items: { type: string; }; })[]; }; verificationMethod: { type: string; items: { $ref: string; }; }; service: { type: string; items: { $ref: string; }; }; publicKey: { type: string; items: { $ref: string; }; deprecated: boolean; }; }; required: string[]; description: string; }; VerificationMethod: { type: string; properties: { id: { type: string; }; type: { type: string; }; controller: { type: string; }; publicKeyBase58: { type: string; }; publicKeyBase64: { type: string; }; publicKeyJwk: { $ref: string; }; publicKeyHex: { type: string; }; publicKeyMultibase: { type: string; }; blockchainAccountId: { type: string; }; ethereumAddress: { type: string; }; conditionOr: { type: string; items: { $ref: string; }; }; conditionAnd: { type: string; items: { $ref: string; }; }; threshold: { type: string; }; conditionThreshold: { type: string; items: { $ref: string; }; }; conditionWeightedThreshold: { type: string; items: { $ref: string; }; }; conditionDelegated: { type: string; }; relationshipParent: { type: string; items: { type: string; }; }; relationshipChild: { type: string; items: { type: string; }; }; relationshipSibling: { type: string; items: { type: string; }; }; }; required: string[]; description: string; }; JsonWebKey: { type: string; properties: { alg: { type: string; }; crv: { type: string; }; e: { type: string; }; ext: { type: string; }; key_ops: { type: string; items: { type: string; }; }; kid: { type: string; }; kty: { type: string; }; n: { type: string; }; use: { type: string; }; x: { type: string; }; y: { type: string; }; }; required: string[]; description: string; }; ConditionWeightedThreshold: { type: string; properties: { condition: { $ref: string; }; weight: { type: string; }; }; required: string[]; }; Service: { type: string; properties: { id: { type: string; }; type: { type: string; }; serviceEndpoint: { anyOf: ({ $ref: string; type?: undefined; items?: undefined; } | { type: string; items: { $ref: string; }; $ref?: undefined; })[]; }; }; required: string[]; description: string; }; ServiceEndpoint: { anyOf: { type: string; }[]; description: string; }; CredentialStatus: { type: string; properties: { revoked: { type: string; }; }; required: string[]; description: string; }; }; methods: { checkCredentialStatus: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; }; }; }; readonly methods: ICredentialStatusVerifier; constructor(registry?: Record<string, StatusMethod>); private checkCredentialStatus; } //# sourceMappingURL=credential-status.d.ts.map