From 07371d63a4f4d985f9666e3c5cf23951c9325b47 Mon Sep 17 00:00:00 2001 From: Donny Date: Mon, 25 Aug 2025 18:54:33 -0400 Subject: [PATCH 1/5] Add network field types and update context definitions --- .../learn-card-contexts/boosts/1.0.1.json | 21 +++++++++++++++++++ .../plugins/vc-templates/src/templates.ts | 4 ++++ packages/plugins/vc-templates/src/types.ts | 7 +++++++ 3 files changed, 32 insertions(+) diff --git a/packages/learn-card-contexts/boosts/1.0.1.json b/packages/learn-card-contexts/boosts/1.0.1.json index 1a690a435..63651a028 100644 --- a/packages/learn-card-contexts/boosts/1.0.1.json +++ b/packages/learn-card-contexts/boosts/1.0.1.json @@ -10,6 +10,27 @@ "address": { "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address" }, + "network": { + "@id": "lcn:boostNetwork", + "@context": { + "networkType": { + "@id": "lcn:boostNetworkType", + "@type": "xsd:string" + }, + "country": { + "@id": "lcn:boostNetworkCountry", + "@type": "xsd:string" + }, + "region": { + "@id": "lcn:boostNetworkRegion", + "@type": "xsd:string" + }, + "organization": { + "@id": "lcn:boostNetworkOrganization", + "@type": "xsd:string" + } + } + }, "attachments": { "@container": "@set", "@context": { diff --git a/packages/plugins/vc-templates/src/templates.ts b/packages/plugins/vc-templates/src/templates.ts index 2294d38e2..3aa2c2609 100644 --- a/packages/plugins/vc-templates/src/templates.ts +++ b/packages/plugins/vc-templates/src/templates.ts @@ -118,6 +118,7 @@ export const VC_TEMPLATES: { display, familyTitles, skills, + network, groupID = '', } = {}, crypto @@ -153,6 +154,7 @@ export const VC_TEMPLATES: { image: boostImage, attachments, skills, + ...(network ? { network } : {}), groupID, }), boostID: ( @@ -175,6 +177,7 @@ export const VC_TEMPLATES: { display, familyTitles, boostID, + network, groupID = '', } = {}, crypto @@ -221,6 +224,7 @@ export const VC_TEMPLATES: { attachments, skills, boostID, + ...(network ? { network } : {}), groupID, }), delegate: ( diff --git a/packages/plugins/vc-templates/src/types.ts b/packages/plugins/vc-templates/src/types.ts index 6106b5af0..916e8d33f 100644 --- a/packages/plugins/vc-templates/src/types.ts +++ b/packages/plugins/vc-templates/src/types.ts @@ -74,6 +74,12 @@ export type AddressSpec = { longitude?: number | undefined; }; }; +export type BoostNetworkFields = { + networkType?: string; + country?: string; + region?: string; + organization?: string; +}; export type BoostTemplate = { did?: string; subject?: string; @@ -94,6 +100,7 @@ export type BoostTemplate = { familyTitles?: BoostFamilyTitles; boostID?: BoostID; address?: AddressSpec; + network?: BoostNetworkFields; groupID?: string; }; From 177bd1a2bf36b4f9bffce5f0739b15f62ba0e592 Mon Sep 17 00:00:00 2001 From: Donny Date: Mon, 25 Aug 2025 18:56:24 -0400 Subject: [PATCH 2/5] update context definition --- .../learn-card-contexts/boosts/1.0.0.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/learn-card-contexts/boosts/1.0.0.json b/packages/learn-card-contexts/boosts/1.0.0.json index c06a1edcb..95ea2a862 100644 --- a/packages/learn-card-contexts/boosts/1.0.0.json +++ b/packages/learn-card-contexts/boosts/1.0.0.json @@ -10,6 +10,27 @@ "address": { "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address" }, + "network": { + "@id": "lcn:boostNetwork", + "@context": { + "networkType": { + "@id": "lcn:boostNetworkType", + "@type": "xsd:string" + }, + "country": { + "@id": "lcn:boostNetworkCountry", + "@type": "xsd:string" + }, + "region": { + "@id": "lcn:boostNetworkRegion", + "@type": "xsd:string" + }, + "organization": { + "@id": "lcn:boostNetworkOrganization", + "@type": "xsd:string" + } + } + }, "attachments": { "@container": "@set", "@context": { From 74ca8c95b70b4ebcbbde301624a651b044f0932e Mon Sep 17 00:00:00 2001 From: Donny Date: Mon, 25 Aug 2025 18:59:58 -0400 Subject: [PATCH 3/5] Create warm-chicken-heal.md --- .changeset/warm-chicken-heal.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/warm-chicken-heal.md diff --git a/.changeset/warm-chicken-heal.md b/.changeset/warm-chicken-heal.md new file mode 100644 index 000000000..5371a5381 --- /dev/null +++ b/.changeset/warm-chicken-heal.md @@ -0,0 +1,5 @@ +--- +"@learncard/vc-templates-plugin": patch +--- + +[LC-914] Add network field types and update context definitions From 9d9c7a3688c66518391d4cc43d6812b713f3ada3 Mon Sep 17 00:00:00 2001 From: Donny Date: Mon, 25 Aug 2025 20:19:21 -0400 Subject: [PATCH 4/5] add 1.0.2 json --- .../learn-card-contexts/boosts/1.0.2.json | 252 ++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 packages/learn-card-contexts/boosts/1.0.2.json diff --git a/packages/learn-card-contexts/boosts/1.0.2.json b/packages/learn-card-contexts/boosts/1.0.2.json new file mode 100644 index 000000000..63651a028 --- /dev/null +++ b/packages/learn-card-contexts/boosts/1.0.2.json @@ -0,0 +1,252 @@ +{ + "@context": { + "id": "@id", + "type": "@type", + "lcn": "https://docs.learncard.com/definitions#", + "cred": "https://www.w3.org/2018/credentials#", + "xsd": "https://www.w3.org/2001/XMLSchema#", + "BoostCredential": { + "@context": { + "address": { + "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address" + }, + "network": { + "@id": "lcn:boostNetwork", + "@context": { + "networkType": { + "@id": "lcn:boostNetworkType", + "@type": "xsd:string" + }, + "country": { + "@id": "lcn:boostNetworkCountry", + "@type": "xsd:string" + }, + "region": { + "@id": "lcn:boostNetworkRegion", + "@type": "xsd:string" + }, + "organization": { + "@id": "lcn:boostNetworkOrganization", + "@type": "xsd:string" + } + } + }, + "attachments": { + "@container": "@set", + "@context": { + "title": { + "@id": "lcn:boostAttachmentTitle", + "@type": "xsd:string" + }, + "type": { + "@id": "lcn:boostAttachmentType", + "@type": "xsd:string" + }, + "url": { + "@id": "lcn:boostAttachmentUrl", + "@type": "xsd:string" + }, + "fileName": { + "@id": "lcn:boostAttachmentFileName", + "@type": "xsd:string" + }, + "fileSize": { + "@id": "lcn:boostAttachmentFileSize", + "@type": "xsd:string" + }, + "fileType": { + "@id": "lcn:boostAttachmentFileType", + "@type": "xsd:string" + } + }, + "@id": "lcn:boostAttachments" + }, + "boostId": { + "@id": "lcn:boostId", + "@type": "xsd:string" + }, + "display": { + "@context": { + "backgroundColor": { + "@id": "lcn:boostBackgroundColor", + "@type": "xsd:string" + }, + "backgroundImage": { + "@id": "lcn:boostBackgroundImage", + "@type": "xsd:string" + }, + "displayType": { + "@id": "lcn:boostDisplayType", + "@type": "xsd:string" + }, + "emoji": { + "@context": { + "activeSkinTone": { + "@id": "lcn:boostEmojiActiveSkinTone", + "@type": "xsd:string" + }, + "imageUrl": { + "@id": "lcn:boostEmojiImageUrl", + "@type": "xsd:string" + }, + "names": { + "@container": "@set", + "@id": "lcn:boostEmojiNames", + "@type": "xsd:string" + }, + "unified": { + "@id": "lcn:boostEmojiUnified", + "@type": "xsd:string" + }, + "unifiedWithoutSkinTone": { + "@id": "lcn:boostEmojiUnifiedWithoutSkinTone", + "@type": "xsd:string" + } + }, + "@id": "lcn:boostEmoji" + }, + "fadeBackgroundImage": { + "@id": "lcn:boostFadeBackgroundImage", + "@type": "xsd:boolean" + }, + "repeatBackgroundImage": { + "@id": "lcn:boostRepeatBackgroundImage", + "@type": "xsd:boolean" + } + }, + "@id": "lcn:boostDisplay" + }, + "familyTitles": { + "@context": { + "dependents": { + "@container": "@set", + "@context": { + "plural": { + "@id": "lcn:plural", + "@type": "xsd:string" + }, + "singular": { + "@id": "lcn:singular", + "@type": "xsd:string" + } + }, + "@id": "lcn:dependents" + }, + "guardians": { + "@container": "@set", + "@context": { + "plural": { + "@id": "lcn:plural", + "@type": "xsd:string" + }, + "singular": { + "@id": "lcn:singular", + "@type": "xsd:string" + } + }, + "@id": "lcn:guardians" + } + }, + "@id": "lcn:familyTitles" + }, + "groupID": { + "@id": "lcn:groupID", + "@type": "xsd:string" + }, + "skills": { + "@container": "@set", + "@context": { + "category": { + "@id": "lcn:boostSkillCategory", + "@type": "xsd:string" + }, + "skill": { + "@id": "lcn:boostSkill", + "@type": "xsd:string" + }, + "subskills": { + "@container": "@set", + "@id": "lcn:boostSubskills", + "@type": "xsd:string" + } + }, + "@id": "lcn:boostSkills" + } + }, + "@id": "lcn:boostCredential" + }, + "BoostID": { + "@id": "lcn:boostID", + "@context": { + "boostID": { + "@id": "lcn:boostIDField", + "@context": { + "fontColor": { + "@id": "lcn:boostIDFontColor", + "@type": "xsd:string" + }, + "accentColor": { + "@id": "lcn:boostIDAccentColor", + "@type": "xsd:string" + }, + "backgroundImage": { + "@id": "lcn:boostIDBackgroundImage", + "@type": "xsd:string" + }, + "dimBackgroundImage": { + "@id": "lcn:boostIDDimBackgroundImage", + "@type": "xsd:boolean" + }, + "issuerThumbnail": { + "@id": "lcn:boostIDIssuerThumbnail", + "@type": "xsd:string" + }, + "showIssuerThumbnail": { + "@id": "lcn:boostIDShowIssuerThumbnail", + "@type": "xsd:boolean" + }, + "IDIssuerName": { + "@id": "lcn:boostIDIssuerName", + "@type": "xsd:string" + }, + "idThumbnail": { + "@id": "lcn:boostIDThumbnail", + "@type": "xsd:string" + }, + "accentFontColor": { + "@id": "lcn:boostIDFontColor", + "@type": "xsd:string" + }, + "idBackgroundColor": { + "@id": "lcn:boostIDBackgroundColor", + "@type": "xsd:string" + }, + "repeatIdBackgroundImage": { + "@id": "lcn:boostIDRepeatIdBackgroundImage", + "@type": "xsd:boolean" + }, + "idDescription": { + "@id": "lcn:boostIDDescription", + "@type": "xsd:string" + } + } + } + } + }, + "CertifiedBoostCredential": { + "@id": "lcn:certifiedBoostCredential", + "@context": { + "@version": 1.1, + "boostId": { + "@id": "lcn:boostId", + "@type": "xsd:string" + }, + "boostCredential": { + "@id": "cred:VerifiableCredential", + "@type": "@id", + "@container": "@graph" + } + } + } + } +} From 1a8241e72e21f05c15909a0498dd8f181536a849 Mon Sep 17 00:00:00 2001 From: Donny Date: Mon, 25 Aug 2025 20:20:10 -0400 Subject: [PATCH 5/5] remove network from previous version json --- .../learn-card-contexts/boosts/1.0.0.json | 21 ------------------- .../learn-card-contexts/boosts/1.0.1.json | 21 ------------------- 2 files changed, 42 deletions(-) diff --git a/packages/learn-card-contexts/boosts/1.0.0.json b/packages/learn-card-contexts/boosts/1.0.0.json index 95ea2a862..c06a1edcb 100644 --- a/packages/learn-card-contexts/boosts/1.0.0.json +++ b/packages/learn-card-contexts/boosts/1.0.0.json @@ -10,27 +10,6 @@ "address": { "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address" }, - "network": { - "@id": "lcn:boostNetwork", - "@context": { - "networkType": { - "@id": "lcn:boostNetworkType", - "@type": "xsd:string" - }, - "country": { - "@id": "lcn:boostNetworkCountry", - "@type": "xsd:string" - }, - "region": { - "@id": "lcn:boostNetworkRegion", - "@type": "xsd:string" - }, - "organization": { - "@id": "lcn:boostNetworkOrganization", - "@type": "xsd:string" - } - } - }, "attachments": { "@container": "@set", "@context": { diff --git a/packages/learn-card-contexts/boosts/1.0.1.json b/packages/learn-card-contexts/boosts/1.0.1.json index 63651a028..1a690a435 100644 --- a/packages/learn-card-contexts/boosts/1.0.1.json +++ b/packages/learn-card-contexts/boosts/1.0.1.json @@ -10,27 +10,6 @@ "address": { "@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address" }, - "network": { - "@id": "lcn:boostNetwork", - "@context": { - "networkType": { - "@id": "lcn:boostNetworkType", - "@type": "xsd:string" - }, - "country": { - "@id": "lcn:boostNetworkCountry", - "@type": "xsd:string" - }, - "region": { - "@id": "lcn:boostNetworkRegion", - "@type": "xsd:string" - }, - "organization": { - "@id": "lcn:boostNetworkOrganization", - "@type": "xsd:string" - } - } - }, "attachments": { "@container": "@set", "@context": {