From 46ac7fe83525eda969e75c3af620cc38867c68d1 Mon Sep 17 00:00:00 2001 From: Patrick St-Louis Date: Wed, 21 Jan 2026 13:52:13 -0500 Subject: [PATCH] add citizenship context to document downloader Signed-off-by: Patrick St-Louis --- .../vc/ld_proofs/document_downloader.py | 1 + .../resources/citizenship_v1_context.jsonld | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 acapy_agent/vc/ld_proofs/resources/citizenship_v1_context.jsonld diff --git a/acapy_agent/vc/ld_proofs/document_downloader.py b/acapy_agent/vc/ld_proofs/document_downloader.py index 7f7ffbeec5..bd6c39c11c 100644 --- a/acapy_agent/vc/ld_proofs/document_downloader.py +++ b/acapy_agent/vc/ld_proofs/document_downloader.py @@ -50,6 +50,7 @@ class StaticCacheJsonLdDownloader: "https://identity.foundation/presentation-exchange/submission/v1": ( "dif-presentation-exchange-submission-v1.jsonld" ), + "https://w3id.org/citizenship/v1": "citizenship_v1_context.jsonld", } def __init__( diff --git a/acapy_agent/vc/ld_proofs/resources/citizenship_v1_context.jsonld b/acapy_agent/vc/ld_proofs/resources/citizenship_v1_context.jsonld new file mode 100644 index 0000000000..c58eb7b66e --- /dev/null +++ b/acapy_agent/vc/ld_proofs/resources/citizenship_v1_context.jsonld @@ -0,0 +1,57 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "name": "http://schema.org/name", + "description": "http://schema.org/description", + "identifier": "http://schema.org/identifier", + "image": { + "@id": "http://schema.org/image", + "@type": "@id" + }, + "PermanentResidentCard": { + "@id": "https://w3id.org/citizenship#PermanentResidentCard", + "@context": { + "@version": 1.1, + "@protected": true, + "id": "@id", + "type": "@type", + "description": "http://schema.org/description", + "name": "http://schema.org/name", + "identifier": "http://schema.org/identifier", + "image": { + "@id": "http://schema.org/image", + "@type": "@id" + } + } + }, + "PermanentResident": { + "@id": "https://w3id.org/citizenship#PermanentResident", + "@context": { + "@version": 1.1, + "@protected": true, + "id": "@id", + "type": "@type", + "ctzn": "https://w3id.org/citizenship#", + "schema": "http://schema.org/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "birthCountry": "ctzn:birthCountry", + "birthDate": { + "@id": "schema:birthDate", + "@type": "xsd:dateTime" + }, + "commuterClassification": "ctzn:commuterClassification", + "familyName": "schema:familyName", + "gender": "schema:gender", + "givenName": "schema:givenName", + "lprCategory": "ctzn:lprCategory", + "lprNumber": "ctzn:lprNumber", + "residentSince": { + "@id": "ctzn:residentSince", + "@type": "xsd:dateTime" + } + } + }, + "Person": "http://schema.org/Person" + } +} \ No newline at end of file