@twin.org/immutable-proof-service 0.0.1-next.2 → 0.0.1-next.21

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.
@@ -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-proof".
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
 
@@ -74,15 +56,21 @@ Create a new authentication proof.
74
56
 
75
57
  #### Parameters
76
58
 
77
- **proofObject**: `IJsonLdNodeObject`
59
+ ##### proofObject
60
+
61
+ `IJsonLdNodeObject`
78
62
 
79
63
  The object for the proof as JSON-LD.
80
64
 
81
- **userIdentity?**: `string`
65
+ ##### userIdentity?
66
+
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
 
@@ -106,7 +94,9 @@ Get an authentication 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
123
  Verify an authentication 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
 
@@ -166,11 +154,15 @@ Remove the immutable 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
 
@@ -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,28 @@ 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
16
+ immutable-proof-assertion
17
17
  ```
18
18
 
19
19
  ***
20
20
 
21
- ### proofConfigKeyId?
21
+ ### proofHashKeyId?
22
22
 
23
- > `optional` **proofConfigKeyId**: `string`
23
+ > `optional` **proofHashKeyId**: `string`
24
24
 
25
- The key to use in the proof config.
25
+ The key to use in the proof hash.
26
26
 
27
27
  #### Default
28
28
 
29
29
  ```ts
30
- immutable-proof
30
+ immutable-proof-hash
31
31
  ```
@@ -0,0 +1,89 @@
1
+ # Interface: IImmutableProofServiceConstructorOptions
2
+
3
+ Options for the immutable proof service constructor.
4
+
5
+ ## Properties
6
+
7
+ ### vaultConnectorType?
8
+
9
+ > `optional` **vaultConnectorType**: `string`
10
+
11
+ The vault connector type.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ vault
17
+ ```
18
+
19
+ ***
20
+
21
+ ### immutableProofEntityStorageType?
22
+
23
+ > `optional` **immutableProofEntityStorageType**: `string`
24
+
25
+ The entity storage for proofs.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ immutable-proof
31
+ ```
32
+
33
+ ***
34
+
35
+ ### immutableStorageType?
36
+
37
+ > `optional` **immutableStorageType**: `string`
38
+
39
+ The immutable storage.
40
+
41
+ #### Default
42
+
43
+ ```ts
44
+ immutable-storage
45
+ ```
46
+
47
+ ***
48
+
49
+ ### identityConnectorType?
50
+
51
+ > `optional` **identityConnectorType**: `string`
52
+
53
+ The identity connector type.
54
+
55
+ #### Default
56
+
57
+ ```ts
58
+ identity
59
+ ```
60
+
61
+ ***
62
+
63
+ ### backgroundTaskConnectorType?
64
+
65
+ > `optional` **backgroundTaskConnectorType**: `string`
66
+
67
+ The background task connector type.
68
+
69
+ #### Default
70
+
71
+ ```ts
72
+ background-task
73
+ ```
74
+
75
+ ***
76
+
77
+ ### eventBusComponentType?
78
+
79
+ > `optional` **eventBusComponentType**: `string`
80
+
81
+ The event bus component type, defaults to no event bus.
82
+
83
+ ***
84
+
85
+ ### config?
86
+
87
+ > `optional` **config**: [`IImmutableProofServiceConfig`](IImmutableProofServiceConfig.md)
88
+
89
+ The configuration for the connector.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-service",
3
- "version": "0.0.1-next.2",
3
+ "version": "0.0.1-next.21",
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.2",
26
+ "@twin.org/immutable-proof-models": "0.0.1-next.21",
27
+ "@twin.org/immutable-proof-task": "0.0.1-next.21",
26
28
  "@twin.org/immutable-storage-models": "next",
27
29
  "@twin.org/nameof": "next",
28
30
  "@twin.org/standards-w3c-did": "next",
29
31
  "@twin.org/vault-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",