Optional_contextOptional_nonceTo prevent replay attack
Attributes proved equal in zero knowledge
Attributes proved inequal to a public value in zero knowledge. An attribute can be proven inequal to any number of values The 2nd item, i.e. Uint8Array in the pair is the encoded value of the public value with which inequality is proved
OptionalblindBlinded credential request. Stores SignatureParams as appropriately sized params are created by the request
builder already so not creating it again
The 2nd item, i.e. Uint8Array in the pair is the encoded value of the public value with which inequality is proved
Optionalblinding?: Uint8ArrayArguments required to calculate the attribute bound pseudonyms to be presented
Bounds on attribute. The key of the map is the credential index and for the inner map is the attribute and value of map denotes min, max, an identifier of the setup parameters for the protocol and the protocol name. An attribute can have many bound checks.
Predicates expressed as Circom programs over attributes of a single credential. For each credential, store a public, private variables, circuit id (used to fetch R1CS, WASM bytes) and attributes used in circuit
Predicates expressed as Circom programs over attributes of multiple credentials.
Each credential is referenced by its index in this array
Each credential has only one accumulator for status
Parameters for predicates like snark proving key for bound check, verifiable encryption, Circom program
OptionalproofAttributes revealed from each credential, key of the map is the credential index
Arguments required to calculate the pseudonyms to be presented
Verifiable encryption of attributes. The key of the map is the credential index and for the inner map is the attribute and value of map denotes the setup parameters for the protocol and the protocol name. An attribute can have many verifiable encryptions.
StaticVERSIONFollows semver and must be updated accordingly when the logic of this class changes or the underlying crypto changes.
Add accumulator value, witness and public key for proving credential status.
OptionalaccumPublicKey: AccumulatorPublicKeyAdd a credential to this presentation. This will result in a proof of possession of this credential being created
Optionalpk: PublicKeyOnly certain kinds of credentials need a public key for creating presentation
Enforce equality between attributes of the credential without revealing them.
Rest...equality: AttributeEqualityArray of reference to attribute where each reference is a pair with 1st item being credential index and 2nd being attribute index in the flattened attribute list.
Enforce inequality with a public value on a credential attribute
The public value that the attribute should be unequal to, i.e. value of attribute attributeName != inEqualTo
OptionalparamId: stringIf absent, the default commitment key is used
Optionalparam: PederCommKeyUncompressed | PederCommKeyEnforce bounds on given attribute from given credential index. The attribute value should lie in [min, max)
Nested attribute names use the "dot" separator
OptionalparamId: stringAn identifier, unique in the context of this builder that identifies a param. If absent, transparent range proof (Bulletproofs++) is used
Optionalparam: BoundCheckParamTypeThis is optional because if the param is already added in previous call to enforceBounds,
then it shouldn't be passed. This is done to avoid copying/passing large objects in memory.
Enforce a predicate written as a Circom program over a credential's attributes
The credential index whose attributes are used as witness in the Circom program
Mapping of private variables from Circom program to attribute names. A variable can be a single value or an array and thus can correspond to a single attribute or array of attributes. Is an array of pairs where the first item of pair is the private variable name and the second item is the attribute name(s)
Mapping of public variables from Circom program to publicly known values. Is an array of pairs where the first item of pair is the public variable name and the second item is the value as a bytearray or array of bytearrays
Optionalr1cs: R1CS | ParsedR1CSFileOptionalwasmBytes: Uint8ArrayOptionalprovingKey: LegoProvingKeyUncompressed | LegoProvingKeyEnforce a predicate written as a Circom program over a many credentials' attributes
Mapping of private variables from Circom program to pairs where each pair corresponds to a credential attribute. The 1st item of the pair is the credential index and 2nd item is the attribute name in that credential
Mapping of public variables from Circom program to its corresponding values
Optionalr1cs: R1CS | ParsedR1CSFileOptionalwasmBytes: Uint8ArrayOptionalprovingKey: LegoProvingKeyUncompressed | LegoProvingKeyCreate a presentation
Optionalval: PredicateParamTypeNested attribute names use the "dot" separator
An identifier, unique in the context of this builder that identifies a commitment key.
An identifier, unique in the context of this builder that identifies an encryption key.
An identifier, unique in the context of this builder that identifies a snark proving key.
OptionalcommKey: SaverChunkedCommitmentKeyUncompressed | SaverChunkedCommitmentKeyThis is optional because if the commitment key is already added in previous call to verifiablyEncrypt,
then it shouldn't be passed. This is done to avoid copying/passing large objects in memory.
OptionalencryptionKey: SaverEncryptionKeyUncompressed | SaverEncryptionKeyThis is optional because if the encryption key is already added in previous call to verifiablyEncrypt,
then it shouldn't be passed. This is done to avoid copying/passing large objects in memory.
OptionalsnarkPk: SaverProvingKeyUncompressed | SaverProvingKeyThis is optional because if the snark proving key is already added in previous call to verifiablyEncrypt,
then it shouldn't be passed. This is done to avoid copying/passing large objects in memory.
StaticenforceOptionalparamId: stringOptionalparam: PederCommKeyUncompressed | PederCommKeyStaticprocessProcess bounds and the corresponding params when enforcing bound check on an attribute.
the object storing all the predicate params. Will be updates
The map of attribute name to bounds. Will be updated.
OptionalparamId: stringOptionalparam: BoundCheckParamTypeStaticprocessOptionalcommKey: SaverChunkedCommitmentKeyUncompressed | SaverChunkedCommitmentKeyOptionalencryptionKey: SaverEncryptionKeyUncompressed | SaverEncryptionKeyOptionalsnarkPk: SaverProvingKeyUncompressed | SaverProvingKeyStaticr1csStaticwasm
This can specify the reason why the proof was created, or date of the proof, or self-attested attributes (as JSON string), etc