anon-identity
Version:
Decentralized identity framework with DIDs, Verifiable Credentials, and privacy-preserving selective disclosure
56 lines • 1.75 kB
TypeScript
import { SignatureSuite, KeyType, SigningOptions, VerificationOptions, SelectiveDisclosureOptions, SignatureSuiteOptions } from './signature-suite';
import { Proof } from '../../types/vc2';
/**
* BbsBlsSignature2020 implementation
* Supports selective disclosure of attributes
*/
export declare class BbsBlsSignature2020Suite extends SignatureSuite {
readonly type = "BbsBlsSignature2020";
readonly requiredKeyType = KeyType.BLS12381G2;
readonly supportsSelectiveDisclosure = true;
constructor(options?: SignatureSuiteOptions);
/**
* Create a BBS+ signature proof
*/
createProof(options: SigningOptions): Promise<Proof>;
/**
* Verify a BBS+ signature proof
*/
verifyProof(options: VerificationOptions): Promise<boolean>;
/**
* Create a derived proof with selective disclosure
*/
createDerivedProof(options: SelectiveDisclosureOptions): Promise<Proof>;
/**
* Verify a derived proof
*/
verifyDerivedProof(options: VerificationOptions): Promise<boolean>;
/**
* Prepare messages from document for signing/verification
*/
private prepareMessages;
/**
* Get indices of revealed attributes
*/
private getRevealedIndices;
/**
* Prepare revealed messages for derived proof verification
*/
private prepareRevealedMessages;
/**
* Extract public key from verification method
*/
private extractPublicKey;
/**
* Generate a random nonce
*/
private generateNonce;
/**
* Generate a BLS12-381 G2 key pair
*/
static generateKeyPair(): Promise<{
publicKey: Uint8Array;
privateKey: Uint8Array;
}>;
}
//# sourceMappingURL=bbs-bls-signature-2020.d.ts.map