@veramo/credential-ld 5.1.5-next.11 → 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.
Files changed (71) hide show
  1. package/build/contexts/schema.org.json +8612 -0
  2. package/build/contexts/w3id.org_security_bbs_v1.json +128 -0
  3. package/build/contexts/w3id.org_security_suites_ed25519-2018_v1.json +89 -56
  4. package/build/contexts/{ed25519-signature-2018-v1.json → w3id.org_security_suites_ed25519-2020-v1.json} +10 -8
  5. package/build/contexts/{json-web-signature-2020-v1.json → w3id.org_security_suites_jws-2020_v1.json} +15 -8
  6. package/build/contexts/w3id.org_security_suites_x25519-2020_v1.json +27 -0
  7. package/build/contexts/w3id.org_security_v1.json +36 -9
  8. package/build/contexts/w3id.org_security_v2.json +90 -22
  9. package/build/contexts/w3id.org_security_v3-unstable.json +4 -2
  10. package/build/contexts/www.w3.org_2018_credentials_examples_v1.json +69 -0
  11. package/build/contexts/www.w3.org_2018_credentials_v1.json +156 -36
  12. package/build/ld-credential-module.d.ts.map +1 -1
  13. package/build/ld-credential-module.js +5 -2
  14. package/build/ld-credential-module.js.map +1 -1
  15. package/build/ld-default-contexts.d.ts.map +1 -1
  16. package/build/ld-default-contexts.js +18 -9
  17. package/build/ld-default-contexts.js.map +1 -1
  18. package/build/ld-suites.d.ts +2 -2
  19. package/build/ld-suites.d.ts.map +1 -1
  20. package/build/ld-suites.js.map +1 -1
  21. package/build/suites/EcdsaSecp256k1RecoverySignature2020.d.ts +1 -1
  22. package/build/suites/EcdsaSecp256k1RecoverySignature2020.d.ts.map +1 -1
  23. package/build/suites/EcdsaSecp256k1RecoverySignature2020.js +3 -2
  24. package/build/suites/EcdsaSecp256k1RecoverySignature2020.js.map +1 -1
  25. package/build/suites/Ed25519Signature2018.d.ts +1 -1
  26. package/build/suites/Ed25519Signature2018.d.ts.map +1 -1
  27. package/build/suites/Ed25519Signature2018.js +2 -1
  28. package/build/suites/Ed25519Signature2018.js.map +1 -1
  29. package/build/suites/Ed25519Signature2020.d.ts +3 -5
  30. package/build/suites/Ed25519Signature2020.d.ts.map +1 -1
  31. package/build/suites/Ed25519Signature2020.js +50 -9
  32. package/build/suites/Ed25519Signature2020.js.map +1 -1
  33. package/build/suites/JsonWebSignature2020.d.ts +1 -1
  34. package/build/suites/JsonWebSignature2020.d.ts.map +1 -1
  35. package/build/suites/JsonWebSignature2020.js +2 -1
  36. package/build/suites/JsonWebSignature2020.js.map +1 -1
  37. package/package.json +4 -4
  38. package/src/__tests__/issue-verify-ed25519-2020.test.ts +143 -0
  39. package/src/contexts/schema.org.json +8612 -0
  40. package/src/contexts/veramo.io_contexts_profile_v1.json +4 -4
  41. package/src/contexts/w3id.org_security_bbs_v1.json +128 -0
  42. package/src/contexts/w3id.org_security_suites_ed25519-2018_v1.json +89 -57
  43. package/src/contexts/{ed25519-signature-2018-v1.json → w3id.org_security_suites_ed25519-2020-v1.json} +10 -8
  44. package/src/contexts/w3id.org_security_suites_jws-2020_v1.json +78 -0
  45. package/src/contexts/w3id.org_security_suites_x25519-2020_v1.json +27 -0
  46. package/src/contexts/w3id.org_security_v1.json +36 -12
  47. package/src/contexts/w3id.org_security_v2.json +124 -57
  48. package/src/contexts/w3id.org_security_v3-unstable.json +684 -692
  49. package/src/contexts/www.w3.org_2018_credentials_examples_v1.json +69 -0
  50. package/src/contexts/www.w3.org_2018_credentials_v1.json +157 -79
  51. package/src/contexts/www.w3.org_ns_did_v1.json +0 -1
  52. package/src/ld-credential-module.ts +19 -5
  53. package/src/ld-default-contexts.ts +19 -10
  54. package/src/ld-suites.ts +2 -1
  55. package/src/suites/EcdsaSecp256k1RecoverySignature2020.ts +4 -5
  56. package/src/suites/Ed25519Signature2018.ts +2 -1
  57. package/src/suites/Ed25519Signature2020.ts +72 -11
  58. package/src/suites/JsonWebSignature2020.ts +2 -1
  59. package/build/contexts/did_v0.11.json +0 -61
  60. package/build/contexts/ed25519-signature-2020-v1.json +0 -77
  61. package/build/contexts/kyc-v1.json +0 -8
  62. package/build/contexts/socialmedia-v1.json +0 -7
  63. package/build/contexts/transmute_v1.json +0 -20
  64. package/src/contexts/did_v0.11.json +0 -64
  65. package/src/contexts/ed25519-signature-2020-v1.json +0 -77
  66. package/src/contexts/json-web-signature-2020-v1.json +0 -71
  67. package/src/contexts/kyc-v1.json +0 -8
  68. package/src/contexts/socialmedia-v1.json +0 -7
  69. package/src/contexts/transmute_v1.json +0 -21
  70. /package/build/contexts/{eip712.json → w3id.org_security_suites_eip712sig-2021_v1.json} +0 -0
  71. /package/src/contexts/{eip712.json → w3id.org_security_suites_eip712sig-2021_v1.json} +0 -0
