import { SignatureType } from './types-and-consts'; import { VerifyResult } from 'crypto-wasm-new'; import { BBSPublicKey, BBSSignature, BBSSignatureParams } from '../bbs'; import { PSPublicKey, PSSignature, PSSignatureParams } from '../ps'; import { BBSPlusPublicKeyG2, BBSPlusSignatureG1, BBSPlusSignatureParamsG1 } from '../bbs-plus'; import { CredentialCommon } from './credential-common'; import { BBDT16Mac, BBDT16MacParams, BBDT16MacProofOfValidity, BBDT16MacPublicKeyG1, BBDT16MacSecretKey } from '../bbdt16-mac'; export declare abstract class Credential extends CredentialCommon { abstract verify(publicKey: PublicKey, signatureParams?: SignatureParams): VerifyResult; serializeForSigning(): object; toJSONWithJsonLdContext(): object; /** * Ensure proof type is correct * @param typ * @protected */ protected static validateProofType(typ: string): void; static getSigType(): SignatureType; } export declare class BBSCredential extends Credential { verify(publicKey: BBSPublicKey, signatureParams?: BBSSignatureParams): VerifyResult; /** * A credential will have at least some proof metadata like the type or purpose. This adds those defaults to the * given object. * @param s */ static applyDefaultProofMetadataIfNeeded(s: object): void; static fromJSON(j: object, proofValue?: string): BBSCredential; static getSigType(): SignatureType; } export declare class BBSPlusCredential extends Credential { verify(publicKey: BBSPlusPublicKeyG2, signatureParams?: BBSPlusSignatureParamsG1): VerifyResult; /** * A credential will have at least some proof metadata like the type or purpose. This adds those defaults to the * given object. * @param s */ static applyDefaultProofMetadataIfNeeded(s: object): void; static fromJSON(j: object, proofValue?: string): BBSPlusCredential; static getSigType(): SignatureType; } export declare class PSCredential extends Credential { verify(publicKey: PSPublicKey, signatureParams?: PSSignatureParams): VerifyResult; /** * A credential will have at least some proof metadata like the type or purpose. This adds those defaults to the * given object. * @param s */ static applyDefaultProofMetadataIfNeeded(s: object): void; static fromJSON(j: object, proofValue?: string): PSCredential; static getSigType(): SignatureType; } export declare class BBDT16Credential extends Credential { verify(publicKey: undefined, signatureParams?: BBDT16MacParams): VerifyResult; /** * Since these cannot be directly verified using the public key, issuer creates a proof of validity and * gives to the holder who can then verify it without using the secret key * @param secretKey * @param publicKey * @param signatureParams */ proofOfValidity(secretKey: BBDT16MacSecretKey, publicKey: BBDT16MacPublicKeyG1, signatureParams?: BBDT16MacParams): BBDT16MacProofOfValidity; /** * This is just done for testing. In practice a credential holder will never have the secret key * @param secretKey * @param signatureParams */ verifyUsingSecretKey(secretKey: BBDT16MacSecretKey, signatureParams?: BBDT16MacParams): VerifyResult; verifyUsingValidityProof(proof: BBDT16MacProofOfValidity, publicKey: BBDT16MacPublicKeyG1, signatureParams?: BBDT16MacParams): VerifyResult; /** * A credential will have at least some proof metadata like the type or purpose. This adds those defaults to the * given object. * @param s */ static applyDefaultProofMetadataIfNeeded(s: object): void; static fromJSON(j: object, proofValue?: string): BBDT16Credential; static getSigType(): SignatureType; } //# sourceMappingURL=credential.d.ts.map