@@ -3,10 +3,65 @@ import { verifyCredential } from '../src/Verify.js'
3
3
import { knownDIDRegistries } from '../src/test-fixtures/knownDidRegistries.js' ;
4
4
const { expect } = chai ;
5
5
6
- /* This is just here for convenience, as an easy way to try things
7
- during development
6
+ /* This file is just here for convenience, as an easy way to try things
7
+ during development, with a few credentials already setup.
8
8
*/
9
9
10
+ const v1oidfNostatusNoexpiryEd25519Signature2020 = {
11
+ "@context" : [
12
+ "https://www.w3.org/2018/credentials/v1" ,
13
+ "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json" ,
14
+ "https://w3id.org/security/suites/ed25519-2020/v1"
15
+ ] ,
16
+ "id" : "urn:uuid:2fe53dc9-b2ec-4939-9b2c-0d00f6663b6c" ,
17
+ "issuanceDate" : "2025-01-09T15:06:31Z" ,
18
+ "type" : [
19
+ "VerifiableCredential" ,
20
+ "OpenBadgeCredential"
21
+ ] ,
22
+ "name" : "DCC Test Credential" ,
23
+ "issuer" : {
24
+ "type" : [
25
+ "Profile"
26
+ ] ,
27
+ "id" : "did:web:digitalcredentials.github.io:vc-test-fixtures:dids:oidf" ,
28
+ "name" : "Digital Credentials Consortium Test Issuer" ,
29
+ "url" : "https://dcconsortium.org" ,
30
+ "image" : "https://user-images.githubusercontent.com/752326/230469660-8f80d264-eccf-4edd-8e50-ea634d407778.png"
31
+ } ,
32
+ "credentialSubject" : {
33
+ "type" : [
34
+ "AchievementSubject"
35
+ ] ,
36
+ "achievement" : {
37
+ "id" : "urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922" ,
38
+ "type" : [
39
+ "Achievement"
40
+ ] ,
41
+ "achievementType" : "Diploma" ,
42
+ "name" : "Badge" ,
43
+ "description" : "This is a sample credential issued by the Digital Credentials Consortium to demonstrate the functionality of Verifiable Credentials for wallets and verifiers." ,
44
+ "criteria" : {
45
+ "type" : "Criteria" ,
46
+ "narrative" : "This credential was issued to a student that demonstrated proficiency in the Python programming language that occurred from **February 17, 2023** to **June 12, 2023**."
47
+ } ,
48
+ "image" : {
49
+ "id" : "https://user-images.githubusercontent.com/752326/214947713-15826a3a-b5ac-4fba-8d4a-884b60cb7157.png" ,
50
+ "type" : "Image"
51
+ }
52
+ } ,
53
+ "name" : "Jane Doe"
54
+ } ,
55
+ "proof" : {
56
+ "type" : "Ed25519Signature2020" ,
57
+ "created" : "2025-05-08T16:04:18Z" ,
58
+ "verificationMethod" : "did:web:digitalcredentials.github.io:vc-test-fixtures:dids:oidf#z6MkjXe1vZvPRqFuc9nRBtZ3e1Y9XKDFSbjFAfzLfW2bD6cZ" ,
59
+ "proofPurpose" : "assertionMethod" ,
60
+ "proofValue" : "z3LWc7BqiGRmP2ZnWvXeoVFgmHAcbNsDidMdnP9nnqw5kgNSUzTFVw5nM5dUnzdUTdNHy4SbHYdL9yp6apFVv16oV"
61
+ }
62
+ } as any
63
+
64
+
10
65
const didWebCredential = {
11
66
"type" : [
12
67
"VerifiableCredential" ,
@@ -116,12 +171,12 @@ const didKeyCredential = {
116
171
117
172
118
173
describe ( 'tests to experiment during development work' , ( ) => {
119
- it . skip ( 'returns oidf data ', async ( ) => {
174
+ it ( 'tests ', async ( ) => {
120
175
// change this however you like to test things, or more likely,
121
176
// change the VC that is passed in.
122
177
const result = await verifyCredential ( { credential : didKeyCredential , knownDIDRegistries } )
123
- console . log ( JSON . stringify ( result , null , 2 ) )
124
- expect ( true ) . to . equal ( true )
178
+ // console.log(JSON.stringify(result, null, 2))
179
+ expect ( result . errors ) . to . not . exist
125
180
} )
126
181
} )
127
182
0 commit comments