diff --git a/Cargo.toml b/Cargo.toml index 111f1b2d8..cf8196cfd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,9 +30,9 @@ exclude = ["bindings/wasm/identity_wasm", "bindings/grpc"] [workspace.dependencies] bls12_381_plus = { version = "0.8.17" } -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction" } -iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction_ts" } -product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "product_common" } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction" } +iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction_ts" } +product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "product_common" } serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } serde_json = { version = "1.0", default-features = false } oqs = { version = "0.10", default-features = false, features = ["sigs", "std", "vendored"] } diff --git a/bindings/grpc/Cargo.toml b/bindings/grpc/Cargo.toml index db7bcb106..7b0b41755 100644 --- a/bindings/grpc/Cargo.toml +++ b/bindings/grpc/Cargo.toml @@ -24,7 +24,7 @@ identity_iota = { path = "../../identity_iota", features = ["resolver", "sd-jwt" identity_jose = { path = "../../identity_jose" } identity_storage = { path = "../../identity_storage", features = ["memstore"] } identity_stronghold = { path = "../../identity_stronghold", features = ["send-sync-storage"] } -iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.9.2" } +iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.10.0" } iota-sdk-legacy = { package = "iota-sdk", version = "1.1.2", features = ["stronghold"] } prost = "0.13" rand = "0.8.5" diff --git a/bindings/wasm/identity_wasm/Cargo.toml b/bindings/wasm/identity_wasm/Cargo.toml index 7e65b01f6..061dba4bf 100644 --- a/bindings/wasm/identity_wasm/Cargo.toml +++ b/bindings/wasm/identity_wasm/Cargo.toml @@ -26,12 +26,12 @@ identity_eddsa_verifier = { path = "../../../identity_eddsa_verifier", default-f iota-caip = { git = "https://github.com/iotaledger/iota-caip.git", features = ["serde"] } # Remove iota-sdk dependency while working on issue #1445 iota-sdk = { version = "1.1.5", default-features = false, features = ["serde", "std"] } -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction", default-features = false } -iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction_ts" } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction", default-features = false } +iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction_ts" } js-sys = { version = "0.3.61" } json-proof-token = "0.4" proc_typescript = { version = "0.1.0", path = "./proc_typescript" } -product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "product_common", features = ["core-client", "transaction", "bindings", "gas-station", "default-http-client"] } +product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "product_common", features = ["core-client", "transaction", "bindings", "gas-station", "default-http-client"] } secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", default-features = false, tag = "v0.3.0" } serde = { version = "1.0", features = ["derive"] } serde-wasm-bindgen = "0.6.5" diff --git a/examples/Cargo.toml b/examples/Cargo.toml index f9d6d2611..9590264b8 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -12,11 +12,11 @@ identity_pqc_verifier = { path = "../identity_pqc_verifier", default-features = identity_storage = { path = "../identity_storage" } identity_stronghold = { path = "../identity_stronghold", default-features = false, features = ["send-sync-storage"] } iota-caip = { git = "https://github.com/iotaledger/iota-caip.git", features = ["iota", "resolver"] } -iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.9.2" } +iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.10.0" } iota-sdk-legacy = { package = "iota-sdk", version = "1.0", default-features = false, features = ["tls", "client", "stronghold"] } json-proof-token.workspace = true -notarization = { git = "https://github.com/iotaledger/notarization.git", tag = "v0.1.8", features = ["irl"] } -product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "product_common", features = ["core-client", "transaction"] } +notarization = { git = "https://github.com/iotaledger/notarization.git", tag = "v0.1.9", features = ["irl"] } +product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "product_common", features = ["core-client", "transaction"] } rand = "0.8.5" sd-jwt-payload = { version = "0.2.1", default-features = false, features = ["sha"] } secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", tag = "v0.3.0" } diff --git a/identity_credential/src/validator/options.rs b/identity_credential/src/validator/options.rs index 2661241ed..17331403e 100644 --- a/identity_credential/src/validator/options.rs +++ b/identity_credential/src/validator/options.rs @@ -8,6 +8,7 @@ use serde::Serialize; /// [`credentialStatus`](https://www.w3.org/TR/vc-data-model/#status). #[derive(Debug, Clone, Copy, PartialEq, Eq, serde_repr::Serialize_repr, serde_repr::Deserialize_repr)] #[repr(u8)] +#[derive(Default)] pub enum StatusCheck { /// Validate the status if supported, reject any unsupported /// [`credentialStatus`](https://www.w3.org/TR/vc-data-model/#status) types. @@ -15,6 +16,7 @@ pub enum StatusCheck { /// Only `RevocationBitmap2022` is currently supported. /// /// This is the default. + #[default] Strict = 0, /// Validate the status if supported, skip any unsupported /// [`credentialStatus`](https://www.w3.org/TR/vc-data-model/#status) types. @@ -23,22 +25,18 @@ pub enum StatusCheck { SkipAll = 2, } -impl Default for StatusCheck { - fn default() -> Self { - Self::Strict - } -} - /// Declares how credential subjects must relate to the presentation holder during validation. /// /// See also the [Subject-Holder Relationship](https://www.w3.org/TR/vc-data-model/#subject-holder-relationships) section of the specification. // Need to use serde_repr to make this work with duck typed interfaces in the Wasm bindings. #[derive(Debug, Clone, Copy, serde_repr::Serialize_repr, serde_repr::Deserialize_repr)] #[repr(u8)] +#[derive(Default)] pub enum SubjectHolderRelationship { /// The holder must always match the subject on all credentials, regardless of their [`nonTransferable`](https://www.w3.org/TR/vc-data-model/#nontransferable-property) property. /// This is the variant returned by [Self::default](Self::default()) and the default used in /// [`crate::validator::JwtPresentationValidationOptions`]. + #[default] AlwaysSubject = 0, /// The holder must match the subject only for credentials where the [`nonTransferable`](https://www.w3.org/TR/vc-data-model/#nontransferable-property) property is `true`. SubjectOnNonTransferable = 1, @@ -46,12 +44,6 @@ pub enum SubjectHolderRelationship { Any = 2, } -impl Default for SubjectHolderRelationship { - fn default() -> Self { - Self::AlwaysSubject - } -} - /// Declares when validation should return if an error occurs. #[derive(Clone, Copy, Debug, Serialize, Deserialize)] pub enum FailFast { diff --git a/identity_iota/Cargo.toml b/identity_iota/Cargo.toml index 3836ad1dd..0e6a5c88f 100644 --- a/identity_iota/Cargo.toml +++ b/identity_iota/Cargo.toml @@ -24,13 +24,13 @@ identity_verification = { version = "=1.7.0-beta.2", path = "../identity_verific iota_interaction.workspace = true [target.'cfg(target_arch = "wasm32")'.dependencies] -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction", default-features = false } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction", default-features = false } [dev-dependencies] # required for doc test anyhow = "1.0.64" identity_iota = { version = "=1.7.0-beta.2", path = "./", features = ["memstore"] } -iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.9.2" } +iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.10.0" } rand = "0.8.5" secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", tag = "v0.3.0" } tokio = { version = "1.46.1", features = ["full"] } diff --git a/identity_iota_core/Cargo.toml b/identity_iota_core/Cargo.toml index 7c63f5418..05b252046 100644 --- a/identity_iota_core/Cargo.toml +++ b/identity_iota_core/Cargo.toml @@ -24,7 +24,7 @@ num-derive = { version = "0.4", default-features = false } num-traits = { version = "0.2", default-features = false, features = ["std"] } once_cell = { version = "1.18", default-features = false, features = ["std"] } prefix-hex = { version = "0.7", default-features = false } -product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "product_common", default-features = false } +product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "product_common", default-features = false } ref-cast = { version = "1.0.14", default-features = false } serde.workspace = true serde_json.workspace = true @@ -46,16 +46,16 @@ secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", tag serde-aux = { version = "4.5.0", optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -iota-config = { git = "https://github.com/iotaledger/iota.git", package = "iota-config", tag = "v1.9.2", optional = true } -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction", optional = true } -iota_interaction_rust = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction_rust", optional = true } -iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.9.2", optional = true } -move-core-types = { git = "https://github.com/iotaledger/iota.git", package = "move-core-types", tag = "v1.9.2", optional = true } -shared-crypto = { git = "https://github.com/iotaledger/iota.git", package = "shared-crypto", tag = "v1.9.2", optional = true } +iota-config = { git = "https://github.com/iotaledger/iota.git", package = "iota-config", tag = "v1.10.0", optional = true } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction", optional = true } +iota_interaction_rust = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction_rust", optional = true } +iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.10.0", optional = true } +move-core-types = { git = "https://github.com/iotaledger/iota.git", package = "move-core-types", tag = "v1.10.0", optional = true } +shared-crypto = { git = "https://github.com/iotaledger/iota.git", package = "shared-crypto", tag = "v1.10.0", optional = true } tokio = { version = "1.46.1", default-features = false, features = ["macros", "sync", "rt", "process"] } [target.'cfg(target_arch = "wasm32")'.dependencies] -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction", default-features = false, optional = true } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction", default-features = false, optional = true } # Dependency iota_interaction_ts is always used on wasm32 platform. It is not controlled by the "iota-client" feature # because it's unclear how to implement this. wasm32 build will most probably always use the "iota-client" feature diff --git a/identity_jose/Cargo.toml b/identity_jose/Cargo.toml index a315b782b..c2fd24999 100644 --- a/identity_jose/Cargo.toml +++ b/identity_jose/Cargo.toml @@ -25,10 +25,10 @@ thiserror.workspace = true zeroize = { version = "1.6", default-features = false, features = ["std", "zeroize_derive"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction" } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction" } [target.'cfg(target_arch = "wasm32")'.dependencies] -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction", default-features = false } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction", default-features = false } [dev-dependencies] iota-crypto = { version = "0.23", features = ["ed25519", "random", "hmac"] } diff --git a/identity_jose/src/jws/format.rs b/identity_jose/src/jws/format.rs index 35c8d939c..49e9eb53c 100644 --- a/identity_jose/src/jws/format.rs +++ b/identity_jose/src/jws/format.rs @@ -2,9 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 /// The serialization format used for the JWS. -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Default)] pub enum JwsFormat { /// JWS Compact Serialization (). + #[default] Compact, /// General JWS JSON Serialization (). General, @@ -13,9 +14,3 @@ pub enum JwsFormat { /// Should be used for single signature or MAC use cases. Flatten, } - -impl Default for JwsFormat { - fn default() -> Self { - Self::Compact - } -} diff --git a/identity_storage/Cargo.toml b/identity_storage/Cargo.toml index e4e408027..853a604cd 100644 --- a/identity_storage/Cargo.toml +++ b/identity_storage/Cargo.toml @@ -38,17 +38,17 @@ tokio = { version = "1.46.1", default-features = false, features = ["macros", "s zkryptium = { workspace = true, optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction", optional = true } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "iota_interaction", default-features = false, optional = true } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "iota_interaction", default-features = false, optional = true } [dev-dependencies] identity_credential = { version = "=1.7.0-beta.2", path = "../identity_credential", features = ["revocation-bitmap"] } identity_ecdsa_verifier = { version = "=1.7.0-beta.2", path = "../identity_ecdsa_verifier", default-features = false, features = ["es256"] } identity_eddsa_verifier = { version = "=1.7.0-beta.2", path = "../identity_eddsa_verifier", default-features = false, features = ["ed25519"] } once_cell = { version = "1.18", default-features = false } -product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.4", package = "product_common", default-features = false } +product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.5", package = "product_common", default-features = false } tokio = { version = "1.46.1", default-features = false, features = ["macros", "sync", "rt"] } [features] diff --git a/identity_verification/src/verification_method/method_scope.rs b/identity_verification/src/verification_method/method_scope.rs index b7551b8b1..b5e50a5f3 100644 --- a/identity_verification/src/verification_method/method_scope.rs +++ b/identity_verification/src/verification_method/method_scope.rs @@ -15,9 +15,10 @@ use crate::verification_method::MethodRelationship; /// /// Can either refer to a generic method embedded in the verification method field, /// or to a verification relationship. -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)] +#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize, Default)] pub enum MethodScope { /// The scope of generic verification methods. + #[default] VerificationMethod, /// The scope of a specific [`MethodRelationship`]. VerificationRelationship(MethodRelationship), @@ -58,12 +59,6 @@ impl MethodScope { } } -impl Default for MethodScope { - fn default() -> Self { - Self::VerificationMethod - } -} - impl FromStr for MethodScope { type Err = Error;