UNPKG

anon-identity

Version:

Decentralized identity framework with DIDs, Verifiable Credentials, and privacy-preserving selective disclosure

39 lines 1.43 kB
import { RevocationList } from '../types'; export interface BatchOperation { type: 'registerDID' | 'updateDID' | 'publishRevocation' | 'registerSchema' | 'revokeCredentials'; data: any; } export declare class BatchOperationsManager { private pendingOperations; private batchSize; private flushTimeout?; private flushIntervalMs; constructor(batchSize?: number, flushIntervalMs?: number); addOperation(operation: BatchOperation): void; private resetFlushTimeout; flush(): Promise<void>; private groupOperationsByType; private batchRegisterDIDs; private batchUpdateDIDs; private batchPublishRevocations; private batchRegisterSchemas; private batchRevokeCredentials; static estimateBatchGas(operations: BatchOperation[]): bigint; static calculateBatchSavings(operations: BatchOperation[]): { individualGas: bigint; batchGas: bigint; savings: bigint; savingsPercent: number; }; } export declare class RevocationMerkleTree { private leaves; private layers; constructor(revokedCredentialHashes: string[]); private buildTree; getRoot(): string; getProof(credentialHash: string): string[]; verify(credentialHash: string, proof: string[], root: string): boolean; static fromRevocationList(revocationList: RevocationList): RevocationMerkleTree; } //# sourceMappingURL=blockchain-batch-operations.d.ts.map