@twin.org/immutable-proof-service 0.0.2-next.3 → 0.0.3-next.10

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.
@@ -22,19 +22,11 @@ The id of the proof.
22
22
 
23
23
  ***
24
24
 
25
- ### nodeIdentity
25
+ ### organizationId
26
26
 
27
- > **nodeIdentity**: `string`
27
+ > **organizationId**: `string`
28
28
 
29
- The identity of the node which controls the proof.
30
-
31
- ***
32
-
33
- ### userIdentity
34
-
35
- > **userIdentity**: `string`
36
-
37
- The identity of the user which created the proof.
29
+ The organization id.
38
30
 
39
31
  ***
40
32
 
@@ -54,11 +46,11 @@ The associated id for the item.
54
46
 
55
47
  ***
56
48
 
57
- ### proofObjectHash
49
+ ### proofObjectIntegrity
58
50
 
59
- > **proofObjectHash**: `string`
51
+ > **proofObjectIntegrity**: `string`
60
52
 
61
- The associated hash for the item.
53
+ The associated integrity for the item.
62
54
 
63
55
  ***
64
56
 
@@ -67,3 +59,11 @@ The associated hash for the item.
67
59
  > `optional` **verifiableStorageId**: `string`
68
60
 
69
61
  The verifiable storage id.
62
+
63
+ ***
64
+
65
+ ### vcContext?
66
+
67
+ > `optional` **vcContext**: `"https://www.w3.org/2018/credentials/v1"` \| `"https://www.w3.org/ns/credentials/v2"`
68
+
69
+ The verifiable credential context.
@@ -36,31 +36,63 @@ Runtime name for the class.
36
36
 
37
37
  ## Methods
38
38
 
39
- ### create()
39
+ ### className()
40
40
 
41
- > **create**(`document`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`string`\>
41
+ > **className**(): `string`
42
42
 
43
- Create a new proof.
43
+ Returns the class name of the component.
44
44
 
45
- #### Parameters
45
+ #### Returns
46
46
 
47
- ##### document
47
+ `string`
48
48
 
49
- `IJsonLdNodeObject`
49
+ The class name of the component.
50
50
 
51
- The document to create the proof for.
51
+ #### Implementation of
52
52
 
53
- ##### userIdentity?
53
+ `IImmutableProofComponent.className`
54
54
 
55
- `string`
55
+ ***
56
56
 
57
- The identity to create the immutable proof operation with.
57
+ ### start()
58
58
 
59
- ##### nodeIdentity?
59
+ > **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
60
+
61
+ The component needs to be started when the node is initialized.
62
+
63
+ #### Parameters
64
+
65
+ ##### nodeLoggingComponentType?
60
66
 
61
67
  `string`
62
68
 
63
- The node identity to use for vault operations.
69
+ The node logging component type.
70
+
71
+ #### Returns
72
+
73
+ `Promise`\<`void`\>
74
+
75
+ Nothing.
76
+
77
+ #### Implementation of
78
+
79
+ `IImmutableProofComponent.start`
80
+
81
+ ***
82
+
83
+ ### create()
84
+
85
+ > **create**(`document`): `Promise`\<`string`\>
86
+
87
+ Create a new proof.
88
+
89
+ #### Parameters
90
+
91
+ ##### document
92
+
93
+ `IJsonLdNodeObject`
94
+
95
+ The document to create the proof for.
64
96
 
65
97
  #### Returns
66
98
 
@@ -76,7 +108,7 @@ The id of the new proof.
76
108
 
77
109
  ### get()
78
110
 
79
- > **get**(`id`): `Promise`\<`IImmutableProof`\>
111
+ > **get**(`id`): `Promise`\<`IDidVerifiableCredential`\>
80
112
 
81
113
  Get a proof.
82
114
 
@@ -90,7 +122,7 @@ The id of the proof to get.
90
122
 
91
123
  #### Returns
92
124
 
93
- `Promise`\<`IImmutableProof`\>
125
+ `Promise`\<`IDidVerifiableCredential`\>
94
126
 
95
127
  The proof.
96
128
 
@@ -136,7 +168,7 @@ NotFoundError if the proof is not found.
136
168
 
137
169
  ### removeVerifiable()
138
170
 
139
- > **removeVerifiable**(`id`, `nodeIdentity?`): `Promise`\<`void`\>
171
+ > **removeVerifiable**(`id`): `Promise`\<`void`\>
140
172
 
141
173
  Remove the verifiable storage for the proof.
142
174
 
@@ -148,12 +180,6 @@ Remove the verifiable storage for the proof.
148
180
 
149
181
  The id of the proof to remove the storage from.
150
182
 
151
- ##### nodeIdentity?
152
-
153
- `string`
154
-
155
- The node identity to use for vault operations.
156
-
157
183
  #### Returns
158
184
 
159
185
  `Promise`\<`void`\>
@@ -32,6 +32,20 @@ verifiable-storage
32
32
 
33
33
  ***
34
34
 
35
+ ### loggingComponentType?
36
+
37
+ > `optional` **loggingComponentType**: `string`
38
+
39
+ The logging component type.
40
+
41
+ #### Default
42
+
43
+ ```ts
44
+ logging
45
+ ```
46
+
47
+ ***
48
+
35
49
  ### identityConnectorType?
36
50
 
37
51
  > `optional` **identityConnectorType**: `string`
@@ -46,11 +60,11 @@ identity
46
60
 
47
61
  ***
48
62
 
49
- ### backgroundTaskConnectorType?
63
+ ### backgroundTaskComponentType?
50
64
 
51
- > `optional` **backgroundTaskConnectorType**: `string`
65
+ > `optional` **backgroundTaskComponentType**: `string`
52
66
 
53
- The background task connector type.
67
+ The background task component type.
54
68
 
55
69
  #### Default
56
70
 
package/locales/en.json CHANGED
@@ -6,7 +6,13 @@
6
6
  "getFailed": "Getting the proof failed",
7
7
  "verifyFailed": "Verifying the proof failed",
8
8
  "removeVerifiableFailed": "Removing verifiable entry from the Immutable Proof failed",
9
- "proofNotFound": "The proof with the Id \"{notFoundId}\" was not found"
9
+ "proofNotFound": "The proof with the Id \"{notFoundId}\" was not found",
10
+ "createProofFailed": "Creating the immutable proof failed"
11
+ }
12
+ },
13
+ "info": {
14
+ "immutableProofService": {
15
+ "createdProof": "The immutable proof with Id \"{proofId}\" has been created successfully"
10
16
  }
11
17
  }
