import { VerifyResult } from 'crypto-wasm-new'; import { CompositeProof } from '../composite-proof'; import { KeyedProof } from './keyed-proof'; import { PresentationSpecification } from './presentation-specification'; import { SetupParamsTracker } from './setup-params-tracker'; import { AccumulatorVerificationParam, AttributeCiphertexts, CredentialVerificationParam, PredicateParamType } from './types-and-consts'; import { Versioned } from './versioned'; /** * The context passed to the proof contains the version and the presentation spec as well. This is done to bind the * presentation spec and the version cryptographically to the proof. * @param version * @param presSpec * @param context */ export declare function buildContextForProof(version: string, presSpec: PresentationSpecification, context?: string | Uint8Array): Uint8Array; export declare class Presentation extends Versioned { readonly spec: PresentationSpecification; readonly proof: CompositeProof; readonly attributeCiphertexts?: Map; readonly blindedAttributeCiphertexts?: AttributeCiphertexts[]; readonly context?: string; readonly nonce?: Uint8Array; constructor(version: string, spec: PresentationSpecification, proof: CompositeProof, attributeCiphertexts?: Map, context?: string, nonce?: Uint8Array, blindedAttributeCiphertexts?: AttributeCiphertexts[]); /** * * @param credentialVerifParams - Map of verification parameters for credentials in the presentation. The key of the map * is the credential index. Can also take array of keys in the order of credentials in the presentation for supporting old API but this will * be removed in future. The verification param could be a public key or secret key. Certain kinds of credentials don't require * either for (partial) verification but will require for full verification * @param accumulatorVerifParams - Mapping credential index -> accumulator verification parameters. * @param predicateParams - Setup params for various predicates * @param circomOutputs - Values for the outputs variables of the Circom programs used for predicates. They key of the map * is the credential index * @param blindedAttributesCircomOutputs - Outputs for Circom predicates on blinded attributes * @param circomOutputsMultiCred - Values for the outputs variables of the Circom programs spanning over multiple credential attributes */ verify(credentialVerifParams: Map | CredentialVerificationParam[], accumulatorVerifParams?: Map, predicateParams?: Map, circomOutputs?: Map, blindedAttributesCircomOutputs?: Uint8Array[][], circomOutputsMultiCred?: Uint8Array[][]): VerifyResult; /** * Get keyed proofs for credentials and there statuses where applicable. * @returns - The key in the returned map is the credential index */ getKeyedProofs(): Map; /** * Encode the revealed attributes of the presented credential * @param credIdx * @param presentedCred * @param presentedCredSchema * @param flattenedNames * @param presVersionGt6 * @param useConstantTimeEncoding */ private static encodeRevealed; private processAttributeInequalities; private processBoundChecks; private processVerifiableEncs; private processCircomPredicates; private static createCircomStatement; toJSON(): object; static ciphertextToBs58(v: object, ret: object, version: string): void; static ciphertextFromBs58(v: object, ret: AttributeCiphertexts, version: string): void; private static addLegoVerifyingKeyToTracker; static addBppSetupParamsToTracker(paramId: string, param: PredicateParamType | undefined, setupParamsTrk: SetupParamsTracker, statementIdx: number): void; static addPedCommG1ToTracker(paramId: string, param: PredicateParamType | undefined, setupParamsTrk: SetupParamsTracker, statementIdx: number): number; static publicInequalityStatement(ineq: Uint8Array, setupParamsTrk: SetupParamsTracker, statementIdx: number, paramId?: string, param?: PredicateParamType): Uint8Array; static addSmcSetupParamsToTracker(paramId: string, param: PredicateParamType | undefined, setupParamsTrk: SetupParamsTracker, statementIdx: number): void; private static addSmcKVVerifierParamsToTracker; static fromJSON(j: object): Presentation; } //# sourceMappingURL=presentation.d.ts.map