import { KBUniversalMembershipWitness, KBUniversalNonMembershipWitness } from '../accumulator'; import { KBUniversalAccumulatorValue } from '../accumulator'; import { BBSPublicKey, BBSSecretKey, BBSSignature, BBSSignatureParams } from '../bbs'; import { LegoProvingKey, LegoProvingKeyUncompressed } from '../legosnark'; import { SaverChunkedCommitmentKey, SaverCiphertext, SaverEncryptionGens, SaverEncryptionGensUncompressed, SaverEncryptionKey, SaverProvingKey, SaverProvingKeyUncompressed } from '../saver'; import { R1CS } from 'crypto-wasm-new'; import { BBSPlusPublicKeyG2, BBSPlusSecretKey, BBSPlusSignatureG1, BBSPlusSignatureParamsG1 } from '../bbs-plus'; import { PSPublicKey, PSSecretKey, PSSignature, PSSignatureParams } from '../ps'; import { AccumulatorParams, AccumulatorPublicKey, AccumulatorSecretKey, MembershipProvingKey, NonMembershipProvingKey, VBMembershipWitness, VBNonMembershipWitness } from '../accumulator'; import { BoundCheckBppParams, BoundCheckBppParamsUncompressed, BoundCheckSmcParams, BoundCheckSmcParamsUncompressed, BoundCheckSmcWithKVProverParams, BoundCheckSmcWithKVProverParamsUncompressed, BoundCheckSmcWithKVVerifierParams, BoundCheckSmcWithKVVerifierParamsUncompressed } from '../bound-check'; import { PederCommKey, PederCommKeyUncompressed } from '../ped-com'; import { BBDT16Mac, BBDT16MacParams, BBDT16MacSecretKey } from '../bbdt16-mac'; /** * Reference to an attribute of a credential. The first item of the pair is the credential index in the presentation and the * second item is the fully qualified attribute name. */ export type AttributeRef = [number, string]; /** * Array of references to attributes that are equal */ export type AttributeEquality = AttributeRef[]; /** * All possible predicate parameter types */ export type PredicateParamType = LegoProvingKey | LegoProvingKeyUncompressed | SaverProvingKey | SaverProvingKeyUncompressed | SaverEncryptionKey | SaverChunkedCommitmentKey | R1CS | Uint8Array | BoundCheckBppParams | BoundCheckBppParamsUncompressed | BoundCheckSmcParams | BoundCheckSmcParamsUncompressed | BoundCheckSmcWithKVProverParams | BoundCheckSmcWithKVProverParamsUncompressed | BoundCheckSmcWithKVVerifierParams | BoundCheckSmcWithKVVerifierParamsUncompressed; /** * All possible bound check parameter types */ export type BoundCheckParamType = LegoProvingKey | LegoProvingKeyUncompressed | BoundCheckBppParams | BoundCheckBppParamsUncompressed | BoundCheckSmcParams | BoundCheckSmcParamsUncompressed | BoundCheckSmcWithKVProverParams | BoundCheckSmcWithKVProverParamsUncompressed | BoundCheckSmcWithKVVerifierParams | BoundCheckSmcWithKVVerifierParamsUncompressed; /** * The first item is the fully qualified attribute name */ export type BlindedAttributeEquality = [string, AttributeRef[]]; export type DateType = Date | string; export type BoundType = number | DateType; /** * The 1st element is an array of all attribute names as flattened and sorted and 2nd element is an array of types of those attributes * in the same order */ export type FlattenedSchema = [string[], object[]]; export type AttributeCiphertexts = { [key: string]: object | SaverCiphertext | SaverCiphertext[]; }; export type SecretKey = BBSSecretKey | BBSPlusSecretKey | PSSecretKey | BBDT16MacSecretKey; export type PublicKey = BBSPublicKey | BBSPlusPublicKeyG2 | PSPublicKey; export type Signature = BBSSignature | BBSPlusSignatureG1 | PSSignature | BBDT16Mac; export type SignatureParams = BBSSignatureParams | BBSPlusSignatureParamsG1 | PSSignatureParams | BBDT16MacParams; export type SignatureParamsClass = typeof BBSSignatureParams | typeof BBSPlusSignatureParamsG1 | typeof PSSignatureParams | typeof BBDT16MacParams; /** * A parameter to verify the credential. This could be a public key or the secret key. Secret key is used to verify credentials * in situations where the issuer and verifier are the same entity (or share the secret key). Thus, such credentials are not * publicly verifiable */ export type CredentialVerificationParam = PublicKey | BBDT16MacSecretKey; /** * A parameter to verify the proof of accumulator (non)membership in zero-knowledge. This could be a public key or the secret key. * Secret key is used to verify the proof in situations where the revocation authority and verifier are the same entity (or share the secret key). * Thus, such proofs are not publicly verifiable */ export type AccumulatorVerificationParam = AccumulatorPublicKey | AccumulatorSecretKey; export type AccumulatorWitnessType = VBMembershipWitness | VBNonMembershipWitness | KBUniversalMembershipWitness | KBUniversalNonMembershipWitness; export type AccumulatorValueType = Uint8Array | KBUniversalAccumulatorValue; export declare const VERSION_STR = "version"; export declare const CRYPTO_VERSION_STR = "cryptoVersion"; export declare const SCHEMA_STR = "credentialSchema"; export declare const JSON_SCHEMA_STR = "jsonSchema"; export declare const FULL_SCHEMA_STR = "fullJsonSchema"; export declare const SCHEMA_TYPE_STR = "JsonSchemaValidator2018"; export declare const SCHEMA_PROPS_STR = "properties"; export declare const SCHEMA_DETAILS_STR = "details"; export declare const SUBJECT_STR = "credentialSubject"; export declare const STATUS_STR = "credentialStatus"; export declare const TYPE_STR = "type"; export declare const VB_ACCUMULATOR_22 = "DockVBAccumulator2022"; export declare const KB_UNI_ACCUMULATOR_24 = "DockKBUniversalAccumulator2024"; export declare const ID_STR = "id"; export declare const REV_CHECK_STR = "revocationCheck"; export declare const REV_ID_STR = "revocationId"; export declare const MEM_CHECK_STR = "membership"; export declare const NON_MEM_CHECK_STR = "non-membership"; export declare const MEM_CHECK_KV_STR = "membership-kv"; export declare const NON_MEM_CHECK_KV_STR = "non-membership-kv"; export declare const PROOF_STR = "proof"; export declare const BBS_CRED_PROOF_TYPE = "Bls12381BBSSignatureDock2023"; export declare const BBS_BLINDED_CRED_PROOF_TYPE = "Bls12381BlindedBBSSignatureDock2023"; export declare const BBS_PLUS_CRED_PROOF_TYPE = "Bls12381BBS+SignatureDock2022"; export declare const BBS_PLUS_BLINDED_CRED_PROOF_TYPE = "Bls12381BlindedBBS+SignatureDock2023"; export declare const PS_CRED_PROOF_TYPE = "Bls12381PSSignatureDock2023"; export declare const BBDT16_CRED_PROOF_TYPE = "Bls12381BBDT16MACDock2024"; export declare const BBDT16_BLINDED_CRED_PROOF_TYPE = "Bls12381BlindedBBDT16MACDock2024"; export declare const LEGOGROTH16 = "LegoGroth16"; export declare const SAVER = "SAVER"; export declare const BPP = "Bulletproofs++"; export declare const SMC = "Set-membership-check"; export declare const SMC_KV = "Set-membership-check-with-keyed-verification"; export declare const UPROVE = "UProve"; /** Label used for generating BBS+ signature parameters */ export declare const BBS_SIGNATURE_PARAMS_LABEL = "DockBBSSignature2023"; export declare const BBS_SIGNATURE_PARAMS_LABEL_BYTES: Uint8Array; /** Label used for generating BBS+ signature parameters */ export declare const BBS_PLUS_SIGNATURE_PARAMS_LABEL = "DockBBS+Signature2022"; export declare const BBS_PLUS_SIGNATURE_PARAMS_LABEL_BYTES: Uint8Array; /** Label used for generating BBDT16 MAC parameters */ export declare const BBDT16_MAC_PARAMS_LABEL = "DockBBDT16MAC"; export declare const BBDT16_MAC_PARAMS_LABEL_BYTES: Uint8Array; /** Label used for generating PS signature parameters */ export declare const PS_SIGNATURE_PARAMS_LABEL = "DockPSSignature2023"; export declare const PS_SIGNATURE_PARAMS_LABEL_BYTES: Uint8Array; /** Label used for generating accumulator parameters */ export declare const ACCUMULATOR_PARAMS_LABEL = "DockVBAccumulator2022"; export declare const ACCUMULATOR_PARAMS_LABEL_BYTES: Uint8Array; /** Label used for generating accumulator proving key */ export declare const ACCUMULATOR_PROVING_KEY_LABEL = "DockVBAccumulatorProvingKey2022"; export declare const ACCUMULATOR_PROVING_KEY_LABEL_BYTES: Uint8Array; /** Label used for generating SAVER encryption generators */ export declare const SAVER_ENCRYPTION_GENS_LABEL = "DockSAVEREncryptionGens2022"; export declare const SAVER_ENCRYPTION_GENS_LABEL_BYTES: Uint8Array; /** Label used for generating Bulletproofs++ generators */ export declare const BPP_GENS_LABEL = "DockBulletproofs++2023"; export declare const BPP_GENS_LABEL_BYTES: Uint8Array; /** Label used for generating commitment key for proving inequality */ export declare const INEQUALITY_COMM_KEY_LABEL = "DockInequalityDiscreteLog2023"; export declare const INEQUALITY_COMM_KEY_LABEL_BYTES: Uint8Array; /** Schema id for an embedded schema and when no explicit id is provided */ export declare const EMPTY_SCHEMA_ID = "data:application/json;charset=utf-8,"; /** Mandatory fields of a schema when serialized */ export declare const SCHEMA_FIELDS: string[]; export declare function dockAccumulatorParams(): AccumulatorParams; export declare function dockAccumulatorMemProvingKey(): MembershipProvingKey; export declare function dockAccumulatorNonMemProvingKey(): NonMembershipProvingKey; export declare function dockSaverEncryptionGens(): SaverEncryptionGens; export declare function dockSaverEncryptionGensUncompressed(): SaverEncryptionGensUncompressed; export declare function dockBoundCheckBppSetup(): BoundCheckBppParams; export declare function dockBoundCheckBppSetupUncompressed(): BoundCheckBppParamsUncompressed; export declare function dockInequalityCommKey(): PederCommKey; export declare function dockInequalityCommKeyUncompressed(): PederCommKeyUncompressed; /** * Possible signature types */ export declare enum SignatureType { Bbs = "Bls12381BBSSignatureDock2023", BbsPlus = "Bls12381BBS+SignatureDock2022", Ps = "Bls12381PSSignatureDock2023", Bbdt16 = "Bls12381BBDT16MACDock2024" } /** * Possible blind-signature types */ export declare enum BlindSignatureType { Bbs = "Bls12381BlindedBBSSignatureDock2023", BbsPlus = "Bls12381BlindedBBS+SignatureDock2023", Bbdt16 = "Bls12381BlindedBBDT16MACDock2024" } /** * Possible revocation protocols */ export declare enum RevocationStatusProtocol { Vb22 = "DockVBAccumulator2022", KbUni24 = "DockKBUniversalAccumulator2024" } /** * Possible bound check protocols */ export declare enum BoundCheckProtocol { Legogroth16 = "LegoGroth16", Bpp = "Bulletproofs++", Smc = "Set-membership-check", SmcKV = "Set-membership-check-with-keyed-verification" } /** * Possible verifiable encryption protocols */ export declare enum VerifiableEncryptionProtocol { Saver = "SAVER" } export declare enum CircomProtocol { Legogroth16 = "LegoGroth16" } export declare enum InequalityProtocol { Uprove = "UProve" } //# sourceMappingURL=types-and-consts.d.ts.map