@twin.org/immutable-proof-service 0.0.2-next.3 → 0.0.3-next.2
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/es/entities/immutableProof.js +53 -0
- package/dist/es/entities/immutableProof.js.map +1 -0
- package/dist/es/immutableProofRoutes.js +278 -0
- package/dist/es/immutableProofRoutes.js.map +1 -0
- package/dist/es/immutableProofService.js +335 -0
- package/dist/es/immutableProofService.js.map +1 -0
- package/dist/es/index.js +10 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IImmutableProofServiceConfig.js +4 -0
- package/dist/es/models/IImmutableProofServiceConfig.js.map +1 -0
- package/dist/es/models/IImmutableProofServiceConstructorOptions.js +2 -0
- package/dist/es/models/IImmutableProofServiceConstructorOptions.js.map +1 -0
- package/dist/es/restEntryPoints.js +10 -0
- package/dist/es/restEntryPoints.js.map +1 -0
- package/dist/es/schema.js +11 -0
- package/dist/es/schema.js.map +1 -0
- package/dist/types/entities/immutableProof.d.ts +0 -8
- package/dist/types/immutableProofService.d.ts +14 -6
- package/dist/types/index.d.ts +7 -7
- package/dist/types/models/IImmutableProofServiceConstructorOptions.d.ts +1 -1
- package/docs/changelog.md +42 -0
- package/docs/open-api/spec.json +10 -20
- package/docs/reference/classes/ImmutableProof.md +0 -16
- package/docs/reference/classes/ImmutableProofService.md +45 -19
- package/package.json +8 -9
- package/dist/cjs/index.cjs +0 -701
- package/dist/esm/index.mjs +0 -692
package/docs/open-api/spec.json
CHANGED
|
@@ -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": {
|
|
@@ -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":
|
|
558
|
-
|
|
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":
|
|
575
|
-
|
|
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`
|
|
@@ -36,31 +36,63 @@ Runtime name for the class.
|
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
-
###
|
|
39
|
+
### className()
|
|
40
40
|
|
|
41
|
-
> **
|
|
41
|
+
> **className**(): `string`
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Returns the class name of the component.
|
|
44
44
|
|
|
45
|
-
####
|
|
45
|
+
#### Returns
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
`string`
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
The class name of the component.
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
#### Implementation of
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
`IImmutableProofComponent.className`
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
***
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
### start()
|
|
58
58
|
|
|
59
|
-
|
|
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
|
|
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
|
|
|
@@ -136,7 +168,7 @@ NotFoundError if the proof is not found.
|
|
|
136
168
|
|
|
137
169
|
### removeVerifiable()
|
|
138
170
|
|
|
139
|
-
> **removeVerifiable**(`id
|
|
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`\>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/immutable-proof-service",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-next.2",
|
|
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,26 @@
|
|
|
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.
|
|
27
|
-
"@twin.org/immutable-proof-task": "0.0.
|
|
27
|
+
"@twin.org/immutable-proof-models": "0.0.3-next.2",
|
|
28
|
+
"@twin.org/immutable-proof-task": "0.0.3-next.2",
|
|
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/
|
|
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
|
-
"
|
|
41
|
-
"
|
|
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/
|
|
47
|
-
"dist/esm",
|
|
46
|
+
"dist/es",
|
|
48
47
|
"dist/types",
|
|
49
48
|
"locales",
|
|
50
49
|
"docs"
|