Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion bindings/grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions bindings/wasm/identity_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
16 changes: 4 additions & 12 deletions identity_credential/src/validator/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ 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.
///
/// 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.
Expand All @@ -23,35 +25,25 @@ 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,
/// Declares that the subject is not required to have any kind of relationship to the holder.
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 {
Expand Down
4 changes: 2 additions & 2 deletions identity_iota/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
16 changes: 8 additions & 8 deletions identity_iota_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions identity_jose/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
9 changes: 2 additions & 7 deletions identity_jose/src/jws/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<https://www.rfc-editor.org/rfc/rfc7515#section-3.1>).
#[default]
Compact,
/// General JWS JSON Serialization (<https://www.rfc-editor.org/rfc/rfc7515#section-7.2.1>).
General,
Expand All @@ -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
}
}
6 changes: 3 additions & 3 deletions identity_storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
9 changes: 2 additions & 7 deletions identity_verification/src/verification_method/method_scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -58,12 +59,6 @@ impl MethodScope {
}
}

impl Default for MethodScope {
fn default() -> Self {
Self::VerificationMethod
}
}

impl FromStr for MethodScope {
type Err = Error;

Expand Down
Loading