@twin.org/standards-w3c-did 0.0.1-next.4 → 0.0.1-next.40

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 (52) hide show
  1. package/dist/cjs/index.cjs +492 -0
  2. package/dist/esm/index.mjs +485 -1
  3. package/dist/types/index.d.ts +16 -2
  4. package/dist/types/models/{IDidProof.d.ts → IDataIntegrityProof.d.ts} +18 -6
  5. package/dist/types/models/IDidCredentialSchema.d.ts +13 -0
  6. package/dist/types/models/IDidDocument.d.ts +6 -0
  7. package/dist/types/models/IDidDocumentVerificationMethod.d.ts +3 -2
  8. package/dist/types/models/IDidLabel.d.ts +17 -0
  9. package/dist/types/models/IDidVerifiableCredential.d.ts +41 -9
  10. package/dist/types/models/IDidVerifiablePresentation.d.ts +9 -7
  11. package/dist/types/models/IJsonWebSignature2020Proof.d.ts +33 -0
  12. package/dist/types/models/IMultikey.d.ts +41 -0
  13. package/dist/types/models/IProof.d.ts +6 -0
  14. package/dist/types/models/IProofSignerVerifier.d.ts +31 -0
  15. package/dist/types/models/didContexts.d.ts +41 -0
  16. package/dist/types/models/didCryptoSuites.d.ts +19 -0
  17. package/dist/types/models/didTypes.d.ts +33 -0
  18. package/dist/types/models/proofTypes.d.ts +17 -0
  19. package/dist/types/signerVerifiers/dataIntegrityProofSignerVerifier.d.ts +38 -0
  20. package/dist/types/signerVerifiers/jsonWebSignature2020SignerVerifier.d.ts +36 -0
  21. package/dist/types/utils/multikeyHelper.d.ts +37 -0
  22. package/dist/types/utils/proofHelper.d.ts +47 -0
  23. package/docs/changelog.md +50 -1
  24. package/docs/reference/classes/DataIntegrityProofSignerVerifier.md +134 -0
  25. package/docs/reference/classes/JsonWebSignature2020SignerVerifier.md +133 -0
  26. package/docs/reference/classes/MultikeyHelper.md +119 -0
  27. package/docs/reference/classes/ProofHelper.md +159 -0
  28. package/docs/reference/index.md +22 -1
  29. package/docs/reference/interfaces/{IDidProof.md → IDataIntegrityProof.md} +23 -7
  30. package/docs/reference/interfaces/IDidCredentialSchema.md +19 -0
  31. package/docs/reference/interfaces/IDidCredentialStatus.md +3 -1
  32. package/docs/reference/interfaces/IDidDocument.md +8 -0
  33. package/docs/reference/interfaces/IDidDocumentVerificationMethod.md +9 -1
  34. package/docs/reference/interfaces/IDidLabel.md +27 -0
  35. package/docs/reference/interfaces/IDidVerifiableCredential.md +57 -12
  36. package/docs/reference/interfaces/IDidVerifiablePresentation.md +6 -6
  37. package/docs/reference/interfaces/IJsonWebSignature2020Proof.md +52 -0
  38. package/docs/reference/interfaces/IMultikey.md +68 -0
  39. package/docs/reference/interfaces/IProofSignerVerifier.md +99 -0
  40. package/docs/reference/type-aliases/DidContexts.md +5 -0
  41. package/docs/reference/type-aliases/DidCryptoSuites.md +5 -0
  42. package/docs/reference/type-aliases/DidTypes.md +5 -0
  43. package/docs/reference/type-aliases/DidVerificationMethodType.md +1 -1
  44. package/docs/reference/type-aliases/IProof.md +5 -0
  45. package/docs/reference/type-aliases/ProofTypes.md +5 -0
  46. package/docs/reference/variables/DidContexts.md +55 -0
  47. package/docs/reference/variables/DidCryptoSuites.md +21 -0
  48. package/docs/reference/variables/DidTypes.md +43 -0
  49. package/docs/reference/variables/DidVerificationMethodType.md +1 -1
  50. package/docs/reference/variables/ProofTypes.md +19 -0
  51. package/locales/en.json +27 -1
  52. package/package.json +7 -4
