From f76b6deec69f5352aa58fc2cd7c4d13ee6187a5c Mon Sep 17 00:00:00 2001 From: Parth Bhatt Date: Fri, 30 Jan 2026 16:21:15 -0800 Subject: [PATCH 1/9] Add context for template render method and legacy nfc rendering template 2024. --- lib/v2rc2.js | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 lib/v2rc2.js diff --git a/lib/v2rc2.js b/lib/v2rc2.js new file mode 100644 index 0000000..e7b9135 --- /dev/null +++ b/lib/v2rc2.js @@ -0,0 +1,93 @@ +/*! + * Copyright (c) 2026 Digital Bazaar, Inc. All rights reserved. + */ +// Use JSON style for context +/* eslint quotes: ['error', 'double'] */ +/* eslint quote-props: ['error', 'always'] */ +/* eslint-disable max-len */ + +export default +/* context-url: https://w3id.org/vc/render-method/v2rc2 */ +/* context-begin */ +{ + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "SvgRenderingTemplate2023": { + "@id": "https://w3id.org/vc/render-method#SvgRenderingTemplate2023", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "css3MediaQuery": "https://w3id.org/vc/render-method#css3MediaQuery", + "digestMultibase": { + "@id": "https://w3id.org/security#digestMultibase", + "@type": "https://w3id.org/security#multibase" + }, + "name": "https://schema.org/name" + } + }, + "SvgRenderingTemplate2024": { + "@id": "https://w3id.org/vc/render-method#SvgRenderingTemplate2024", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "digestMultibase": { + "@id": "https://w3id.org/security#digestMultibase", + "@type": "https://w3id.org/security#multibase" + }, + "mediaQuery": "https://w3id.org/vc/render-method#mediaQuery", + "mediaType": "https://schema.org/encodingFormat", + "name": "https://schema.org/name", + "template": "https://w3id.org/vc/render-method#template" + } + }, + "TemplateRenderMethod": { + "@id": "https://w3id.org/vc/render-method#TemplateRenderMethod", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "description": "https://schema.org/description", + "name": "https://schema.org/name", + "renderEngine": "https://w3id.org/vc/render-method#renderEngine", + "renderProperty": { + "@id": "https://w3id.org/vc/render-method#renderProperty", + "@container": "@set" + }, + "outputPreference": { + "@id": "https://w3id.org/vc/render-method#outputPreference", + "@context": { + "@protected": true, + "id": "@id", + "mode": { + "@id": "https://w3id.org/vc/render-method#mode", + "@container": "@set" + }, + "mediaType": "https://schema.org/encodingFormat", + "style": { + "@id": "https://w3id.org/vc/render-method#style", + "@type": "@json" + } + } + }, + "template": { + "@id": "https://w3id.org/vc/render-method#template", + "@type": "@id" + } + } + }, + "NfcRenderingTemplate2024": { + "@id": "https://w3id.org/vc/render-method#NfcRenderingTemplate2024", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "name": "https://schema.org/name", + "payload": "https://w3id.org/vc/render-method#payload" + } + } + } +} From 8608e25c4bdf60204bc1cfa6f2cd3f2e4d1af4a2 Mon Sep 17 00:00:00 2001 From: Parth Bhatt Date: Mon, 2 Feb 2026 16:47:36 -0800 Subject: [PATCH 2/9] Rename renderEngine to renderSuite. --- lib/v2rc2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v2rc2.js b/lib/v2rc2.js index e7b9135..9bf361f 100644 --- a/lib/v2rc2.js +++ b/lib/v2rc2.js @@ -52,7 +52,7 @@ export default "type": "@type", "description": "https://schema.org/description", "name": "https://schema.org/name", - "renderEngine": "https://w3id.org/vc/render-method#renderEngine", + "renderSuite": "https://w3id.org/vc/render-method#renderSuite", "renderProperty": { "@id": "https://w3id.org/vc/render-method#renderProperty", "@container": "@set" From c356a9ad15f9273cccb35b19cd03757ced084f83 Mon Sep 17 00:00:00 2001 From: Parth Bhatt Date: Mon, 2 Feb 2026 16:59:11 -0800 Subject: [PATCH 3/9] Add context-end line. --- lib/v2rc2.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/v2rc2.js b/lib/v2rc2.js index 9bf361f..c7c1439 100644 --- a/lib/v2rc2.js +++ b/lib/v2rc2.js @@ -91,3 +91,4 @@ export default } } } +/* context-end */; From f398c8ff5795816f19205a1a76919e2854e3db37 Mon Sep 17 00:00:00 2001 From: Parth Bhatt Date: Tue, 3 Feb 2026 09:12:50 -0800 Subject: [PATCH 4/9] Remove legacy . --- lib/v2rc2.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/v2rc2.js b/lib/v2rc2.js index c7c1439..73dc821 100644 --- a/lib/v2rc2.js +++ b/lib/v2rc2.js @@ -78,16 +78,6 @@ export default "@type": "@id" } } - }, - "NfcRenderingTemplate2024": { - "@id": "https://w3id.org/vc/render-method#NfcRenderingTemplate2024", - "@context": { - "@protected": true, - "id": "@id", - "type": "@type", - "name": "https://schema.org/name", - "payload": "https://w3id.org/vc/render-method#payload" - } } } } From 5a05712d28ee1598ad2997a74b1a2650b77fbf8a Mon Sep 17 00:00:00 2001 From: Parth Bhatt Date: Tue, 3 Feb 2026 09:15:59 -0800 Subject: [PATCH 5/9] Fix copyright text. --- lib/v2rc2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v2rc2.js b/lib/v2rc2.js index 73dc821..c40c280 100644 --- a/lib/v2rc2.js +++ b/lib/v2rc2.js @@ -1,5 +1,5 @@ /*! - * Copyright (c) 2026 Digital Bazaar, Inc. All rights reserved. + * Copyright (c) 2026 Digital Bazaar, Inc. */ // Use JSON style for context /* eslint quotes: ['error', 'double'] */ From ae085bf772b58369ac88845137ed3183ff80e7ad Mon Sep 17 00:00:00 2001 From: Parth Bhatt Date: Tue, 3 Feb 2026 09:32:34 -0800 Subject: [PATCH 6/9] Remove old SVG render contexts. --- lib/v2rc2.js | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/lib/v2rc2.js b/lib/v2rc2.js index c40c280..bb24d92 100644 --- a/lib/v2rc2.js +++ b/lib/v2rc2.js @@ -14,36 +14,6 @@ export default "@protected": true, "id": "@id", "type": "@type", - "SvgRenderingTemplate2023": { - "@id": "https://w3id.org/vc/render-method#SvgRenderingTemplate2023", - "@context": { - "@protected": true, - "id": "@id", - "type": "@type", - "css3MediaQuery": "https://w3id.org/vc/render-method#css3MediaQuery", - "digestMultibase": { - "@id": "https://w3id.org/security#digestMultibase", - "@type": "https://w3id.org/security#multibase" - }, - "name": "https://schema.org/name" - } - }, - "SvgRenderingTemplate2024": { - "@id": "https://w3id.org/vc/render-method#SvgRenderingTemplate2024", - "@context": { - "@protected": true, - "id": "@id", - "type": "@type", - "digestMultibase": { - "@id": "https://w3id.org/security#digestMultibase", - "@type": "https://w3id.org/security#multibase" - }, - "mediaQuery": "https://w3id.org/vc/render-method#mediaQuery", - "mediaType": "https://schema.org/encodingFormat", - "name": "https://schema.org/name", - "template": "https://w3id.org/vc/render-method#template" - } - }, "TemplateRenderMethod": { "@id": "https://w3id.org/vc/render-method#TemplateRenderMethod", "@context": { From f6bd6fd1f8d7608d2a5047361d3784c361e9f61d Mon Sep 17 00:00:00 2001 From: Parth Bhatt Date: Tue, 3 Feb 2026 09:54:55 -0800 Subject: [PATCH 7/9] Update readme status section with v2rc2. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6f59ee4..dc12382 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,10 @@ spec contexts. - URL: `https://w3id.org/vc/render-method/v2rc1` - Short name: `v2rc1` - Status: under development +- VC Render Method v2rc2 context + - URL: `https://w3id.org/vc/render-method/v2rc2` + - Short name: `v2rc2` + - Status: under development ## Developing From fbcfca10b90a9462cdb014a08bc71bc29a5497e9 Mon Sep 17 00:00:00 2001 From: Parth Bhatt Date: Tue, 3 Feb 2026 10:13:21 -0800 Subject: [PATCH 8/9] Add the metadata, v2rc2.jsonld context. --- contexts/v2rc2.jsonld | 42 ++++++++++++++++++++++++++++++++++++++++++ lib/index.js | 11 +++++++++++ 2 files changed, 53 insertions(+) create mode 100644 contexts/v2rc2.jsonld diff --git a/contexts/v2rc2.jsonld b/contexts/v2rc2.jsonld new file mode 100644 index 0000000..7574c2c --- /dev/null +++ b/contexts/v2rc2.jsonld @@ -0,0 +1,42 @@ +{ + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "TemplateRenderMethod": { + "@id": "https://w3id.org/vc/render-method#TemplateRenderMethod", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "description": "https://schema.org/description", + "name": "https://schema.org/name", + "renderSuite": "https://w3id.org/vc/render-method#renderSuite", + "renderProperty": { + "@id": "https://w3id.org/vc/render-method#renderProperty", + "@container": "@set" + }, + "outputPreference": { + "@id": "https://w3id.org/vc/render-method#outputPreference", + "@context": { + "@protected": true, + "id": "@id", + "mode": { + "@id": "https://w3id.org/vc/render-method#mode", + "@container": "@set" + }, + "mediaType": "https://schema.org/encodingFormat", + "style": { + "@id": "https://w3id.org/vc/render-method#style", + "@type": "@json" + } + } + }, + "template": { + "@id": "https://w3id.org/vc/render-method#template", + "@type": "@id" + } + } + } + } +} diff --git a/lib/index.js b/lib/index.js index 14924cc..151e87d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -3,6 +3,7 @@ */ import v1Context from './v1.js'; import v2rc1Context from './v2rc1.js'; +import v2rc2Context from './v2rc2.js'; // map of context id to context export const contexts = new Map(); @@ -39,3 +40,13 @@ setExportsFromMetadata({ context: v2rc1Context } }); +setExportsFromMetadata({ + contextsMap: contexts, metadataMap: metadata, namedMap: named, + metadata: { + id: 'https://w3id.org/vc/render-method/v2rc2', + type: 'ContextMetadata', + shortName: 'v2rc2', + fileUrl: new URL('../contexts/v2rc2.jsonld', import.meta.url), + context: v2rc2Context + } +}); From 367d0244c788c0e5a9b498e9db1e28afe50f9fb9 Mon Sep 17 00:00:00 2001 From: Parth Bhatt Date: Tue, 3 Feb 2026 15:18:44 -0800 Subject: [PATCH 9/9] Fix test. --- test/context.common.cjs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/context.common.cjs b/test/context.common.cjs index 4a5a434..0190cd2 100644 --- a/test/context.common.cjs +++ b/test/context.common.cjs @@ -4,17 +4,17 @@ module.exports.tests = function({contexts, metadata, named, expect}) { it('contexts', async () => { expect(metadata).to.exist; - expect(metadata.size).to.equal(2); + expect(metadata.size).to.equal(3); }); it('metadata', async () => { expect(metadata).to.exist; - expect(metadata.size).to.equal(2); + expect(metadata.size).to.equal(3); }); it('named', async () => { expect(named).to.exist; - expect(named.size).to.equal(2); + expect(named.size).to.equal(3); }); it('contents', async () => { @@ -26,6 +26,10 @@ module.exports.tests = function({contexts, metadata, named, expect}) { { id: 'https://w3id.org/vc/render-method/v2rc1', name: 'v2rc1' + }, + { + id: 'https://w3id.org/vc/render-method/v2rc2', + name: 'v2rc2' } ];