@twin.org/immutable-proof-service 0.0.2-next.2 → 0.0.3-next.1

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.
@@ -78,7 +78,7 @@
78
78
  "exampleResponse": {
79
79
  "value": {
80
80
  "name": "GeneralError",
81
- "message": "component.error",
81
+ "message": "errorMessage",
82
82
  "properties": {
83
83
  "foo": "bar"
84
84
  }
@@ -99,7 +99,7 @@
99
99
  "exampleResponse": {
100
100
  "value": {
101
101
  "name": "UnauthorizedError",
102
- "message": "component.error"
102
+ "message": "errorMessage"
103
103
  }
104
104
  }
105
105
  }
@@ -117,7 +117,7 @@
117
117
  "exampleResponse": {
118
118
  "value": {
119
119
  "name": "NotFoundError",
120
- "message": "component.error",
120
+ "message": "errorMessage",
121
121
  "properties": {
122
122
  "notFoundId": "1"
123
123
  }
@@ -138,7 +138,7 @@
138
138
  "exampleResponse": {
139
139
  "value": {
140
140
  "name": "InternalServerError",
141
- "message": "component.error"
141
+ "message": "errorMessage"
142
142
  }
143
143
  }
144
144
  }
@@ -200,8 +200,6 @@
200
200
  ],
201
201
  "type": "ImmutableProof",
202
202
  "id": "ais:1234567890",
203
- "nodeIdentity": "node-1",
204
- "userIdentity": "user-1",
205
203
  "proofObjectId": "test:1234567890",
206
204
  "proofObjectHash": "EAOKyDN0mYQbBh91eMdVeroxQx1H4GfnRbmt6n/2L/Y=",
207
205
  "proof": {
@@ -229,8 +227,6 @@
229
227
  ],
230
228
  "type": "ImmutableProof",
231
229
  "id": "ais:1234567890",
232
- "nodeIdentity": "node-1",
233
- "userIdentity": "user-1",
234
230
  "proofObjectId": "test:1234567890",
235
231
  "proofObjectHash": "EAOKyDN0mYQbBh91eMdVeroxQx1H4GfnRbmt6n/2L/Y=",
236
232
  "proof": {
@@ -266,7 +262,7 @@
266
262
  "exampleResponse": {
267
263
  "value": {
268
264
  "name": "GeneralError",
269
- "message": "component.error",
265
+ "message": "errorMessage",
270
266
  "properties": {
271
267
  "foo": "bar"
272
268
  }
@@ -287,7 +283,7 @@
287
283
  "exampleResponse": {
288
284
  "value": {
289
285
  "name": "UnauthorizedError",
290
- "message": "component.error"
286
+ "message": "errorMessage"
291
287
  }
292
288
  }
293
289
  }
@@ -305,7 +301,7 @@
305
301
  "exampleResponse": {
306
302
  "value": {
307
303
  "name": "NotFoundError",
308
- "message": "component.error",
304
+ "message": "errorMessage",
309
305
  "properties": {
310
306
  "notFoundId": "1"
311
307
  }
@@ -326,7 +322,7 @@
326
322
  "exampleResponse": {
327
323
  "value": {
328
324
  "name": "InternalServerError",
329
- "message": "component.error"
325
+ "message": "errorMessage"
330
326
  }
331
327
  }
332
328
  }
@@ -409,7 +405,7 @@
409
405
  "exampleResponse": {
410
406
  "value": {
411
407
  "name": "GeneralError",
412
- "message": "component.error",
408
+ "message": "errorMessage",
413
409
  "properties": {
414
410
  "foo": "bar"
415
411
  }
@@ -430,7 +426,7 @@
430
426
  "exampleResponse": {
431
427
  "value": {
432
428
  "name": "UnauthorizedError",
433
- "message": "component.error"
429
+ "message": "errorMessage"
434
430
  }
435
431
  }
436
432
  }
@@ -448,7 +444,7 @@
448
444
  "exampleResponse": {
449
445
  "value": {
450
446
  "name": "NotFoundError",
451
- "message": "component.error",
447
+ "message": "errorMessage",
452
448
  "properties": {
453
449
  "notFoundId": "1"
454
450
  }
@@ -469,7 +465,7 @@
469
465
  "exampleResponse": {
470
466
  "value": {
471
467
  "name": "InternalServerError",
472
- "message": "component.error"
468
+ "message": "errorMessage"
473
469
  }
474
470
  }
475
471
  }
@@ -494,15 +490,15 @@
494
490
  {
495
491
  "type": "array",
496
492
  "minItems": 1,
497
- "items": {
498
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
499
- },
500
493
  "prefixItems": [
501
494
  {
502
495
  "type": "string",
503
496
  "const": "https://www.w3.org/ns/credentials/v2"
504
497
  }
505
- ]
498
+ ],
499
+ "items": {
500
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
501
+ }
506
502
  }
507
503
  ],
508
504
  "description": "JSON-LD Context."
@@ -554,12 +550,9 @@
554
550
  },
555
551
  {
556
552
  "type": "array",
557
- "items": false,
558
- "prefixItems": [
559
- {
560
- "type": "string"
561
- }
562
- ]
553
+ "items": {
554
+ "type": "string"
555
+ }
563
556
  }
564
557
  ],
565
558
  "description": "One or more security domains in which the proof is meant to be used."
@@ -571,12 +564,9 @@
571
564
  },
572
565
  {
573
566
  "type": "array",
574
- "items": false,
575
- "prefixItems": [
576
- {
577
- "type": "string"
578
- }
579
- ]
567
+ "items": {
568
+ "type": "string"
569
+ }
580
570
  }
581
571
  ],