12
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-service",
3
- "version": "0.0.2-next.3",
3
+ "version": "0.0.3-next.10",
4
4
  "description": "Immutable proof contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,6 +16,7 @@
16
16
  "dependencies": {
17
17
  "@twin.org/api-models": "next",
18
18
  "@twin.org/background-task-models": "next",
19
+ "@twin.org/context": "next",
19
20
  "@twin.org/core": "next",
20
21
  "@twin.org/crypto": "next",
21
22
  "@twin.org/data-json-ld": "next",
@@ -23,28 +24,27 @@
23
24
  "@twin.org/entity-storage-models": "next",
24
25
  "@twin.org/event-bus-models": "next",
25
26
  "@twin.org/identity-models": "next",
26
- "@twin.org/immutable-proof-models": "0.0.2-next.3",
27
- "@twin.org/immutable-proof-task": "0.0.2-next.3",
27
+ "@twin.org/immutable-proof-models": "0.0.3-next.10",
28
+ "@twin.org/immutable-proof-task": "0.0.3-next.10",
29
+ "@twin.org/logging-models": "next",
28
30
  "@twin.org/nameof": "next",
29
31
  "@twin.org/standards-w3c-did": "next",
30
32
  "@twin.org/vault-models": "next",
31
33
  "@twin.org/verifiable-storage-models": "next",
32
34
  "@twin.org/web": "next"
33
35
  },
34
- "main": "./dist/cjs/index.cjs",
35
- "module": "./dist/esm/index.mjs",
36
+ "main": "./dist/es/index.js",
36
37
  "types": "./dist/types/index.d.ts",
37
38
  "exports": {
38
39
  ".": {
39
40
  "types": "./dist/types/index.d.ts",
40
- "require": "./dist/cjs/index.cjs",
41
- "import": "./dist/esm/index.mjs"
41
+ "import": "./dist/es/index.js",
42
+ "default": "./dist/es/index.js"
42
43
  },
43
44
  "./locales/*.json": "./locales/*.json"
44
45
  },
45
46
  "files": [
46
- "dist/cjs",
47
- "dist/esm",
47
+ "dist/es",
48
48
  "dist/types",
49
49
  "locales",
50
50
  "docs"