@twin.org/immutable-proof-service 0.0.1-next.3 → 0.0.1-next.31

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.
@@ -62,8 +62,8 @@ The associated hash for the item.
62
62
 
63
63
  ***
64
64
 
65
- ### immutableStorageId?
65
+ ### verifiableStorageId?
66
66
 
67
- > `optional` **immutableStorageId**: `string`
67
+ > `optional` **verifiableStorageId**: `string`
68
68
 
69
- The immutable storage id.
69
+ The verifiable storage id.
@@ -16,29 +16,11 @@ Create a new instance of ImmutableProofService.
16
16
 
17
17
  #### Parameters
18
18
 
19
- **options?**
19
+ ##### options?
20
20
 
21
- The dependencies for the immutable proof connector.
22
-
23
- • **options.vaultConnectorType?**: `string`
24
-
25
- The vault connector type, defaults to "vault".
26
-
27
- • **options.immutableProofEntityStorageType?**: `string`
28
-
29
- The entity storage for proofs, defaults to "immutable-proof".
30
-
31
- • **options.immutableStorageType?**: `string`
32
-
33
- The immutable storage, defaults to "immutable-storage".
34
-
35
- • **options.config?**: [`IImmutableProofServiceConfig`](../interfaces/IImmutableProofServiceConfig.md)
36
-
37
- The configuration for the connector.
38
-
39
- • **options.identityConnectorType?**: `string`
21
+ [`IImmutableProofServiceConstructorOptions`](../interfaces/IImmutableProofServiceConstructorOptions.md)
40
22
 
41
- The identity connector type, defaults to "identity".
23
+ The dependencies for the immutable proof connector.
42
24
 
43
25
  #### Returns
44
26
 
@@ -68,21 +50,27 @@ Runtime name for the class.
68
50
 
69
51
  ### create()
70
52
 
71
- > **create**(`proofObject`, `userIdentity`?, `nodeIdentity`?): `Promise`\<`string`\>
53
+ > **create**(`document`, `userIdentity`?, `nodeIdentity`?): `Promise`\<`string`\>
72
54
 
73
- Create a new authentication proof.
55
+ Create a new proof.
74
56
 
75
57
  #### Parameters
76
58
 
77
- **proofObject**: `IJsonLdNodeObject`
59
+ ##### document
60
+
61
+ `IJsonLdNodeObject`
62
+
63
+ The document to create the proof for.
78
64
 
79
- The object for the proof as JSON-LD.
65
+ ##### userIdentity?
80
66
 
81
- • **userIdentity?**: `string`
67
+ `string`
82
68
 
83
69
  The identity to create the immutable proof operation with.
84
70
 
85
- **nodeIdentity?**: `string`
71
+ ##### nodeIdentity?
72
+
73
+ `string`
86
74
 
87
75
  The node identity to use for vault operations.
88
76
 
@@ -90,7 +78,7 @@ The node identity to use for vault operations.
90
78
 
91
79
  `Promise`\<`string`\>
92
80
 
93
- The id of the new authentication proof.
81
+ The id of the new proof.
94
82
 
95
83
  #### Implementation of
96
84
 
@@ -102,11 +90,13 @@ The id of the new authentication proof.
102
90
 
103
91
  > **get**(`id`): `Promise`\<`IImmutableProof`\>
104
92
 
105
- Get an authentication proof.
93
+ Get a proof.
106
94
 
107
95
  #### Parameters
108
96
 
109
- **id**: `string`
97
+ ##### id
98
+
99
+ `string`
110
100
 
111
101
  The id of the proof to get.
112
102
 
@@ -128,19 +118,17 @@ NotFoundError if the proof is not found.
128
118
 
129
119
  ### verify()
130
120
 
131
- > **verify**(`id`, `proofObject`): `Promise`\<`IImmutableProofVerification`\>
121
+ > **verify**(`id`): `Promise`\<`IImmutableProofVerification`\>
132
122
 
133
- Verify an authentication proof.
123
+ Verify a proof.
134
124
 
135
125
  #### Parameters
136
126
 
137
- **id**: `string`
127
+ ##### id
138
128
 
139
- The id of the proof to verify.
140
-
141
- • **proofObject**: `IJsonLdNodeObject`
129
+ `string`
142
130
 
143
- The object to verify as JSON-LD.
131
+ The id of the proof to verify.
144
132
 
145
133
  #### Returns
146
134
 
@@ -158,19 +146,23 @@ NotFoundError if the proof is not found.
158
146
 
159
147
  ***
160
148
 
