Skip to content

Commit

Permalink
Changelog + proof version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenbf committed Oct 8, 2024
1 parent 2643089 commit ce0a497
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- `get_encryption_keys`, `decrypt_amount`, and `combine_encrypted_amounts` functions for handling encrypted amounts.
- `prove_statement_v1` for producing proofs related to Concordium identities.
- `prove_identity_statement` for producing proofs related to Concordium identities.
- `Network` type to represent different concordium network variants.
- `AttributeTag` to represent the different identity attribute variants.
- A number of types including `VerifiablePresentation`, `Web3IdCredential`, `VerifiableCredentialStatement`,
Expand Down
8 changes: 6 additions & 2 deletions src/id_proofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,20 @@ pub fn prove_identity_statement(
credential: cred_id,
};

let proof_version = ProofVersion::Version2;
let proof = statement
.prove(
ProofVersion::Version2,
proof_version,
&global_context,
challenge.as_ref(),
&id_object.alist,
&credential_context,
)
.context("Could not produce proof.")
.map_err(|e| e.to_call_failed(fn_name.to_string()))?;
VersionedIdentityProof::try_from(concordium_base::common::Versioned::new(VERSION_0, proof))

// We tag the proof with version 1 for `Versioned`, as 0 is used for `Proof` produced with
// `ProofVersion::Version1`
VersionedIdentityProof::try_from(concordium_base::common::Versioned::new((proof_version as u32).into(), proof))
.map_err(|e| e.to_call_failed(fn_name.to_string()))
}

0 comments on commit ce0a497

Please sign in to comment.