@@ -37,24 +37,29 @@ npm i
37
37
38
38
## Setup
39
39
40
- To integrate with this test suite, you will need a
41
- [ VC-API compatible] ( https://w3c-ccg.github.io/vc-api/ ) issuer and verifier that
42
- are capable of issuing and verifying verifiable credentials and verifiable
43
- presentations. If your implementation is not VC-API compatible, it is possible
44
- to "wrap" the implementation in a minimal VC-API implementation, example code
45
- for which is available at < https://github.com/Wind4Greg/Server-for-VCs > .
46
- Additionally, your verifier will need to be able to verify Verifiable Credentials
40
+ This test suite uses an HTTP API (based on the
41
+ [ VC-API] ( https://w3c-ccg.github.io/vc-api/ ) ) for passing credentials into
42
+ issuer and verifier implementations. If your implementation is not already
43
+ compatible with the VC-API, it is possible to "wrap" the implementation in a
44
+ minimal VC-API implementation (example code is available at
45
+ < https://github.com/Wind4Greg/Server-for-VCs > ).
46
+
47
+ Additionally, verifier implementations will need to be able to verify Verifiable Credentials
47
48
and Verifiable Presentations signed with ` eddsa-rdfc-2022 ` . We recommend
48
- that any issuer endpoints submitted to this test suite also issue using
49
+ that any issuer endpoints used with this test suite also issue using
49
50
` eddsa-rdfc-2022 ` . Both signed and unsigned Verifiable Presentations will
50
51
be submitted for verification. Signed Verifiable Presentations from this suite
51
52
will have a domain and challenge set. The domain should be the test repo, and
52
53
the challenge is static.
53
54
54
- The issuer endpoint will need to conform to the
55
- [ VC Issuer API] ( https://w3c-ccg.github.io/vc-api/#issue-credential ) .
55
+ ### Test Suite HTTP API
56
56
57
- A request to issue a credential (` /credentials/issue ` ) will look like this:
57
+
58
+ A request to ** issue a credential** (` /credentials/issue ` ) will look like this:
59
+
60
+ ``` http
61
+ POST /credentials/issue
62
+ ```
58
63
59
64
``` json
60
65
{
@@ -82,6 +87,10 @@ A request to issue a credential (`/credentials/issue`) will look like this:
82
87
The response from a call to issue a credential (` /credentials/issue ` ) will
83
88
look like this:
84
89
90
+ ``` http
91
+ HTTP/1.1 200 OK
92
+ ```
93
+
85
94
``` json
86
95
{
87
96
"verifiableCredential" : {
@@ -112,12 +121,13 @@ look like this:
112
121
}
113
122
```
114
123
115
- The credential verifier endpoint will need to conform to the
116
- [ VC Verifier API] ( https://w3c-ccg.github.io/vc-api/#verify-credential ) .
117
-
118
- A request to the verifier endpoint (` /credentials/verify ` ) for a credential
124
+ A request to the ** verifier endpoint** (` /credentials/verify ` ) for a credential
119
125
will look like this:
120
126
127
+ ``` http
128
+ POST /credentials/verify
129
+ ```
130
+
121
131
``` json
122
132
{
123
133
"verifiableCredential" : {
@@ -147,13 +157,16 @@ will look like this:
147
157
},
148
158
"options" : {}
149
159
}
150
-
151
160
```
152
161
153
162
A response from the verifier endpoint (` /credentials/verify ` ) for a
154
163
verifiable credential might look like this (only HTTP response codes are
155
164
checked):
156
165
166
+ ``` http
167
+ HTTP/1.1 200 OK
168
+ ```
169
+
157
170
``` json
158
171
{
159
172
"checks" : [" proof" ],
@@ -162,11 +175,18 @@ checked):
162
175
}
163
176
```
164
177
165
- The presentation verifier endpoint will need to conform to the
166
- [ VC Verifier API] ( https://w3c-ccg.github.io/vc-api/#verify-presentation ) .
178
+ The credential verifier endpoint is based on the
179
+ [ VC-API Verify Credential] ( https://w3c-ccg.github.io/vc-api/#verify-credential )
180
+ endpoint.
167
181
168
- A request to the verifier endpoint for a presentation (` /presentations/verify ` )
169
- will look like this:
182
+ ---
183
+
184
+ A request to the ** verifier endpoint** for a presentation
185
+ (` /presentations/verify ` ) will look like this:
186
+
187
+ ``` http
188
+ POST /presentations/verify
189
+ ```
170
190
171
191
``` json
172
192
{
@@ -221,6 +241,10 @@ A response from the verifier endpoint (`/credentials/verify`) for a
221
241
verifiable presentation might look like this (only HTTP response codes are
222
242
checked):
223
243
244
+ ``` http
245
+ HTTP/1.1 200 OK
246
+ ```
247
+
224
248
``` json
225
249
{
226
250
"checks" : [" proof" ],
@@ -229,6 +253,11 @@ checked):
229
253
}
230
254
```
231
255
256
+ The presentation verifier endpoint is based on the
257
+ [ VC API Verify Presentation] ( https://w3c-ccg.github.io/vc-api/#verify-presentation ) endpoint.
258
+
259
+ #### Required Contexts
260
+
232
261
Implementations are expected to not error when any of the following context
233
262
files are used in a verifiable credential or a verifiable presentation:
234
263
0 commit comments