-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
179 lines (175 loc) · 6.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html>
<head>
<title>Verifiable Credentials ReSpec Test</title>
<meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
<script src='https://www.w3.org/Tools/respec/respec-w3c' class='remove'></script>
<script src="./dist/main.js" class="remove"></script>
<script type="text/javascript" class="remove">
var respecConfig = {
group: "vc",
specStatus: "ED",
shortName: "respec-vc-test",
subtitle: "Test of ReSpec VC",
doJsonLd: true,
includePermalinks: false,
edDraftURI: "https://respec-vc-test.example/",
editors: [
{ name: "Manu Sporny", url: "https://www.linkedin.com/in/manusporny/",
company: "Digital Bazaar", companyURL: "http://digitalbazaar.com/"}
],
authors:
[
{ name: "Manu Sporny", url: "http://digitalbazaar.com/",
company: "Digital Bazaar", companyURL: "http://digitalbazaar.com/"}
],
maxTocLevel: 2,
inlineCSS: true,
postProcess: [window.respecVc.createVcExamples]
};
</script>
<style>
pre .comment {
font-weight: bold;
color: SteelBlue;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
code {
color: rgb(199, 73, 0);
font-weight: bold;
}
</style>
</head>
<body>
<section id="abstract">
<p>Hello respec-vc!</p>
</section>
<section id="sotd">
<p>This is a test of the respec-vc plugin.</p>
</section>
<section>
<h1>Basic Example</h1>
<p>Here is a signing example</p>
<pre class="example nohighlight vc" title="A Verifiable Credential example">
{
<span class='comment'>// set the context, which establishes the special terms we will be using
// such as 'issuer' and 'alumniOf'.</span>
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
<span class='comment'>// specify the identifier for the credential</span>
"id": "http://example.edu/credentials/1872",
<span class='comment'>// the credential types, which declare what data to expect in the credential</span>
"type": ["VerifiableCredential", "ExampleAlumniCredential"],
<span class='comment'>// the entity that issued the credential</span>
"issuer": "https://example.edu/issuers/565049",
<span class='comment'>// when the credential was issued</span>
"validFrom": "2010-01-01T19:23:24Z",
<span class='comment'>// claims about the subjects of the credential</span>
"credentialSubject": {
<span class='comment'>// identifier for the only subject of the credential</span>
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
<span class='comment'>// assertion about the only subject of the credential</span>
"alumniOf": {
"id": "did:example:c276e12ec21ebfeb1f712ebc6f1",
"name": "Example University"
}
}
}
</pre>
</section>
<section>
<h1>Only Certain Tabs Example</h1>
<p>This example shows use of <code>data-vc-tabs</code> for filtering which
tabs are displayed.</p>
<pre class="example nohighlight vc" title="A Verifiable Credential example"
data-vc-vm='https://example.edu/issuers/565049/keys/1'
data-vc-tabs="vc-jwt">
{
<span class='comment'>// set the context, which establishes the special terms we will be using
// such as 'issuer' and 'alumniOf'.</span>
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
<span class='comment'>// specify the identifier for the credential</span>
"id": "http://example.edu/credentials/1872",
<span class='comment'>// the credential types, which declare what data to expect in the credential</span>
"type": ["VerifiableCredential", "ExampleAlumniCredential"],
<span class='comment'>// the entity that issued the credential</span>
"issuer": "https://example.edu/issuers/565049",
<span class='comment'>// when the credential was issued</span>
"validFrom": "2010-01-01T19:23:24Z",
<span class='comment'>// claims about the subjects of the credential</span>
"credentialSubject": {
<span class='comment'>// identifier for the only subject of the credential</span>
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
<span class='comment'>// assertion about the only subject of the credential</span>
"alumniOf": {
"id": "did:example:c276e12ec21ebfeb1f712ebc6f1",
"name": "Example University"
}
}
}
</pre>
</section>
<section>
<h1>File Hash Examples</h1>
<p>
This section demonstrates the hashing of remote files. Hashes for
`https://www.w3.org/ns/credentials/v2` are provided below:
</p>
<ul>
<li>
raw (`openssl dgst -sha256`):
<code><span class="vc-hash" data-hash-url="https://www.w3.org/ns/credentials/v2"
data-hash-format="openssl dgst -sha256" /></code>
</li>
<li>
digestSRI (sha2-256 base64pad):
<code><span class="vc-hash" data-hash-url="https://www.w3.org/ns/credentials/v2"
data-hash-format="sri sha2-256" /></code>
</li>
<li>
digestSRI (sha2-384 base64pad):
<code><span class="vc-hash" data-hash-url="https://www.w3.org/ns/credentials/v2"
data-hash-format="sri sha2-384" /></code>
</li>
<li>
digestMultibase (sha2-256 base16):
<code><span class="vc-hash" data-hash-url="https://www.w3.org/ns/credentials/v2"
data-hash-format="multihash sha2-256 base16" /></code>
</li>
<li>
digestMultibase (sha2-256 base58btc):
<code><span class="vc-hash" data-hash-url="https://www.w3.org/ns/credentials/v2"
data-hash-format="multihash sha2-256 base58btc" /></code>
</li>
<li>
digestMultibase (sha2-256 base64-url-nopad):
<code><span class="vc-hash" data-hash-url="https://www.w3.org/ns/credentials/v2"
data-hash-format="multihash sha2-256" /></code>
</li>
<li>
digestMultibase (sha2-384 base64-url-nopad):
<code><span class="vc-hash" data-hash-url="https://www.w3.org/ns/credentials/v2"
data-hash-format="multihash sha2-384" /></code>
</li>
<li>
digestMultibase (sha3-256 base64-url-nopad):
<code><span class="vc-hash" data-hash-url="https://www.w3.org/ns/credentials/v2"
data-hash-format="multihash sha3-256" /></code>
</li>
<li>
digestMultibase (sha3-384 base64-url-nopad):
<code><span class="vc-hash" data-hash-url="https://www.w3.org/ns/credentials/v2"
data-hash-format="multihash sha3-384" /></code>
</li>
</ul>
</section>
</body>
</html>