@@ -0,0 +1,27 @@
1
+ # Interface: IDidLabel
2
+
3
+ Interface describing a DID Label.
4
+
5
+ ## Properties
6
+
7
+ ### @value
8
+
9
+ > **@value**: `string`
10
+
11
+ The value for the label.
12
+
13
+ ***
14
+
15
+ ### @language
16
+
17
+ > **@language**: `string`
18
+
19
+ The language for the label.
20
+
21
+ ***
22
+
23
+ ### @direction?
24
+
25
+ > `optional` **@direction**: `string`
26
+
27
+ The direction of the label.
@@ -1,16 +1,13 @@
1
- # Interface: IDidVerifiableCredential\<T\>
1
+ # Interface: IDidVerifiableCredential
2
2
 
3
3
  Interface describing a verifiable credential.
4
-
5
- ## Type Parameters
6
-
7
- • **T** = `unknown`
4
+ https://www.w3.org/TR/vc-data-model-2.0
8
5
 
9
6
  ## Properties
10
7
 
11
8
  ### @context
12
9
 
13
- > **@context**: `IJsonLdContextDefinitionRoot`
10
+ > **@context**: `"https://www.w3.org/2018/credentials/v1"` \| `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `...IJsonLdContextDefinitionElement[]`\] \| \[`"https://www.w3.org/2018/credentials/v1"`, `...IJsonLdContextDefinitionElement[]`\]
14
11
 
15
12
  The context for the verifiable credential.
16
13
 
@@ -26,15 +23,15 @@ The identifier for the verifiable credential.
26
23
 
27
24
  ### type
28
25
 
29
- > **type**: `string`[]
26
+ > **type**: `string` \| `string`[]
30
27
 
31
28
  The types of the data stored in the verifiable credential.
32
29
 
33
30
  ***
34
31
 
35
- ### credentialSubject
32
+ ### credentialSubject?
36
33
 
37
- > **credentialSubject**: `T` \| `T`[]
34
+ > `optional` **credentialSubject**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
38
35
 
39
36
  The data for the verifiable credential.
40
37
 
@@ -42,16 +39,24 @@ The data for the verifiable credential.
42
39
 
43
40
  ### credentialStatus?
44
41
 
45
- > `optional` **credentialStatus**: [`IDidCredentialStatus`](IDidCredentialStatus.md)
42
+ > `optional` **credentialStatus**: [`IDidCredentialStatus`](IDidCredentialStatus.md) \| [`IDidCredentialStatus`](IDidCredentialStatus.md)[]
46
43
 
47
44
  Used to discover information about the current status of the
48
45
  verifiable credential, such as whether it is suspended or revoked.
49
46
 
50
47
  ***
51
48
 
49
+ ### credentialSchema?
50
+
51
+ > `optional` **credentialSchema**: [`IDidCredentialSchema`](IDidCredentialSchema.md) \| [`IDidCredentialSchema`](IDidCredentialSchema.md)[]
52
+
53
+ Annotate type definitions or lock them to specific versions of the vocabulary.
54
+
55
+ ***
56
+
52
57
  ### issuer?
53
58
 
54
- > `optional` **issuer**: `string`
59
+ > `optional` **issuer**: `string` \| \{ `id`: `string`; `name`: `string` \| [`IDidLabel`](IDidLabel.md)[]; `description`: `string` \| [`IDidLabel`](IDidLabel.md)[]; \}
55
60
 
56
61
  The issuing identity.
57
62
 
@@ -65,9 +70,49 @@ The date the verifiable credential was issued.
65
70
 
66
71
  ***
67
72
 
73
+ ### name?
74
+
75
+ > `optional` **name**: `string` \| [`IDidLabel`](IDidLabel.md)[]
76
+
77
+ The name of the credential.
78
+
79
+ ***
80
+
81
+ ### description?
82
+
83
+ > `optional` **description**: `string` \| [`IDidLabel`](IDidLabel.md)[]
84
+
85
+ The description of the credential.
86
+
87
+ ***
88
+
89
+ ### validFrom?
90
+
91
+ > `optional` **validFrom**: `string`
92
+
93
+ The date the verifiable credential is valid from.
94
+
95
+ ***
96
+
97
+ ### validUntil?
98
+
99
+ > `optional` **validUntil**: `string`
100
+
101
+ The date the verifiable credential is valid until.
102
+
103
+ ***
104
+
105
+ ### evidence?
106
+
107
+ > `optional` **evidence**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
108
+
109
+ Evidence associated with the Credential.
110
+
111
+ ***
112
+
68
113
  ### proof?
69
114
 
70
- > `optional` **proof**: [`IDidProof`](IDidProof.md) \| [`IDidProof`](IDidProof.md)[]
115
+ > `optional` **proof**: [`IProof`](../type-aliases/IProof.md) \| [`IProof`](../type-aliases/IProof.md)[]
71
116
 
72
117
  Proofs that the verifiable credential is valid.
73
118
  Optional if a different proof method is used, such as JWT.
@@ -6,9 +6,9 @@ Interface describing a verifiable presentation.
6
6
 
7
7
  ### @context
8
8
 
9
- > **@context**: `IJsonLdContextDefinitionRoot`
9
+ > **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `...IJsonLdContextDefinitionElement[]`\]
10
10
 
11
- The context for the verifiable credential.
11
+ The context for the verifiable presentation.
12
12
 
13
13
  ***
14
14
 
@@ -22,15 +22,15 @@ Provide a unique identifier for the presentation.
22
22
 
23
23
  ### type
24
24
 
25
- > **type**: `string`[]
25
+ > **type**: `string` \| `string`[]
26
26
 
27
27
  The types of the data stored in the verifiable credential.
28
28
 
29
29
  ***
30
30
 
31
- ### verifiableCredential
31
+ ### verifiableCredential?
32
32
 
33
- > **verifiableCredential**: `string`[]
33
+ > `optional` **verifiableCredential**: (`string` \| [`IDidVerifiableCredential`](IDidVerifiableCredential.md))[]
34
34
 
35
35
  The data for the verifiable credentials.
36
36
 
@@ -46,7 +46,7 @@ The entity generating the presentation.
46
46
 
47
47
  ### proof?
48
48
 
49
- > `optional` **proof**: [`IDidProof`](IDidProof.md) \| [`IDidProof`](IDidProof.md)[]
49
+ > `optional` **proof**: [`IProof`](../type-aliases/IProof.md) \| [`IProof`](../type-aliases/IProof.md)[]
50
50
 
51
51
  Proofs that the verifiable presentation is valid.
52
52
  Optional if a different proof method is used, such as JWT.
@@ -0,0 +1,52 @@
1
+ # Interface: IJsonWebSignature2020Proof
2
+
3
+ Interface describing a did proof in JSON Web Signature 2020 Format.
4
+ https://www.w3.org/TR/vc-jws-2020/
5
+
6
+ ## Properties
7
+
8
+ ### @context?
9
+
10
+ > `optional` **@context**: `"https://w3id.org/security/suites/jws-2020/v1"` \| \[`"https://w3id.org/security/suites/jws-2020/v1"`, `...IJsonLdContextDefinitionElement[]`\]
11
+
12
+ JSON-LD Context.
13
+
14
+ ***
15
+
16
+ ### type
17
+
18
+ > **type**: `"JsonWebSignature2020"`
19
+
20
+ JSON-LD Type.
21
+
22
+ ***
23
+
24
+ ### proofPurpose
25
+
26
+ > **proofPurpose**: `string`
27
+
28
+ The reason the proof was created.
29
+
30
+ ***
31
+
32
+ ### verificationMethod?
33
+
34
+ > `optional` **verificationMethod**: `string`
35
+
36
+ The verification method of the proof.
37
+
38
+ ***
39
+
40
+ ### created?
41
+
42
+ > `optional` **created**: `string`
43
+
44
+ The iso date of when the proof was created.
45
+
46
+ ***
47
+
48
+ ### jws?
49
+
50
+ > `optional` **jws**: `string`
51
+
52
+ The JSON Web Signature.
@@ -0,0 +1,68 @@
1
+ # Interface: IMultikey
2
+
3
+ Interface describing a Multikey.
4
+ https://www.w3.org/TR/cid-1.0/
5
+
6
+ ## Properties
7
+
8
+ ### @context?
9
+
10
+ > `optional` **@context**: `"https://www.w3.org/ns/cid/v1"` \| `"https://w3id.org/security/multikey/v1"` \| \[`"https://www.w3.org/ns/cid/v1"`, `...IJsonLdContextDefinitionElement[]`\] \| \[`"https://w3id.org/security/multikey/v1"`, `...IJsonLdContextDefinitionElement[]`\]
11
+
12
+ JSON-LD Context.
13
+
14
+ ***
15
+
16
+ ### id?
17
+
18
+ > `optional` **id**: `string`
19
+
20
+ The id of the entry.
21
+
22
+ ***
23
+
24
+ ### type
25
+
26
+ > **type**: `"Multikey"`
27
+
28
+ The type of the entry.
29
+
30
+ ***
31
+
32
+ ### controller?
33
+
34
+ > `optional` **controller**: `string`
35
+
36
+ The controller for the entry.
37
+
38
+ ***
39
+
40
+ ### publicKeyMultibase
41
+
42
+ > **publicKeyMultibase**: `string`
43
+
44
+ The public key for the entry.
45
+
46
+ ***
47
+
48
+ ### secretKeyMultibase?
49
+
50
+ > `optional` **secretKeyMultibase**: `string`
51
+
52
+ The secret key for the entry.
53
+
54
+ ***
55
+
56
+ ### expires?
57
+
58
+ > `optional` **expires**: `string`
59
+
60
+ The date the entry expires.
61
+
62
+ ***
63
+
64
+ ### revoked?
65
+
66
+ > `optional` **revoked**: `string`
67
+
68
+ The date the entry was revoked.
@@ -0,0 +1,99 @@
1
+ # Interface: IProofSignerVerifier
2
+
3
+ Interface describing a proof signer and verifier.
4
+
5
+ ## Methods
6
+
7
+ ### createProof()
8
+
9
+ > **createProof**(`unsecuredDocument`, `unsignedProof`, `signKey`): `Promise`\<[`IProof`](../type-aliases/IProof.md)\>
10
+
11
+ Create a proof for the given data.
12
+
13
+ #### Parameters
14
+
15
+ ##### unsecuredDocument
16
+
17
+ `IJsonLdNodeObject`
18
+
19
+ The data to create the proof for.
20
+
21
+ ##### unsignedProof
22
+
23
+ [`IProof`](../type-aliases/IProof.md)
24
+
25
+ The proof options.
26
+
27
+ ##### signKey
28
+
29
+ `IJwk`
30
+
31
+ The key to sign the proof with.
32
+
33
+ #### Returns
34
+
35
+ `Promise`\<[`IProof`](../type-aliases/IProof.md)\>
36
+
37
+ The created proof.
38
+
39
+ ***
40
+
41
+ ### verifyProof()
42
+
43
+ > **verifyProof**(`securedDocument`, `signedProof`, `verifyKey`): `Promise`\<`boolean`\>
44
+
45
+ Verify a proof for the given data.
46
+
47
+ #### Parameters
48
+
49
+ ##### securedDocument
50
+
51
+ `IJsonLdNodeObject`
52
+
53
+ The credential to verify.
54
+
55
+ ##### signedProof
56
+
57
+ [`IProof`](../type-aliases/IProof.md)
58
+
59
+ The proof to verify.
60
+
61
+ ##### verifyKey
62
+
63
+ `IJwk`
64
+
65
+ The public key to verify the proof with.
66
+
67
+ #### Returns
68
+
69
+ `Promise`\<`boolean`\>
70
+
71
+ True if the credential was verified.
72
+
73
+ ***
74
+
75
+ ### createHash()
76
+
77
+ > **createHash**(`unsecuredDocument`, `unsignedProof`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
78
+
79
+ Create a hash for the given data.
80
+
81
+ #### Parameters
82
+
83
+ ##### unsecuredDocument
84
+
85
+ `IJsonLdNodeObject`
86
+
87
+ The data to create the proof for.
88
+
89
+ ##### unsignedProof
90
+
91
+ [`IProof`](../type-aliases/IProof.md)
92
+
93
+ The unsigned proof.
94
+
95
+ #### Returns
96
+
97
+ `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
98
+
99
+ The created hash.
@@ -0,0 +1,5 @@
1
+ # Type Alias: DidContexts
2
+
3
+ > **DidContexts** = *typeof* [`DidContexts`](../variables/DidContexts.md)\[keyof *typeof* [`DidContexts`](../variables/DidContexts.md)\]
4
+
5
+ The contexts for DIDs.
@@ -0,0 +1,5 @@
1
+ # Type Alias: DidCryptoSuites
2
+
3
+ > **DidCryptoSuites** = *typeof* [`DidCryptoSuites`](../variables/DidCryptoSuites.md)\[keyof *typeof* [`DidCryptoSuites`](../variables/DidCryptoSuites.md)\]
4
+
5
+ The types for DID Proof crypto suites.
@@ -0,0 +1,5 @@
1
+ # Type Alias: DidTypes
2
+
3
+ > **DidTypes** = *typeof* [`DidTypes`](../variables/DidTypes.md)\[keyof *typeof* [`DidTypes`](../variables/DidTypes.md)\]
4
+
5
+ The types for DIDs.
@@ -1,5 +1,5 @@
1
1
  # Type Alias: DidVerificationMethodType
