diff --git a/Cargo.lock b/Cargo.lock index 078eb1132..7f18868ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1841,7 +1841,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -2354,7 +2354,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3500,7 +3500,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -4290,7 +4290,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -5220,17 +5220,26 @@ name = "taceo-oprf" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be862ba49094098f945f1375f704a2c47b4e267a6e564462a43ad142b4b1469e" +dependencies = [ + "taceo-oprf-types 0.10.1", +] + +[[package]] +name = "taceo-oprf" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f2d8a89181967875c3e130dca3d5e906e720b30568b82c68653c3048b1bb02" dependencies = [ "taceo-oprf-client", "taceo-oprf-core", - "taceo-oprf-types", + "taceo-oprf-types 0.11.0", ] [[package]] name = "taceo-oprf-client" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "696c4b03e8b570d1d0486f7bc2273b85951b316d7f720fc2f95e79f2b053f649" +checksum = "b1624edfd12063146c6f3614c659cb178a8ae82bfac72b751a72133136000866" dependencies = [ "ark-ec", "ciborium", @@ -5241,7 +5250,7 @@ dependencies = [ "serde", "taceo-ark-babyjubjub", "taceo-oprf-core", - "taceo-oprf-types", + "taceo-oprf-types 0.11.0", "taceo-poseidon2", "thiserror 2.0.18", "tokio", @@ -5293,6 +5302,27 @@ dependencies = [ "uuid", ] +[[package]] +name = "taceo-oprf-types" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b92ebe8693dfb75f2f1e7861785792747495f8f2be058ff07698f16046cb5fad" +dependencies = [ + "alloy", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "async-trait", + "eyre", + "http", + "serde", + "taceo-ark-babyjubjub", + "taceo-ark-serde-compat", + "taceo-circom-types", + "taceo-groth16-sol", + "taceo-oprf-core", + "uuid", +] + [[package]] name = "taceo-poseidon2" version = "0.2.1" @@ -5333,7 +5363,7 @@ dependencies = [ "getrandom 0.4.1", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -6079,7 +6109,7 @@ dependencies = [ "sha2", "strum", "subtle", - "taceo-oprf", + "taceo-oprf 0.8.0", "thiserror 2.0.18", "tokio", "tokio-test", @@ -6305,7 +6335,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -6688,9 +6718,9 @@ dependencies = [ [[package]] name = "world-id-authenticator" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07d061f3e1150294b0eaab3c3a8311343c144995097c6f08cd7babbe8610faca" +checksum = "f1713b3c70d6f2822f8ec0c12e313a74616fce2aa86c5cb54a991d13be5fe625" dependencies = [ "alloy", "anyhow", @@ -6707,7 +6737,7 @@ dependencies = [ "taceo-ark-babyjubjub", "taceo-eddsa-babyjubjub", "taceo-groth16-material", - "taceo-oprf", + "taceo-oprf 0.10.0", "taceo-poseidon2", "thiserror 2.0.18", "tokio", @@ -6718,9 +6748,9 @@ dependencies = [ [[package]] name = "world-id-core" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88fbe3660167654a014924faeeec87d7aebb9ff13a43dbb51958045f0aa3ed6" +checksum = "c0f0b7dab893d2588e13b3d3a0c6259467c7079b7cbe4a41db5a6bf4a04f46be" dependencies = [ "taceo-eddsa-babyjubjub", "world-id-authenticator", @@ -6730,9 +6760,9 @@ dependencies = [ [[package]] name = "world-id-primitives" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022157c68f1c49bb3d7256b9199174d6de6cc9d4b07c5ea757f2f6b35597b4a2" +checksum = "8a38588112438f94966aef95559b48a0c3d4ae627c0ebc680ae4739ca0538c29" dependencies = [ "alloy", "alloy-primitives", @@ -6758,7 +6788,7 @@ dependencies = [ "taceo-eddsa-babyjubjub", "taceo-groth16-material", "taceo-groth16-sol", - "taceo-oprf", + "taceo-oprf 0.10.0", "taceo-poseidon2", "thiserror 2.0.18", "url", @@ -6767,9 +6797,9 @@ dependencies = [ [[package]] name = "world-id-proof" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "091e4902d84a827900db7f030fc6bb3f9705e0abe6d20aca943148727bb625b8" +checksum = "c0685fc6fcb0fef10a7caa80f7d4ac09727ee582934c2da39bdd82a423ab7abe" dependencies = [ "ark-bn254", "ark-ec", @@ -6785,7 +6815,7 @@ dependencies = [ "taceo-circom-types", "taceo-eddsa-babyjubjub", "taceo-groth16-material", - "taceo-oprf", + "taceo-oprf 0.10.0", "taceo-poseidon2", "tar", "thiserror 2.0.18", diff --git a/Cargo.toml b/Cargo.toml index 3895f85b3..8e302b56f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ alloy-core = { version = "1", default-features = false, features = [ ] } alloy-primitives = { version = "1", default-features = false } uniffi = { version = "0.31", features = ["tokio"] } -world-id-core = { version = "0.6", default-features = false } +world-id-core = { version = "0.7", default-features = false } # internal walletkit-core = { version = "0.11.1", path = "walletkit-core", default-features = false } diff --git a/walletkit-core/src/credential.rs b/walletkit-core/src/credential.rs index e478c7e48..4b72c297b 100644 --- a/walletkit-core/src/credential.rs +++ b/walletkit-core/src/credential.rs @@ -52,14 +52,10 @@ impl Credential { self.0.expires_at } - /// Returns the credential's `associated_data_hash` field element. - /// - /// This is a Poseidon2 commitment to the associated data (e.g. a PCP archive) - /// set by the issuer at issuance time. Returns `FieldElement::ZERO` if no - /// associated data was committed to. + /// Returns the associated-data commitment field element for this credential. #[must_use] - pub fn associated_data_hash(&self) -> FieldElement { - self.0.associated_data_hash.into() + pub fn associated_data_commitment(&self) -> FieldElement { + self.0.associated_data_commitment.into() } } diff --git a/walletkit-core/tests/proof_generation_integration.rs b/walletkit-core/tests/proof_generation_integration.rs index def118da1..1d9e3eb73 100644 --- a/walletkit-core/tests/proof_generation_integration.rs +++ b/walletkit-core/tests/proof_generation_integration.rs @@ -33,10 +33,9 @@ use alloy::signers::{local::PrivateKeySigner, SignerSync}; use alloy::sol; use alloy_primitives::U160; use eyre::{Context as _, Result}; -use taceo_oprf::types::OprfKeyId; use walletkit_core::storage::cache_embedded_groth16_material; use walletkit_core::{defaults::DefaultConfig, Authenticator, Environment}; -use world_id_core::primitives::{rp::RpId, FieldElement, Nullifier}; +use world_id_core::primitives::{rp::RpId, FieldElement, Nullifier, OprfKeyId}; use world_id_core::{ requests::{ProofRequest, RequestItem, RequestVersion}, Authenticator as CoreAuthenticator, EdDSAPrivateKey,