582
572
  "description": "Provided to mitigate replay attacks on domains."
@@ -22,22 +22,6 @@ The id of the proof.
22
22
 
23
23
  ***
24
24
 
25
- ### nodeIdentity
26
-
27
- > **nodeIdentity**: `string`
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.
38
-
39
- ***
40
-
41
25
  ### dateCreated
42
26
 
43
27
  > **dateCreated**: `string`
@@ -30,41 +30,69 @@ The dependencies for the immutable proof connector.
30
30
 
31
31
  ### CLASS\_NAME
32
32
 
33
- > `readonly` **CLASS\_NAME**: `string`
33
+ > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
35
35
  Runtime name for the class.
36
36
 
37
+ ## Methods
38
+
39
+ ### className()
40
+
41
+ > **className**(): `string`
42
+
43
+ Returns the class name of the component.
44
+
45
+ #### Returns
46
+
47
+ `string`
48
+
49
+ The class name of the component.
50
+
37
51
  #### Implementation of
38
52
 
39
- `IImmutableProofComponent.CLASS_NAME`
53
+ `IImmutableProofComponent.className`
40
54
 
41
- ## Methods
55
+ ***
42
56
 
43
- ### create()
57
+ ### start()
44
58
 
45
- > **create**(`document`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`string`\>
59
+ > **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
46
60
 
47
- Create a new proof.
61
+ The component needs to be started when the node is initialized.
48
62
 
49
63
  #### Parameters
50
64
 
51
- ##### document
65
+ ##### nodeLoggingComponentType?
52
66
 
53
- `IJsonLdNodeObject`
67
+ `string`
54
68
 
55
- The document to create the proof for.
69
+ The node logging component type.
56
70
 
57
- ##### userIdentity?
71
+ #### Returns
58
72
 
59
- `string`
73
+ `Promise`\<`void`\>
60
74
 
61
- The identity to create the immutable proof operation with.
75
+ Nothing.
62
76
 
63
- ##### nodeIdentity?
77
+ #### Implementation of
64
78
 
65
- `string`
79
+ `IImmutableProofComponent.start`
66
80
 
67
- The node identity to use for vault operations.
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.
68
96
 
69
97
  #### Returns
70
98
 
@@ -140,7 +168,7 @@ NotFoundError if the proof is not found.
140
168
 
141
169
  ### removeVerifiable()
142
170
 
143
- > **removeVerifiable**(`id`, `nodeIdentity?`): `Promise`\<`void`\>
171
+ > **removeVerifiable**(`id`): `Promise`\<`void`\>
144
172
 
145
173
  Remove the verifiable storage for the proof.
146
174
 
@@ -152,12 +180,6 @@ Remove the verifiable storage for the proof.
152
180
 
153
181
  The id of the proof to remove the storage from.
154
182
 
155
- ##### nodeIdentity?
156
-
157
- `string`
158
-
159
- The node identity to use for vault operations.
160
-
161
183
  #### Returns
162
184
 
163
185
  `Promise`\<`void`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-service",
3
- "version": "0.0.2-next.2",
3
+ "version": "0.0.3-next.1",
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,30 +24,43 @@
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.2",
27
- "@twin.org/immutable-proof-task": "0.0.2-next.2",
27
+ "@twin.org/immutable-proof-models": "0.0.3-next.1",
28
+ "@twin.org/immutable-proof-task": "0.0.3-next.1",
28
29
  "@twin.org/nameof": "next",
29
30
  "@twin.org/standards-w3c-did": "next",
30
31
  "@twin.org/vault-models": "next",
31
32
  "@twin.org/verifiable-storage-models": "next",
32
33
  "@twin.org/web": "next"
33
34
  },
34
- "main": "./dist/cjs/index.cjs",
35
- "module": "./dist/esm/index.mjs",
35
+ "main": "./dist/es/index.js",
36
36
  "types": "./dist/types/index.d.ts",
37
37
  "exports": {
38
38
  ".": {
39
39
  "types": "./dist/types/index.d.ts",
40
- "require": "./dist/cjs/index.cjs",
41
- "import": "./dist/esm/index.mjs"
40
+ "import": "./dist/es/index.js",
41
+ "default": "./dist/es/index.js"
42
42
  },
43
43
  "./locales/*.json": "./locales/*.json"
44
44
  },
45
45
  "files": [
46
- "dist/cjs",
47
- "dist/esm",
46
+ "dist/es",
48
47
  "dist/types",
49
48
  "locales",
50
49
  "docs"
51
- ]
50
+ ],
51
+ "keywords": [
52
+ "twin",
53
+ "trade",
54
+ "iota",
55
+ "framework",
56
+ "blockchain",
57
+ "immutable-proof",
58
+ "service",
59
+ "microservice",
60
+ "business-logic"
61
+ ],
62
+ "bugs": {
63
+ "url": "git+https://github.com/twinfoundation/immutable-proof/issues"
64
+ },
65
+ "homepage": "https://twindev.org"
52
66
  }