UNPKG

anon-identity

Version:

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

26 lines 1.24 kB
import { VerifiableCredential, SelectivelyDisclosedCredential } from '../types'; export declare class SelectiveDisclosure { /** * Create a selectively disclosed credential revealing only specified attributes */ static createSelectivelyDisclosedCredential(originalCredential: VerifiableCredential, attributesToDisclose: string[], holderPrivateKey: Uint8Array, holderDID: string): Promise<SelectivelyDisclosedCredential>; /** * Create a cryptographic proof for the selective disclosure */ private static createDisclosureProof; /** * Verify a selective disclosure proof */ static verifySelectiveDisclosure(disclosedCredential: SelectivelyDisclosedCredential, holderPublicKey: Uint8Array): Promise<boolean>; /** * Create a commitment to a value (for future ZKP enhancement) */ static createCommitment(value: any, salt?: string): string; /** * Verify a commitment (for future ZKP enhancement) */ static verifyCommitment(value: any, salt: string, commitment: string): boolean; private static arraysEqual; } export declare function getPublicKeyFromPrivate(privateKey: Uint8Array): Promise<Uint8Array>; //# sourceMappingURL=selective-disclosure.d.ts.map