2
2
 
3
- > **DidVerificationMethodType**: *typeof* [`DidVerificationMethodType`](../variables/DidVerificationMethodType.md)\[keyof *typeof* [`DidVerificationMethodType`](../variables/DidVerificationMethodType.md)\]
3
+ > **DidVerificationMethodType** = *typeof* [`DidVerificationMethodType`](../variables/DidVerificationMethodType.md)\[keyof *typeof* [`DidVerificationMethodType`](../variables/DidVerificationMethodType.md)\]
4
4
 
5
5
  The types of verification method.
@@ -0,0 +1,5 @@
1
+ # Type Alias: IProof
2
+
3
+ > **IProof** = [`IDataIntegrityProof`](../interfaces/IDataIntegrityProof.md) \| [`IJsonWebSignature2020Proof`](../interfaces/IJsonWebSignature2020Proof.md)
4
+
5
+ Interface describing a proof.
@@ -0,0 +1,5 @@
1
+ # Type Alias: ProofTypes
2
+
3
+ > **ProofTypes** = *typeof* [`ProofTypes`](../variables/ProofTypes.md)\[keyof *typeof* [`ProofTypes`](../variables/ProofTypes.md)\]
4
+
5
+ The types for proofs.
@@ -0,0 +1,55 @@
1
+ # Variable: DidContexts
2
+
3
+ > `const` **DidContexts**: `object`
4
+
5
+ The contexts for DIDs.
6
+
7
+ ## Type declaration
8
+
9
+ ### Context
10
+
11
+ > `readonly` **Context**: `"https://www.w3.org/ns/did/v1"` = `"https://www.w3.org/ns/did/v1"`
12
+
13
+ The context root for DID.
14
+
15
+ ### ContextVCv1
16
+
17
+ > `readonly` **ContextVCv1**: `"https://www.w3.org/2018/credentials/v1"` = `"https://www.w3.org/2018/credentials/v1"`
18
+
19
+ The context root for DID VC v1.
20
+
21
+ ### ContextVCv2
22
+
23
+ > `readonly` **ContextVCv2**: `"https://www.w3.org/ns/credentials/v2"` = `"https://www.w3.org/ns/credentials/v2"`
24
+
25
+ The context root for DID VC v2.
26
+
27
+ ### ContextSecurityEd25519
28
+
29
+ > `readonly` **ContextSecurityEd25519**: `"https://w3id.org/security/suites/ed25519-2020/v1"` = `"https://w3id.org/security/suites/ed25519-2020/v1"`
30
+
31
+ The context root for security ed25519 suites.
32
+
33
+ ### ContextSecurityJws2020
34
+
35
+ > `readonly` **ContextSecurityJws2020**: `"https://w3id.org/security/suites/jws-2020/v1"` = `"https://w3id.org/security/suites/jws-2020/v1"`
36
+
37
+ The context root for security jws-2020 suites.
38
+
39
+ ### ContextDataIntegrity
40
+
41
+ > `readonly` **ContextDataIntegrity**: `"https://www.w3.org/ns/credentials/v2"` = `"https://www.w3.org/ns/credentials/v2"`
42
+
43
+ The context root for VC Data Integrity.
44
+
45
+ ### ContextControllerIdentifiers
46
+
47
+ > `readonly` **ContextControllerIdentifiers**: `"https://www.w3.org/ns/cid/v1"` = `"https://www.w3.org/ns/cid/v1"`
48
+
49
+ The context root for VC Data Integrity.
50
+
51
+ ### ContextSecurityMultikey
52
+
53
+ > `readonly` **ContextSecurityMultikey**: `"https://w3id.org/security/multikey/v1"` = `"https://w3id.org/security/multikey/v1"`
54
+
55
+ The context root for security multikey suites.
@@ -0,0 +1,21 @@
1
+ # Variable: DidCryptoSuites
2
+
3
+ > `const` **DidCryptoSuites**: `object`
4
+
5
+ The types for DID Proof crypto suites.
6
+
7
+ ## Type declaration
8
+
9
+ ### EdDSAJcs2022
10
+
11
+ > `readonly` **EdDSAJcs2022**: `"eddsa-jcs-2022"` = `"eddsa-jcs-2022"`
12
+
13
+ The type for EdDSA crypto suite for JSON Canonicalization Scheme [RFC8785].
14
+ https://www.w3.org/TR/vc-di-eddsa/#eddsa-jcs-2022
15
+
16
+ ### EdDSARdfc2022
17
+
18
+ > `readonly` **EdDSARdfc2022**: `"eddsa-rdfc-2022"` = `"eddsa-rdfc-2022"`
19
+
20
+ The type for EdDSA crypto suite for RDF Dataset Canonicalization.
21
+ https://www.w3.org/TR/vc-di-eddsa/#eddsa-rdfc-2022
@@ -0,0 +1,43 @@
1
+ # Variable: DidTypes
2
+
3
+ > `const` **DidTypes**: `object`
4
+
5
+ The types for DIDs.
6
+
7
+ ## Type declaration
8
+
9
+ ### VerifiableCredential
10
+
11
+ > `readonly` **VerifiableCredential**: `"VerifiableCredential"` = `"VerifiableCredential"`
12
+
13
+ The type for Verifiable Credential.
14
+
15
+ ### VerifiablePresentation
16
+
17
+ > `readonly` **VerifiablePresentation**: `"VerifiablePresentation"` = `"VerifiablePresentation"`
18
+
19
+ The type for Verifiable Presentation.
20
+
21
+ ### Ed25519VerificationKey2020
22
+
23
+ > `readonly` **Ed25519VerificationKey2020**: `"Ed25519VerificationKey2020"` = `"Ed25519VerificationKey2020"`
24
+
25
+ The type for Ed25519VerificationKey2020.
26
+
27
+ ### JsonWebKey2020
28
+
29
+ > `readonly` **JsonWebKey2020**: `"JsonWebKey2020"` = `"JsonWebKey2020"`
30
+
31
+ The type for JsonWebKey2020.
32
+
33
+ ### LinkedDomains
34
+
35
+ > `readonly` **LinkedDomains**: `"LinkedDomains"` = `"LinkedDomains"`
36
+
37
+ The type for LinkedDomains.
38
+
39
+ ### Multikey
40
+
41
+ > `readonly` **Multikey**: `"Multikey"` = `"Multikey"`
42
+
43
+ The type for Multikey.
@@ -6,4 +6,4 @@ The types of verification method.
6
6
 
