Skip to content

Commit ff7ff52

Browse files
committed
add orb context definition
Signed-off-by: Troy Ronda <[email protected]>
1 parent d07048f commit ff7ff52

File tree

2 files changed

+89
-34
lines changed

2 files changed

+89
-34
lines changed

contexts/orb-v1.jsonld

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@protected": true,
5+
6+
"AnchorCredential": {
7+
"@id": "https://trustbloc.dev/ns/orb#AnchorCredential",
8+
"@context": {
9+
"@version": 1.1,
10+
"@protected": true,
11+
12+
"id": "@id",
13+
"type": "@type"
14+
}
15+
},
16+
"Anchor": {
17+
"@id": "https://trustbloc.dev/ns/orb#Anchor",
18+
"@context": {
19+
"@version": 1.1,
20+
"@protected": true,
21+
22+
"id": "@id",
23+
"type": "@type",
24+
25+
"orb": "https://trustbloc.dev/ns/orb#",
26+
27+
"coreIndex": "orb:coreIndex",
28+
"operationCount": "orb:operationCount",
29+
"namespace": "orb:namespace",
30+
"previousAnchors": "orb:previousAnchors",
31+
"version": "orb:version"
32+
}
33+
},
34+
"AnchorCredentialReference": {
35+
"@id": "https://trustbloc.dev/ns/orb#AnchorCredentialReference",
36+
"@context": {
37+
"@version": 1.1,
38+
"@protected": true,
39+
40+
"id": "@id",
41+
"type": "@type"
42+
}
43+
}
44+
}
45+
}