@@ -1,8 +1,22 @@
1
1
  import { RequiredAgentMethods, VeramoLdSignature } from '../ld-suites.js'
2
- import { CredentialPayload, DIDDocument, IAgentContext, IKey, TKeyType } from '@veramo/core-types'
2
+ import {
3
+ CredentialPayload,
4
+ DIDDocComponent,
5
+ DIDDocument,
6
+ IAgentContext,
7
+ IKey,
8
+ IResolver,
9
+ TKeyType,
10
+ } from '@veramo/core-types'
3
11
  import * as u8a from 'uint8arrays'
4
12
  import { Ed25519Signature2020 } from '@digitalcredentials/ed25519-signature-2020'
5
13
  import { Ed25519VerificationKey2020 } from '@digitalcredentials/ed25519-verification-key-2020'
14
+ import { asArray, base64ToBytes, bytesToMultibase, extractPublicKeyHex, hexToBytes } from '@veramo/utils'
15
+ import { VerificationMethod } from 'did-resolver'
16
+
17
+ import Debug from 'debug'
18
+
19
+ const debug = Debug('veramo:credential-ld:Ed25519Signature2020')
6
20
 
7
21
  /**
8
22
  * Veramo wrapper for the Ed25519Signature2020 suite by digitalcredentials
@@ -10,9 +24,6 @@ import { Ed25519VerificationKey2020 } from '@digitalcredentials/ed25519-verifica
10
24
  * @alpha This API is experimental and is very likely to change or disappear in future releases without notice.
11
25
  */
12
26
  export class VeramoEd25519Signature2020 extends VeramoLdSignature {
13
- private readonly MULTIBASE_BASE58BTC_PREFIX = 'z'
14
- private readonly MULTICODEC_PREFIX = [0xed, 0x01]
15
-
16
27
  getSupportedVerificationType(): string {
17
28
  return 'Ed25519VerificationKey2020'
18
29
  }
@@ -40,15 +51,16 @@ export class VeramoEd25519Signature2020 extends VeramoLdSignature {
40
51
  keyRef: key.kid,
41
52
  data: messageString,
42
53
  encoding: 'base64',
54
+ algorithm: 'EdDSA',
43
55
  })