161
- ### removeImmutable()
149
+ ### removeVerifiable()
162
150
 
163
- > **removeImmutable**(`id`, `nodeIdentity`?): `Promise`\<`void`\>
151
+ > **removeVerifiable**(`id`, `nodeIdentity`?): `Promise`\<`void`\>
164
152
 
165
- Remove the immutable storage for the proof.
153
+ Remove the verifiable storage for the proof.
166
154
 
167
155
  #### Parameters
168
156
 
169
- **id**: `string`
157
+ ##### id
158
+
159
+ `string`
170
160
 
171
161
  The id of the proof to remove the storage from.
172
162
 
173
- **nodeIdentity?**: `string`
163
+ ##### nodeIdentity?
164
+
165
+ `string`
174
166
 
175
167
  The node identity to use for vault operations.
176
168
 
@@ -186,4 +178,4 @@ NotFoundError if the proof is not found.
186
178
 
187
179
  #### Implementation of
188
180
 
189
- `IImmutableProofComponent.removeImmutable`
181
+ `IImmutableProofComponent.removeVerifiable`
@@ -1,21 +1,25 @@
1
1
  # Function: generateRestRoutesImmutableProof()
2
2
 
3
- > **generateRestRoutesImmutableProof**(`baseRouteName`, `componentName`): `IRestRoute`[]
3
+ > **generateRestRoutesImmutableProof**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
4
4
 
5
5
  The REST routes for immutable proof.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **baseRouteName**: `string`
9
+ ### baseRouteName
10
+
11
+ `string`
10
12
 
11
13
  Prefix to prepend to the paths.
12
14
 
13
- **componentName**: `string`
15
+ ### componentName
16
+
17
+ `string`
14
18
 
15
19
  The name of the component to use in the routes stored in the ComponentFactory.
16
20
 
17
21
  ## Returns
18
22
 
19
- `IRestRoute`[]
23
+ `IRestRoute`\<`any`, `any`\>[]
20
24
 
21
25
  The generated routes.
@@ -6,15 +6,21 @@ Create a proof.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **httpRequestContext**: `IHttpRequestContext`
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
10
12
 
11
13
  The request context for the API.
12
14
 
13
- **componentName**: `string`
15
+ ### componentName
16
+
17
+ `string`
14
18
 
15
19
  The name of the component to use in the routes.
16
20
 
17
- **request**: `IImmutableProofCreateRequest`
21
+ ### request
22
+
23
+ `IImmutableProofCreateRequest`
18
24
 
19
25
  The request.
20
26
 
@@ -6,15 +6,21 @@ Get the proof.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **httpRequestContext**: `IHttpRequestContext`
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
10
12
 
11
13
  The request context for the API.
12
14
 
13
- **componentName**: `string`
15
+ ### componentName
16
+
17
+ `string`
14
18
 
15
19
  The name of the component to use in the routes.
16
20
 
17
- **request**: `IImmutableProofGetRequest`
21
+ ### request
22
+
23
+ `IImmutableProofGetRequest`
18
24
 
19
25
  The request.
20
26
 
@@ -6,15 +6,21 @@ Verify the proof.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **httpRequestContext**: `IHttpRequestContext`
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
10
12
 
11
13
  The request context for the API.
12
14
 
13
- **componentName**: `string`
15
+ ### componentName
16
+
17
+ `string`
14
18
 
15
19
  The name of the component to use in the routes.
16
20
 
17
- **request**: `IImmutableProofVerifyRequest`
21
+ ### request
22
+
23
+ `IImmutableProofVerifyRequest`
18
24
 
19
25
  The request.
20
26
 
@@ -8,6 +8,7 @@
8
8
  ## Interfaces
9
9
 
10
10
  - [IImmutableProofServiceConfig](interfaces/IImmutableProofServiceConfig.md)
11
+ - [IImmutableProofServiceConstructorOptions](interfaces/IImmutableProofServiceConstructorOptions.md)
11
12
 
12
13
  ## Variables
13
14
 
@@ -4,28 +4,14 @@ Configuration for the immutable proof service.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### assertionMethodId?
7
+ ### verificationMethodId?
8
8
 
9
- > `optional` **assertionMethodId**: `string`
9
+ > `optional` **verificationMethodId**: `string`
10
10
 
11
- The assertion method id to use for the stream.
11
+ The verification method id to use for the proof.
12
12
 
13
13
  #### Default
14
14
 