7
7
  ## Index Signature
8
8
 
9
- \[`id`: `string`\]: keyof `Pick`\<[`IDidDocument`](../interfaces/IDidDocument.md), `"verificationMethod"` \| `"authentication"` \| `"assertionMethod"` \| `"keyAgreement"` \| `"capabilityInvocation"` \| `"capabilityDelegation"`\>
9
+ \[`id`: `string`\]: `"verificationMethod"` \| `"authentication"` \| `"assertionMethod"` \| `"keyAgreement"` \| `"capabilityInvocation"` \| `"capabilityDelegation"`
@@ -0,0 +1,19 @@
1
+ # Variable: ProofTypes
2
+
3
+ > `const` **ProofTypes**: `object`
4
+
5
+ The types for proofs.
6
+
7
+ ## Type declaration
8
+
9
+ ### DataIntegrityProof
10
+
11
+ > `readonly` **DataIntegrityProof**: `"DataIntegrityProof"` = `"DataIntegrityProof"`
12
+
13
+ The type for Data Integrity Proof.
14
+
15
+ ### JsonWebSignature2020
16
+
17
+ > `readonly` **JsonWebSignature2020**: `"JsonWebSignature2020"` = `"JsonWebSignature2020"`
18
+
19
+ The type for Json Web Signature 2020.
package/locales/en.json CHANGED
@@ -1 +1,27 @@
1
- {}
1
+ {
2
+ "error": {
3
+ "proofHelper": {
4
+ "unsupportedProofType": "Proof type \"{proofType}\" not supported.",
5
+ "proofMissing": "Proof is missing."
6
+ },
7
+ "jsonWebSignature2020SignerVerifier": {
8
+ "missingPrivateKey": "Private key is missing.",
9
+ "missingPublicKey": "Public key is missing.",
10
+ "missingProofValue": "Proof value is missing."
11
+ },
12
+ "dataIntegrityProofSignerVerifier": {
13
+ "cryptosuiteNotSupported": "Cryptosuite \"{cryptosuite}\" is not supported.",
14
+ "missingPrivateKey": "Private key is missing.",
15
+ "missingPublicKey": "Public key is missing.",
16
+ "missingProofValue": "Proof value is missing."
17
+ },
18
+ "multikeyHelper": {
19
+ "invalidPublicKeyMultibase": "Public key multibase \"{publicKeyMultibase}\" is invalid.",
20
+ "invalidSecretKeyMultibase": "Secret key multibase \"{secretKeyMultibase}\" is invalid.",
21
+ "unsupportedCrv": "Curve \"{crv}\" is not supported.",
22
+ "unsupportedKty": "Key type \"{kty}\" is not supported.",
23
+ "publicKeyMultibaseMissingHeader": "Public key multibase \"{publicKeyMultibase}\" is missing the multi codec header",
24
+ "secretKeyMultibaseMissingHeader": "Secret key multibase \"{secretKeyMultibase}\" is missing the multi codec header"
25
+ }
26
+ }
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/standards-w3c-did",
3
- "version": "0.0.1-next.4",
3
+ "version": "0.0.1-next.40",
4
4
  "description": "Models which define the structure of W3C DID Standard",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,7 +14,10 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
+ "@twin.org/core": "next",
18
+ "@twin.org/crypto": "next",
17
19
  "@twin.org/data-json-ld": "next",
20
+ "@twin.org/nameof": "next",
18
21
  "@twin.org/web": "next"
19
22
  },
20
23
  "main": "./dist/cjs/index.cjs",
@@ -22,11 +25,11 @@
22
25
  "types": "./dist/types/index.d.ts",
23
26
  "exports": {
24
27
  ".": {
28
+ "types": "./dist/types/index.d.ts",
25
29
  "require": "./dist/cjs/index.cjs",
26
- "import": "./dist/esm/index.mjs",
27
- "types": "./dist/types/index.d.ts"
30
+ "import": "./dist/esm/index.mjs"
28
31
  },
29
- "./locales": "./locales"
32
+ "./locales/*.json": "./locales/*.json"
30
33
  },
31
34
  "files": [
32
35
  "dist/cjs",