From 91dfb2da23bbf668ad23ff69182e679ee2817eda Mon Sep 17 00:00:00 2001 From: Simon Bihel Date: Wed, 10 Jul 2024 13:23:46 +0100 Subject: [PATCH] Change created to DateTimeStamp --- crates/claims/crates/data-integrity/core/src/options.rs | 8 ++++---- .../data-integrity/core/src/proof/configuration/mod.rs | 6 +++--- .../core/src/proof/configuration/reference.rs | 4 ++-- crates/claims/crates/data-integrity/core/src/proof/mod.rs | 4 ++-- .../crates/data-integrity/core/src/proof/reference.rs | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/claims/crates/data-integrity/core/src/options.rs b/crates/claims/crates/data-integrity/core/src/options.rs index e81058f2a..8b06798bb 100644 --- a/crates/claims/crates/data-integrity/core/src/options.rs +++ b/crates/claims/crates/data-integrity/core/src/options.rs @@ -14,7 +14,7 @@ pub struct ProofOptions { /// Date a creation of the proof. #[serde(skip_serializing_if = "Option::is_none")] - pub created: Option, + pub created: Option, /// Verification method. pub verification_method: Option>, @@ -74,7 +74,7 @@ impl Default for ProofOptions { fn default() -> Self { Self { context: None, - created: Some(xsd_types::DateTime::now_ms()), + created: Some(xsd_types::DateTimeStamp::now_ms()), verification_method: None, proof_purpose: ProofPurpose::default(), expires: None, @@ -89,7 +89,7 @@ impl Default for ProofOptions { impl ProofOptions { pub fn new( - created: xsd_types::DateTime, + created: xsd_types::DateTimeStamp, verification_method: ReferenceOrOwned, proof_purpose: ProofPurpose, options: T, @@ -111,7 +111,7 @@ impl ProofOptions { pub fn from_method_and_options(verification_method: ReferenceOrOwned, options: T) -> Self { Self { context: None, - created: Some(xsd_types::DateTime::now_ms()), + created: Some(xsd_types::DateTimeStamp::now_ms()), verification_method: Some(verification_method), proof_purpose: ProofPurpose::default(), expires: None, diff --git a/crates/claims/crates/data-integrity/core/src/proof/configuration/mod.rs b/crates/claims/crates/data-integrity/core/src/proof/configuration/mod.rs index c1e2f90b1..ed58f5edf 100644 --- a/crates/claims/crates/data-integrity/core/src/proof/configuration/mod.rs +++ b/crates/claims/crates/data-integrity/core/src/proof/configuration/mod.rs @@ -31,7 +31,7 @@ pub struct ProofConfiguration { /// Date a creation of the proof. #[serde(skip_serializing_if = "Option::is_none")] - pub created: Option, + pub created: Option, /// Verification method. #[serde(serialize_with = "S::serialize_verification_method_ref")] @@ -90,7 +90,7 @@ pub struct ProofConfiguration { impl ProofConfiguration { pub fn new( type_: S, - created: xsd_types::DateTime, + created: xsd_types::DateTimeStamp, verification_method: ReferenceOrOwned, proof_purpose: ProofPurpose, options: S::ProofOptions, @@ -118,7 +118,7 @@ impl ProofConfiguration { Self { context: None, type_, - created: Some(xsd_types::DateTime::now_ms()), + created: Some(xsd_types::DateTimeStamp::now_ms()), verification_method, proof_purpose: ProofPurpose::default(), expires: None, diff --git a/crates/claims/crates/data-integrity/core/src/proof/configuration/reference.rs b/crates/claims/crates/data-integrity/core/src/proof/configuration/reference.rs index 1b35e9c34..e2c9f5ece 100644 --- a/crates/claims/crates/data-integrity/core/src/proof/configuration/reference.rs +++ b/crates/claims/crates/data-integrity/core/src/proof/configuration/reference.rs @@ -20,7 +20,7 @@ pub struct ProofConfigurationRef<'a, S: CryptographicSuite> { pub type_: &'a S, #[serde(skip_serializing_if = "Option::is_none")] - pub created: Option, + pub created: Option, #[serde(serialize_with = "S::serialize_verification_method_ref_ref")] pub verification_method: ReferenceOrOwnedRef<'a, S::VerificationMethod>, @@ -141,7 +141,7 @@ pub struct ProofConfigurationRefWithoutOptions<'a, S: CryptographicSuite> { pub type_: &'a S, #[serde(skip_serializing_if = "Option::is_none")] - pub created: Option, + pub created: Option, #[serde(serialize_with = "S::serialize_verification_method_ref_ref")] pub verification_method: ReferenceOrOwnedRef<'a, S::VerificationMethod>, diff --git a/crates/claims/crates/data-integrity/core/src/proof/mod.rs b/crates/claims/crates/data-integrity/core/src/proof/mod.rs index 7ee9b9c5e..e905fa950 100644 --- a/crates/claims/crates/data-integrity/core/src/proof/mod.rs +++ b/crates/claims/crates/data-integrity/core/src/proof/mod.rs @@ -49,7 +49,7 @@ pub struct Proof { /// Date a creation of the proof. #[serde(skip_serializing_if = "Option::is_none")] - pub created: Option, + pub created: Option, /// Verification method. #[serde(serialize_with = "S::serialize_verification_method_ref")] @@ -113,7 +113,7 @@ impl Proof { /// Creates a new proof. pub fn new( type_: T, - created: xsd_types::DateTime, + created: xsd_types::DateTimeStamp, verification_method: ReferenceOrOwned, proof_purpose: ProofPurpose, options: T::ProofOptions, diff --git a/crates/claims/crates/data-integrity/core/src/proof/reference.rs b/crates/claims/crates/data-integrity/core/src/proof/reference.rs index 3ed59a2b3..be2818043 100644 --- a/crates/claims/crates/data-integrity/core/src/proof/reference.rs +++ b/crates/claims/crates/data-integrity/core/src/proof/reference.rs @@ -9,7 +9,7 @@ pub struct ProofRef<'a, S: CryptographicSuite> { pub type_: &'a S, - pub created: Option, + pub created: Option, pub verification_method: ReferenceOrOwnedRef<'a, S::VerificationMethod>,