diff --git a/crates/contexts/linked-vp-v1.jsonld b/crates/contexts/linked-vp-v1.jsonld new file mode 100644 index 000000000..0adf8237d --- /dev/null +++ b/crates/contexts/linked-vp-v1.jsonld @@ -0,0 +1,9 @@ +{ + "@context": [ + { + "@version": 1.1, + "@protected": true, + "LinkedVerifiablePresentation": "https://identity.foundation/linked-vp/contexts/v1#LinkedVerifiablePresentation" + } + ] +} diff --git a/crates/contexts/src/lib.rs b/crates/contexts/src/lib.rs index 59d1c7633..257042584 100644 --- a/crates/contexts/src/lib.rs +++ b/crates/contexts/src/lib.rs @@ -73,6 +73,7 @@ pub const DID_CONFIGURATION_V0_0: &str = include_str!("../did-configuration-v0.0 /// pub const DID_CONFIGURATION_V1: &str = include_str!("../did-configuration-v1.jsonld"); pub const JFF_VC_EDU_PLUGFEST_2022_2: &str = include_str!("../jff-vc-edu-plugfest-2-context.json"); +pub const LINKED_VP_V1: &str = include_str!("../linked-vp-v1.jsonld"); pub const TZ_V2: &str = include_str!("../tz-2021-v2.jsonld"); pub const TZVM_V1: &str = include_str!("../tzvm-2021-v1.jsonld"); diff --git a/crates/contexts/update.sh b/crates/contexts/update.sh index d336a07d0..1945d88b6 100755 --- a/crates/contexts/update.sh +++ b/crates/contexts/update.sh @@ -28,5 +28,6 @@ exec curl \ https://w3id.org/vc/status-list/2021/v1 -o w3id-vc-status-list-2021-v1.jsonld \ https://demo.didkit.dev/2022/cacao-zcap/contexts/v1.json -o cacao-zcap-v1.jsonld \ https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/jff-vc-edu-plugfest-1-context.json -o jff-vc-edu-plugfest-1-context.json \ + https://identity.foundation/linked-vp/contexts/v1 -o linked-vp-v1.jsonld \ https://identity.foundation/.well-known/did-configuration/v1 -o did-configuration-v1.jsonld \ -L diff --git a/crates/json-ld/src/contexts.rs b/crates/json-ld/src/contexts.rs index b22e5c752..eb049c343 100644 --- a/crates/json-ld/src/contexts.rs +++ b/crates/json-ld/src/contexts.rs @@ -63,6 +63,7 @@ pub const DID_CONFIGURATION_V1_CONTEXT: &Iri = iri!("https://identity.foundation/.well-known/did-configuration/v1"); pub const JFF_VC_EDU_PLUGFEST_2022_2_CONTEXT: &Iri = iri!("https://purl.imsglobal.org/spec/ob/v3p0/context.json"); +pub const LINKED_VP_V1_CONTEXT: &Iri = iri!("https://identity.foundation/linked-vp/contexts/v1"); /// Load a remote context from its static definition. fn load_static_context(iri: &Iri, content: &str) -> RemoteDocument { @@ -228,6 +229,10 @@ lazy_static::lazy_static! { JFF_VC_EDU_PLUGFEST_2022_2_CONTEXT, ssi_contexts::JFF_VC_EDU_PLUGFEST_2022_2 ); + pub static ref LINKED_VP_V1_CONTEXT_DOCUMENT: RemoteDocument = load_static_context( + LINKED_VP_V1_CONTEXT, + ssi_contexts::LINKED_VP_V1 + ); } macro_rules! iri_match { @@ -309,6 +314,7 @@ impl Loader for StaticLoader { JFF_VC_EDU_PLUGFEST_2022_2_CONTEXT => { Ok(JFF_VC_EDU_PLUGFEST_2022_2_CONTEXT_DOCUMENT.clone()) }, + LINKED_VP_V1_CONTEXT => { Ok(LINKED_VP_V1_CONTEXT_DOCUMENT.clone()) }, _ as iri => Err(LoadError::new(iri.to_owned(), UnknownContext)) } }