@veramo/credential-ld 5.1.5-next.12 → 5.1.5-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/contexts/schema.org.json +8612 -0
- package/build/contexts/w3id.org_security_bbs_v1.json +128 -0
- package/build/contexts/w3id.org_security_suites_ed25519-2018_v1.json +89 -56
- package/build/contexts/{ed25519-signature-2018-v1.json → w3id.org_security_suites_ed25519-2020-v1.json} +10 -8
- package/build/contexts/{json-web-signature-2020-v1.json → w3id.org_security_suites_jws-2020_v1.json} +15 -8
- package/build/contexts/w3id.org_security_suites_x25519-2020_v1.json +27 -0
- package/build/contexts/w3id.org_security_v1.json +36 -9
- package/build/contexts/w3id.org_security_v2.json +90 -22
- package/build/contexts/w3id.org_security_v3-unstable.json +4 -2
- package/build/contexts/www.w3.org_2018_credentials_examples_v1.json +69 -0
- package/build/contexts/www.w3.org_2018_credentials_v1.json +156 -36
- package/build/ld-credential-module.d.ts.map +1 -1
- package/build/ld-credential-module.js +5 -2
- package/build/ld-credential-module.js.map +1 -1
- package/build/ld-default-contexts.d.ts.map +1 -1
- package/build/ld-default-contexts.js +18 -9
- package/build/ld-default-contexts.js.map +1 -1
- package/build/ld-suites.d.ts +2 -2
- package/build/ld-suites.d.ts.map +1 -1
- package/build/ld-suites.js.map +1 -1
- package/build/suites/EcdsaSecp256k1RecoverySignature2020.d.ts +1 -1
- package/build/suites/EcdsaSecp256k1RecoverySignature2020.d.ts.map +1 -1
- package/build/suites/EcdsaSecp256k1RecoverySignature2020.js +3 -2
- package/build/suites/EcdsaSecp256k1RecoverySignature2020.js.map +1 -1
- package/build/suites/Ed25519Signature2018.d.ts +1 -1
- package/build/suites/Ed25519Signature2018.d.ts.map +1 -1
- package/build/suites/Ed25519Signature2018.js +2 -1
- package/build/suites/Ed25519Signature2018.js.map +1 -1
- package/build/suites/Ed25519Signature2020.d.ts +3 -5
- package/build/suites/Ed25519Signature2020.d.ts.map +1 -1
- package/build/suites/Ed25519Signature2020.js +50 -9
- package/build/suites/Ed25519Signature2020.js.map +1 -1
- package/build/suites/JsonWebSignature2020.d.ts +1 -1
- package/build/suites/JsonWebSignature2020.d.ts.map +1 -1
- package/build/suites/JsonWebSignature2020.js +2 -1
- package/build/suites/JsonWebSignature2020.js.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/issue-verify-ed25519-2020.test.ts +143 -0
- package/src/contexts/schema.org.json +8612 -0
- package/src/contexts/veramo.io_contexts_profile_v1.json +4 -4
- package/src/contexts/w3id.org_security_bbs_v1.json +128 -0
- package/src/contexts/w3id.org_security_suites_ed25519-2018_v1.json +89 -57
- package/src/contexts/{ed25519-signature-2018-v1.json → w3id.org_security_suites_ed25519-2020-v1.json} +10 -8
- package/src/contexts/w3id.org_security_suites_jws-2020_v1.json +78 -0
- package/src/contexts/w3id.org_security_suites_x25519-2020_v1.json +27 -0
- package/src/contexts/w3id.org_security_v1.json +36 -12
- package/src/contexts/w3id.org_security_v2.json +124 -57
- package/src/contexts/w3id.org_security_v3-unstable.json +684 -692
- package/src/contexts/www.w3.org_2018_credentials_examples_v1.json +69 -0
- package/src/contexts/www.w3.org_2018_credentials_v1.json +157 -79
- package/src/contexts/www.w3.org_ns_did_v1.json +0 -1
- package/src/ld-credential-module.ts +19 -5
- package/src/ld-default-contexts.ts +19 -10
- package/src/ld-suites.ts +2 -1
- package/src/suites/EcdsaSecp256k1RecoverySignature2020.ts +4 -5
- package/src/suites/Ed25519Signature2018.ts +2 -1
- package/src/suites/Ed25519Signature2020.ts +72 -11
- package/src/suites/JsonWebSignature2020.ts +2 -1
- package/build/contexts/did_v0.11.json +0 -61
- package/build/contexts/ed25519-signature-2020-v1.json +0 -77
- package/build/contexts/kyc-v1.json +0 -8
- package/build/contexts/socialmedia-v1.json +0 -7
- package/build/contexts/transmute_v1.json +0 -20
- package/src/contexts/did_v0.11.json +0 -64
- package/src/contexts/ed25519-signature-2020-v1.json +0 -77
- package/src/contexts/json-web-signature-2020-v1.json +0 -71
- package/src/contexts/kyc-v1.json +0 -8
- package/src/contexts/socialmedia-v1.json +0 -7
- package/src/contexts/transmute_v1.json +0 -21
- /package/build/contexts/{eip712.json → w3id.org_security_suites_eip712sig-2021_v1.json} +0 -0
- /package/src/contexts/{eip712.json → w3id.org_security_suites_eip712sig-2021_v1.json} +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
{
|
|
4
|
+
"@version": 1.1
|
|
5
|
+
},
|
|
6
|
+
"https://www.w3.org/ns/odrl.jsonld",
|
|
7
|
+
{
|
|
8
|
+
"ex": "https://example.org/examples#",
|
|
9
|
+
"schema": "http://schema.org/",
|
|
10
|
+
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
|
11
|
+
"3rdPartyCorrelation": "ex:3rdPartyCorrelation",
|
|
12
|
+
"AllVerifiers": "ex:AllVerifiers",
|
|
13
|
+
"Archival": "ex:Archival",
|
|
14
|
+
"BachelorDegree": "ex:BachelorDegree",
|
|
15
|
+
"Child": "ex:Child",
|
|
16
|
+
"CLCredentialDefinition2019": "ex:CLCredentialDefinition2019",
|
|
17
|
+
"CLSignature2019": "ex:CLSignature2019",
|
|
18
|
+
"IssuerPolicy": "ex:IssuerPolicy",
|
|
19
|
+
"HolderPolicy": "ex:HolderPolicy",
|
|
20
|
+
"Mother": "ex:Mother",
|
|
21
|
+
"RelationshipCredential": "ex:RelationshipCredential",
|
|
22
|
+
"UniversityDegreeCredential": "ex:UniversityDegreeCredential",
|
|
23
|
+
"AlumniCredential": "ex:AlumniCredential",
|
|
24
|
+
"DisputeCredential": "ex:DisputeCredential",
|
|
25
|
+
"PrescriptionCredential": "ex:PrescriptionCredential",
|
|
26
|
+
"ZkpExampleSchema2018": "ex:ZkpExampleSchema2018",
|
|
27
|
+
"issuerData": "ex:issuerData",
|
|
28
|
+
"attributes": "ex:attributes",
|
|
29
|
+
"signature": "ex:signature",
|
|
30
|
+
"signatureCorrectnessProof": "ex:signatureCorrectnessProof",
|
|
31
|
+
"primaryProof": "ex:primaryProof",
|
|
32
|
+
"nonRevocationProof": "ex:nonRevocationProof",
|
|
33
|
+
"alumniOf": {
|
|
34
|
+
"@id": "schema:alumniOf",
|
|
35
|
+
"@type": "rdf:HTML"
|
|
36
|
+
},
|
|
37
|
+
"child": {
|
|
38
|
+
"@id": "ex:child",
|
|
39
|
+
"@type": "@id"
|
|
40
|
+
},
|
|
41
|
+
"degree": "ex:degree",
|
|
42
|
+
"degreeType": "ex:degreeType",
|
|
43
|
+
"degreeSchool": "ex:degreeSchool",
|
|
44
|
+
"college": "ex:college",
|
|
45
|
+
"name": {
|
|
46
|
+
"@id": "schema:name",
|
|
47
|
+
"@type": "rdf:HTML"
|
|
48
|
+
},
|
|
49
|
+
"givenName": "schema:givenName",
|
|
50
|
+
"familyName": "schema:familyName",
|
|
51
|
+
"parent": {
|
|
52
|
+
"@id": "ex:parent",
|
|
53
|
+
"@type": "@id"
|
|
54
|
+
},
|
|
55
|
+
"referenceId": "ex:referenceId",
|
|
56
|
+
"documentPresence": "ex:documentPresence",
|
|
57
|
+
"evidenceDocument": "ex:evidenceDocument",
|
|
58
|
+
"spouse": "schema:spouse",
|
|
59
|
+
"subjectPresence": "ex:subjectPresence",
|
|
60
|
+
"verifier": {
|
|
61
|
+
"@id": "ex:verifier",
|
|
62
|
+
"@type": "@id"
|
|
63
|
+
},
|
|
64
|
+
"currentStatus": "ex:currentStatus",
|
|
65
|
+
"statusReason": "ex:statusReason",
|
|
66
|
+
"prescription": "ex:prescription"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
@@ -26,15 +26,43 @@
|
|
|
26
26
|
"JsonSchemaValidator2018": "cred:JsonSchemaValidator2018"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
"credentialStatus": {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
29
|
+
"credentialStatus": {
|
|
30
|
+
"@id": "cred:credentialStatus",
|
|
31
|
+
"@type": "@id"
|
|
32
|
+
},
|
|
33
|
+
"credentialSubject": {
|
|
34
|
+
"@id": "cred:credentialSubject",
|
|
35
|
+
"@type": "@id"
|
|
36
|
+
},
|
|
37
|
+
"evidence": {
|
|
38
|
+
"@id": "cred:evidence",
|
|
39
|
+
"@type": "@id"
|
|
40
|
+
},
|
|
41
|
+
"expirationDate": {
|
|
42
|
+
"@id": "cred:expirationDate",
|
|
43
|
+
"@type": "xsd:dateTime"
|
|
44
|
+
},
|
|
45
|
+
"holder": {
|
|
46
|
+
"@id": "cred:holder",
|
|
47
|
+
"@type": "@id"
|
|
48
|
+
},
|
|
49
|
+
"issued": {
|
|
50
|
+
"@id": "cred:issued",
|
|
51
|
+
"@type": "xsd:dateTime"
|
|
52
|
+
},
|
|
53
|
+
"issuer": {
|
|
54
|
+
"@id": "cred:issuer",
|
|
55
|
+
"@type": "@id"
|
|
56
|
+
},
|
|
57
|
+
"issuanceDate": {
|
|
58
|
+
"@id": "cred:issuanceDate",
|
|
59
|
+
"@type": "xsd:dateTime"
|
|
60
|
+
},
|
|
61
|
+
"proof": {
|
|
62
|
+
"@id": "sec:proof",
|
|
63
|
+
"@type": "@id",
|
|
64
|
+
"@container": "@graph"
|
|
65
|
+
},
|
|
38
66
|
"refreshService": {
|
|
39
67
|
"@id": "cred:refreshService",
|
|
40
68
|
"@type": "@id",
|
|
@@ -47,9 +75,18 @@
|
|
|
47
75
|
"ManualRefreshService2018": "cred:ManualRefreshService2018"
|
|
48
76
|
}
|
|
49
77
|
},
|
|
50
|
-
"termsOfUse": {
|
|
51
|
-
|
|
52
|
-
|
|
78
|
+
"termsOfUse": {
|
|
79
|
+
"@id": "cred:termsOfUse",
|
|
80
|
+
"@type": "@id"
|
|
81
|
+
},
|
|
82
|
+
"validFrom": {
|
|
83
|
+
"@id": "cred:validFrom",
|
|
84
|
+
"@type": "xsd:dateTime"
|
|
85
|
+
},
|
|
86
|
+
"validUntil": {
|
|
87
|
+
"@id": "cred:validUntil",
|
|
88
|
+
"@type": "xsd:dateTime"
|
|
89
|
+
}
|
|
53
90
|
}
|
|
54
91
|
},
|
|
55
92
|
"VerifiablePresentation": {
|
|
@@ -61,9 +98,20 @@
|
|
|
61
98
|
"type": "@type",
|
|
62
99
|
"cred": "https://www.w3.org/2018/credentials#",
|
|
63
100
|
"sec": "https://w3id.org/security#",
|
|
64
|
-
"holder": {
|
|
65
|
-
|
|
66
|
-
|
|
101
|
+
"holder": {
|
|
102
|
+
"@id": "cred:holder",
|
|
103
|
+
"@type": "@id"
|
|
104
|
+
},
|
|
105
|
+
"proof": {
|
|
106
|
+
"@id": "sec:proof",
|
|
107
|
+
"@type": "@id",
|
|
108
|
+
"@container": "@graph"
|
|
109
|
+
},
|
|
110
|
+
"verifiableCredential": {
|
|
111
|
+
"@id": "cred:verifiableCredential",
|
|
112
|
+
"@type": "@id",
|
|
113
|
+
"@container": "@graph"
|
|
114
|
+
}
|
|
67
115
|
}
|
|
68
116
|
},
|
|
69
117
|
"EcdsaSecp256k1Signature2019": {
|
|
@@ -76,9 +124,15 @@
|
|
|
76
124
|
"sec": "https://w3id.org/security#",
|
|
77
125
|
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
78
126
|
"challenge": "sec:challenge",
|
|
79
|
-
"created": {
|
|
127
|
+
"created": {
|
|
128
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
129
|
+
"@type": "xsd:dateTime"
|
|
130
|
+
},
|
|
80
131
|
"domain": "sec:domain",
|
|
81
|
-
"expires": {
|
|
132
|
+
"expires": {
|
|
133
|
+
"@id": "sec:expiration",
|
|
134
|
+
"@type": "xsd:dateTime"
|
|
135
|
+
},
|
|
82
136
|
"jws": "sec:jws",
|
|
83
137
|
"nonce": "sec:nonce",
|
|
84
138
|
"proofPurpose": {
|
|
@@ -90,12 +144,23 @@
|
|
|
90
144
|
"id": "@id",
|
|
91
145
|
"type": "@type",
|
|
92
146
|
"sec": "https://w3id.org/security#",
|
|
93
|
-
"assertionMethod": {
|
|
94
|
-
|
|
147
|
+
"assertionMethod": {
|
|
148
|
+
"@id": "sec:assertionMethod",
|
|
149
|
+
"@type": "@id",
|
|
150
|
+
"@container": "@set"
|
|
151
|
+
},
|
|
152
|
+
"authentication": {
|
|
153
|
+
"@id": "sec:authenticationMethod",
|
|
154
|
+
"@type": "@id",
|
|
155
|
+
"@container": "@set"
|
|
156
|
+
}
|
|
95
157
|
}
|
|
96
158
|
},
|
|
97
159
|
"proofValue": "sec:proofValue",
|
|
98
|
-
"verificationMethod": {
|
|
160
|
+
"verificationMethod": {
|
|
161
|
+
"@id": "sec:verificationMethod",
|
|
162
|
+
"@type": "@id"
|
|
163
|
+
}
|
|
99
164
|
}
|
|
100
165
|
},
|
|
101
166
|
"EcdsaSecp256r1Signature2019": {
|
|
@@ -108,9 +173,15 @@
|
|
|
108
173
|
"sec": "https://w3id.org/security#",
|
|
109
174
|
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
110
175
|
"challenge": "sec:challenge",
|
|
111
|
-
"created": {
|
|
176
|
+
"created": {
|
|
177
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
178
|
+
"@type": "xsd:dateTime"
|
|
179
|
+
},
|
|
112
180
|
"domain": "sec:domain",
|
|
113
|
-
"expires": {
|
|
181
|
+
"expires": {
|
|
182
|
+
"@id": "sec:expiration",
|
|
183
|
+
"@type": "xsd:dateTime"
|
|
184
|
+
},
|
|
114
185
|
"jws": "sec:jws",
|
|
115
186
|
"nonce": "sec:nonce",
|
|
116
187
|
"proofPurpose": {
|
|
@@ -122,12 +193,23 @@
|
|
|
122
193
|
"id": "@id",
|
|
123
194
|
"type": "@type",
|
|
124
195
|
"sec": "https://w3id.org/security#",
|
|
125
|
-
"assertionMethod": {
|
|
126
|
-
|
|
196
|
+
"assertionMethod": {
|
|
197
|
+
"@id": "sec:assertionMethod",
|
|
198
|
+
"@type": "@id",
|
|
199
|
+
"@container": "@set"
|
|
200
|
+
},
|
|
201
|
+
"authentication": {
|
|
202
|
+
"@id": "sec:authenticationMethod",
|
|
203
|
+
"@type": "@id",
|
|
204
|
+
"@container": "@set"
|
|
205
|
+
}
|
|
127
206
|
}
|
|
128
207
|
},
|
|
129
208
|
"proofValue": "sec:proofValue",
|
|
130
|
-
"verificationMethod": {
|
|
209
|
+
"verificationMethod": {
|
|
210
|
+
"@id": "sec:verificationMethod",
|
|
211
|
+
"@type": "@id"
|
|
212
|
+
}
|
|
131
213
|
}
|
|
132
214
|
},
|
|
133
215
|
"Ed25519Signature2018": {
|
|
@@ -140,9 +222,15 @@
|
|
|
140
222
|
"sec": "https://w3id.org/security#",
|
|
141
223
|
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
142
224
|
"challenge": "sec:challenge",
|
|
143
|
-
"created": {
|
|
225
|
+
"created": {
|
|
226
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
227
|
+
"@type": "xsd:dateTime"
|
|
228
|
+
},
|
|
144
229
|
"domain": "sec:domain",
|
|
145
|
-
"expires": {
|
|
230
|
+
"expires": {
|
|
231
|
+
"@id": "sec:expiration",
|
|
232
|
+
"@type": "xsd:dateTime"
|
|
233
|
+
},
|
|
146
234
|
"jws": "sec:jws",
|
|
147
235
|
"nonce": "sec:nonce",
|
|
148
236
|
"proofPurpose": {
|
|
@@ -154,12 +242,23 @@
|
|
|
154
242
|
"id": "@id",
|
|
155
243
|
"type": "@type",
|
|
156
244
|
"sec": "https://w3id.org/security#",
|
|
157
|
-
"assertionMethod": {
|
|
158
|
-
|
|
245
|
+
"assertionMethod": {
|
|
246
|
+
"@id": "sec:assertionMethod",
|
|
247
|
+
"@type": "@id",
|
|
248
|
+
"@container": "@set"
|
|
249
|
+
},
|
|
250
|
+
"authentication": {
|
|
251
|
+
"@id": "sec:authenticationMethod",
|
|
252
|
+
"@type": "@id",
|
|
253
|
+
"@container": "@set"
|
|
254
|
+
}
|
|
159
255
|
}
|
|
160
256
|
},
|
|
161
257
|
"proofValue": "sec:proofValue",
|
|
162
|
-
"verificationMethod": {
|
|
258
|
+
"verificationMethod": {
|
|
259
|
+
"@id": "sec:verificationMethod",
|
|
260
|
+
"@type": "@id"
|
|
261
|
+
}
|
|
163
262
|
}
|
|
164
263
|
},
|
|
165
264
|
"RsaSignature2018": {
|
|
@@ -168,9 +267,15 @@
|
|
|
168
267
|
"@version": 1.1,
|
|
169
268
|
"@protected": true,
|
|
170
269
|
"challenge": "sec:challenge",
|
|
171
|
-
"created": {
|
|
270
|
+
"created": {
|
|
271
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
272
|
+
"@type": "xsd:dateTime"
|
|
273
|
+
},
|
|
172
274
|
"domain": "sec:domain",
|
|
173
|
-
"expires": {
|
|
275
|
+
"expires": {
|
|
276
|
+
"@id": "sec:expiration",
|
|
277
|
+
"@type": "xsd:dateTime"
|
|
278
|
+
},
|
|
174
279
|
"jws": "sec:jws",
|
|
175
280
|
"nonce": "sec:nonce",
|
|
176
281
|
"proofPurpose": {
|
|
@@ -182,14 +287,29 @@
|
|
|
182
287
|
"id": "@id",
|
|
183
288
|
"type": "@type",
|
|
184
289
|
"sec": "https://w3id.org/security#",
|
|
185
|
-
"assertionMethod": {
|
|
186
|
-
|
|
290
|
+
"assertionMethod": {
|
|
291
|
+
"@id": "sec:assertionMethod",
|
|
292
|
+
"@type": "@id",
|
|
293
|
+
"@container": "@set"
|
|
294
|
+
},
|
|
295
|
+
"authentication": {
|
|
296
|
+
"@id": "sec:authenticationMethod",
|
|
297
|
+
"@type": "@id",
|
|
298
|
+
"@container": "@set"
|
|
299
|
+
}
|
|
187
300
|
}
|
|
188
301
|
},
|
|
189
302
|
"proofValue": "sec:proofValue",
|
|
190
|
-
"verificationMethod": {
|
|
303
|
+
"verificationMethod": {
|
|
304
|
+
"@id": "sec:verificationMethod",
|
|
305
|
+
"@type": "@id"
|
|
306
|
+
}
|
|
191
307
|
}
|
|
192
308
|
},
|
|
193
|
-
"proof": {
|
|
309
|
+
"proof": {
|
|
310
|
+
"@id": "https://w3id.org/security#proof",
|
|
311
|
+
"@type": "@id",
|
|
312
|
+
"@container": "@graph"
|
|
313
|
+
}
|
|
194
314
|
}
|
|
195
315
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-credential-module.d.ts","sourceRoot":"","sources":["../src/ld-credential-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,IAAI,EACJ,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"ld-credential-module.d.ts","sourceRoot":"","sources":["../src/ld-credential-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,IAAI,EACJ,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAA;AAO3B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAIrD,qBAAa,kBAAkB;IAC7B;;;;;;OAMG;IAEH,OAAO,CAAC,eAAe,CAAiB;IACxC,aAAa,EAAE,aAAa,CAAA;gBAEhB,OAAO,EAAE;QAAE,eAAe,EAAE,eAAe,CAAC;QAAC,aAAa,EAAE,aAAa,CAAA;KAAE;IAKvF,iBAAiB,CACf,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,EACjC,sBAAsB,GAAE,OAAe;IAgEnC,2BAA2B,CAC/B,UAAU,EAAE,iBAAiB,EAC7B,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,IAAI,EACT,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,OAAO,CAAC,oBAAoB,CAAC;IAmB1B,4BAA4B,CAChC,YAAY,EAAE,mBAAmB,EACjC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,IAAI,EACT,oBAAoB,EAAE,MAAM,EAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,OAAO,CAAC,sBAAsB,CAAC;IAoB5B,gBAAgB,CACpB,UAAU,EAAE,oBAAoB,EAChC,mBAAmB,qBAAiB,EACpC,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,GAChC,OAAO,CAAC,OAAO,CAAC;IAkBb,kBAAkB,CACtB,YAAY,EAAE,sBAAsB,EACpC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,mBAAmB,qBAAiB,EACpC,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,GAChC,OAAO,CAAC,OAAO,CAAC;CAiBpB"}
|
|
@@ -27,15 +27,18 @@ export class LdCredentialModule {
|
|
|
27
27
|
const didDoc = resolutionResult.didDocument;
|
|
28
28
|
if (!didDoc)
|
|
29
29
|
return;
|
|
30
|
+
let result = didDoc;
|
|
30
31
|
// currently, Veramo LD suites can modify the resolution response for DIDs from
|
|
31
32
|
// the document Loader. This allows us to fix incompatibilities between DID Documents
|
|
32
33
|
// and LD suites to be fixed specifically within the Veramo LD Suites definition
|
|
33
|
-
this.ldSuiteLoader.getAllSignatureSuites()
|
|
34
|
+
for (const x of this.ldSuiteLoader.getAllSignatureSuites()) {
|
|
35
|
+
result = (await x.preDidResolutionModification(url, result, context)) || result;
|
|
36
|
+
}
|
|
34
37
|
// console.log(`Returning from Documentloader: ${JSON.stringify(returnDocument)}`)
|
|
35
38
|
return {
|
|
36
39
|
contextUrl: null,
|
|
37
40
|
documentUrl: url,
|
|
38
|
-
document:
|
|
41
|
+
document: result,
|
|
39
42
|
};
|
|
40
43
|
}
|
|
41
44
|
if (this.ldContextLoader.has(url)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-credential-module.js","sourceRoot":"","sources":["../src/ld-credential-module.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,aAAa,CAAA;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,gBAAgB,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"ld-credential-module.js","sourceRoot":"","sources":["../src/ld-credential-module.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,aAAa,CAAA;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,gBAAgB,MAAM,uCAAuC,CAAA;AAEpE,MAAM,EAAE,mBAAmB,EAAE,GAAG,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAK5C,MAAM,KAAK,GAAG,KAAK,CAAC,iCAAiC,CAAC,CAAA;AAEtD,MAAM,OAAO,kBAAkB;IAC7B;;;;;;OAMG;IAEK,eAAe,CAAiB;IACxC,aAAa,CAAe;IAE5B,YAAY,OAA2E;QACrF,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAA;QAC9C,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAA;IAC5C,CAAC;IAED,iBAAiB,CACf,OAAiC,EACjC,yBAAkC,KAAK;QAEvC,OAAO,mBAAmB,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE;YAC/C,+CAA+C;YAE/C,iBAAiB;YACjB,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;gBACxC,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EA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;YAC7B,GAAG,OAAO;YACV,YAAY;YACZ,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,uBAAuB,EAAE,CAAC;YACzF,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,CAAC;YACpE,SAAS;YACT,MAAM;YACN,YAAY,EAAE,KAAK;SACpB,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACpB,+BAA+B;YAC/B,KAAK,CAAC,oCAAoC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAA;SAC7E;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-default-contexts.d.ts","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ld-default-contexts.d.ts","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":"AAkBA;;;;;;;GAOG;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4B5B,CAAA"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import contextCredentialV1 from './contexts/www.w3.org_2018_credentials_v1.json' assert { type: 'json' };
|
|
2
|
+
import contextCredentialExamplesV1 from './contexts/www.w3.org_2018_credentials_examples_v1.json' assert { type: 'json' };
|
|
2
3
|
import contextDidV1 from './contexts/www.w3.org_ns_did_v1.json' assert { type: 'json' };
|
|
3
4
|
import contextSecurityV1 from './contexts/w3id.org_security_v1.json' assert { type: 'json' };
|
|
4
5
|
import contextSecurityV2 from './contexts/w3id.org_security_v2.json' assert { type: 'json' };
|
|
5
6
|
import contextSecurityV3 from './contexts/w3id.org_security_v3-unstable.json' assert { type: 'json' };
|
|
7
|
+
import contextSecurityBBSV1 from './contexts/w3id.org_security_bbs_v1.json' assert { type: 'json' };
|
|
6
8
|
import contextSuitesEd25519 from './contexts/w3id.org_security_suites_ed25519-2018_v1.json' assert { type: 'json' };
|
|
7
9
|
import contextSuitesX25519 from './contexts/w3id.org_security_suites_x25519-2019_v1.json' assert { type: 'json' };
|
|
8
|
-
import
|
|
10
|
+
import contextVeramoProfile from './contexts/veramo.io_contexts_profile_v1.json' assert { type: 'json' };
|
|
9
11
|
import contextLdsEcdsaSecpRecovery2020_0 from './contexts/lds-ecdsa-secp256k1-recovery2020-0.0.json' assert { type: 'json' };
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import contextSuitesJws_2020 from './contexts/
|
|
14
|
-
import contextSuiteEip712 from './contexts/
|
|
12
|
+
import contextSuitesSecp256k1Recovery2020 from './contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json' assert { type: 'json' };
|
|
13
|
+
import contextSuitesEd25519_2020 from './contexts/w3id.org_security_suites_ed25519-2020-v1.json' assert { type: 'json' };
|
|
14
|
+
import contextSuitesX25519_2020 from './contexts/w3id.org_security_suites_x25519-2020_v1.json' assert { type: 'json' };
|
|
15
|
+
import contextSuitesJws_2020 from './contexts/w3id.org_security_suites_jws-2020_v1.json' assert { type: 'json' };
|
|
16
|
+
import contextSuiteEip712 from './contexts/w3id.org_security_suites_eip712sig-2021_v1.json' assert { type: 'json' };
|
|
17
|
+
import schema_org from './contexts/schema.org.json' assert { type: 'json' };
|
|
15
18
|
/**
|
|
16
19
|
* Provides a hardcoded map of common Linked Data `@context` definitions.
|
|
17
20
|
*
|
|
@@ -23,25 +26,31 @@ import contextSuiteEip712 from './contexts/eip712.json' assert { type: 'json' };
|
|
|
23
26
|
// @ts-ignore
|
|
24
27
|
export const LdDefaultContexts = new Map([
|
|
25
28
|
['https://www.w3.org/2018/credentials/v1', contextCredentialV1],
|
|
29
|
+
['https://www.w3.org/2018/credentials/examples/v1', contextCredentialExamplesV1],
|
|
26
30
|
['https://www.w3.org/ns/did/v1', contextDidV1],
|
|
31
|
+
['https://w3id.org/did/v1', contextDidV1],
|
|
27
32
|
['https://w3id.org/security/v1', contextSecurityV1],
|
|
28
33
|
['https://w3id.org/security/v2', contextSecurityV2],
|
|
29
34
|
['https://w3id.org/security/v3-unstable', contextSecurityV3],
|
|
35
|
+
['https://w3id.org/security/bbs/v1', contextSecurityBBSV1],
|
|
30
36
|
['https://w3id.org/security/suites/ed25519-2018/v1', contextSuitesEd25519],
|
|
31
37
|
['https://w3id.org/security/suites/x25519-2019/v1', contextSuitesX25519],
|
|
32
38
|
['https://w3id.org/security/suites/ed25519-2020/v1', contextSuitesEd25519_2020],
|
|
39
|
+
['https://w3id.org/security/suites/x25519-2020/v1', contextSuitesX25519_2020],
|
|
33
40
|
['https://w3id.org/security/suites/jws-2020/v1', contextSuitesJws_2020],
|
|
34
|
-
['https://veramo.io/contexts/profile/v1',
|
|
41
|
+
['https://veramo.io/contexts/profile/v1', contextVeramoProfile],
|
|
35
42
|
[
|
|
36
43
|
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
|
|
37
44
|
contextLdsEcdsaSecpRecovery2020_0,
|
|
38
45
|
],
|
|
39
46
|
[
|
|
40
47
|
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-2.0.jsonld',
|
|
41
|
-
|
|
48
|
+
contextSuitesSecp256k1Recovery2020,
|
|
42
49
|
],
|
|
43
|
-
['https://w3id.org/security/suites/secp256k1recovery-2020/v2',
|
|
50
|
+
['https://w3id.org/security/suites/secp256k1recovery-2020/v2', contextSuitesSecp256k1Recovery2020],
|
|
44
51
|
['https://w3id.org/security/suites/eip712sig-2021', contextSuiteEip712],
|
|
45
52
|
['https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/', contextSuiteEip712],
|
|
53
|
+
['https://w3id.org/security/suites/eip712sig-2021/v1', contextSuiteEip712],
|
|
54
|
+
['https://schema.org', schema_org],
|
|
46
55
|
]);
|
|
47
56
|
//# sourceMappingURL=ld-default-contexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-default-contexts.js","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,gDAAgD,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AACxG,OAAO,YAAY,MAAM,sCAAsC,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AACvF,OAAO,iBAAiB,MAAM,sCAAsC,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAC5F,OAAO,iBAAiB,MAAM,sCAAsC,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAC5F,OAAO,iBAAiB,MAAM,+CAA+C,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AACrG,OAAO,oBAAoB,MAAM,0DAA0D,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AACnH,OAAO,mBAAmB,MAAM,yDAAyD,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AACjH,OAAO,
|
|
1
|
+
{"version":3,"file":"ld-default-contexts.js","sourceRoot":"","sources":["../src/ld-default-contexts.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,gDAAgD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,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAE3E;;;;;;;GAOG;AACH,aAAa;AACb,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,CAAC,wCAAwC,EAAE,mBAAmB,CAAC;IAC/D,CAAC,iDAAiD,EAAE,2BAA2B,CAAC;IAChF,CAAC,8BAA8B,EAAE,YAAY,CAAC;IAC9C,CAAC,yBAAyB,EAAE,YAAY,CAAC;IACzC,CAAC,8BAA8B,EAAE,iBAAiB,CAAC;IACnD,CAAC,8BAA8B,EAAE,iBAAiB,CAAC;IACnD,CAAC,uCAAuC,EAAE,iBAAiB,CAAC;IAC5D,CAAC,kCAAkC,EAAE,oBAAoB,CAAC;IAC1D,CAAC,kDAAkD,EAAE,oBAAoB,CAAC;IAC1E,CAAC,iDAAiD,EAAE,mBAAmB,CAAC;IACxE,CAAC,kDAAkD,EAAE,yBAAyB,CAAC;IAC/E,CAAC,iDAAiD,EAAE,wBAAwB,CAAC;IAC7E,CAAC,8CAA8C,EAAE,qBAAqB,CAAC;IACvE,CAAC,uCAAuC,EAAE,oBAAoB,CAAC;IAC/D;QACE,6GAA6G;QAC7G,iCAAiC;KAClC;IACD;QACE,6GAA6G;QAC7G,kCAAkC;KACnC;IACD,CAAC,4DAA4D,EAAE,kCAAkC,CAAC;IAClG,CAAC,iDAAiD,EAAE,kBAAkB,CAAC;IACvE,CAAC,gEAAgE,EAAE,kBAAkB,CAAC;IACtF,CAAC,oDAAoD,EAAE,kBAAkB,CAAC;IAC1E,CAAC,oBAAoB,EAAE,UAAU,CAAC;CACnC,CAAC,CAAA"}
|
package/build/ld-suites.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CredentialPayload, IAgentContext, IKey, IKeyManager, IResolver, PresentationPayload, TKeyType } from '@veramo/core-types';
|
|
1
|
+
import { CredentialPayload, DIDDocComponent, IAgentContext, IKey, IKeyManager, IResolver, PresentationPayload, TKeyType } from '@veramo/core-types';
|
|
2
2
|
import { DIDDocument } from 'did-resolver';
|
|
3
3
|
export type RequiredAgentMethods = IResolver & Pick<IKeyManager, 'keyManagerGet' | 'keyManagerSign'>;
|
|
4
4
|
/**
|
|
@@ -11,7 +11,7 @@ export declare abstract class VeramoLdSignature {
|
|
|
11
11
|
abstract getSupportedVeramoKeyType(): TKeyType;
|
|
12
12
|
abstract getSuiteForSigning(key: IKey, issuerDid: string, verificationMethodId: string, context: IAgentContext<RequiredAgentMethods>): any;
|
|
13
13
|
abstract getSuiteForVerification(): any;
|
|
14
|
-
abstract preDidResolutionModification(didUrl: string, didDoc: DIDDocument):
|
|
14
|
+
abstract preDidResolutionModification(didUrl: string, didDoc: DIDDocument | DIDDocComponent, context: IAgentContext<IResolver>): Promise<DIDDocument | DIDDocComponent>;
|
|
15
15
|
abstract preSigningCredModification(credential: CredentialPayload): void;
|
|
16
16
|
preSigningPresModification(presentation: PresentationPayload): void;
|
|
17
17
|
}
|
package/build/ld-suites.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-suites.d.ts","sourceRoot":"","sources":["../src/ld-suites.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,IAAI,EACJ,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACT,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,gBAAgB,CAAC,CAAA;AAEpG;;;;GAIG;AACH,8BAAsB,iBAAiB;IAMrC,QAAQ,CAAC,4BAA4B,IAAI,MAAM;IAE/C,QAAQ,CAAC,yBAAyB,IAAI,QAAQ;IAE9C,QAAQ,CAAC,kBAAkB,CACzB,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5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":3,"file":"ld-suites.js","sourceRoot":"","sources":["../src/ld-suites.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ld-suites.js","sourceRoot":"","sources":["../src/ld-suites.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,MAAM,OAAgB,iBAAiB;IAuBrC,0BAA0B,CAAC,YAAiC;QAC1D,mGAAmG;QACnG,gEAAgE;QAChE,MAAM,qBAAqB,GAAG,YAAmB,CAAA;QACjD,IAAI,qBAAqB,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC,EAAE;YAChD,OAAO,qBAAqB,CAAC,QAAQ,CAAA;SACtC;IACH,CAAC;CACF"}
|
|
@@ -11,7 +11,7 @@ export declare class VeramoEcdsaSecp256k1RecoverySignature2020 extends VeramoLdS
|
|
|
11
11
|
getSuiteForSigning(key: IKey, did: string, verifiableMethodId: string, context: IAgentContext<RequiredAgentMethods>): any;
|
|
12
12
|
getSuiteForVerification(): any;
|
|
13
13
|
preSigningCredModification(credential: CredentialPayload): void;
|
|
14
|
-
preDidResolutionModification(didUrl: string, didDoc: DIDDocument):
|
|
14
|
+
preDidResolutionModification(didUrl: string, didDoc: DIDDocument): Promise<DIDDocument>;
|
|
15
15
|
getContext(): string;
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=EcdsaSecp256k1RecoverySignature2020.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.d.ts","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.d.ts","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAOlG;;;;GAIG;AACH,qBAAa,yCAA0C,SAAQ,iBAAiB;IAC9E,4BAA4B,IAAI,MAAM;IAItC,yBAAyB,IAAI,QAAQ;IAIrC,kBAAkB,CAChB,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,MAAM,EACX,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,GAAG;IAyCN,uBAAuB,IAAI,GAAG;IAI9B,0BAA0B,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAGzD,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAoB7F,UAAU,IAAI,MAAM;CAGrB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VeramoLdSignature } from '../ld-suites.js';
|
|
2
2
|
import ldsEcdsa from '@veramo-community/lds-ecdsa-secp256k1-recovery2020';
|
|
3
|
-
const { EcdsaSecp256k1RecoveryMethod2020, EcdsaSecp256k1RecoverySignature2020, } = ldsEcdsa;
|
|
4
3
|
import * as u8a from 'uint8arrays';
|
|
5
4
|
import { asArray, encodeJoseBlob } from '@veramo/utils';
|
|
5
|
+
const { EcdsaSecp256k1RecoveryMethod2020, EcdsaSecp256k1RecoverySignature2020 } = ldsEcdsa;
|
|
6
6
|
/**
|
|
7
7
|
* Veramo wrapper for the EcdsaSecp256k1RecoverySignature2020 suite by Transmute Industries
|
|
8
8
|
*
|
|
@@ -57,7 +57,7 @@ export class VeramoEcdsaSecp256k1RecoverySignature2020 extends VeramoLdSignature
|
|
|
57
57
|
}
|
|
58
58
|
preSigningCredModification(credential) {
|
|
59
59
|
}
|
|
60
|
-
preDidResolutionModification(didUrl, didDoc) {
|
|
60
|
+
async preDidResolutionModification(didUrl, didDoc) {
|
|
61
61
|
// did:ethr
|
|
62
62
|
const idx = didDoc['@context']?.indexOf('https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld') || -1;
|
|
63
63
|
if (Array.isArray(didDoc['@context']) && idx !== -1) {
|
|
@@ -74,6 +74,7 @@ export class VeramoEcdsaSecp256k1RecoverySignature2020 extends VeramoLdSignature
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
+
return didDoc;
|
|
77
78
|
}
|
|
78
79
|
getContext() {
|
|
79
80
|
return 'https://w3id.org/security/suites/secp256k1recovery-2020/v2';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.js","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEzE,OAAO,QAAQ,MAAM,oDAAoD,CAAA;AACzE,
|
|
1
|
+
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.js","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEzE,OAAO,QAAQ,MAAM,oDAAoD,CAAA;AACzE,OAAO,KAAK,GAAG,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEvD,MAAM,EAAE,gCAAgC,EAAE,mCAAmC,EAAE,GAAG,QAAQ,CAAA;AAE1F;;;;GAIG;AACH,MAAM,OAAO,yCAA0C,SAAQ,iBAAiB;IAC9E,4BAA4B;QAC1B,OAAO,k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C,CAAA;SACH;QACD,OAAO,MAAM,CAAA;IACf,CAAC;IACD,UAAU;QACR,OAAO,4DAA4D,CAAA;IACrE,CAAC;CACF"}
|
|
@@ -11,6 +11,6 @@ export declare class VeramoEd25519Signature2018 extends VeramoLdSignature {
|
|
|
11
11
|
getSuiteForSigning(key: IKey, issuerDid: string, verificationMethodId: string, context: IAgentContext<RequiredAgentMethods>): any;
|
|
12
12
|
getSuiteForVerification(): any;
|
|
13
13
|
preSigningCredModification(credential: CredentialPayload): void;
|
|
14
|
-
preDidResolutionModification(didUrl: string, didDoc: DIDDocument):
|
|
14
|
+
preDidResolutionModification(didUrl: string, didDoc: DIDDocument): Promise<DIDDocument>;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=Ed25519Signature2018.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ed25519Signature2018.d.ts","sourceRoot":"","sources":["../../src/suites/Ed25519Signature2018.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAIlG;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAC/D,4BAA4B,IAAI,MAAM;IAItC,yBAAyB,IAAI,QAAQ;IAIrC,kBAAkB,CAChB,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,GAAG;IA2CN,uBAAuB,IAAI,GAAG;IAI9B,0BAA0B,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"Ed25519Signature2018.d.ts","sourceRoot":"","sources":["../../src/suites/Ed25519Signature2018.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAIlG;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAC/D,4BAA4B,IAAI,MAAM;IAItC,yBAAyB,IAAI,QAAQ;IAIrC,kBAAkB,CAChB,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,GAAG;IA2CN,uBAAuB,IAAI,GAAG;IAI9B,0BAA0B,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAIzD,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;CAI9F"}
|
|
@@ -58,8 +58,9 @@ export class VeramoEd25519Signature2018 extends VeramoLdSignature {
|
|
|
58
58
|
preSigningCredModification(credential) {
|
|
59
59
|
// nothing to do here
|
|
60
60
|
}
|
|
61
|
-
preDidResolutionModification(didUrl, didDoc) {
|
|
61
|
+
async preDidResolutionModification(didUrl, didDoc) {
|
|
62
62
|
// nothing to do here
|
|
63
|
+
return didDoc;
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
//# sourceMappingURL=Ed25519Signature2018.js.map
|