Skip to content

Commit

Permalink
Use VCDM v2.0 with status lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
timothee-haudebourg committed Jun 25, 2024
1 parent 957b6bd commit 72df756
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use ssi_json_ld::{
AnyJsonLdEnvironment, CompactJsonLd, JsonLdError, JsonLdNodeObject, JsonLdObject,
};
use ssi_jws::{CompactJWS, InvalidCompactJWS, JWSVerifier};
use ssi_vc::{json::JsonCredentialTypes, Context, V2};
use ssi_vc::v2::{syntax::JsonCredentialTypes, Context};
use ssi_verification_methods::ssi_core::OneOrMany;

use crate::{
Expand All @@ -23,7 +23,7 @@ use super::BitstringStatusListEntry;
pub struct BitstringStatusListEntrySetCredential {
/// JSON-LD context.
#[serde(rename = "@context")]
pub context: Context<V2>,
pub context: Context,

/// Credential identifier.
#[serde(default, skip_serializing_if = "Option::is_none")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use ssi_json_ld::{
};
use ssi_jws::{CompactJWS, InvalidCompactJWS, JWSVerifier};
use ssi_vc::{
json::{JsonCredentialTypes, RequiredCredentialType},
Context, V2,
syntax::RequiredType,
v2::syntax::{Context, JsonCredentialTypes},
};

use crate::{EncodedStatusMap, FromBytes, FromBytesOptions};
Expand All @@ -25,16 +25,16 @@ pub const BITSTRING_STATUS_LIST_CREDENTIAL_TYPE: &str = "BitstringStatusListCred
#[derive(Debug, Clone, Copy)]
pub struct BitstringStatusListCredentialType;

impl RequiredCredentialType for BitstringStatusListCredentialType {
const REQUIRED_CREDENTIAL_TYPE: &'static str = BITSTRING_STATUS_LIST_CREDENTIAL_TYPE;
impl RequiredType for BitstringStatusListCredentialType {
const REQUIRED_TYPE: &'static str = BITSTRING_STATUS_LIST_CREDENTIAL_TYPE;
}

#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BitstringStatusListCredential {
/// JSON-LD context.
#[serde(rename = "@context")]
pub context: Context<V2>,
pub context: Context,

/// Credential identifier.
#[serde(default, skip_serializing_if = "Option::is_none")]
Expand Down

0 comments on commit 72df756

Please sign in to comment.