15
15
  ```ts
16
- immutable-proof
17
- ```
18
-
19
- ***
20
-
21
- ### proofConfigKeyId?
22
-
23
- > `optional` **proofConfigKeyId**: `string`
24
-
25
- The key to use in the proof config.
26
-
27
- #### Default
28
-
29
- ```ts
30
- immutable-proof
16
+ immutable-proof-assertion
31
17
  ```
@@ -0,0 +1,75 @@
1
+ # Interface: IImmutableProofServiceConstructorOptions
2
+
3
+ Options for the immutable proof service constructor.
4
+
5
+ ## Properties
6
+
7
+ ### immutableProofEntityStorageType?
8
+
9
+ > `optional` **immutableProofEntityStorageType**: `string`
10
+
11
+ The entity storage for proofs.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ immutable-proof
17
+ ```
18
+
19
+ ***
20
+
21
+ ### verifiableStorageType?
22
+
23
+ > `optional` **verifiableStorageType**: `string`
24
+
25
+ The verifiable storage.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ verifiable-storage
31
+ ```
32
+
33
+ ***
34
+
35
+ ### identityConnectorType?
36
+
37
+ > `optional` **identityConnectorType**: `string`
38
+
39
+ The identity connector type.
40
+
41
+ #### Default
42
+
43
+ ```ts
44
+ identity
45
+ ```
46
+
47
+ ***
48
+
49
+ ### backgroundTaskConnectorType?
50
+
51
+ > `optional` **backgroundTaskConnectorType**: `string`
52
+
53
+ The background task connector type.
54
+
55
+ #### Default
56
+
57
+ ```ts
58
+ background-task
59
+ ```
60
+
61
+ ***
62
+
63
+ ### eventBusComponentType?
64
+
65
+ > `optional` **eventBusComponentType**: `string`
66
+
67
+ The event bus component type, defaults to no event bus.
68
+
69
+ ***
70
+
71
+ ### config?
72
+
73
+ > `optional` **config**: [`IImmutableProofServiceConfig`](IImmutableProofServiceConfig.md)
74
+
75
+ The configuration for the connector.
package/locales/en.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "createFailed": "Creating the proof failed",
6
6
  "getFailed": "Getting the proof failed",
7
7
  "verifyFailed": "Verifying the proof failed",
8
- "removeImmutableFailed": "Removing immutable entry from the Immutable Proof failed",
8
+ "removeVerifiableFailed": "Removing verifiable entry from the Immutable Proof failed",
9
9
  "proofNotFound": "The proof with the Id \"{notFoundId}\" was not found"
10
10
  }
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-service",
3
- "version": "0.0.1-next.3",
3
+ "version": "0.0.1-next.31",
4
4
  "description": "Immutable proof contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,31 +15,33 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/api-models": "next",
18
+ "@twin.org/background-task-models": "next",
18
19
  "@twin.org/core": "next",
19
20
  "@twin.org/crypto": "next",
20
21
  "@twin.org/data-json-ld": "next",
21
- "@twin.org/data-schema-org": "next",
22
22
  "@twin.org/entity": "next",
23
23
  "@twin.org/entity-storage-models": "next",
24
+ "@twin.org/event-bus-models": "next",
24
25
  "@twin.org/identity-models": "next",
25
- "@twin.org/immutable-proof-models": "0.0.1-next.3",
26
- "@twin.org/immutable-storage-models": "next",
26
+ "@twin.org/immutable-proof-models": "0.0.1-next.31",
27
+ "@twin.org/immutable-proof-task": "0.0.1-next.31",
27
28
  "@twin.org/nameof": "next",
28
29
  "@twin.org/standards-w3c-did": "next",
29
30
  "@twin.org/vault-models": "next",
31
+ "@twin.org/verifiable-storage-models": "next",
30
32
  "@twin.org/web": "next",
31
- "jsonschema": "1.4.1"
33
+ "jsonschema": "1.5.0"
32
34
  },
33
35
  "main": "./dist/cjs/index.cjs",
34
36
  "module": "./dist/esm/index.mjs",
35
37
  "types": "./dist/types/index.d.ts",
36
38
  "exports": {
37
39
  ".": {
40
+ "types": "./dist/types/index.d.ts",
38
41
  "require": "./dist/cjs/index.cjs",
39
- "import": "./dist/esm/index.mjs",
40
- "types": "./dist/types/index.d.ts"
42
+ "import": "./dist/esm/index.mjs"
41
43
  },
42
- "./locales": "./locales"
44
+ "./locales/*.json": "./locales/*.json"
43
45
  },
44
46
  "files": [
45
47
  "dist/cjs",