import { CredentialStatus } from '../types/vc2'; import { DID } from '../types'; /** * Interface for credential status checking */ export interface CredentialStatusChecker { /** * Check if a credential is revoked or suspended * @param credentialId The credential ID to check * @param statusInfo The credential status information * @returns Status check result */ checkStatus(credentialId: string, statusInfo: CredentialStatus): Promise; } export interface StatusCheckResult { revoked: boolean; suspended?: boolean; reason?: string; statusListIndex?: number; checkedAt: string; } /** * RevocationList2020 status checker * Compatible with existing revocation implementation */ export declare class RevocationList2020StatusChecker implements CredentialStatusChecker { private revocationLists; constructor(revocationLists?: Map); checkStatus(credentialId: string, statusInfo: CredentialStatus): Promise; /** * Add or update a revocation list */ addRevocationList(listId: string, list: any): void; } /** * StatusList2021 implementation * Uses a bitstring to efficiently store credential status */ export declare class StatusList2021 { private bitstring; private size; constructor(size?: number); /** * Set status for a credential at given index * @param index The index in the status list * @param revoked Whether the credential is revoked */ setStatus(index: number, revoked: boolean): void; /** * Check status for a credential at given index * @param index The index in the status list * @returns Whether the credential is revoked */ getStatus(index: number): boolean; /** * Encode the bitstring as base64 */ encode(): string; /** * Decode from base64 */ static decode(encoded: string, size: number): StatusList2021; /** * Create a signed status list credential */ createStatusListCredential(issuerDID: DID, privateKey: Uint8Array, listId: string): Promise; } /** * StatusList2021 status checker */ export declare class StatusList2021StatusChecker implements CredentialStatusChecker { private statusLists; constructor(statusLists?: Map); checkStatus(credentialId: string, statusInfo: CredentialStatus): Promise; /** * Add or update a status list */ addStatusList(listId: string, list: StatusList2021): void; /** * Load a status list from a credential */ loadStatusListCredential(credential: any): Promise; } /** * Composite status checker that supports multiple status types */ export declare class CompositeStatusChecker implements CredentialStatusChecker { private checkers; constructor(); registerChecker(type: string, checker: CredentialStatusChecker): void; checkStatus(credentialId: string, statusInfo: CredentialStatus): Promise; } //# sourceMappingURL=credential-status.d.ts.map