@twin.org/immutable-proof-service 0.0.1-next.9 → 0.0.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,45 +8,23 @@ 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".
34
-
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".
21
+ [`IImmutableProofServiceConstructorOptions`](../interfaces/IImmutableProofServiceConstructorOptions.md)
42
22
 
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
 
@@ -72,21 +50,27 @@ Runtime name for the class.
72
50
 
73
51
  ### create()
74
52
 
75
- > **create**(`proofObject`, `userIdentity`?, `nodeIdentity`?): `Promise`\<`string`\>
53
+ > **create**(`document`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`string`\>
76
54
 
77
- Create a new authentication proof.
55
+ Create a new proof.
78
56
 
79
57
  #### Parameters
80
58
 
81
- **proofObject**: `IJsonLdNodeObject`
59
+ ##### document
60
+
61
+ `IJsonLdNodeObject`
82
62
 
83
- The object for the proof as JSON-LD.
63
+ The document to create the proof for.
84
64
 
85
- **userIdentity?**: `string`
65
+ ##### userIdentity?
66
+
67
+ `string`
86
68
 
87
69
  The identity to create the immutable proof operation with.
88
70
 
89
- **nodeIdentity?**: `string`
71
+ ##### nodeIdentity?
72
+
73
+ `string`
90
74
 
91
75
  The node identity to use for vault operations.
92
76
 
@@ -94,7 +78,7 @@ The node identity to use for vault operations.
94
78
 
95
79
  `Promise`\<`string`\>
96
80
 
97
- The id of the new authentication proof.
81
+ The id of the new proof.
98
82
 
99
83
  #### Implementation of
100
84
 
@@ -106,11 +90,13 @@ The id of the new authentication proof.
106
90
 
107
91
  > **get**(`id`): `Promise`\<`IImmutableProof`\>
108
92
 
109
- Get an authentication proof.
93
+ Get a proof.
110
94
 
111
95
  #### Parameters
112
96
 
113
- **id**: `string`
97
+ ##### id
98
+
99
+ `string`
114
100
 
115
101
  The id of the proof to get.
116
102
 
@@ -132,19 +118,17 @@ NotFoundError if the proof is not found.
132
118
 
133
119
  ### verify()
134
120
 
135
- > **verify**(`id`, `proofObject`): `Promise`\<`IImmutableProofVerification`\>
121
+ > **verify**(`id`): `Promise`\<`IImmutableProofVerification`\>
136
122
 
137
- Verify an authentication proof.
123
+ Verify a proof.
138
124
 
139
125
  #### Parameters
140
126
 
141
- **id**: `string`
127
+ ##### id
142
128
 
143
- The id of the proof to verify.
144
-
145
- • **proofObject**: `IJsonLdNodeObject`
129
+ `string`
146
130
 
147
- The object to verify as JSON-LD.
131
+ The id of the proof to verify.
148
132
 
149
133
  #### Returns
150
134
 
@@ -162,19 +146,23 @@ NotFoundError if the proof is not found.
162
146
 
163
147
  ***
164
148
 
165
- ### removeImmutable()
149
+ ### removeVerifiable()
166
150
 
167
- > **removeImmutable**(`id`, `nodeIdentity`?): `Promise`\<`void`\>
151
+ > **removeVerifiable**(`id`, `nodeIdentity?`): `Promise`\<`void`\>
168
152
 
169
- Remove the immutable storage for the proof.
153
+ Remove the verifiable storage for the proof.
170
154
 
171
155
  #### Parameters
172
156
 
173
- **id**: `string`
157
+ ##### id
158
+
159
+ `string`
174
160
 
175
161
  The id of the proof to remove the storage from.
176
162
 
177
- **nodeIdentity?**: `string`
163
+ ##### nodeIdentity?
164
+
165
+ `string`
178
166
 
179
167
  The node identity to use for vault operations.
180
168
 
@@ -190,4 +178,4 @@ NotFoundError if the proof is not found.
190
178
 
191
179
  #### Implementation of
192
180
 
193
- `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
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.1",
4
4
  "description": "Immutable proof contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,31 +14,31 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-models": "next",
18
- "@twin.org/background-task-models": "next",
19
- "@twin.org/core": "next",
20
- "@twin.org/crypto": "next",
21
- "@twin.org/data-json-ld": "next",
22
- "@twin.org/data-schema-org": "next",
23
- "@twin.org/entity": "next",
24
- "@twin.org/entity-storage-models": "next",
25
- "@twin.org/identity-models": "next",
26
- "@twin.org/immutable-proof-models": "0.0.1-next.9",
27
- "@twin.org/immutable-storage-models": "next",
28
- "@twin.org/nameof": "next",
29
- "@twin.org/standards-w3c-did": "next",
30
- "@twin.org/vault-models": "next",
31
- "@twin.org/web": "next",
32
- "jsonschema": "1.4.1"
17
+ "@twin.org/api-models": "^0.0.2-next.1",
18
+ "@twin.org/background-task-models": "^0.0.1",
19
+ "@twin.org/core": "^0.0.1",
20
+ "@twin.org/crypto": "^0.0.1",
21
+ "@twin.org/data-json-ld": "^0.0.1",
22
+ "@twin.org/entity": "^0.0.1",
23
+ "@twin.org/entity-storage-models": "^0.0.1",
24
+ "@twin.org/event-bus-models": "^0.0.1",
25
+ "@twin.org/identity-models": "^0.0.1",
26
+ "@twin.org/immutable-proof-models": "^0.0.1",
27
+ "@twin.org/immutable-proof-task": "^0.0.1",
28
+ "@twin.org/nameof": "^0.0.1",
29
+ "@twin.org/standards-w3c-did": "^0.0.1",
30
+ "@twin.org/vault-models": "^0.0.1",
31
+ "@twin.org/verifiable-storage-models": "^0.0.1",
32
+ "@twin.org/web": "^0.0.1"
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
  },