44
- return u8a.fromString(signature)
56
+ return base64ToBytes(signature)
45
57
  },
46
58
  }
47
59
 
48
60
  const verificationKey = new Ed25519VerificationKey2020({
49
61
  id,
50
62
  controller,
51
- publicKeyMultibase: this.preSigningKeyModification(u8a.fromString(key.publicKeyHex, 'hex')),
63
+ publicKeyMultibase: bytesToMultibase(hexToBytes(key.publicKeyHex), 'Ed25519'),
52
64
  // signer: () => signer,
53
65
  // type: this.getSupportedVerificationType(),
54
66
  })
@@ -69,12 +81,61 @@ export class VeramoEd25519Signature2020 extends VeramoLdSignature {
69
81
  // nothing to do here
70
82
  }
71
83
 
72
- preDidResolutionModification(didUrl: string, didDoc: DIDDocument): void {
73
- // nothing to do here
84
+ async preDidResolutionModification(
85
+ didUrl: string,
86
+ doc: DIDDocument | Exclude<string, DIDDocComponent>,
87
+ context: IAgentContext<IResolver>,
88
+ ): Promise<DIDDocument | Exclude<string, DIDDocComponent>> {
89
+ let document = doc
90
+ // The verification method (key) must contain "https://w3id.org/security/suites/ed25519-2020/v1" context.
91
+ if ((document as DIDDocument).verificationMethod) {
92
+ document.verificationMethod = asArray(document.verificationMethod)?.map(
93
+ this.transformVerificationMethod,
94
+ )
95
+ }
96
+
97
+ // this signature suite requires the document loader to dereference the DID URL
98
+ if (didUrl.includes('#') && didUrl !== document.id) {
99
+ const contexts = (document as DIDDocument)['@context']
100
+ try {
101
+ let newDoc: any = (await context.agent.getDIDComponentById({
102
+ didDocument: document,
103
+ didUrl: didUrl,
104
+ })) as Exclude<string, DIDDocComponent>
105
+
106
+ // other signature suites require the full DID document, so as a workaround
107
+ // we'll only return the 2020 verification method, even if the 2018 would also be compatible
108
+ if (
109
+ [
110
+ 'Ed25519VerificationKey2020',
111
+ // 'Ed25519VerificationKey2018',
112
+ // 'JsonWebKey2020'
113
+ ].includes(newDoc.type)
114
+ ) {
115
+ newDoc['@context'] = [...new Set([...asArray(contexts), ...asArray(document['@context'])])]
116
+ document = newDoc
117
+ }
118
+ } catch (e: any) {
119
+ debug(`document loader could not locate DID component by fragment: ${didUrl}`)
120
+ }
121
+ }
122
+
123
+ if ((document as VerificationMethod).type === 'Ed25519VerificationKey2020') {
124
+ document = this.transformVerificationMethod(document as VerificationMethod)
125
+ }
126
+
127
+ return document
74
128
  }
75
129
 
76
- preSigningKeyModification(key: Uint8Array): string {
77
- const modifiedKey = u8a.concat([this.MULTICODEC_PREFIX, key])
78
- return `${this.MULTIBASE_BASE58BTC_PREFIX}${u8a.toString(modifiedKey, 'base58btc')}`
130
+ private transformVerificationMethod(vm: VerificationMethod): VerificationMethod {
131
+ if (vm.type === 'Ed25519VerificationKey2020') {
132
+ ;(vm as any)['@context'] = 'https://w3id.org/security/suites/ed25519-2020/v1'
133
+ // publicKeyMultibase is required by this suite
134
+ if (!vm.publicKeyMultibase) {
135
+ const publicKeyHex = extractPublicKeyHex(vm)
136
+ vm.publicKeyMultibase = bytesToMultibase(hexToBytes(publicKeyHex), 'Ed25519')
137
+ }
138
+ }
139
+ return vm
79
140
  }
80
141
  }
@@ -83,8 +83,9 @@ export class VeramoJsonWebSignature2020 extends VeramoLdSignature {
83
83
  // nop
84
84
  }
85
85
 
86
- preDidResolutionModification(didUrl: string, didDoc: DIDDocument): void {
86
+ async preDidResolutionModification(didUrl: string, didDoc: DIDDocument): Promise<DIDDocument> {
87
87
  // do nothing
88
+ return didDoc
88
89
  }
89
90
 
90
91
  }
@@ -1,61 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "id": "@id",
5
- "type": "@type",
6
- "dc": "http://purl.org/dc/terms/",
7
- "schema": "http://schema.org/",
8
- "sec": "https://w3id.org/security#",
9
- "didv": "https://w3id.org/did#",
10
- "xsd": "http://www.w3.org/2001/XMLSchema#",
11
- "EcdsaSecp256k1Signature2019": "sec:EcdsaSecp256k1Signature2019",
12
- "EcdsaSecp256k1VerificationKey2019": "sec:EcdsaSecp256k1VerificationKey2019",
13
- "Ed25519Signature2018": "sec:Ed25519Signature2018",
14
- "Ed25519VerificationKey2018": "sec:Ed25519VerificationKey2018",
15
- "Ed25519Signature2020": "sec:Ed25519Signature2020",
16
- "Ed25519VerificationKey2020": "sec:Ed25519VerificationKey2020",
17
- "JsonWebSignature2020": "sec:JsonWebSignature2020",
18
- "JsonWebKey2020": "sec:JsonWebKey2020",
19
- "RsaSignature2018": "sec:RsaSignature2018",
20
- "RsaVerificationKey2018": "sec:RsaVerificationKey2018",
21
- "SchnorrSecp256k1Signature2019": "sec:SchnorrSecp256k1Signature2019",
22
- "SchnorrSecp256k1VerificationKey2019": "sec:SchnorrSecp256k1VerificationKey2019",
23
- "ServiceEndpointProxyService": "didv:ServiceEndpointProxyService",
24
- "allowedAction": "sec:allowedAction",
25
- "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" },
26
- "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" },
27
- "capability": { "@id": "sec:capability", "@type": "@id" },
28
- "capabilityAction": "sec:capabilityAction",
29
- "capabilityChain": { "@id": "sec:capabilityChain", "@type": "@id", "@container": "@list" },
30
- "capabilityDelegation": { "@id": "sec:capabilityDelegationMethod", "@type": "@id", "@container": "@set" },
31
- "capabilityInvocation": { "@id": "sec:capabilityInvocationMethod", "@type": "@id", "@container": "@set" },
32
- "capabilityStatusList": { "@id": "sec:capabilityStatusList", "@type": "@id" },
33
- "canonicalizationAlgorithm": "sec:canonicalizationAlgorithm",
34
- "caveat": { "@id": "sec:caveat", "@type": "@id", "@container": "@set" },
35
- "challenge": "sec:challenge",
36
- "controller": { "@id": "sec:controller", "@type": "@id" },
37
- "created": { "@id": "dc:created", "@type": "xsd:dateTime" },
38
- "creator": { "@id": "dc:creator", "@type": "@id" },
39
- "delegator": { "@id": "sec:delegator", "@type": "@id" },
40
- "domain": "sec:domain",
41
- "expirationDate": { "@id": "sec:expiration", "@type": "xsd:dateTime" },
42
- "invocationTarget": { "@id": "sec:invocationTarget", "@type": "@id" },
43
- "invoker": { "@id": "sec:invoker", "@type": "@id" },
44
- "jws": "sec:jws",
45
- "keyAgreement": { "@id": "sec:keyAgreementMethod", "@type": "@id", "@container": "@set" },
46
- "nonce": "sec:nonce",
47
- "owner": { "@id": "sec:owner", "@type": "@id" },
48
- "proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" },
49
- "proofPurpose": { "@id": "sec:proofPurpose", "@type": "@vocab" },
50
- "proofValue": "sec:proofValue",
51
- "publicKey": { "@id": "sec:publicKey", "@type": "@id", "@container": "@set" },
52
- "publicKeyBase58": "sec:publicKeyBase58",
53
- "publicKeyMultibase": "sec:publicKeyMultibase",
54
- "publicKeyJwk": "sec:publicKeyJwk",
55
- "publicKeyPem": "sec:publicKeyPem",
56
- "revoked": { "@id": "sec:revoked", "@type": "xsd:dateTime" },
57
- "service": { "@id": "didv:service", "@type": "@id", "@container": "@set" },
58
- "serviceEndpoint": { "@id": "didv:serviceEndpoint", "@type": "@id" },
59
- "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }
60
- }
61
- }
@@ -1,77 +0,0 @@
1
- {
2
- "@context": {
3
- "id": "@id",
4
- "type": "@type",
5
- "@protected": true,
6
- "proof": {
7
- "@id": "https://w3id.org/security#proof",
8
- "@type": "@id",
9
- "@container": "@graph"
10
- },
11
- "Ed25519VerificationKey2020": {
12
- "@id": "https://w3id.org/security#Ed25519VerificationKey2020"
13
- },
14
- "Ed25519Signature2020": {
15
- "@id": "https://w3id.org/security#Ed25519Signature2020",
16
- "@context": {
17
- "@protected": true,
18
- "id": "@id",
19
- "type": "@type",
20
- "challenge": "https://w3id.org/security#challenge",
21
- "created": {
22
- "@id": "http://purl.org/dc/terms/created",
23
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
24
- },
25
- "domain": "https://w3id.org/security#domain",
26
- "expires": {
27
- "@id": "https://w3id.org/security#expiration",
28
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
29
- },
30
- "nonce": "https://w3id.org/security#nonce",
31
- "proofPurpose": {
32
- "@id": "https://w3id.org/security#proofPurpose",
33
- "@type": "@vocab",
34
- "@context": {
35
- "@version": 1.1,
36
- "@protected": true,
37
- "id": "@id",
38
- "type": "@type",
39
- "assertionMethod": {
40
- "@id": "https://w3id.org/security#assertionMethod",
41
- "@type": "@id",
42
- "@container": "@set"
43
- },
44
- "authentication": {
45
- "@id": "https://w3id.org/security#authenticationMethod",
46
- "@type": "@id",
47
- "@container": "@set"
48
- },
49
- "capabilityInvocation": {
50
- "@id": "https://w3id.org/security#capabilityInvocationMethod",
51
- "@type": "@id",
52
- "@container": "@set"
53
- },
54
- "capabilityDelegation": {
55
- "@id": "https://w3id.org/security#capabilityDelegationMethod",
56
- "@type": "@id",
57
- "@container": "@set"
58
- },
59
- "keyAgreement": {
60
- "@id": "https://w3id.org/security#keyAgreementMethod",
61
- "@type": "@id",
62
- "@container": "@set"
63
- }
64
- }
65
- },
66
- "proofValue": {
67
- "@id": "https://w3id.org/security#proofValue",
68
- "@type": "https://w3id.org/security#multibase"
69
- },
70
- "verificationMethod": {
71
- "@id": "https://w3id.org/security#verificationMethod",
72
- "@type": "@id"
73
- }
74
- }
75
- }
76
- }
77
- }
@@ -1,8 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "@protected": true,
5
- "VerifiableKyc": "https://veramo.io/contexts/kyc#VerifiableKyc",
6
- "name": "https://schema.org/name"
7
- }
8
- }
@@ -1,7 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "@protected": true,
5
- "VerifableSocialMediaPosting": "https://veramo.io/contexts/socialmedia#VerifableSocialMediaPosting"
6
- }
7
- }
@@ -1,20 +0,0 @@
1
- {
2
- "@context": [
3
- {
4
- "@version": 1.1
5
- },
6
- "https://www.w3.org/ns/did/v1",
7
- {
8
- "JsonWebKey2020": "https://w3id.org/security#JsonWebKey2020",
9
- "Ed25519VerificationKey2018": "https://w3id.org/security#Ed25519VerificationKey2018",
10
- "X25519KeyAgreementKey2019": "https://w3id.org/security#X25519KeyAgreementKey2019",
11
- "publicKeyJwk": {
12
- "@id": "https://w3id.org/security#publicKeyJwk",
13
- "@type": "@json"
14
- },
15
- "publicKeyBase58": {
16
- "@id": "https://w3id.org/security#publicKeyBase58"
17
- }
18
- }
19
- ]
20
- }
@@ -1,64 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "id": "@id",
5
- "type": "@type",
6
-
7
- "dc": "http://purl.org/dc/terms/",
8
- "schema": "http://schema.org/",
9
- "sec": "https://w3id.org/security#",
10
- "didv": "https://w3id.org/did#",
11
- "xsd": "http://www.w3.org/2001/XMLSchema#",
12
-
13
- "EcdsaSecp256k1Signature2019": "sec:EcdsaSecp256k1Signature2019",
14
- "EcdsaSecp256k1VerificationKey2019": "sec:EcdsaSecp256k1VerificationKey2019",
15
- "Ed25519Signature2018": "sec:Ed25519Signature2018",
16
- "Ed25519VerificationKey2018": "sec:Ed25519VerificationKey2018",
17
- "Ed25519Signature2020": "sec:Ed25519Signature2020",
18
- "Ed25519VerificationKey2020": "sec:Ed25519VerificationKey2020",
19
- "JsonWebSignature2020": "sec:JsonWebSignature2020",
20
- "JsonWebKey2020": "sec:JsonWebKey2020",
21
- "RsaSignature2018": "sec:RsaSignature2018",
22
- "RsaVerificationKey2018": "sec:RsaVerificationKey2018",
23
- "SchnorrSecp256k1Signature2019": "sec:SchnorrSecp256k1Signature2019",
24
- "SchnorrSecp256k1VerificationKey2019": "sec:SchnorrSecp256k1VerificationKey2019",
25
- "ServiceEndpointProxyService": "didv:ServiceEndpointProxyService",
26
-
27
- "allowedAction": "sec:allowedAction",
28
- "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"},
29
- "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"},
30
- "capability": {"@id": "sec:capability", "@type": "@id"},
31
- "capabilityAction": "sec:capabilityAction",
32
- "capabilityChain": {"@id": "sec:capabilityChain", "@type": "@id", "@container": "@list"},
33
- "capabilityDelegation": {"@id": "sec:capabilityDelegationMethod", "@type": "@id", "@container": "@set"},
34
- "capabilityInvocation": {"@id": "sec:capabilityInvocationMethod", "@type": "@id", "@container": "@set"},
35
- "capabilityStatusList": {"@id": "sec:capabilityStatusList", "@type": "@id"},
36
- "canonicalizationAlgorithm": "sec:canonicalizationAlgorithm",
37
- "caveat": {"@id": "sec:caveat", "@type": "@id", "@container": "@set"},
38
- "challenge": "sec:challenge",
39
- "controller": {"@id": "sec:controller", "@type": "@id"},
40
- "created": {"@id": "dc:created", "@type": "xsd:dateTime"},
41
- "creator": {"@id": "dc:creator", "@type": "@id"},
42
- "delegator": {"@id": "sec:delegator", "@type": "@id"},
43
- "domain": "sec:domain",
44
- "expirationDate": {"@id": "sec:expiration", "@type": "xsd:dateTime"},
45
- "invocationTarget": {"@id": "sec:invocationTarget", "@type": "@id"},
46
- "invoker": {"@id": "sec:invoker", "@type": "@id"},
47
- "jws": "sec:jws",
48
- "keyAgreement": {"@id": "sec:keyAgreementMethod", "@type": "@id", "@container": "@set"},
49
- "nonce": "sec:nonce",
50
- "owner": {"@id": "sec:owner", "@type": "@id"},
51
- "proof": {"@id": "sec:proof", "@type": "@id", "@container": "@graph"},
52
- "proofPurpose": {"@id": "sec:proofPurpose", "@type": "@vocab"},
53
- "proofValue": "sec:proofValue",
54
- "publicKey": {"@id": "sec:publicKey", "@type": "@id", "@container": "@set"},
55
- "publicKeyBase58": "sec:publicKeyBase58",
56
- "publicKeyMultibase": "sec:publicKeyMultibase",
57
- "publicKeyJwk": "sec:publicKeyJwk",
58
- "publicKeyPem": "sec:publicKeyPem",
59
- "revoked": {"@id": "sec:revoked", "@type": "xsd:dateTime"},
60
- "service": {"@id": "didv:service", "@type": "@id", "@container": "@set"},
61
- "serviceEndpoint": {"@id": "didv:serviceEndpoint", "@type": "@id"},
62
- "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"}
63
- }
64
- }
@@ -1,77 +0,0 @@
1
- {
2
- "@context": {
3
- "id": "@id",
4
- "type": "@type",
5
- "@protected": true,
6
- "proof": {
7
- "@id": "https://w3id.org/security#proof",
8
- "@type": "@id",
9
- "@container": "@graph"
10
- },
11
- "Ed25519VerificationKey2020": {
12
- "@id": "https://w3id.org/security#Ed25519VerificationKey2020"
13
- },
14
- "Ed25519Signature2020": {
15
- "@id": "https://w3id.org/security#Ed25519Signature2020",
16
- "@context": {
17
- "@protected": true,
18
- "id": "@id",
19
- "type": "@type",
20
- "challenge": "https://w3id.org/security#challenge",
21
- "created": {
22
- "@id": "http://purl.org/dc/terms/created",
23
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
24
- },
25
- "domain": "https://w3id.org/security#domain",
26
- "expires": {
27
- "@id": "https://w3id.org/security#expiration",
28
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
29
- },
30
- "nonce": "https://w3id.org/security#nonce",
31
- "proofPurpose": {
32
- "@id": "https://w3id.org/security#proofPurpose",
33
- "@type": "@vocab",
34
- "@context": {
35
- "@version": 1.1,
36
- "@protected": true,
37
- "id": "@id",
38
- "type": "@type",
39
- "assertionMethod": {
40
- "@id": "https://w3id.org/security#assertionMethod",
41
- "@type": "@id",
42
- "@container": "@set"
43
- },
44
- "authentication": {
45
- "@id": "https://w3id.org/security#authenticationMethod",
46
- "@type": "@id",
47
- "@container": "@set"
48
- },
49
- "capabilityInvocation": {
50
- "@id": "https://w3id.org/security#capabilityInvocationMethod",
51
- "@type": "@id",
52
- "@container": "@set"
53
- },
54
- "capabilityDelegation": {
55
- "@id": "https://w3id.org/security#capabilityDelegationMethod",
56
- "@type": "@id",
57
- "@container": "@set"
58
- },
59
- "keyAgreement": {
60
- "@id": "https://w3id.org/security#keyAgreementMethod",
61
- "@type": "@id",
62
- "@container": "@set"
63
- }
64
- }
65
- },
66
- "proofValue": {
67
- "@id": "https://w3id.org/security#proofValue",
68
- "@type": "https://w3id.org/security#multibase"
69
- },
70
- "verificationMethod": {
71
- "@id": "https://w3id.org/security#verificationMethod",
72
- "@type": "@id"
73
- }
74
- }
75
- }
76
- }
77
- }
@@ -1,71 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "id": "@id",
5
- "type": "@type",
6
- "@protected": true,
7
- "JsonWebKey2020": {
8
- "@id": "https://w3id.org/security#JsonWebKey2020"
9
- },
10
- "JsonWebSignature2020": {
11
- "@id": "https://w3id.org/security#JsonWebSignature2020",
12
- "@context": {
13
- "@version": 1.1,
14
- "id": "@id",
15
- "type": "@type",
16
- "@protected": true,
17
- "challenge": "https://w3id.org/security#challenge",
18
- "created": {
19
- "@id": "http://purl.org/dc/terms/created",
20
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
21
- },
22
- "domain": "https://w3id.org/security#domain",
23
- "expires": {
24
- "@id": "https://w3id.org/security#expiration",
25
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
26
- },
27
- "jws": "https://w3id.org/security#jws",
28
- "nonce": "https://w3id.org/security#nonce",
29
- "proofPurpose": {
30
- "@id": "https://w3id.org/security#proofPurpose",
31
- "@type": "@vocab",
32
- "@context": {
33
- "@version": 1.1,
34
- "@protected": true,
35
- "id": "@id",
36
- "type": "@type",
37
- "assertionMethod": {
38
- "@id": "https://w3id.org/security#assertionMethod",
39
- "@type": "@id",
40
- "@container": "@set"
41
- },
42
- "authentication": {
43
- "@id": "https://w3id.org/security#authenticationMethod",
44
- "@type": "@id",
45
- "@container": "@set"
46
- },
47
- "capabilityInvocation": {
48
- "@id": "https://w3id.org/security#capabilityInvocationMethod",
49
- "@type": "@id",
50
- "@container": "@set"
51
- },
52
- "capabilityDelegation": {
53
- "@id": "https://w3id.org/security#capabilityDelegationMethod",
54
- "@type": "@id",
55
- "@container": "@set"
56
- },
57
- "keyAgreement": {
58
- "@id": "https://w3id.org/security#keyAgreementMethod",
59
- "@type": "@id",
60
- "@container": "@set"
61
- }
62
- }
63
- },
64
- "verificationMethod": {
65
- "@id": "https://w3id.org/security#verificationMethod",
66
- "@type": "@id"
67
- }
68
- }
69
- }
70
- }
71
- }
@@ -1,8 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "@protected": true,
5
- "VerifiableKyc": "https://veramo.io/contexts/kyc#VerifiableKyc",
6
- "name": "https://schema.org/name"
7
- }
8
- }
@@ -1,7 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "@protected": true,
5
- "VerifableSocialMediaPosting": "https://veramo.io/contexts/socialmedia#VerifableSocialMediaPosting"
6
- }
7
- }
@@ -1,21 +0,0 @@
1
- {
2
- "@context": [
3
- {
4
- "@version": 1.1
5
- },
6
- "https://www.w3.org/ns/did/v1",
7
- {
8
- "JsonWebKey2020": "https://w3id.org/security#JsonWebKey2020",
9
- "Ed25519VerificationKey2018": "https://w3id.org/security#Ed25519VerificationKey2018",
10
- "X25519KeyAgreementKey2019": "https://w3id.org/security#X25519KeyAgreementKey2019",
11
-
12
- "publicKeyJwk": {
13
- "@id": "https://w3id.org/security#publicKeyJwk",
14
- "@type": "@json"
15
- },
16
- "publicKeyBase58": {
17
- "@id": "https://w3id.org/security#publicKeyBase58"
18
- }
19
- }
20
- ]
21
- }