index.html

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,8 @@ <h4>AnchorCredential</h4>
712712
{
713713
"@context": [
714714
"https://www.w3.org/2018/credentials/v1",
715-
"https://trustbloc.github.io/context/orb-v1.json",
716-
"https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json"
715+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld",
716+
"https://w3id.org/jws/v1"
717717
],
718718
"id": "http://sally.example.com/transactions/bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
719719
"type": [
@@ -723,15 +723,17 @@ <h4>AnchorCredential</h4>
723723
"issuer": "https://sally.example.com/services/orb",
724724
"issuanceDate": "2021-01-27T09:30:10Z",
725725
"credentialSubject": {
726-
"anchorString": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
726+
"operationCount": 1,
727+
"coreIndex": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
727728
"namespace": "did:orb",
728729
"version": "1",
729-
"previousTransactions": {
730+
"previousAnchors": {
730731
"EiA329wd6Aj36YRmp7NGkeB5ADnVt8ARdMZMPzfXsjwTJA": "bafkreibmrmenuxhgaomod4m26ds5ztdujxzhjobgvpsyl2v2ndcskq2iay",
731732
"EiABk7KK58BVLHMataxgYZjTNbsHgtD8BtjF0tOWFV29rw": "bafkreibh3whnisud76knkv7z7ucbf3k2rs6knhvajernrdabdbfaomakli"
732-
}
733+
},
734+
"type": "Anchor"
733735
},
734-
"proofChain": [{
736+
"proof": [{
735737
"type": "JsonWebSignature2020",
736738
"proofPurpose": "assertionMethod",
737739
"created": "2021-01-27T09:30:00Z",
@@ -765,7 +767,7 @@ <h4>AnchorCredential</h4>
765767
{
766768
"@context": [
767769
"https://www.w3.org/ns/activitystreams",
768-
"https://trustbloc.github.io/context/orb-v1.json"
770+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld"
769771
],
770772
"id": "https://sally.example.com/services/orb/activities/bafkreiatkubvbkdidscmqynkyls3iqawdqvthi7e6mbky2amuw3inxsi3y",
771773
"type": "Create",
@@ -782,7 +784,7 @@ <h4>AnchorCredential</h4>
782784
"object": {
783785
"@context": [
784786
"https://www.w3.org/2018/credentials/v1",
785-
"https://trustbloc.github.io/context/orb-v1.json"
787+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld"
786788
],
787789
"id": "http://sally.example.com/transactions/642bab75-76a4-4b5f-98bb-794467ad5891",
788790
"type": [
@@ -792,15 +794,17 @@ <h4>AnchorCredential</h4>
792794
"issuer": "https://sally.example.com/services/orb",
793795
"issuanceDate": "2021-01-27T09:30:10Z",
794796
"credentialSubject": {
795-
"anchorString": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
797+
"operationCount": 1,
798+
"coreIndex": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
796799
"namespace": "did:orb",
797800
"version": "1",
798-
"previousTransactions": {
801+
"previousAnchors": {
799802
"EiA329wd6Aj36YRmp7NGkeB5ADnVt8ARdMZMPzfXsjwTJA": "bafkreibmrmenuxhgaomod4m26ds5ztdujxzhjobgvpsyl2v2ndcskq2iay",
800803
"EiABk7KK58BVLHMataxgYZjTNbsHgtD8BtjF0tOWFV29rw": "bafkreibh3whnisud76knkv7z7ucbf3k2rs6knhvajernrdabdbfaomakli"
801-
}
804+
},
805+
"type": "Anchor"
802806
},
803-
"proofChain": [{}]
807+
"proof": [{}]
804808
}
805809
}
806810
</pre>
@@ -881,7 +885,7 @@ <h4>Actor (Discovery)</h4>
881885
"@context": [
882886
"https://www.w3.org/ns/activitystreams",
883887
"https://w3id.org/security/v1",
884-
"https://trustbloc.github.io/context/orb-v1.json"
888+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld"
885889
],
886890
"id": "https://alice.example.com/services/orb",
887891
"type": "Service",
@@ -993,7 +997,7 @@ <h4>Create Activity</h4>
993997
{
994998
"@context": [
995999
"https://www.w3.org/ns/activitystreams",
996-
"https://trustbloc.github.io/context/orb-v1.json"
1000+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld"
9971001
],
9981002
"id": "https://sally.example.com/services/orb/activities/bafkreiatkubvbkdidscmqynkyls3iqawdqvthi7e6mbky2amuw3inxsi3y",
9991003
"type": "Create",
@@ -1010,7 +1014,7 @@ <h4>Create Activity</h4>
10101014
"object": {
10111015
"@context": [
10121016
"https://www.w3.org/2018/credentials/v1",
1013-
"https://trustbloc.github.io/context/orb-v1.json"
1017+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld"
10141018
],
10151019
"id": "http://sally.example.com/transactions/bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
10161020
"type": [
@@ -1020,15 +1024,17 @@ <h4>Create Activity</h4>
10201024
"issuer": "https://sally.example.com/services/orb",
10211025
"issuanceDate": "2021-01-27T09:30:10Z",
10221026
"credentialSubject": {
1023-
"anchorString": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
1027+
"operationCount": 1,
1028+
"coreIndex": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
10241029
"namespace": "did:orb",
10251030
"version": "1",
1026-
"previousTransactions": {
1031+
"previousAnchors": {
10271032
"EiA329wd6Aj36YRmp7NGkeB5ADnVt8ARdMZMPzfXsjwTJA": "bafkreibmrmenuxhgaomod4m26ds5ztdujxzhjobgvpsyl2v2ndcskq2iay",
10281033
"EiABk7KK58BVLHMataxgYZjTNbsHgtD8BtjF0tOWFV29rw": "bafkreibh3whnisud76knkv7z7ucbf3k2rs6knhvajernrdabdbfaomakli"
1029-
}
1034+
},
1035+
"type": "Anchor"
10301036
},
1031-
"proofChain": [{}]
1037+
"proof": [{}]
10321038
}
10331039
}
10341040
</pre>
@@ -1069,7 +1075,7 @@ <h4>Announce Activity</h4>
10691075
"items": [
10701076
{
10711077
"@context": [
1072-
"https://trustbloc.github.io/context/orb-v1.json"
1078+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld"
10731079
],
10741080
"id": "http://sally.example.com/transactions/bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
10751081
"type": "AnchorCredentialReference",
@@ -1096,7 +1102,7 @@ <h4>Announce Activity</h4>
10961102
{
10971103
"@context": [
10981104
"https://www.w3.org/ns/activitystreams",
1099-
"https://trustbloc.github.io/context/orb-v1.json"
1105+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld"
11001106
],
11011107
"id": "https://sally.example.com/services/orb/activities/bafkreiatkubvbkdidscmqynkyls3iqawdqvthi7e6mbky2amuw3inxsi3y",
11021108
"type": "Announce",
@@ -1120,7 +1126,7 @@ <h4>Announce Activity</h4>
11201126
"object": {
11211127
"@context": [
11221128
"https://www.w3.org/2018/credentials/v1",
1123-
"https://trustbloc.github.io/context/orb-v1.json"
1129+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld"
11241130
],
11251131
"id": "http://sally.example.com/transactions/bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
11261132
"type": [
@@ -1130,15 +1136,17 @@ <h4>Announce Activity</h4>
11301136
"issuer": "https://sally.example.com/services/orb",
11311137
"issuanceDate": "2021-01-27T09:30:10Z",
11321138
"credentialSubject": {
1133-
"anchorString": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
1139+
"operationCount": 1,
1140+
"coreIndex": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
11341141
"namespace": "did:orb",
11351142
"version": "1",
1136-
"previousTransactions": {
1143+
"previousAnchors": {
11371144
"EiA329wd6Aj36YRmp7NGkeB5ADnVt8ARdMZMPzfXsjwTJA": "bafkreibmrmenuxhgaomod4m26ds5ztdujxzhjobgvpsyl2v2ndcskq2iay",
11381145
"EiABk7KK58BVLHMataxgYZjTNbsHgtD8BtjF0tOWFV29rw": "bafkreibh3whnisud76knkv7z7ucbf3k2rs6knhvajernrdabdbfaomakli"
1139-
}
1146+
},
1147+
"type": "Anchor"
11401148
},
1141-
"proofChain": [{}]
1149+
"proof": [{}]
11421150
}
11431151
}
11441152
]
@@ -1287,7 +1295,7 @@ <h4>Offer Activity</h4>
12871295
"object": {
12881296
"@context": [
12891297
"https://www.w3.org/2018/credentials/v1",
1290-
"https://trustbloc.github.io/context/orb-v1.json"
1298+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld"
12911299
],
12921300
"id": "http://sally.example.com/transactions/bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
12931301
"type": [
@@ -1344,7 +1352,7 @@ <h4>Like Activity</h4>
13441352
"result": {
13451353
"@context": [
13461354
"https://w3id.org/security/v1",
1347-
"https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json"
1355+
"https://w3id.org/jws/v1"
13481356
],
13491357
"proof": {
13501358
"type": "JsonWebSignature2020",
@@ -1512,8 +1520,8 @@ <h4>WebCAS</h4>
15121520
{
15131521
"@context": [
15141522
"https://www.w3.org/2018/credentials/v1",
1515-
"https://trustbloc.github.io/context/orb-v1.json",
1516-
"https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json"
1523+
"https://trustbloc.github.io/did-method-orb/contexts/orb-v1.jsonld",
1524+
"https://w3id.org/jws/v1"
15171525
],
15181526
"id": "http://sally.example.com/transactions/bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
15191527
"type": [
@@ -1523,15 +1531,17 @@ <h4>WebCAS</h4>
15231531
"issuer": "https://sally.example.com/services/orb",
15241532
"issuanceDate": "2021-01-27T09:30:10Z",
15251533
"credentialSubject": {
1526-
"anchorString": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
1534+
"operationCount": 1,
1535+
"coreIndex": "bafkreihwsnuregceqh263vgdathcprnbvatyat6h6mu7ipjhhodcdbyhoy",
15271536
"namespace": "did:orb",
15281537
"version": "1",
1529-
"previousTransactions": {
1538+
"previousAnchors": {
15301539
"EiA329wd6Aj36YRmp7NGkeB5ADnVt8ARdMZMPzfXsjwTJA": "bafkreibmrmenuxhgaomod4m26ds5ztdujxzhjobgvpsyl2v2ndcskq2iay",
15311540
"EiABk7KK58BVLHMataxgYZjTNbsHgtD8BtjF0tOWFV29rw": "bafkreibh3whnisud76knkv7z7ucbf3k2rs6knhvajernrdabdbfaomakli"
1532-
}
1541+
},
1542+
"type": "Anchor"
15331543
},
1534-
"proofChain": [{}]
1544+
"proof": [{}]
15351545
}
15361546
</pre>
15371547
</section>

0 commit comments

Comments
 (0)