@twin.org/immutable-proof-models 0.0.1-next.25 → 0.0.1-next.26

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.
@@ -56,6 +56,10 @@ var properties = {
56
56
  type: "string",
57
57
  description: "The id of the proof."
58
58
  },
59
+ nodeIdentity: {
60
+ type: "string",
61
+ description: "The id of the node who created the proof."
62
+ },
59
63
  userIdentity: {
60
64
  type: "string",
61
65
  description: "The id of the user who created the proof."
@@ -69,7 +73,7 @@ var properties = {
69
73
  description: "The hash of the object associated with the proof."
70
74
  },
71
75
  proof: {
72
- $ref: "https://schema.twindev.org/did/DidProof",
76
+ $ref: "https://schema.twindev.org/did/DataIntegrityProof",
73
77
  description: "The proof which can be undefined if it has not yet been issued."
74
78
  },
75
79
  immutableReceipt: {
@@ -81,6 +85,7 @@ var required = [
81
85
  "@context",
82
86
  "type",
83
87
  "id",
88
+ "nodeIdentity",
84
89
  "userIdentity",
85
90
  "proofObjectHash"
86
91
  ];
@@ -120,7 +125,7 @@ class ImmutableProofDataTypes {
120
125
  // eslint-disable-next-line @typescript-eslint/naming-convention
121
126
  const ImmutableProofFailure = {
122
127
  /**
123
- * Proof not yes issued.
128
+ * Proof not yet issued.
124
129
  */
125
130
  NotIssued: "notIssued",
126
131
  /**
@@ -54,6 +54,10 @@ var properties = {
54
54
  type: "string",
55
55
  description: "The id of the proof."
56
56
  },
57
+ nodeIdentity: {
58
+ type: "string",
59
+ description: "The id of the node who created the proof."
60
+ },
57
61
  userIdentity: {
58
62
  type: "string",
59
63
  description: "The id of the user who created the proof."
@@ -67,7 +71,7 @@ var properties = {
67
71
  description: "The hash of the object associated with the proof."
68
72
  },
69
73
  proof: {
70
- $ref: "https://schema.twindev.org/did/DidProof",
74
+ $ref: "https://schema.twindev.org/did/DataIntegrityProof",
71
75
  description: "The proof which can be undefined if it has not yet been issued."
72
76
  },
73
77
  immutableReceipt: {
@@ -79,6 +83,7 @@ var required = [
79
83
  "@context",
80
84
  "type",
81
85
  "id",
86
+ "nodeIdentity",
82
87
  "userIdentity",
83
88
  "proofObjectHash"
84
89
  ];
@@ -118,7 +123,7 @@ class ImmutableProofDataTypes {
118
123
  // eslint-disable-next-line @typescript-eslint/naming-convention
119
124
  const ImmutableProofFailure = {
120
125
  /**
121
- * Proof not yes issued.
126
+ * Proof not yet issued.
122
127
  */
123
128
  NotIssued: "notIssued",
124
129
  /**
@@ -1,5 +1,5 @@
1
1
  import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
- import type { IDidProof } from "@twin.org/standards-w3c-did";
2
+ import type { IDataIntegrityProof } from "@twin.org/standards-w3c-did";
3
3
  import type { ImmutableProofTypes } from "./immutableProofTypes";
4
4
  /**
5
5
  * Interface describing an immutable proof state.
@@ -21,6 +21,10 @@ export interface IImmutableProof {
21
21
  * The id of the proof.
22
22
  */
23
23
  id: string;
24
+ /**
25
+ * The id of the node who created the proof.
26
+ */
27
+ nodeIdentity: string;
24
28
  /**
25
29
  * The id of the user who created the proof.
26
30
  */
@@ -36,7 +40,7 @@ export interface IImmutableProof {
36
40
  /**
37
41
  * The proof which can be undefined if it has not yet been issued.
38
42
  */
39
- proof?: IDidProof;
43
+ proof?: IDataIntegrityProof;
40
44
  /**
41
45
  * The immutable receipt detail for where the proof is stored.
42
46
  */
@@ -7,22 +7,22 @@ import type { IImmutableProofVerification } from "./IImmutableProofVerification"
7
7
  */
8
8
  export interface IImmutableProofComponent extends IComponent {
9
9
  /**
10
- * Create a new authentication proof.
11
- * @param proofObject The object for the proof as JSON-LD.
10
+ * Create a new proof.
11
+ * @param document The document to create the proof for.
12
12
  * @param userIdentity The identity to create the immutable proof operation with.
13
13
  * @param nodeIdentity The node identity to use for vault operations.
14
- * @returns The id of the new authentication proof.
14
+ * @returns The id of the new proof.
15
15
  */
16
- create(proofObject: IJsonLdNodeObject, userIdentity?: string, nodeIdentity?: string): Promise<string>;
16
+ create(document: IJsonLdNodeObject, userIdentity?: string, nodeIdentity?: string): Promise<string>;
17
17
  /**
18
- * Get an authentication proof.
18
+ * Get a proof.
19
19
  * @param id The id of the proof to get.
20
20
  * @returns The proof.
21
21
  * @throws NotFoundError if the proof is not found.
22
22
  */
23
23
  get(id: string): Promise<IImmutableProof>;
24
24
  /**
25
- * Verify an authentication proof.
25
+ * Verify a proof.
26
26
  * @param id The id of the proof to verify.
27
27
  * @returns The result of the verification and any failures.
28
28
  * @throws NotFoundError if the proof is not found.
@@ -8,8 +8,8 @@ export interface IImmutableProofCreateRequest {
8
8
  */
9
9
  body: {
10
10
  /**
11
- * The proof object to create the proof for.
11
+ * The document to create the proof for.
12
12
  */
13
- proofObject: IJsonLdNodeObject;
13
+ document: IJsonLdNodeObject;
14
14
  };
15
15
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export declare const ImmutableProofFailure: {
5
5
  /**
6
- * Proof not yes issued.
6
+ * Proof not yet issued.
7
7
  */
8
8
  readonly NotIssued: "notIssued";
9
9
  /**
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/immutable-proof-models - Changelog
2
2
 
3
- ## v0.0.1-next.25
3
+ ## v0.0.1-next.26
4
4
 
5
5
  - Initial Release
@@ -28,6 +28,14 @@ The id of the proof.
28
28
 
29
29
  ***
30
30
 
31
+ ### nodeIdentity
32
+
33
+ > **nodeIdentity**: `string`
34
+
35
+ The id of the node who created the proof.
36
+
37
+ ***
38
+
31
39
  ### userIdentity
32
40
 
33
41
  > **userIdentity**: `string`
@@ -54,7 +62,7 @@ The hash of the object associated with the proof.
54
62
 
55
63
  ### proof?
56
64
 
57
- > `optional` **proof**: `IDidProof`
65
+ > `optional` **proof**: `IDataIntegrityProof`
58
66
 
59
67
  The proof which can be undefined if it has not yet been issued.
60
68
 
@@ -10,17 +10,17 @@ Interface describing an immutable proof contract.
10
10
 
11
11
  ### create()
12
12
 
13
- > **create**(`proofObject`, `userIdentity`?, `nodeIdentity`?): `Promise`\<`string`\>
13
+ > **create**(`document`, `userIdentity`?, `nodeIdentity`?): `Promise`\<`string`\>
14
14
 
15
- Create a new authentication proof.
15
+ Create a new proof.
16
16
 
17
17
  #### Parameters
18
18
 
19
- ##### proofObject
19
+ ##### document
20
20
 
21
21
  `IJsonLdNodeObject`
22
22
 
23
- The object for the proof as JSON-LD.
23
+ The document to create the proof for.
24
24
 
25
25
  ##### userIdentity?
26
26
 
@@ -38,7 +38,7 @@ The node identity to use for vault operations.
38
38
 
39
39
  `Promise`\<`string`\>
40
40
 
41
- The id of the new authentication proof.
41
+ The id of the new proof.
42
42
 
43
43
  ***
44
44
 
@@ -46,7 +46,7 @@ The id of the new authentication proof.
46
46
 
47
47
  > **get**(`id`): `Promise`\<[`IImmutableProof`](IImmutableProof.md)\>
48
48
 
49
- Get an authentication proof.
49
+ Get a proof.
50
50
 
51
51
  #### Parameters
52
52
 
@@ -72,7 +72,7 @@ NotFoundError if the proof is not found.
72
72
 
73
73
  > **verify**(`id`): `Promise`\<[`IImmutableProofVerification`](IImmutableProofVerification.md)\>
74
74
 
75
- Verify an authentication proof.
75
+ Verify a proof.
76
76
 
77
77
  #### Parameters
78
78
 
@@ -10,8 +10,8 @@ Create a proof.
10
10
 
11
11
  The parameters from the body.
12
12
 
13
- #### proofObject
13
+ #### document
14
14
 
15
- > **proofObject**: `IJsonLdNodeObject`
15
+ > **document**: `IJsonLdNodeObject`
16
16
 
17
- The proof object to create the proof for.
17
+ The document to create the proof for.
@@ -10,7 +10,7 @@ The failure reason of the proof.
10
10
 
11
11
  > `readonly` **NotIssued**: `"notIssued"` = `"notIssued"`
12
12
 
13
- Proof not yes issued.
13
+ Proof not yet issued.
14
14
 
15
15
  ### ProofMissing
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-models",
3
- "version": "0.0.1-next.25",
3
+ "version": "0.0.1-next.26",
4
4
  "description": "Models which define the structure of the immutable proof connectors and services",
5
5
  "repository": {
6
6
  "type": "git",