@twin.org/immutable-proof-service 0.0.1-next.9 → 0.0.2-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.
@@ -4,13 +4,13 @@ Class describing the immutable proof.
4
4
 
5
5
  ## Constructors
6
6
 
7
- ### new ImmutableProof()
7
+ ### Constructor
8
8
 
9
- > **new ImmutableProof**(): [`ImmutableProof`](ImmutableProof.md)
9
+ > **new ImmutableProof**(): `ImmutableProof`
10
10
 
11
11
  #### Returns
12
12
 
13
- [`ImmutableProof`](ImmutableProof.md)
13
+ `ImmutableProof`
14
14
 
15
15
  ## Properties
16
16
 
@@ -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.
@@ -8,56 +8,26 @@ Class for performing immutable proof operations.
8
8
 
9
9
  ## Constructors
10
10
 
11
- ### new ImmutableProofService()
11
+ ### Constructor
12
12
 
13
- > **new ImmutableProofService**(`options`?): [`ImmutableProofService`](ImmutableProofService.md)
13
+ > **new ImmutableProofService**(`options?`): `ImmutableProofService`
14
14
 
15
15
  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".
21
+ [`IImmutableProofServiceConstructorOptions`](../interfaces/IImmutableProofServiceConstructorOptions.md)
34
22
 
35
- **options.identityConnectorType?**: `string`
36
-
37
- The identity connector type, defaults to "identity".
38
-
39
- • **options.backgroundTaskConnectorType?**: `string`
40
-
41
- The background task connector type, defaults to "background-task".
42
-
43
- • **options.config?**: [`IImmutableProofServiceConfig`](../interfaces/IImmutableProofServiceConfig.md)
44
-
45
- The configuration for the connector.
23
+ The dependencies for the immutable proof connector.
46
24
 
47
25
  #### Returns
48
26
 
49
- [`ImmutableProofService`](ImmutableProofService.md)
27
+ `ImmutableProofService`
50
28
 
51
29
  ## Properties
52
30
 
53
- ### NAMESPACE
54
-
55
- > `readonly` `static` **NAMESPACE**: `string` = `"immutable-proof"`
56
-
57
- The namespace for the service.
58
-
59
- ***
60
-
61
31
  ### CLASS\_NAME
62
32
 
63
33
  > `readonly` **CLASS\_NAME**: `string`
@@ -72,21 +42,27 @@ Runtime name for the class.
72
42
 
73
43
  ### create()
74
44
 
