@veramo/credential-ld 5.0.1-next.8 → 5.1.0
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/action-handler.d.ts +19 -27
- package/build/action-handler.d.ts.map +1 -1
- package/build/contexts/eip712.json +93 -0
- package/build/ld-default-contexts.d.ts.map +1 -1
- package/build/ld-default-contexts.js +23 -20
- package/build/ld-default-contexts.js.map +1 -1
- package/build/plugin.schema.json +30 -32
- package/build/suites/JsonWebSignature2020.d.ts.map +1 -1
- package/build/suites/JsonWebSignature2020.js +5 -2
- package/build/suites/JsonWebSignature2020.js.map +1 -1
- package/build/types.d.ts +4 -4
- package/build/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/issue-verify-flow.test.ts +30 -3
- package/src/contexts/eip712.json +93 -0
- package/src/ld-default-contexts.ts +23 -20
- package/src/plugin.schema.json +30 -32
- package/src/suites/JsonWebSignature2020.ts +10 -5
- package/src/types.ts +9 -9
|
@@ -50,10 +50,7 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
"@context": {
|
|
53
|
-
|
|
54
|
-
items: {
|
|
55
|
-
type: string;
|
|
56
|
-
};
|
|
53
|
+
$ref: string;
|
|
57
54
|
};
|
|
58
55
|
issuanceDate: {
|
|
59
56
|
$ref: string;
|
|
@@ -96,8 +93,22 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
96
93
|
};
|
|
97
94
|
description: string;
|
|
98
95
|
};
|
|
96
|
+
ContextType: {
|
|
97
|
+
anyOf: ({
|
|
98
|
+
type: string; /** {@inheritdoc ICredentialIssuerLD.createVerifiableCredentialLD} */
|
|
99
|
+
items?: undefined;
|
|
100
|
+
} | {
|
|
101
|
+
type: string;
|
|
102
|
+
items: {
|
|
103
|
+
anyOf: {
|
|
104
|
+
type: string;
|
|
105
|
+
}[];
|
|
106
|
+
};
|
|
107
|
+
})[];
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
99
110
|
DateType: {
|
|
100
|
-
type: string;
|
|
111
|
+
type: string;
|
|
101
112
|
description: string;
|
|
102
113
|
};
|
|
103
114
|
CredentialStatusReference: {
|
|
@@ -137,15 +148,7 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
137
148
|
})[];
|
|
138
149
|
};
|
|
139
150
|
"@context": {
|
|
140
|
-
|
|
141
|
-
type: string;
|
|
142
|
-
items: {
|
|
143
|
-
type: string;
|
|
144
|
-
};
|
|
145
|
-
} | {
|
|
146
|
-
type: string;
|
|
147
|
-
items?: undefined;
|
|
148
|
-
})[];
|
|
151
|
+
$ref: string;
|
|
149
152
|
};
|
|
150
153
|
issuanceDate: {
|
|
151
154
|
type: string;
|
|
@@ -221,10 +224,7 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
221
224
|
};
|
|
222
225
|
};
|
|
223
226
|
"@context": {
|
|
224
|
-
|
|
225
|
-
items: {
|
|
226
|
-
type: string;
|
|
227
|
-
};
|
|
227
|
+
$ref: string;
|
|
228
228
|
};
|
|
229
229
|
verifier: {
|
|
230
230
|
type: string;
|
|
@@ -282,15 +282,7 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
282
282
|
})[];
|
|
283
283
|
};
|
|
284
284
|
"@context": {
|
|
285
|
-
|
|
286
|
-
type: string;
|
|
287
|
-
items: {
|
|
288
|
-
type: string;
|
|
289
|
-
};
|
|
290
|
-
} | {
|
|
291
|
-
type: string;
|
|
292
|
-
items?: undefined;
|
|
293
|
-
})[];
|
|
285
|
+
$ref: string;
|
|
294
286
|
};
|
|
295
287
|
verifier: {
|
|
296
288
|
type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-handler.d.ts","sourceRoot":"","sources":["../src/action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAKZ,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAvFzB;IAE5C,OAAO,CAAC,kBAAkB,CAAoB;gBAElC,OAAO,EAAE;QAAE,WAAW,EAAE,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;QAAC,MAAM,EAAE,iBAAiB,EAAE,CAAA;KAAE;IActG,uEAAuE;IAC1D,8BAA8B,CACzC,IAAI,EAAE,mCAAmC,EACzC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,sBAAsB,CAAC;IAiElC,qEAAqE;IACxD,4BAA4B,CACvC,IAAI,EAAE,iCAAiC,EACvC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,oBAAoB,CAAC;IAiDhC,2DAA2D;IAC9C,kBAAkB,CAC7B,IAAI,EAAE,uBAAuB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,OAAO,CAAC;IAgBnB,6DAA6D;IAChD,oBAAoB,CAC/B,IAAI,EAAE,yBAAyB,EAC/B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,OAAO,CAAC;YAgBL,oBAAoB;CAgCnC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": {
|
|
3
|
+
"@version": 1.1,
|
|
4
|
+
"@protected": true,
|
|
5
|
+
"Eip712SchemaValidator2021": "https://w3id.org/security#Eip712SchemaValidator2021",
|
|
6
|
+
"EthereumEip712Signature2021": {
|
|
7
|
+
"@id": "https://w3id.org/security#EthereumEip712Signature2021",
|
|
8
|
+
"@context": {
|
|
9
|
+
"@version": 1.1,
|
|
10
|
+
"@protected": true,
|
|
11
|
+
"id": "@id",
|
|
12
|
+
"type": "@type",
|
|
13
|
+
"created": {
|
|
14
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
15
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
16
|
+
},
|
|
17
|
+
"domain": "https://w3id.org/security#domain",
|
|
18
|
+
"proofPurpose": {
|
|
19
|
+
"@id": "https://w3id.org/security#proofPurpose",
|
|
20
|
+
"@type": "@vocab",
|
|
21
|
+
"@context": {
|
|
22
|
+
"@version": 1.1,
|
|
23
|
+
"@protected": true,
|
|
24
|
+
"id": "@id",
|
|
25
|
+
"type": "@type",
|
|
26
|
+
"assertionMethod": {
|
|
27
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
28
|
+
"@type": "@id",
|
|
29
|
+
"@container": "@set"
|
|
30
|
+
},
|
|
31
|
+
"authentication": {
|
|
32
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
33
|
+
"@type": "@id",
|
|
34
|
+
"@container": "@set"
|
|
35
|
+
},
|
|
36
|
+
"capabilityInvocation": {
|
|
37
|
+
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
38
|
+
"@type": "@id",
|
|
39
|
+
"@container": "@set"
|
|
40
|
+
},
|
|
41
|
+
"capabilityDelegation": {
|
|
42
|
+
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
43
|
+
"@type": "@id",
|
|
44
|
+
"@container": "@set"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"eip712Domain": {
|
|
49
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#eip712-domain",
|
|
50
|
+
"@context": {
|
|
51
|
+
"@version": 1.1,
|
|
52
|
+
"@protected": true,
|
|
53
|
+
"id": "@id",
|
|
54
|
+
"type": "@type",
|
|
55
|
+
"messageSchema": {
|
|
56
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#message-schema",
|
|
57
|
+
"@type": "@json"
|
|
58
|
+
},
|
|
59
|
+
"primaryType": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#primary-type",
|
|
60
|
+
"domain": {
|
|
61
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#domain",
|
|
62
|
+
"@type": "@json"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"eip712": {
|
|
67
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#eip712-domain",
|
|
68
|
+
"@context": {
|
|
69
|
+
"@version": 1.1,
|
|
70
|
+
"@protected": true,
|
|
71
|
+
"id": "@id",
|
|
72
|
+
"type": "@type",
|
|
73
|
+
"types": {
|
|
74
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#message-schema",
|
|
75
|
+
"@type": "@json"
|
|
76
|
+
},
|
|
77
|
+
"primaryType": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#primary-type",
|
|
78
|
+
"domain": {
|
|
79
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#domain",
|
|
80
|
+
"@type": "@json"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"proofValue": "https://w3id.org/security#proofValue",
|
|
85
|
+
"verificationMethod": {
|
|
86
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
87
|
+
"@type": "@id"
|
|
88
|
+
},
|
|
89
|
+
"canonicalizationHash": "https://w3id.org/security/suites/eip712sig-2021#canonicalizationHash"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -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":"AAeA;;;;;;;GAOG;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsB5B,CAAA"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import contextCredentialV1 from
|
|
2
|
-
import contextDidV1 from
|
|
3
|
-
import contextSecurityV1 from
|
|
4
|
-
import contextSecurityV2 from
|
|
5
|
-
import contextSecurityV3 from
|
|
6
|
-
import contextSuitesEd25519 from
|
|
7
|
-
import contextSuitesX25519 from
|
|
8
|
-
import contextProfile from
|
|
9
|
-
import contextLdsEcdsaSecpRecovery2020_0 from
|
|
10
|
-
import contextLdsEcdsaSecpRecovery2020_2 from
|
|
11
|
-
import contextSuitesSecp from
|
|
1
|
+
import contextCredentialV1 from './contexts/www.w3.org_2018_credentials_v1.json' assert { type: 'json' };
|
|
2
|
+
import contextDidV1 from './contexts/www.w3.org_ns_did_v1.json' assert { type: 'json' };
|
|
3
|
+
import contextSecurityV1 from './contexts/w3id.org_security_v1.json' assert { type: 'json' };
|
|
4
|
+
import contextSecurityV2 from './contexts/w3id.org_security_v2.json' assert { type: 'json' };
|
|
5
|
+
import contextSecurityV3 from './contexts/w3id.org_security_v3-unstable.json' assert { type: 'json' };
|
|
6
|
+
import contextSuitesEd25519 from './contexts/w3id.org_security_suites_ed25519-2018_v1.json' assert { type: 'json' };
|
|
7
|
+
import contextSuitesX25519 from './contexts/w3id.org_security_suites_x25519-2019_v1.json' assert { type: 'json' };
|
|
8
|
+
import contextProfile from './contexts/veramo.io_contexts_profile_v1.json' assert { type: 'json' };
|
|
9
|
+
import contextLdsEcdsaSecpRecovery2020_0 from './contexts/lds-ecdsa-secp256k1-recovery2020-0.0.json' assert { type: 'json' };
|
|
10
|
+
import contextLdsEcdsaSecpRecovery2020_2 from './contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json' assert { type: 'json' };
|
|
11
|
+
import contextSuitesSecp from './contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json' assert { type: 'json' };
|
|
12
12
|
import contextSuitesEd25519_2020 from './contexts/ed25519-signature-2020-v1.json' assert { type: 'json' };
|
|
13
13
|
import contextSuitesJws_2020 from './contexts/json-web-signature-2020-v1.json' assert { type: 'json' };
|
|
14
|
+
import contextSuiteEip712 from './contexts/eip712.json' assert { type: 'json' };
|
|
14
15
|
/**
|
|
15
16
|
* Provides a hardcoded map of common Linked Data `@context` definitions.
|
|
16
17
|
*
|
|
@@ -30,15 +31,17 @@ export const LdDefaultContexts = new Map([
|
|
|
30
31
|
['https://w3id.org/security/suites/x25519-2019/v1', contextSuitesX25519],
|
|
31
32
|
['https://w3id.org/security/suites/ed25519-2020/v1', contextSuitesEd25519_2020],
|
|
32
33
|
['https://w3id.org/security/suites/jws-2020/v1', contextSuitesJws_2020],
|
|
33
|
-
// ['https://w3id.org/did/v0.11', require('./contexts/did_v0.11.json')],
|
|
34
|
-
// ['https://veramo.io/contexts/socialmedia/v1', require('./contexts/socialmedia-v1.json')],
|
|
35
|
-
// ['https://veramo.io/contexts/kyc/v1', require('./contexts/kyc-v1.json')],
|
|
36
34
|
['https://veramo.io/contexts/profile/v1', contextProfile],
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
[
|
|
36
|
+
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
|
|
37
|
+
contextLdsEcdsaSecpRecovery2020_0,
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-2.0.jsonld',
|
|
41
|
+
contextLdsEcdsaSecpRecovery2020_2,
|
|
42
|
+
],
|
|
43
|
+
['https://w3id.org/security/suites/secp256k1recovery-2020/v2', contextSuitesSecp],
|
|
44
|
+
['https://w3id.org/security/suites/eip712sig-2021', contextSuiteEip712],
|
|
45
|
+
['https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/', contextSuiteEip712],
|
|
43
46
|
]);
|
|
44
47
|
//# 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,cAAc,MAAM,+CAA+C,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAClG,OAAO,iCAAiC,MAAM,sDAAsD,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAC5H,OAAO,iCAAiC,MAAM,oEAAoE,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAC1I,OAAO,iBAAiB,MAAM,oEAAoE,CAAC,SAA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C,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AACtG,OAAO,kBAAkB,MAAM,wBAAwB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAA;AAE/E;;;;;;;GAOG;AACH,aAAa;AACb,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,CAAC,wCAAwC,EAAE,mBAAmB,CAAC;IAC/D,CAAC,8BAA8B,EAAE,YAAY,CAAC;IAC9C,CAAC,8BAA8B,EAAE,iBAAiB,CAAC;IACnD,CAAC,8BAA8B,EAAE,iBAAiB,CAAC;IACnD,CAAC,uCAAuC,EAAE,iBAAiB,CAAC;IAC5D,CAAC,kDAAkD,EAAE,oBAAoB,CAAC;IAC1E,CAAC,iDAAiD,EAAE,mBAAmB,CAAC;IACxE,CAAC,kDAAkD,EAAE,yBAAyB,CAAC;IAC/E,CAAC,8CAA8C,EAAE,qBAAqB,CAAC;IACvE,CAAC,uCAAuC,EAAE,cAAc,CAAC;IACzD;QACE,6GAA6G;QAC7G,iCAAiC;KAClC;IACD;QACE,6GAA6G;QAC7G,iCAAiC;KAClC;IACD,CAAC,4DAA4D,EAAE,iBAAiB,CAAC;IACjF,CAAC,iDAAiD,EAAE,kBAAkB,CAAC;IACvE,CAAC,gEAAgE,EAAE,kBAAkB,CAAC;CACvF,CAAC,CAAA"}
|
package/build/plugin.schema.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"keyRef": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"description": "Optional. The key handle ( {@link @veramo/core#IKey.kid | IKey.kid } ) from the internal database."
|
|
14
|
+
"description": "Optional. The key handle ( {@link @veramo/core-types#IKey.kid | IKey.kid } ) from the internal database."
|
|
15
15
|
},
|
|
16
16
|
"fetchRemoteContexts": {
|
|
17
17
|
"type": "boolean",
|
|
@@ -42,10 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"@context": {
|
|
45
|
-
"
|
|
46
|
-
"items": {
|
|
47
|
-
"type": "string"
|
|
48
|
-
}
|
|
45
|
+
"$ref": "#/components/schemas/ContextType"
|
|
49
46
|
},
|
|
50
47
|
"issuanceDate": {
|
|
51
48
|
"$ref": "#/components/schemas/DateType"
|
|
@@ -93,6 +90,30 @@
|
|
|
93
90
|
},
|
|
94
91
|
"description": "The value of the credentialSubject property is defined as a set of objects that contain one or more properties that are each related to a subject of the verifiable credential. Each object MAY contain an id.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#credential-subject | Credential Subject }"
|
|
95
92
|
},
|
|
93
|
+
"ContextType": {
|
|
94
|
+
"anyOf": [
|
|
95
|
+
{
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "object"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"anyOf": [
|
|
105
|
+
{
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "object"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"description": "The data type for `@context` properties of credentials, presentations, etc."
|
|
116
|
+
},
|
|
96
117
|
"DateType": {
|
|
97
118
|
"type": "string",
|
|
98
119
|
"description": "Represents an issuance or expiration date for Credentials / Presentations. This is used as input when creating them."
|
|
@@ -139,17 +160,7 @@
|
|
|
139
160
|
]
|
|
140
161
|
},
|
|
141
162
|
"@context": {
|
|
142
|
-
"
|
|
143
|
-
{
|
|
144
|
-
"type": "array",
|
|
145
|
-
"items": {
|
|
146
|
-
"type": "string"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"type": "string"
|
|
151
|
-
}
|
|
152
|
-
]
|
|
163
|
+
"$ref": "#/components/schemas/ContextType"
|
|
153
164
|
},
|
|
154
165
|
"issuanceDate": {
|
|
155
166
|
"type": "string"
|
|
@@ -199,7 +210,7 @@
|
|
|
199
210
|
},
|
|
200
211
|
"keyRef": {
|
|
201
212
|
"type": "string",
|
|
202
|
-
"description": "Optional. The key handle ( {@link @veramo/core#IKey.kid | IKey.kid } ) from the internal database."
|
|
213
|
+
"description": "Optional. The key handle ( {@link @veramo/core-types#IKey.kid | IKey.kid } ) from the internal database."
|
|
203
214
|
},
|
|
204
215
|
"fetchRemoteContexts": {
|
|
205
216
|
"type": "boolean",
|
|
@@ -233,10 +244,7 @@
|
|
|
233
244
|
}
|
|
234
245
|
},
|
|
235
246
|
"@context": {
|
|
236
|
-
"
|
|
237
|
-
"items": {
|
|
238
|
-
"type": "string"
|
|
239
|
-
}
|
|
247
|
+
"$ref": "#/components/schemas/ContextType"
|
|
240
248
|
},
|
|
241
249
|
"verifier": {
|
|
242
250
|
"type": "array",
|
|
@@ -303,17 +311,7 @@
|
|
|
303
311
|
]
|
|
304
312
|
},
|
|
305
313
|
"@context": {
|
|
306
|
-
"
|
|
307
|
-
{
|
|
308
|
-
"type": "array",
|
|
309
|
-
"items": {
|
|
310
|
-
"type": "string"
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"type": "string"
|
|
315
|
-
}
|
|
316
|
-
]
|
|
314
|
+
"$ref": "#/components/schemas/ContextType"
|
|
317
315
|
},
|
|
318
316
|
"verifier": {
|
|
319
317
|
"type": "array",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonWebSignature2020.d.ts","sourceRoot":"","sources":["../../src/suites/JsonWebSignature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAM1E;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAC7D,4BAA4B,IAAI,gBAAgB;IAIhD,yBAAyB,IAAI,QAAQ;IAI/B,kBAAkB,CACpB,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC7C,OAAO,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"JsonWebSignature2020.d.ts","sourceRoot":"","sources":["../../src/suites/JsonWebSignature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAM1E;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAC7D,4BAA4B,IAAI,gBAAgB;IAIhD,yBAAyB,IAAI,QAAQ;IAI/B,kBAAkB,CACpB,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC7C,OAAO,CAAC,GAAG,CAAC;IAmDf,uBAAuB,IAAI,GAAG;IAI9B,0BAA0B,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAI/D,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;CAI1E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VeramoLdSignature } from "../ld-suites.js";
|
|
2
2
|
import * as u8a from "uint8arrays";
|
|
3
3
|
import { JsonWebKey, JsonWebSignature } from "@transmute/json-web-signature";
|
|
4
|
-
import { encodeJoseBlob } from "@veramo/utils";
|
|
4
|
+
import { asArray, encodeJoseBlob } from "@veramo/utils";
|
|
5
5
|
/**
|
|
6
6
|
* Veramo wrapper for the JsonWebSignature2020 suite by Transmute Industries
|
|
7
7
|
*
|
|
@@ -52,13 +52,16 @@ export class VeramoJsonWebSignature2020 extends VeramoLdSignature {
|
|
|
52
52
|
const suite = new JsonWebSignature({
|
|
53
53
|
key: verificationKey,
|
|
54
54
|
});
|
|
55
|
+
suite.ensureSuiteContext = ({ document }) => {
|
|
56
|
+
document['@context'] = [...asArray(document['@context'] || []), 'https://w3id.org/security/suites/jws-2020/v1'];
|
|
57
|
+
};
|
|
55
58
|
return suite;
|
|
56
59
|
}
|
|
57
60
|
getSuiteForVerification() {
|
|
58
61
|
return new JsonWebSignature();
|
|
59
62
|
}
|
|
60
63
|
preSigningCredModification(credential) {
|
|
61
|
-
|
|
64
|
+
// nop
|
|
62
65
|
}
|
|
63
66
|
preDidResolutionModification(didUrl, didDoc) {
|
|
64
67
|
// do nothing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonWebSignature2020.js","sourceRoot":"","sources":["../../src/suites/JsonWebSignature2020.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"JsonWebSignature2020.js","sourceRoot":"","sources":["../../src/suites/JsonWebSignature2020.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGxD;;;;GAIG;AACH,MAAM,OAAO,0BAA2B,SAAQ,iBAAiB;IAC7D,4BAA4B;QACxB,OAAO,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,SAAS;gBACd,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC;aACxE;SACJ,CAAC,CAAA;QAEF,eAAe,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,MAAM,CAAA;QAErC,MAAM,KAAK,GAAG,IAAI,gBAAgB,CAAC;YAC/B,GAAG,EAAE,eAAe;SACvB,CAAC,CAAA;QAEF,KAAK,CAAC,kBAAkB,GAAG,CAAC,EAAE,QAAQ,EAA+C,EAAE,EAAE;YACrF,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,EAAE,8CAA8C,CAAC,CAAA;QACnH,CAAC,CAAA;QAED,OAAO,KAAK,CAAA;IAChB,CAAC;IAED,uBAAuB;QACnB,OAAO,IAAI,gBAAgB,EAAE,CAAA;IACjC,CAAC;IAED,0BAA0B,CAAC,UAA6B;QACpD,MAAM;IACV,CAAC;IAED,4BAA4B,CAAC,MAAc,EAAE,MAAmB;QAC5D,aAAa;IACjB,CAAC;CAEJ"}
|
package/build/types.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
16
16
|
* @param args - Arguments necessary to create the Presentation.
|
|
17
17
|
* @param context - This reserved param is automatically added and handled by the framework, *do not override*
|
|
18
18
|
*
|
|
19
|
-
* @returns - a promise that resolves to the {@link @veramo/core#VerifiablePresentation} that was requested or rejects with an error
|
|
19
|
+
* @returns - a promise that resolves to the {@link @veramo/core-types#VerifiablePresentation} that was requested or rejects with an error
|
|
20
20
|
* if there was a problem with the input or while getting the key to sign
|
|
21
21
|
*
|
|
22
22
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#presentations | Verifiable Presentation data model }
|
|
@@ -31,7 +31,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
31
31
|
* @param args - Arguments necessary to create the Presentation.
|
|
32
32
|
* @param context - This reserved param is automatically added and handled by the framework, *do not override*
|
|
33
33
|
*
|
|
34
|
-
* @returns - a promise that resolves to the {@link @veramo/core#VerifiableCredential} that was requested or rejects with an error
|
|
34
|
+
* @returns - a promise that resolves to the {@link @veramo/core-types#VerifiableCredential} that was requested or rejects with an error
|
|
35
35
|
* if there was a problem with the input or while getting the key to sign
|
|
36
36
|
*
|
|
37
37
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#credentials | Verifiable Credential data model}
|
|
@@ -92,7 +92,7 @@ export interface ICreateVerifiablePresentationLDArgs {
|
|
|
92
92
|
*/
|
|
93
93
|
domain?: string;
|
|
94
94
|
/**
|
|
95
|
-
* Optional. The key handle ({@link @veramo/core#IKey.kid | IKey.kid}) from the internal database.
|
|
95
|
+
* Optional. The key handle ({@link @veramo/core-types#IKey.kid | IKey.kid}) from the internal database.
|
|
96
96
|
*/
|
|
97
97
|
keyRef?: string;
|
|
98
98
|
/**
|
|
@@ -124,7 +124,7 @@ export interface ICreateVerifiableCredentialLDArgs {
|
|
|
124
124
|
*/
|
|
125
125
|
credential: CredentialPayload;
|
|
126
126
|
/**
|
|
127
|
-
* Optional. The key handle ({@link @veramo/core#IKey.kid | IKey.kid}) from the internal database.
|
|
127
|
+
* Optional. The key handle ({@link @veramo/core-types#IKey.kid | IKey.kid}) from the internal database.
|
|
128
128
|
*/
|
|
129
129
|
keyRef?: string;
|
|
130
130
|
/**
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;GAQG;AAC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CAAA;IAE7B;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;;OAOG;IACH,YAAY,EAAE,sBAAsB,CAAA;IAEpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAC1C,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,gBAAgB,CAAC,CACvG,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAChC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veramo/credential-ld",
|
|
3
3
|
"description": "Veramo plugin for working with W3C JSON-LD Verifiable Credentials & Presentations.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.1.0",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./build/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@transmute/ed25519-signature-2018": "^0.7.0-unstable.79",
|
|
28
28
|
"@transmute/json-web-signature": "^0.7.0-unstable.79",
|
|
29
29
|
"@veramo-community/lds-ecdsa-secp256k1-recovery2020": "uport-project/EcdsaSecp256k1RecoverySignature2020",
|
|
30
|
-
"@veramo/core-types": "^5.
|
|
31
|
-
"@veramo/utils": "^5.
|
|
30
|
+
"@veramo/core-types": "^5.1.0",
|
|
31
|
+
"@veramo/utils": "^5.1.0",
|
|
32
32
|
"cross-fetch": "^3.1.5",
|
|
33
33
|
"debug": "^4.3.3",
|
|
34
34
|
"did-resolver": "^4.0.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"node_modules",
|
|
64
64
|
"src"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "cd1e0f3b990efcc1bccc88cf87d4ab0fd7ded042"
|
|
67
67
|
}
|
|
@@ -7,9 +7,7 @@ import {
|
|
|
7
7
|
IResolver,
|
|
8
8
|
TAgent,
|
|
9
9
|
} from '../../../core-types/src'
|
|
10
|
-
import {
|
|
11
|
-
createAgent
|
|
12
|
-
} from '../../../core/src'
|
|
10
|
+
import { createAgent } from '../../../core/src'
|
|
13
11
|
import { CredentialPlugin } from '../../../credential-w3c/src'
|
|
14
12
|
import { DIDManager, MemoryDIDStore } from '../../../did-manager/src'
|
|
15
13
|
import { KeyManager, MemoryKeyStore, MemoryPrivateKeyStore } from '../../../key-manager/src'
|
|
@@ -27,6 +25,7 @@ import { VeramoEcdsaSecp256k1RecoverySignature2020 } from '../suites/EcdsaSecp25
|
|
|
27
25
|
import { jest } from '@jest/globals'
|
|
28
26
|
|
|
29
27
|
import 'cross-fetch/polyfill'
|
|
28
|
+
|
|
30
29
|
jest.setTimeout(300000)
|
|
31
30
|
|
|
32
31
|
const customContext: Record<string, ContextDoc> = {
|
|
@@ -81,6 +80,34 @@ describe('credential-LD full flow', () => {
|
|
|
81
80
|
didEthrIdentifier = await agent.didManagerCreate({ provider: 'did:ethr:goerli' })
|
|
82
81
|
})
|
|
83
82
|
|
|
83
|
+
it('create credential with inline context', async () => {
|
|
84
|
+
const credential: CredentialPayload = {
|
|
85
|
+
issuer: didKeyIdentifier.did,
|
|
86
|
+
'@context': [
|
|
87
|
+
{
|
|
88
|
+
'@context': {
|
|
89
|
+
nothing: 'custom:example.context#blank',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
credentialSubject: {
|
|
94
|
+
nothing: 'else matters',
|
|
95
|
+
},
|
|
96
|
+
}
|
|
97
|
+
const verifiableCredential = await agent.createVerifiableCredential({
|
|
98
|
+
credential,
|
|
99
|
+
proofFormat: 'lds',
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
expect(verifiableCredential).toBeDefined()
|
|
103
|
+
|
|
104
|
+
const result = await agent.verifyCredential({
|
|
105
|
+
credential: verifiableCredential,
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
expect(result.verified).toBe(true)
|
|
109
|
+
})
|
|
110
|
+
|
|
84
111
|
it('works with Ed25519Signature2018 credential', async () => {
|
|
85
112
|
const credential: CredentialPayload = {
|
|
86
113
|
issuer: didKeyIdentifier.did,
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": {
|
|
3
|
+
"@version": 1.1,
|
|
4
|
+
"@protected": true,
|
|
5
|
+
"Eip712SchemaValidator2021": "https://w3id.org/security#Eip712SchemaValidator2021",
|
|
6
|
+
"EthereumEip712Signature2021": {
|
|
7
|
+
"@id": "https://w3id.org/security#EthereumEip712Signature2021",
|
|
8
|
+
"@context": {
|
|
9
|
+
"@version": 1.1,
|
|
10
|
+
"@protected": true,
|
|
11
|
+
"id": "@id",
|
|
12
|
+
"type": "@type",
|
|
13
|
+
"created": {
|
|
14
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
15
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
16
|
+
},
|
|
17
|
+
"domain": "https://w3id.org/security#domain",
|
|
18
|
+
"proofPurpose": {
|
|
19
|
+
"@id": "https://w3id.org/security#proofPurpose",
|
|
20
|
+
"@type": "@vocab",
|
|
21
|
+
"@context": {
|
|
22
|
+
"@version": 1.1,
|
|
23
|
+
"@protected": true,
|
|
24
|
+
"id": "@id",
|
|
25
|
+
"type": "@type",
|
|
26
|
+
"assertionMethod": {
|
|
27
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
28
|
+
"@type": "@id",
|
|
29
|
+
"@container": "@set"
|
|
30
|
+
},
|
|
31
|
+
"authentication": {
|
|
32
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
33
|
+
"@type": "@id",
|
|
34
|
+
"@container": "@set"
|
|
35
|
+
},
|
|
36
|
+
"capabilityInvocation": {
|
|
37
|
+
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
38
|
+
"@type": "@id",
|
|
39
|
+
"@container": "@set"
|
|
40
|
+
},
|
|
41
|
+
"capabilityDelegation": {
|
|
42
|
+
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
43
|
+
"@type": "@id",
|
|
44
|
+
"@container": "@set"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"eip712Domain": {
|
|
49
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#eip712-domain",
|
|
50
|
+
"@context": {
|
|
51
|
+
"@version": 1.1,
|
|
52
|
+
"@protected": true,
|
|
53
|
+
"id": "@id",
|
|
54
|
+
"type": "@type",
|
|
55
|
+
"messageSchema": {
|
|
56
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#message-schema",
|
|
57
|
+
"@type": "@json"
|
|
58
|
+
},
|
|
59
|
+
"primaryType": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#primary-type",
|
|
60
|
+
"domain": {
|
|
61
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#domain",
|
|
62
|
+
"@type": "@json"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"eip712": {
|
|
67
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#eip712-domain",
|
|
68
|
+
"@context": {
|
|
69
|
+
"@version": 1.1,
|
|
70
|
+
"@protected": true,
|
|
71
|
+
"id": "@id",
|
|
72
|
+
"type": "@type",
|
|
73
|
+
"types": {
|
|
74
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#message-schema",
|
|
75
|
+
"@type": "@json"
|
|
76
|
+
},
|
|
77
|
+
"primaryType": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#primary-type",
|
|
78
|
+
"domain": {
|
|
79
|
+
"@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#domain",
|
|
80
|
+
"@type": "@json"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"proofValue": "https://w3id.org/security#proofValue",
|
|
85
|
+
"verificationMethod": {
|
|
86
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
87
|
+
"@type": "@id"
|
|
88
|
+
},
|
|
89
|
+
"canonicalizationHash": "https://w3id.org/security/suites/eip712sig-2021#canonicalizationHash"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import contextCredentialV1 from
|
|
2
|
-
import contextDidV1 from
|
|
3
|
-
import contextSecurityV1 from
|
|
4
|
-
import contextSecurityV2 from
|
|
5
|
-
import contextSecurityV3 from
|
|
6
|
-
import contextSuitesEd25519 from
|
|
7
|
-
import contextSuitesX25519 from
|
|
8
|
-
import contextProfile from
|
|
9
|
-
import contextLdsEcdsaSecpRecovery2020_0 from
|
|
10
|
-
import contextLdsEcdsaSecpRecovery2020_2 from
|
|
11
|
-
import contextSuitesSecp from
|
|
1
|
+
import contextCredentialV1 from './contexts/www.w3.org_2018_credentials_v1.json' assert { type: 'json' }
|
|
2
|
+
import contextDidV1 from './contexts/www.w3.org_ns_did_v1.json' assert { type: 'json' }
|
|
3
|
+
import contextSecurityV1 from './contexts/w3id.org_security_v1.json' assert { type: 'json' }
|
|
4
|
+
import contextSecurityV2 from './contexts/w3id.org_security_v2.json' assert { type: 'json' }
|
|
5
|
+
import contextSecurityV3 from './contexts/w3id.org_security_v3-unstable.json' assert { type: 'json' }
|
|
6
|
+
import contextSuitesEd25519 from './contexts/w3id.org_security_suites_ed25519-2018_v1.json' assert { type: 'json' }
|
|
7
|
+
import contextSuitesX25519 from './contexts/w3id.org_security_suites_x25519-2019_v1.json' assert { type: 'json' }
|
|
8
|
+
import contextProfile from './contexts/veramo.io_contexts_profile_v1.json' assert { type: 'json' }
|
|
9
|
+
import contextLdsEcdsaSecpRecovery2020_0 from './contexts/lds-ecdsa-secp256k1-recovery2020-0.0.json' assert { type: 'json' }
|
|
10
|
+
import contextLdsEcdsaSecpRecovery2020_2 from './contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json' assert { type: 'json' }
|
|
11
|
+
import contextSuitesSecp from './contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json' assert { type: 'json' }
|
|
12
12
|
import contextSuitesEd25519_2020 from './contexts/ed25519-signature-2020-v1.json' assert { type: 'json' }
|
|
13
13
|
import contextSuitesJws_2020 from './contexts/json-web-signature-2020-v1.json' assert { type: 'json' }
|
|
14
|
+
import contextSuiteEip712 from './contexts/eip712.json' assert { type: 'json' }
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Provides a hardcoded map of common Linked Data `@context` definitions.
|
|
@@ -31,14 +32,16 @@ export const LdDefaultContexts = new Map([
|
|
|
31
32
|
['https://w3id.org/security/suites/x25519-2019/v1', contextSuitesX25519],
|
|
32
33
|
['https://w3id.org/security/suites/ed25519-2020/v1', contextSuitesEd25519_2020],
|
|
33
34
|
['https://w3id.org/security/suites/jws-2020/v1', contextSuitesJws_2020],
|
|
34
|
-
// ['https://w3id.org/did/v0.11', require('./contexts/did_v0.11.json')],
|
|
35
|
-
// ['https://veramo.io/contexts/socialmedia/v1', require('./contexts/socialmedia-v1.json')],
|
|
36
|
-
// ['https://veramo.io/contexts/kyc/v1', require('./contexts/kyc-v1.json')],
|
|
37
35
|
['https://veramo.io/contexts/profile/v1', contextProfile],
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
[
|
|
37
|
+
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
|
|
38
|
+
contextLdsEcdsaSecpRecovery2020_0,
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-2.0.jsonld',
|
|
42
|
+
contextLdsEcdsaSecpRecovery2020_2,
|
|
43
|
+
],
|
|
44
|
+
['https://w3id.org/security/suites/secp256k1recovery-2020/v2', contextSuitesSecp],
|
|
45
|
+
['https://w3id.org/security/suites/eip712sig-2021', contextSuiteEip712],
|
|
46
|
+
['https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/', contextSuiteEip712],
|
|
44
47
|
])
|
package/src/plugin.schema.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"keyRef": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"description": "Optional. The key handle ( {@link @veramo/core#IKey.kid | IKey.kid } ) from the internal database."
|
|
14
|
+
"description": "Optional. The key handle ( {@link @veramo/core-types#IKey.kid | IKey.kid } ) from the internal database."
|
|
15
15
|
},
|
|
16
16
|
"fetchRemoteContexts": {
|
|
17
17
|
"type": "boolean",
|
|
@@ -42,10 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"@context": {
|
|
45
|
-
"
|
|
46
|
-
"items": {
|
|
47
|
-
"type": "string"
|
|
48
|
-
}
|
|
45
|
+
"$ref": "#/components/schemas/ContextType"
|
|
49
46
|
},
|
|
50
47
|
"issuanceDate": {
|
|
51
48
|
"$ref": "#/components/schemas/DateType"
|
|
@@ -93,6 +90,30 @@
|
|
|
93
90
|
},
|
|
94
91
|
"description": "The value of the credentialSubject property is defined as a set of objects that contain one or more properties that are each related to a subject of the verifiable credential. Each object MAY contain an id.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#credential-subject | Credential Subject }"
|
|
95
92
|
},
|
|
93
|
+
"ContextType": {
|
|
94
|
+
"anyOf": [
|
|
95
|
+
{
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "object"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"anyOf": [
|
|
105
|
+
{
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "object"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"description": "The data type for `@context` properties of credentials, presentations, etc."
|
|
116
|
+
},
|
|
96
117
|
"DateType": {
|
|
97
118
|
"type": "string",
|
|
98
119
|
"description": "Represents an issuance or expiration date for Credentials / Presentations. This is used as input when creating them."
|
|
@@ -139,17 +160,7 @@
|
|
|
139
160
|
]
|
|
140
161
|
},
|
|
141
162
|
"@context": {
|
|
142
|
-
"
|
|
143
|
-
{
|
|
144
|
-
"type": "array",
|
|
145
|
-
"items": {
|
|
146
|
-
"type": "string"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"type": "string"
|
|
151
|
-
}
|
|
152
|
-
]
|
|
163
|
+
"$ref": "#/components/schemas/ContextType"
|
|
153
164
|
},
|
|
154
165
|
"issuanceDate": {
|
|
155
166
|
"type": "string"
|
|
@@ -199,7 +210,7 @@
|
|
|
199
210
|
},
|
|
200
211
|
"keyRef": {
|
|
201
212
|
"type": "string",
|
|
202
|
-
"description": "Optional. The key handle ( {@link @veramo/core#IKey.kid | IKey.kid } ) from the internal database."
|
|
213
|
+
"description": "Optional. The key handle ( {@link @veramo/core-types#IKey.kid | IKey.kid } ) from the internal database."
|
|
203
214
|
},
|
|
204
215
|
"fetchRemoteContexts": {
|
|
205
216
|
"type": "boolean",
|
|
@@ -233,10 +244,7 @@
|
|
|
233
244
|
}
|
|
234
245
|
},
|
|
235
246
|
"@context": {
|
|
236
|
-
"
|
|
237
|
-
"items": {
|
|
238
|
-
"type": "string"
|
|
239
|
-
}
|
|
247
|
+
"$ref": "#/components/schemas/ContextType"
|
|
240
248
|
},
|
|
241
249
|
"verifier": {
|
|
242
250
|
"type": "array",
|
|
@@ -303,17 +311,7 @@
|
|
|
303
311
|
]
|
|
304
312
|
},
|
|
305
313
|
"@context": {
|
|
306
|
-
"
|
|
307
|
-
{
|
|
308
|
-
"type": "array",
|
|
309
|
-
"items": {
|
|
310
|
-
"type": "string"
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"type": "string"
|
|
315
|
-
}
|
|
316
|
-
]
|
|
314
|
+
"$ref": "#/components/schemas/ContextType"
|
|
317
315
|
},
|
|
318
316
|
"verifier": {
|
|
319
317
|
"type": "array",
|
|
@@ -2,19 +2,19 @@ import { CredentialPayload, DIDDocument, IAgentContext, IKey, TKeyType } from "@
|
|
|
2
2
|
import { RequiredAgentMethods, VeramoLdSignature } from "../ld-suites.js";
|
|
3
3
|
import * as u8a from "uint8arrays";
|
|
4
4
|
import { JsonWebKey, JsonWebSignature } from "@transmute/json-web-signature";
|
|
5
|
-
import { encodeJoseBlob } from "@veramo/utils";
|
|
5
|
+
import { asArray, encodeJoseBlob } from "@veramo/utils";
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Veramo wrapper for the JsonWebSignature2020 suite by Transmute Industries
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
|
|
12
12
|
*/
|
|
13
13
|
export class VeramoJsonWebSignature2020 extends VeramoLdSignature {
|
|
14
14
|
getSupportedVerificationType(): 'JsonWebKey2020' {
|
|
15
15
|
return 'JsonWebKey2020'
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
getSupportedVeramoKeyType(): TKeyType {
|
|
19
19
|
return 'Ed25519'
|
|
20
20
|
}
|
|
@@ -68,6 +68,10 @@ export class VeramoJsonWebSignature2020 extends VeramoLdSignature {
|
|
|
68
68
|
key: verificationKey,
|
|
69
69
|
})
|
|
70
70
|
|
|
71
|
+
suite.ensureSuiteContext = ({ document }: { document: any, addSuiteContext: boolean }) => {
|
|
72
|
+
document['@context'] = [...asArray(document['@context'] || []), 'https://w3id.org/security/suites/jws-2020/v1']
|
|
73
|
+
}
|
|
74
|
+
|
|
71
75
|
return suite
|
|
72
76
|
}
|
|
73
77
|
|
|
@@ -76,10 +80,11 @@ export class VeramoJsonWebSignature2020 extends VeramoLdSignature {
|
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
preSigningCredModification(credential: CredentialPayload): void {
|
|
79
|
-
|
|
83
|
+
// nop
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
preDidResolutionModification(didUrl: string, didDoc: DIDDocument): void {
|
|
83
87
|
// do nothing
|
|
84
88
|
}
|
|
85
|
-
|
|
89
|
+
|
|
90
|
+
}
|
package/src/types.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
27
27
|
* @param args - Arguments necessary to create the Presentation.
|
|
28
28
|
* @param context - This reserved param is automatically added and handled by the framework, *do not override*
|
|
29
29
|
*
|
|
30
|
-
* @returns - a promise that resolves to the {@link @veramo/core#VerifiablePresentation} that was requested or rejects with an error
|
|
30
|
+
* @returns - a promise that resolves to the {@link @veramo/core-types#VerifiablePresentation} that was requested or rejects with an error
|
|
31
31
|
* if there was a problem with the input or while getting the key to sign
|
|
32
32
|
*
|
|
33
33
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#presentations | Verifiable Presentation data model }
|
|
@@ -46,7 +46,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
46
46
|
* @param args - Arguments necessary to create the Presentation.
|
|
47
47
|
* @param context - This reserved param is automatically added and handled by the framework, *do not override*
|
|
48
48
|
*
|
|
49
|
-
* @returns - a promise that resolves to the {@link @veramo/core#VerifiableCredential} that was requested or rejects with an error
|
|
49
|
+
* @returns - a promise that resolves to the {@link @veramo/core-types#VerifiableCredential} that was requested or rejects with an error
|
|
50
50
|
* if there was a problem with the input or while getting the key to sign
|
|
51
51
|
*
|
|
52
52
|
* @remarks Please see {@link https://www.w3.org/TR/vc-data-model/#credentials | Verifiable Credential data model}
|
|
@@ -116,7 +116,7 @@ export interface ICreateVerifiablePresentationLDArgs {
|
|
|
116
116
|
domain?: string
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* Optional. The key handle ({@link @veramo/core#IKey.kid | IKey.kid}) from the internal database.
|
|
119
|
+
* Optional. The key handle ({@link @veramo/core-types#IKey.kid | IKey.kid}) from the internal database.
|
|
120
120
|
*/
|
|
121
121
|
keyRef?: string
|
|
122
122
|
|
|
@@ -130,7 +130,7 @@ export interface ICreateVerifiablePresentationLDArgs {
|
|
|
130
130
|
/**
|
|
131
131
|
* Any other options that can be forwarded to the lower level libraries
|
|
132
132
|
*/
|
|
133
|
-
[x:string]: any
|
|
133
|
+
[x: string]: any
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
|
@@ -152,9 +152,9 @@ export interface ICreateVerifiableCredentialLDArgs {
|
|
|
152
152
|
credential: CredentialPayload
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
|
-
* Optional. The key handle ({@link @veramo/core#IKey.kid | IKey.kid}) from the internal database.
|
|
155
|
+
* Optional. The key handle ({@link @veramo/core-types#IKey.kid | IKey.kid}) from the internal database.
|
|
156
156
|
*/
|
|
157
|
-
keyRef?: string
|
|
157
|
+
keyRef?: string
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* Set this to true if you want the `@context` URLs to be fetched in case they are not preloaded.
|
|
@@ -166,7 +166,7 @@ export interface ICreateVerifiableCredentialLDArgs {
|
|
|
166
166
|
/**
|
|
167
167
|
* Any other options that can be forwarded to the lower level libraries
|
|
168
168
|
*/
|
|
169
|
-
[x:string]: any
|
|
169
|
+
[x: string]: any
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
/**
|
|
@@ -196,7 +196,7 @@ export interface IVerifyCredentialLDArgs {
|
|
|
196
196
|
/**
|
|
197
197
|
* Any other options that can be forwarded to the lower level libraries
|
|
198
198
|
*/
|
|
199
|
-
[x:string]: any
|
|
199
|
+
[x: string]: any
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
/**
|
|
@@ -236,7 +236,7 @@ export interface IVerifyPresentationLDArgs {
|
|
|
236
236
|
/**
|
|
237
237
|
* Any other options that can be forwarded to the lower level libraries
|
|
238
238
|
*/
|
|
239
|
-
[x:string]: any
|
|
239
|
+
[x: string]: any
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
/**
|