@twin.org/standards-w3c-did 0.0.1-next.28 → 0.0.1-next.29
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/dist/cjs/index.cjs +1 -3
- package/dist/esm/index.mjs +1 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/IDataIntegrityProof.d.ts +2 -2
- package/dist/types/models/IDidVerifiableCredential.d.ts +2 -3
- package/dist/types/models/IDidVerifiablePresentation.d.ts +2 -3
- package/dist/types/models/IProof.d.ts +6 -0
- package/dist/types/models/IProofSignerVerifier.d.ts +4 -3
- package/dist/types/signerVerifiers/dataIntegrityProofSignerVerifier.d.ts +5 -3
- package/dist/types/signerVerifiers/jsonWebSignature2020SignerVerifier.d.ts +4 -3
- package/dist/types/utils/proofHelper.d.ts +3 -2
- package/docs/changelog.md +1 -1
- package/docs/reference/classes/DataIntegrityProofSignerVerifier.md +5 -5
- package/docs/reference/classes/JsonWebSignature2020SignerVerifier.md +5 -5
- package/docs/reference/classes/ProofHelper.md +4 -4
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/IDataIntegrityProof.md +0 -12
- package/docs/reference/interfaces/IDidVerifiableCredential.md +1 -1
- package/docs/reference/interfaces/IDidVerifiablePresentation.md +1 -1
- package/docs/reference/interfaces/IProofSignerVerifier.md +5 -5
- package/docs/reference/type-aliases/IProof.md +5 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -188,14 +188,12 @@ class DataIntegrityProofSignerVerifier {
|
|
|
188
188
|
async verifyProof(securedDocument, signedProof, verifyKey) {
|
|
189
189
|
core.Guards.object(this.CLASS_NAME, "securedDocument", securedDocument);
|
|
190
190
|
core.Guards.object(this.CLASS_NAME, "signedProof", signedProof);
|
|
191
|
+
core.Guards.stringValue(this.CLASS_NAME, "signedProof.proofValue", signedProof.proofValue);
|
|
191
192
|
core.Guards.object(this.CLASS_NAME, "verifyKey", verifyKey);
|
|
192
193
|
const rawKeys = await web.Jwk.toRaw(verifyKey);
|
|
193
194
|
if (!core.Is.uint8Array(rawKeys.publicKey)) {
|
|
194
195
|
throw new core.GeneralError(this.CLASS_NAME, "missingPublicKey");
|
|
195
196
|
}
|
|
196
|
-
if (!core.Is.stringValue(signedProof.proofValue) || !signedProof.proofValue.startsWith("z")) {
|
|
197
|
-
throw new core.GeneralError(this.CLASS_NAME, "missingProofValue");
|
|
198
|
-
}
|
|
199
197
|
const combinedHash = await this.createHash(securedDocument, signedProof);
|
|
200
198
|
return crypto.Ed25519.verify(rawKeys.publicKey, combinedHash, core.Converter.base58ToBytes(signedProof.proofValue.slice(1)));
|
|
201
199
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -186,14 +186,12 @@ class DataIntegrityProofSignerVerifier {
|
|
|
186
186
|
async verifyProof(securedDocument, signedProof, verifyKey) {
|
|
187
187
|
Guards.object(this.CLASS_NAME, "securedDocument", securedDocument);
|
|
188
188
|
Guards.object(this.CLASS_NAME, "signedProof", signedProof);
|
|
189
|
+
Guards.stringValue(this.CLASS_NAME, "signedProof.proofValue", signedProof.proofValue);
|
|
189
190
|
Guards.object(this.CLASS_NAME, "verifyKey", verifyKey);
|
|
190
191
|
const rawKeys = await Jwk.toRaw(verifyKey);
|
|
191
192
|
if (!Is.uint8Array(rawKeys.publicKey)) {
|
|
192
193
|
throw new GeneralError(this.CLASS_NAME, "missingPublicKey");
|
|
193
194
|
}
|
|
194
|
-
if (!Is.stringValue(signedProof.proofValue) || !signedProof.proofValue.startsWith("z")) {
|
|
195
|
-
throw new GeneralError(this.CLASS_NAME, "missingProofValue");
|
|
196
|
-
}
|
|
197
195
|
const combinedHash = await this.createHash(securedDocument, signedProof);
|
|
198
196
|
return Ed25519.verify(rawKeys.publicKey, combinedHash, Converter.base58ToBytes(signedProof.proofValue.slice(1)));
|
|
199
197
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from "./models/IDidVerifiableCredential";
|
|
|
14
14
|
export * from "./models/IDidVerifiablePresentation";
|
|
15
15
|
export * from "./models/IJsonWebSignature2020Proof";
|
|
16
16
|
export * from "./models/IMultikey";
|
|
17
|
+
export * from "./models/IProof";
|
|
17
18
|
export * from "./models/IProofSignerVerifier";
|
|
18
19
|
export * from "./models/proofTypes";
|
|
19
20
|
export * from "./signerVerifiers/dataIntegrityProofSignerVerifier";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IJsonLdContextDefinitionElement
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
2
|
import type { DidContexts } from "./didContexts";
|
|
3
3
|
import type { DidCryptoSuites } from "./didCryptoSuites";
|
|
4
4
|
import type { ProofTypes } from "./proofTypes";
|
|
@@ -6,7 +6,7 @@ import type { ProofTypes } from "./proofTypes";
|
|
|
6
6
|
* Interface describing a did proof.
|
|
7
7
|
* https://www.w3.org/TR/vc-data-integrity/
|
|
8
8
|
*/
|
|
9
|
-
export interface IDataIntegrityProof
|
|
9
|
+
export interface IDataIntegrityProof {
|
|
10
10
|
/**
|
|
11
11
|
* JSON-LD Context.
|
|
12
12
|
*/
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
2
|
import type { DidContexts } from "./didContexts";
|
|
3
|
-
import type { IDataIntegrityProof } from "./IDataIntegrityProof";
|
|
4
3
|
import type { IDidCredentialSchema } from "./IDidCredentialSchema";
|
|
5
4
|
import type { IDidCredentialStatus } from "./IDidCredentialStatus";
|
|
6
5
|
import type { IDidLabel } from "./IDidLabel";
|
|
7
|
-
import type {
|
|
6
|
+
import type { IProof } from "./IProof";
|
|
8
7
|
/**
|
|
9
8
|
* Interface describing a verifiable credential.
|
|
10
9
|
* https://www.w3.org/TR/vc-data-model-2.0
|
|
@@ -71,5 +70,5 @@ export interface IDidVerifiableCredential {
|
|
|
71
70
|
* Proofs that the verifiable credential is valid.
|
|
72
71
|
* Optional if a different proof method is used, such as JWT.
|
|
73
72
|
*/
|
|
74
|
-
proof?:
|
|
73
|
+
proof?: IProof | IProof[];
|
|
75
74
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
2
|
import type { DidContexts } from "./didContexts";
|
|
3
|
-
import type { IDataIntegrityProof } from "./IDataIntegrityProof";
|
|
4
3
|
import type { IDidVerifiableCredential } from "./IDidVerifiableCredential";
|
|
5
|
-
import type {
|
|
4
|
+
import type { IProof } from "./IProof";
|
|
6
5
|
/**
|
|
7
6
|
* Interface describing a verifiable presentation.
|
|
8
7
|
*/
|
|
@@ -31,5 +30,5 @@ export interface IDidVerifiablePresentation {
|
|
|
31
30
|
* Proofs that the verifiable presentation is valid.
|
|
32
31
|
* Optional if a different proof method is used, such as JWT.
|
|
33
32
|
*/
|
|
34
|
-
proof?:
|
|
33
|
+
proof?: IProof | IProof[];
|
|
35
34
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
2
|
import type { IJwk } from "@twin.org/web";
|
|
3
|
+
import type { IProof } from "./IProof";
|
|
3
4
|
/**
|
|
4
5
|
* Interface describing a proof signer and verifier.
|
|
5
6
|
*/
|
|
@@ -11,7 +12,7 @@ export interface IProofSignerVerifier {
|
|
|
11
12
|
* @param signKey The key to sign the proof with.
|
|
12
13
|
* @returns The created proof.
|
|
13
14
|
*/
|
|
14
|
-
createProof(unsecuredDocument: IJsonLdNodeObject, unsignedProof:
|
|
15
|
+
createProof(unsecuredDocument: IJsonLdNodeObject, unsignedProof: IProof, signKey: IJwk): Promise<IProof>;
|
|
15
16
|
/**
|
|
16
17
|
* Verify a proof for the given data.
|
|
17
18
|
* @param securedDocument The credential to verify.
|
|
@@ -19,12 +20,12 @@ export interface IProofSignerVerifier {
|
|
|
19
20
|
* @param verifyKey The public key to verify the proof with.
|
|
20
21
|
* @returns True if the credential was verified.
|
|
21
22
|
*/
|
|
22
|
-
verifyProof(securedDocument: IJsonLdNodeObject, signedProof:
|
|
23
|
+
verifyProof(securedDocument: IJsonLdNodeObject, signedProof: IProof, verifyKey: IJwk): Promise<boolean>;
|
|
23
24
|
/**
|
|
24
25
|
* Create a hash for the given data.
|
|
25
26
|
* @param unsecuredDocument The data to create the proof for.
|
|
26
27
|
* @param unsignedProof The unsigned proof.
|
|
27
28
|
* @returns The created hash.
|
|
28
29
|
*/
|
|
29
|
-
createHash(unsecuredDocument: IJsonLdNodeObject, unsignedProof:
|
|
30
|
+
createHash(unsecuredDocument: IJsonLdNodeObject, unsignedProof: IProof): Promise<Uint8Array>;
|
|
30
31
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
2
|
import { type IJwk } from "@twin.org/web";
|
|
3
|
+
import type { IDataIntegrityProof } from "../models/IDataIntegrityProof";
|
|
4
|
+
import type { IProof } from "../models/IProof";
|
|
3
5
|
import type { IProofSignerVerifier } from "../models/IProofSignerVerifier";
|
|
4
6
|
/**
|
|
5
7
|
* Helper methods for creating and verifying proofs.
|
|
@@ -17,7 +19,7 @@ export declare class DataIntegrityProofSignerVerifier implements IProofSignerVer
|
|
|
17
19
|
* @param signKey The key to sign the proof with.
|
|
18
20
|
* @returns The created proof.
|
|
19
21
|
*/
|
|
20
|
-
createProof(unsecuredDocument: IJsonLdNodeObject, unsignedProof:
|
|
22
|
+
createProof(unsecuredDocument: IJsonLdNodeObject, unsignedProof: IDataIntegrityProof, signKey: IJwk): Promise<IProof>;
|
|
21
23
|
/**
|
|
22
24
|
* Verify a proof for the given data in format.
|
|
23
25
|
* @param securedDocument The credential to verify.
|
|
@@ -25,12 +27,12 @@ export declare class DataIntegrityProofSignerVerifier implements IProofSignerVer
|
|
|
25
27
|
* @param verifyKey The public key to verify the proof with.
|
|
26
28
|
* @returns True if the credential was verified.
|
|
27
29
|
*/
|
|
28
|
-
verifyProof(securedDocument: IJsonLdNodeObject, signedProof:
|
|
30
|
+
verifyProof(securedDocument: IJsonLdNodeObject, signedProof: IDataIntegrityProof, verifyKey: IJwk): Promise<boolean>;
|
|
29
31
|
/**
|
|
30
32
|
* Create a hash for the given data.
|
|
31
33
|
* @param unsecuredDocument The data to create the proof for.
|
|
32
34
|
* @param unsignedProof The unsigned proof.
|
|
33
35
|
* @returns The created hash.
|
|
34
36
|
*/
|
|
35
|
-
createHash(unsecuredDocument: IJsonLdNodeObject, unsignedProof:
|
|
37
|
+
createHash(unsecuredDocument: IJsonLdNodeObject, unsignedProof: IDataIntegrityProof): Promise<Uint8Array>;
|
|
36
38
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
2
|
import { type IJwk } from "@twin.org/web";
|
|
3
|
+
import type { IJsonWebSignature2020Proof } from "../models/IJsonWebSignature2020Proof";
|
|
3
4
|
import type { IProofSignerVerifier } from "../models/IProofSignerVerifier";
|
|
4
5
|
/**
|
|
5
6
|
* Helper methods for creating and verifying proofs.
|
|
@@ -16,7 +17,7 @@ export declare class JsonWebSignature2020SignerVerifier implements IProofSignerV
|
|
|
16
17
|
* @param signKey The key to sign the proof with.
|
|
17
18
|
* @returns The created proof.
|
|
18
19
|
*/
|
|
19
|
-
createProof(unsecuredDocument: IJsonLdNodeObject, unsignedProof:
|
|
20
|
+
createProof(unsecuredDocument: IJsonLdNodeObject, unsignedProof: IJsonWebSignature2020Proof, signKey: IJwk): Promise<IJsonWebSignature2020Proof>;
|
|
20
21
|
/**
|
|
21
22
|
* Verify a proof for the given data in format.
|
|
22
23
|
* @param securedDocument The credential to verify.
|
|
@@ -24,12 +25,12 @@ export declare class JsonWebSignature2020SignerVerifier implements IProofSignerV
|
|
|
24
25
|
* @param verifyKey The public key to verify the proof with.
|
|
25
26
|
* @returns True if the credential was verified.
|
|
26
27
|
*/
|
|
27
|
-
verifyProof(securedDocument: IJsonLdNodeObject, signedProof:
|
|
28
|
+
verifyProof(securedDocument: IJsonLdNodeObject, signedProof: IJsonWebSignature2020Proof, verifyKey: IJwk): Promise<boolean>;
|
|
28
29
|
/**
|
|
29
30
|
* Create a hash for the given data.
|
|
30
31
|
* @param unsecuredDocument The data to create the proof for.
|
|
31
32
|
* @param unsignedProof The unsigned proof.
|
|
32
33
|
* @returns The created hash.
|
|
33
34
|
*/
|
|
34
|
-
createHash(unsecuredDocument: IJsonLdNodeObject, unsignedProof:
|
|
35
|
+
createHash(unsecuredDocument: IJsonLdNodeObject, unsignedProof: IJsonWebSignature2020Proof): Promise<Uint8Array>;
|
|
35
36
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
2
|
import type { IJwk } from "@twin.org/web";
|
|
3
|
+
import type { IProof } from "../models/IProof";
|
|
3
4
|
import type { IProofSignerVerifier } from "../models/IProofSignerVerifier";
|
|
4
5
|
import { ProofTypes } from "../models/proofTypes";
|
|
5
6
|
/**
|
|
@@ -25,7 +26,7 @@ export declare class ProofHelper {
|
|
|
25
26
|
* @param signKey The key to sign the proof with.
|
|
26
27
|
* @returns The created proof.
|
|
27
28
|
*/
|
|
28
|
-
static createProof(proofType: ProofTypes, unsecuredDocument: IJsonLdNodeObject, unsignedProof:
|
|
29
|
+
static createProof(proofType: ProofTypes, unsecuredDocument: IJsonLdNodeObject, unsignedProof: IProof, signKey: IJwk): Promise<IProof>;
|
|
29
30
|
/**
|
|
30
31
|
* Verify a proof for the given data.
|
|
31
32
|
* @param securedDocument The credential to verify.
|
|
@@ -33,5 +34,5 @@ export declare class ProofHelper {
|
|
|
33
34
|
* @param verifyKey The public key to verify the proof with.
|
|
34
35
|
* @returns True if the credential was verified.
|
|
35
36
|
*/
|
|
36
|
-
static verifyProof(securedDocument: IJsonLdNodeObject, signedProof:
|
|
37
|
+
static verifyProof(securedDocument: IJsonLdNodeObject, signedProof: IProof, verifyKey: IJwk): Promise<boolean>;
|
|
37
38
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -29,7 +29,7 @@ Runtime name for the class.
|
|
|
29
29
|
|
|
30
30
|
### createProof()
|
|
31
31
|
|
|
32
|
-
> **createProof**(`unsecuredDocument`, `unsignedProof`, `signKey`): `Promise
|
|
32
|
+
> **createProof**(`unsecuredDocument`, `unsignedProof`, `signKey`): `Promise`\<[`IProof`](../type-aliases/IProof.md)\>
|
|
33
33
|
|
|
34
34
|
Create a proof for the given data.
|
|
35
35
|
|
|
@@ -43,7 +43,7 @@ The data to create the proof for.
|
|
|
43
43
|
|
|
44
44
|
##### unsignedProof
|
|
45
45
|
|
|
46
|
-
`
|
|
46
|
+
[`IDataIntegrityProof`](../interfaces/IDataIntegrityProof.md)
|
|
47
47
|
|
|
48
48
|
The proof options.
|
|
49
49
|
|
|
@@ -55,7 +55,7 @@ The key to sign the proof with.
|
|
|
55
55
|
|
|
56
56
|
#### Returns
|
|
57
57
|
|
|
58
|
-
`Promise
|
|
58
|
+
`Promise`\<[`IProof`](../type-aliases/IProof.md)\>
|
|
59
59
|
|
|
60
60
|
The created proof.
|
|
61
61
|
|
|
@@ -81,7 +81,7 @@ The credential to verify.
|
|
|
81
81
|
|
|
82
82
|
##### signedProof
|
|
83
83
|
|
|
84
|
-
`
|
|
84
|
+
[`IDataIntegrityProof`](../interfaces/IDataIntegrityProof.md)
|
|
85
85
|
|
|
86
86
|
The proof to verify.
|
|
87
87
|
|
|
@@ -119,7 +119,7 @@ The data to create the proof for.
|
|
|
119
119
|
|
|
120
120
|
##### unsignedProof
|
|
121
121
|
|
|
122
|
-
`
|
|
122
|
+
[`IDataIntegrityProof`](../interfaces/IDataIntegrityProof.md)
|
|
123
123
|
|
|
124
124
|
The unsigned proof.
|
|
125
125
|
|
|
@@ -28,7 +28,7 @@ Runtime name for the class.
|
|
|
28
28
|
|
|
29
29
|
### createProof()
|
|
30
30
|
|
|
31
|
-
> **createProof**(`unsecuredDocument`, `unsignedProof`, `signKey`): `Promise
|
|
31
|
+
> **createProof**(`unsecuredDocument`, `unsignedProof`, `signKey`): `Promise`\<[`IJsonWebSignature2020Proof`](../interfaces/IJsonWebSignature2020Proof.md)\>
|
|
32
32
|
|
|
33
33
|
Create a proof for the given data.
|
|
34
34
|
|
|
@@ -42,7 +42,7 @@ The data to create the proof for.
|
|
|
42
42
|
|
|
43
43
|
##### unsignedProof
|
|
44
44
|
|
|
45
|
-
`
|
|
45
|
+
[`IJsonWebSignature2020Proof`](../interfaces/IJsonWebSignature2020Proof.md)
|
|
46
46
|
|
|
47
47
|
The proof options.
|
|
48
48
|
|
|
@@ -54,7 +54,7 @@ The key to sign the proof with.
|
|
|
54
54
|
|
|
55
55
|
#### Returns
|
|
56
56
|
|
|
57
|
-
`Promise
|
|
57
|
+
`Promise`\<[`IJsonWebSignature2020Proof`](../interfaces/IJsonWebSignature2020Proof.md)\>
|
|
58
58
|
|
|
59
59
|
The created proof.
|
|
60
60
|
|
|
@@ -80,7 +80,7 @@ The credential to verify.
|
|
|
80
80
|
|
|
81
81
|
##### signedProof
|
|
82
82
|
|
|
83
|
-
`
|
|
83
|
+
[`IJsonWebSignature2020Proof`](../interfaces/IJsonWebSignature2020Proof.md)
|
|
84
84
|
|
|
85
85
|
The proof to verify.
|
|
86
86
|
|
|
@@ -118,7 +118,7 @@ The data to create the proof for.
|
|
|
118
118
|
|
|
119
119
|
##### unsignedProof
|
|
120
120
|
|
|
121
|
-
`
|
|
121
|
+
[`IJsonWebSignature2020Proof`](../interfaces/IJsonWebSignature2020Proof.md)
|
|
122
122
|
|
|
123
123
|
The unsigned proof.
|
|
124
124
|
|
|
@@ -50,7 +50,7 @@ GeneralError if the proof type is not supported.
|
|
|
50
50
|
|
|
51
51
|
### createProof()
|
|
52
52
|
|
|
53
|
-
> `static` **createProof**(`proofType`, `unsecuredDocument`, `unsignedProof`, `signKey`): `Promise
|
|
53
|
+
> `static` **createProof**(`proofType`, `unsecuredDocument`, `unsignedProof`, `signKey`): `Promise`\<[`IProof`](../type-aliases/IProof.md)\>
|
|
54
54
|
|
|
55
55
|
Create a proof for the given data.
|
|
56
56
|
|
|
@@ -70,7 +70,7 @@ The data to create the proof for.
|
|
|
70
70
|
|
|
71
71
|
##### unsignedProof
|
|
72
72
|
|
|
73
|
-
`
|
|
73
|
+
[`IProof`](../type-aliases/IProof.md)
|
|
74
74
|
|
|
75
75
|
The proof options.
|
|
76
76
|
|
|
@@ -82,7 +82,7 @@ The key to sign the proof with.
|
|
|
82
82
|
|
|
83
83
|
#### Returns
|
|
84
84
|
|
|
85
|
-
`Promise
|
|
85
|
+
`Promise`\<[`IProof`](../type-aliases/IProof.md)\>
|
|
86
86
|
|
|
87
87
|
The created proof.
|
|
88
88
|
|
|
@@ -104,7 +104,7 @@ The credential to verify.
|
|
|
104
104
|
|
|
105
105
|
##### signedProof
|
|
106
106
|
|
|
107
|
-
`
|
|
107
|
+
[`IProof`](../type-aliases/IProof.md)
|
|
108
108
|
|
|
109
109
|
The proof to verify.
|
|
110
110
|
|
package/docs/reference/index.md
CHANGED
|
@@ -3,14 +3,6 @@
|
|
|
3
3
|
Interface describing a did proof.
|
|
4
4
|
https://www.w3.org/TR/vc-data-integrity/
|
|
5
5
|
|
|
6
|
-
## Extends
|
|
7
|
-
|
|
8
|
-
- `IJsonLdNodeObject`
|
|
9
|
-
|
|
10
|
-
## Indexable
|
|
11
|
-
|
|
12
|
-
\[`key`: `string`\]: `undefined` \| `null` \| `string` \| `number` \| `boolean` \| `string`[] \| `IJsonLdContextDefinition` \| `IJsonLdContextDefinitionElement`[] \| `IJsonLdIdMap` \| `IJsonLdNodeObject` \| `IJsonLdListObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdSetObject` \| `IJsonLdJsonObject` \| `IJsonLdIndexMap` \| `IJsonLdLanguageMap` \| `IJsonLdGraphObject` \| `IJsonLdNodeObject`[] \| `IJsonLdJsonObject`[] \| \{\} \| `IJsonLdTypeMap` \| `IJsonLdNodePrimitive`[]
|
|
13
|
-
|
|
14
6
|
## Properties
|
|
15
7
|
|
|
16
8
|
### @context?
|
|
@@ -19,10 +11,6 @@ https://www.w3.org/TR/vc-data-integrity/
|
|
|
19
11
|
|
|
20
12
|
JSON-LD Context.
|
|
21
13
|
|
|
22
|
-
#### Overrides
|
|
23
|
-
|
|
24
|
-
`IJsonLdNodeObject.@context`
|
|
25
|
-
|
|
26
14
|
***
|
|
27
15
|
|
|
28
16
|
### type
|
|
@@ -112,7 +112,7 @@ Evidence associated with the Credential.
|
|
|
112
112
|
|
|
113
113
|
### proof?
|
|
114
114
|
|
|
115
|
-
> `optional` **proof**: [`
|
|
115
|
+
> `optional` **proof**: [`IProof`](../type-aliases/IProof.md) \| [`IProof`](../type-aliases/IProof.md)[]
|
|
116
116
|
|
|
117
117
|
Proofs that the verifiable credential is valid.
|
|
118
118
|
Optional if a different proof method is used, such as JWT.
|
|
@@ -46,7 +46,7 @@ The entity generating the presentation.
|
|
|
46
46
|
|
|
47
47
|
### proof?
|
|
48
48
|
|
|
49
|
-
> `optional` **proof**: [`
|
|
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.
|
|
@@ -6,7 +6,7 @@ Interface describing a proof signer and verifier.
|
|
|
6
6
|
|
|
7
7
|
### createProof()
|
|
8
8
|
|
|
9
|
-
> **createProof**(`unsecuredDocument`, `unsignedProof`, `signKey`): `Promise
|
|
9
|
+
> **createProof**(`unsecuredDocument`, `unsignedProof`, `signKey`): `Promise`\<[`IProof`](../type-aliases/IProof.md)\>
|
|
10
10
|
|
|
11
11
|
Create a proof for the given data.
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ The data to create the proof for.
|
|
|
20
20
|
|
|
21
21
|
##### unsignedProof
|
|
22
22
|
|
|
23
|
-
`
|
|
23
|
+
[`IProof`](../type-aliases/IProof.md)
|
|
24
24
|
|
|
25
25
|
The proof options.
|
|
26
26
|
|
|
@@ -32,7 +32,7 @@ The key to sign the proof with.
|
|
|
32
32
|
|
|
33
33
|
#### Returns
|
|
34
34
|
|
|
35
|
-
`Promise
|
|
35
|
+
`Promise`\<[`IProof`](../type-aliases/IProof.md)\>
|
|
36
36
|
|
|
37
37
|
The created proof.
|
|
38
38
|
|
|
@@ -54,7 +54,7 @@ The credential to verify.
|
|
|
54
54
|
|
|
55
55
|
##### signedProof
|
|
56
56
|
|
|
57
|
-
`
|
|
57
|
+
[`IProof`](../type-aliases/IProof.md)
|
|
58
58
|
|
|
59
59
|
The proof to verify.
|
|
60
60
|
|
|
@@ -88,7 +88,7 @@ The data to create the proof for.
|
|
|
88
88
|
|
|
89
89
|
##### unsignedProof
|
|
90
90
|
|
|
91
|
-
`
|
|
91
|
+
[`IProof`](../type-aliases/IProof.md)
|
|
92
92
|
|
|
93
93
|
The unsigned proof.
|
|
94
94
|
|