From 68ff8cb3c2cc6e5bde87a6d6add4d1019249c0f2 Mon Sep 17 00:00:00 2001 From: Bob Stasyszyn Date: Wed, 17 Aug 2022 11:36:04 -0400 Subject: [PATCH] chore: Update JSON-LD context for activity anchors closes #1428 Signed-off-by: Bob Stasyszyn --- .../payload/activity-anchors-v1.json | 61 +++--------------- samples/docker/contexts/ld-contexts.json | 63 +++---------------- samples/tutorial/contexts/ld-contexts.json | 63 +++---------------- test/bdd/fixtures/contexts/ld-contexts.json | 63 +++---------------- 4 files changed, 34 insertions(+), 216 deletions(-) diff --git a/internal/pkg/ldcontext/payload/activity-anchors-v1.json b/internal/pkg/ldcontext/payload/activity-anchors-v1.json index 9aebe3f71..ed465d421 100644 --- a/internal/pkg/ldcontext/payload/activity-anchors-v1.json +++ b/internal/pkg/ldcontext/payload/activity-anchors-v1.json @@ -9,60 +9,13 @@ "@context": { "@version": 1.1, "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "parent": "aa:parent" - } - }, - "AnchorIndex": { - "@id": "https://w3id.org/activityanchors#AnchorIndex", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "resources": { - "@id": "aa:resources", - "@type": "@json" - } - } - }, - "AnchorResource": { - "@id": "https://w3id.org/activityanchors#AnchorResource", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "previousAnchor": "aa:previousAnchor" - } - }, - "AnchorCredential": { - "@id": "https://w3id.org/activityanchors#AnchorCredential", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type" - } - }, - "AnchorProof": { - "@id": "https://w3id.org/activityanchors#AnchorProof", - "@context": { - "@version": 1.1, - "@protected": true, + "id": "@id", "type": "@type" } }, - "AnchorReference": { - "@id": "https://w3id.org/activityanchors#AnchorReference", + "AnchorReceipt": { + "@id": "https://w3id.org/activityanchors#AnchorReceipt", "@context": { "@version": 1.1, "@protected": true, @@ -70,15 +23,15 @@ "type": "@type" } }, - "ContentAddressedStorage": { - "@id": "https://w3id.org/activityanchors#ContentAddressedStorage", + "AnchorCredential": { + "@id": "https://w3id.org/activityanchors#AnchorCredential", "@context": { "@version": 1.1, "@protected": true, "id": "@id", "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "cid": "aa:contentIdentifier" + "anchor": "https://w3id.org/activityanchors#anchor", + "profile": "https://w3id.org/activityanchors#profile" } } } diff --git a/samples/docker/contexts/ld-contexts.json b/samples/docker/contexts/ld-contexts.json index 93b39d13b..26fe81df3 100644 --- a/samples/docker/contexts/ld-contexts.json +++ b/samples/docker/contexts/ld-contexts.json @@ -11,76 +11,31 @@ "@context": { "@version": 1.1, "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "parent": "aa:parent" - } - }, - "AnchorIndex": { - "@id": "https://w3id.org/activityanchors#AnchorIndex", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "resources": { - "@id": "aa:resources", - "@type": "@json" - } - } - }, - "AnchorResource": { - "@id": "https://w3id.org/activityanchors#AnchorResource", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "previousAnchor": "aa:previousAnchor" - } - }, - "AnchorCredential": { - "@id": "https://w3id.org/activityanchors#AnchorCredential", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type" - } - }, - "AnchorProof": { - "@id": "https://w3id.org/activityanchors#AnchorProof", - "@context": { - "@version": 1.1, - "@protected": true, + "id": "@id", "type": "@type" } }, - "AnchorReference": { - "@id": "https://w3id.org/activityanchors#AnchorReference", + "AnchorReceipt": { + "@id": "https://w3id.org/activityanchors#AnchorReceipt", "@context": { "@version": 1.1, "@protected": true, + "id": "@id", "type": "@type" } }, - "ContentAddressedStorage": { - "@id": "https://w3id.org/activityanchors#ContentAddressedStorage", + "AnchorCredential": { + "@id": "https://w3id.org/activityanchors#AnchorCredential", "@context": { "@version": 1.1, "@protected": true, + "id": "@id", "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "cid": "aa:contentIdentifier" + "anchor": "https://w3id.org/activityanchors#anchor", + "profile": "https://w3id.org/activityanchors#profile" } } } diff --git a/samples/tutorial/contexts/ld-contexts.json b/samples/tutorial/contexts/ld-contexts.json index 93b39d13b..26fe81df3 100644 --- a/samples/tutorial/contexts/ld-contexts.json +++ b/samples/tutorial/contexts/ld-contexts.json @@ -11,76 +11,31 @@ "@context": { "@version": 1.1, "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "parent": "aa:parent" - } - }, - "AnchorIndex": { - "@id": "https://w3id.org/activityanchors#AnchorIndex", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "resources": { - "@id": "aa:resources", - "@type": "@json" - } - } - }, - "AnchorResource": { - "@id": "https://w3id.org/activityanchors#AnchorResource", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "previousAnchor": "aa:previousAnchor" - } - }, - "AnchorCredential": { - "@id": "https://w3id.org/activityanchors#AnchorCredential", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type" - } - }, - "AnchorProof": { - "@id": "https://w3id.org/activityanchors#AnchorProof", - "@context": { - "@version": 1.1, - "@protected": true, + "id": "@id", "type": "@type" } }, - "AnchorReference": { - "@id": "https://w3id.org/activityanchors#AnchorReference", + "AnchorReceipt": { + "@id": "https://w3id.org/activityanchors#AnchorReceipt", "@context": { "@version": 1.1, "@protected": true, + "id": "@id", "type": "@type" } }, - "ContentAddressedStorage": { - "@id": "https://w3id.org/activityanchors#ContentAddressedStorage", + "AnchorCredential": { + "@id": "https://w3id.org/activityanchors#AnchorCredential", "@context": { "@version": 1.1, "@protected": true, + "id": "@id", "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "cid": "aa:contentIdentifier" + "anchor": "https://w3id.org/activityanchors#anchor", + "profile": "https://w3id.org/activityanchors#profile" } } } diff --git a/test/bdd/fixtures/contexts/ld-contexts.json b/test/bdd/fixtures/contexts/ld-contexts.json index 93b39d13b..26fe81df3 100644 --- a/test/bdd/fixtures/contexts/ld-contexts.json +++ b/test/bdd/fixtures/contexts/ld-contexts.json @@ -11,76 +11,31 @@ "@context": { "@version": 1.1, "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "parent": "aa:parent" - } - }, - "AnchorIndex": { - "@id": "https://w3id.org/activityanchors#AnchorIndex", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "resources": { - "@id": "aa:resources", - "@type": "@json" - } - } - }, - "AnchorResource": { - "@id": "https://w3id.org/activityanchors#AnchorResource", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "as": "https://www.w3.org/ns/activitystreams#", - "previousAnchor": "aa:previousAnchor" - } - }, - "AnchorCredential": { - "@id": "https://w3id.org/activityanchors#AnchorCredential", - "@context": { - "@version": 1.1, - "@protected": true, - "id": "@id", - "type": "@type" - } - }, - "AnchorProof": { - "@id": "https://w3id.org/activityanchors#AnchorProof", - "@context": { - "@version": 1.1, - "@protected": true, + "id": "@id", "type": "@type" } }, - "AnchorReference": { - "@id": "https://w3id.org/activityanchors#AnchorReference", + "AnchorReceipt": { + "@id": "https://w3id.org/activityanchors#AnchorReceipt", "@context": { "@version": 1.1, "@protected": true, + "id": "@id", "type": "@type" } }, - "ContentAddressedStorage": { - "@id": "https://w3id.org/activityanchors#ContentAddressedStorage", + "AnchorCredential": { + "@id": "https://w3id.org/activityanchors#AnchorCredential", "@context": { "@version": 1.1, "@protected": true, + "id": "@id", "type": "@type", - "aa": "https://w3id.org/activityanchors#", - "cid": "aa:contentIdentifier" + "anchor": "https://w3id.org/activityanchors#anchor", + "profile": "https://w3id.org/activityanchors#profile" } } }