Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(contexts): add did-configuration version 1 #547

Merged
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
12 changes: 12 additions & 0 deletions crates/contexts/did-configuration-v1.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"@context": [
{
"@version": 1.1,
"@protected": true,
"LinkedDomains": "https://identity.foundation/.well-known/resources/did-configuration/#LinkedDomains",
"DomainLinkageCredential": "https://identity.foundation/.well-known/resources/did-configuration/#DomainLinkageCredential",
"origin": "https://identity.foundation/.well-known/resources/did-configuration/#origin",
"linked_dids": "https://identity.foundation/.well-known/resources/did-configuration/#linked_dids"
}
]
}
2 changes: 2 additions & 0 deletions crates/contexts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ pub const CACAO_ZCAP_V1: &str = include_str!("../cacao-zcap-v1.jsonld");
/// <https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/jff-vc-edu-plugfest-1-context.json>
pub const JFF_VC_EDU_PLUGFEST_2022: &str = include_str!("../jff-vc-edu-plugfest-1-context.json");
pub const DID_CONFIGURATION_V0_0: &str = include_str!("../did-configuration-v0.0.jsonld");
/// <https://identity.foundation/.well-known/did-configuration/v1>
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 TZ_V2: &str = include_str!("../tz-2021-v2.jsonld");
Expand Down
1 change: 1 addition & 0 deletions crates/contexts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ 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/.well-known/did-configuration/v1 -o did-configuration-v1.jsonld \
-L
9 changes: 9 additions & 0 deletions crates/json-ld/src/contexts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ pub const JFF_VC_EDU_PLUGFEST_2022_CONTEXT: &Iri =
iri!("https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/jff-vc-edu-plugfest-1-context.json");
pub const DID_CONFIGURATION_V0_0_CONTEXT: &Iri =
iri!("https://identity.foundation/.well-known/contexts/did-configuration-v0.0.jsonld");
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");

Expand Down Expand Up @@ -218,6 +220,10 @@ lazy_static::lazy_static! {
DID_CONFIGURATION_V0_0_CONTEXT,
ssi_contexts::DID_CONFIGURATION_V0_0
);
pub static ref DID_CONFIGURATION_V1_CONTEXT_DOCUMENT: RemoteDocument = load_static_context(
DID_CONFIGURATION_V1_CONTEXT,
ssi_contexts::DID_CONFIGURATION_V1
);
pub static ref JFF_VC_EDU_PLUGFEST_2022_2_CONTEXT_DOCUMENT: RemoteDocument = load_static_context(
JFF_VC_EDU_PLUGFEST_2022_2_CONTEXT,
ssi_contexts::JFF_VC_EDU_PLUGFEST_2022_2
Expand Down Expand Up @@ -297,6 +303,9 @@ impl Loader for StaticLoader {
DID_CONFIGURATION_V0_0_CONTEXT => {
Ok(DID_CONFIGURATION_V0_0_CONTEXT_DOCUMENT.clone())
},
DID_CONFIGURATION_V1_CONTEXT => {
Ok(DID_CONFIGURATION_V1_CONTEXT_DOCUMENT.clone())
},
JFF_VC_EDU_PLUGFEST_2022_2_CONTEXT => {
Ok(JFF_VC_EDU_PLUGFEST_2022_2_CONTEXT_DOCUMENT.clone())
},
Expand Down