75
- > **create**(`proofObject`, `userIdentity`?, `nodeIdentity`?): `Promise`\<`string`\>
45
+ > **create**(`document`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`string`\>
76
46
 
77
- Create a new authentication proof.
47
+ Create a new proof.
78
48
 
79
49
  #### Parameters
80
50
 
81
- **proofObject**: `IJsonLdNodeObject`
51
+ ##### document
82
52
 
83
- The object for the proof as JSON-LD.
53
+ `IJsonLdNodeObject`
84
54
 
85
- **userIdentity?**: `string`
55
+ The document to create the proof for.
56
+
57
+ ##### userIdentity?
58
+
59
+ `string`
86
60
 
87
61
  The identity to create the immutable proof operation with.
88
62
 
89
- **nodeIdentity?**: `string`
63
+ ##### nodeIdentity?
64
+
65
+ `string`
90
66
 
91
67
  The node identity to use for vault operations.
92
68
 
@@ -94,7 +70,7 @@ The node identity to use for vault operations.
94
70
 
95
71
  `Promise`\<`string`\>
96
72
 
97
- The id of the new authentication proof.
73
+ The id of the new proof.
98
74
 
99
75
  #### Implementation of
100
76
 
@@ -106,11 +82,13 @@ The id of the new authentication proof.
106
82
 
107
83
  > **get**(`id`): `Promise`\<`IImmutableProof`\>
108
84
 
109
- Get an authentication proof.
85
+ Get a proof.
110
86
 
111
87
  #### Parameters
112
88
 
113
- **id**: `string`
89
+ ##### id
90
+
91
+ `string`
114
92
 
115
93
  The id of the proof to get.
116
94
 
@@ -132,19 +110,17 @@ NotFoundError if the proof is not found.
132
110
 
133
111
  ### verify()
134
112
 
135
- > **verify**(`id`, `proofObject`): `Promise`\<`IImmutableProofVerification`\>
113
+ > **verify**(`id`): `Promise`\<`IImmutableProofVerification`\>
136
114
 
137
- Verify an authentication proof.
115
+ Verify a proof.
138
116
 
139
117
  #### Parameters
140
118
 
141
- **id**: `string`
142
-
143
- The id of the proof to verify.
119
+ ##### id
144
120
 
145
- • **proofObject**: `IJsonLdNodeObject`
121
+ `string`
146
122
 
147
- The object to verify as JSON-LD.
123
+ The id of the proof to verify.
148
124
 
149
125
  #### Returns
150
126
 
@@ -162,19 +138,23 @@ NotFoundError if the proof is not found.
162
138
 
163
139
  ***
164
140
 
165
- ### removeImmutable()
141
+ ### removeVerifiable()
166
142
 
167
- > **removeImmutable**(`id`, `nodeIdentity`?): `Promise`\<`void`\>
143
+ > **removeVerifiable**(`id`, `nodeIdentity?`): `Promise`\<`void`\>
168
144
 
169
- Remove the immutable storage for the proof.
145
+ Remove the verifiable storage for the proof.
170
146
 
171
147
  #### Parameters
172
148
 
173
- **id**: `string`
149
+ ##### id
150
+
151
+ `string`
174
152
 
175
153
  The id of the proof to remove the storage from.
176
154
 
177
- **nodeIdentity?**: `string`
155
+ ##### nodeIdentity?
156
+
157
+ `string`
178
158
 
179
159
  The node identity to use for vault operations.
180
160
 
@@ -190,4 +170,4 @@ NotFoundError if the proof is not found.
190
170
 
191
171
  #### Implementation of
192
172
 
193
- `IImmutableProofComponent.removeImmutable`
173
+ `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
16
  immutable-proof-assertion
17
17
  ```
18
-
19
- ***
20
-
21
- ### proofHashKeyId?
22
-
23
- > `optional` **proofHashKeyId**: `string`
24
-
25
- The key to use in the proof hash.
26
-
27
- #### Default
28
-
29
- ```ts
30
- immutable-proof-hash
31
- ```
@@ -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.9",
3
+ "version": "0.0.2-next.1",
4
4
  "description": "Immutable proof contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,26 +19,26 @@
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/crypto": "next",
21
21
  "@twin.org/data-json-ld": "next",
22
- "@twin.org/data-schema-org": "next",
23
22
  "@twin.org/entity": "next",
24
23
  "@twin.org/entity-storage-models": "next",
24
+ "@twin.org/event-bus-models": "next",
25
25
  "@twin.org/identity-models": "next",
26
- "@twin.org/immutable-proof-models": "0.0.1-next.9",
27
- "@twin.org/immutable-storage-models": "next",
26
+ "@twin.org/immutable-proof-models": "0.0.2-next.1",
27
+ "@twin.org/immutable-proof-task": "0.0.2-next.1",
28
28
  "@twin.org/nameof": "next",
29
29
  "@twin.org/standards-w3c-did": "next",
30
30
  "@twin.org/vault-models": "next",
31
- "@twin.org/web": "next",
32
- "jsonschema": "1.4.1"
31
+ "@twin.org/verifiable-storage-models": "next",
32
+ "@twin.org/web": "next"
33
33
  },
34
34
  "main": "./dist/cjs/index.cjs",
35
35
  "module": "./dist/esm/index.mjs",
36
36
  "types": "./dist/types/index.d.ts",
37
37
  "exports": {
38
38
  ".": {
39
+ "types": "./dist/types/index.d.ts",
39
40
  "require": "./dist/cjs/index.cjs",
40
- "import": "./dist/esm/index.mjs",
41
- "types": "./dist/types/index.d.ts"
41
+ "import": "./dist/esm/index.mjs"
42
42
  },
43
43
  "./locales/*.json": "./locales/*.json"
44
44
  },