@twin.org/immutable-proof-service 0.0.1 → 0.0.2-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.
@@ -365,8 +365,9 @@ async function immutableProofVerify(httpRequestContext, componentName, request)
365
365
  class ImmutableProofService {
366
366
  /**
367
367
  * The namespace for the service.
368
+ * @internal
368
369
  */
369
- static NAMESPACE = "immutable-proof";
370
+ static _NAMESPACE = "immutable-proof";
370
371
  /**
371
372
  * Runtime name for the class.
372
373
  */
@@ -470,7 +471,7 @@ class ImmutableProofService {
470
471
  document: immutableProof
471
472
  };
472
473
  await this._backgroundTaskConnector.create("immutable-proof", proofTaskPayload);
473
- return new core.Urn(ImmutableProofService.NAMESPACE, id).toString();
474
+ return new core.Urn(ImmutableProofService._NAMESPACE, id).toString();
474
475
  }
475
476
  catch (error) {
476
477
  throw new core.GeneralError(this.CLASS_NAME, "createFailed", undefined, error);
@@ -485,9 +486,9 @@ class ImmutableProofService {
485
486
  async get(id) {
486
487
  core.Guards.stringValue(this.CLASS_NAME, "id", id);
487
488
  const urnParsed = core.Urn.fromValidString(id);
488
- if (urnParsed.namespaceIdentifier() !== ImmutableProofService.NAMESPACE) {
489
+ if (urnParsed.namespaceIdentifier() !== ImmutableProofService._NAMESPACE) {
489
490
  throw new core.GeneralError(this.CLASS_NAME, "namespaceMismatch", {
490
- namespace: ImmutableProofService.NAMESPACE,
491
+ namespace: ImmutableProofService._NAMESPACE,
491
492
  id
492
493
  });
493
494
  }
@@ -508,9 +509,9 @@ class ImmutableProofService {
508
509
  async verify(id) {
509
510
  core.Guards.stringValue(this.CLASS_NAME, "id", id);
510
511
  const urnParsed = core.Urn.fromValidString(id);
511
- if (urnParsed.namespaceIdentifier() !== ImmutableProofService.NAMESPACE) {
512
+ if (urnParsed.namespaceIdentifier() !== ImmutableProofService._NAMESPACE) {
512
513
  throw new core.GeneralError(this.CLASS_NAME, "namespaceMismatch", {
513
- namespace: ImmutableProofService.NAMESPACE,
514
+ namespace: ImmutableProofService._NAMESPACE,
514
515
  id
515
516
  });
516
517
  }
@@ -538,9 +539,9 @@ class ImmutableProofService {
538
539
  core.Guards.stringValue(this.CLASS_NAME, "id", id);
539
540
  core.Guards.stringValue(this.CLASS_NAME, "nodeIdentity", nodeIdentity);
540
541
  const urnParsed = core.Urn.fromValidString(id);
541
- if (urnParsed.namespaceIdentifier() !== ImmutableProofService.NAMESPACE) {
542
+ if (urnParsed.namespaceIdentifier() !== ImmutableProofService._NAMESPACE) {
542
543
  throw new core.GeneralError(this.CLASS_NAME, "namespaceMismatch", {
543
- namespace: ImmutableProofService.NAMESPACE,
544
+ namespace: ImmutableProofService._NAMESPACE,
544
545
  id
545
546
  });
546
547
  }
@@ -609,7 +610,7 @@ class ImmutableProofService {
609
610
  const verifiableCreateResult = await this._verifiableStorage.create(proofEntity.nodeIdentity, core.ObjectHelper.toBytes(compacted));
610
611
  proofEntity.verifiableStorageId = verifiableCreateResult.id;
611
612
  await this._proofStorage.set(proofEntity);
612
- await this._eventBusComponent?.publish(immutableProofModels.ImmutableProofTopics.ProofCreated, { id: new core.Urn(ImmutableProofService.NAMESPACE, task.payload.proofId).toString() });
613
+ await this._eventBusComponent?.publish(immutableProofModels.ImmutableProofTopics.ProofCreated, { id: new core.Urn(ImmutableProofService._NAMESPACE, task.payload.proofId).toString() });
613
614
  }
614
615
  }
615
616
  }
@@ -363,8 +363,9 @@ async function immutableProofVerify(httpRequestContext, componentName, request)
363
363
  class ImmutableProofService {
364
364
  /**
365
365
  * The namespace for the service.
366
+ * @internal
366
367
  */
367
- static NAMESPACE = "immutable-proof";
368
+ static _NAMESPACE = "immutable-proof";
368
369
  /**
369
370
  * Runtime name for the class.
370
371
  */
@@ -468,7 +469,7 @@ class ImmutableProofService {
468
469
  document: immutableProof
469
470
  };
470
471
  await this._backgroundTaskConnector.create("immutable-proof", proofTaskPayload);
471
- return new Urn(ImmutableProofService.NAMESPACE, id).toString();
472
+ return new Urn(ImmutableProofService._NAMESPACE, id).toString();
472
473
  }
473
474
  catch (error) {
474
475
  throw new GeneralError(this.CLASS_NAME, "createFailed", undefined, error);
@@ -483,9 +484,9 @@ class ImmutableProofService {
483
484
  async get(id) {
484
485
  Guards.stringValue(this.CLASS_NAME, "id", id);
485
486
  const urnParsed = Urn.fromValidString(id);
486
- if (urnParsed.namespaceIdentifier() !== ImmutableProofService.NAMESPACE) {
487
+ if (urnParsed.namespaceIdentifier() !== ImmutableProofService._NAMESPACE) {
487
488
  throw new GeneralError(this.CLASS_NAME, "namespaceMismatch", {
488
- namespace: ImmutableProofService.NAMESPACE,
489
+ namespace: ImmutableProofService._NAMESPACE,
489
490
  id
490
491
  });
491
492
  }
@@ -506,9 +507,9 @@ class ImmutableProofService {
506
507
  async verify(id) {
507
508
  Guards.stringValue(this.CLASS_NAME, "id", id);
508
509
  const urnParsed = Urn.fromValidString(id);
509
- if (urnParsed.namespaceIdentifier() !== ImmutableProofService.NAMESPACE) {
510
+ if (urnParsed.namespaceIdentifier() !== ImmutableProofService._NAMESPACE) {
510
511
  throw new GeneralError(this.CLASS_NAME, "namespaceMismatch", {
511
- namespace: ImmutableProofService.NAMESPACE,
512
+ namespace: ImmutableProofService._NAMESPACE,
512
513
  id
513
514
  });
514
515
  }
@@ -536,9 +537,9 @@ class ImmutableProofService {
536
537
  Guards.stringValue(this.CLASS_NAME, "id", id);
537
538
  Guards.stringValue(this.CLASS_NAME, "nodeIdentity", nodeIdentity);
538
539
  const urnParsed = Urn.fromValidString(id);
539
- if (urnParsed.namespaceIdentifier() !== ImmutableProofService.NAMESPACE) {
540
+ if (urnParsed.namespaceIdentifier() !== ImmutableProofService._NAMESPACE) {
540
541
  throw new GeneralError(this.CLASS_NAME, "namespaceMismatch", {
541
- namespace: ImmutableProofService.NAMESPACE,
542
+ namespace: ImmutableProofService._NAMESPACE,
542
543
  id
543
544
  });
544
545
  }
@@ -607,7 +608,7 @@ class ImmutableProofService {
607
608
  const verifiableCreateResult = await this._verifiableStorage.create(proofEntity.nodeIdentity, ObjectHelper.toBytes(compacted));
608
609
  proofEntity.verifiableStorageId = verifiableCreateResult.id;
609
610
  await this._proofStorage.set(proofEntity);
610
- await this._eventBusComponent?.publish(ImmutableProofTopics.ProofCreated, { id: new Urn(ImmutableProofService.NAMESPACE, task.payload.proofId).toString() });
611
+ await this._eventBusComponent?.publish(ImmutableProofTopics.ProofCreated, { id: new Urn(ImmutableProofService._NAMESPACE, task.payload.proofId).toString() });
611
612
  }
612
613
  }
613
614
  }
@@ -5,10 +5,6 @@ import type { IImmutableProofServiceConstructorOptions } from "./models/IImmutab
5
5
  * Class for performing immutable proof operations.
6
6
  */
7
7
  export declare class ImmutableProofService implements IImmutableProofComponent {
8
- /**
9
- * The namespace for the service.
10
- */
11
- static readonly NAMESPACE: string;
12
8
  /**
13
9
  * Runtime name for the class.
14
10
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @twin.org/immutable-proof-service - Changelog
2
2
 
3
+ ## [0.0.2-next.2](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-service-v0.0.2-next.1...immutable-proof-service-v0.0.2-next.2) (2025-08-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * eslint migration to flat config ([c8536f2](https://github.com/twinfoundation/immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/immutable-proof-models bumped from 0.0.2-next.1 to 0.0.2-next.2
16
+ * @twin.org/immutable-proof-task bumped from 0.0.2-next.1 to 0.0.2-next.2
17
+
18
+ ## [0.0.2-next.1](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-service-v0.0.2-next.0...immutable-proof-service-v0.0.2-next.1) (2025-08-20)
19
+
20
+
21
+ ### Features
22
+
23
+ * remove unused namespace ([a39864c](https://github.com/twinfoundation/immutable-proof/commit/a39864c0b2ca8753334a34028b8e5823a14162b4))
24
+ * update data types to use fully qualified names ([e94d0f5](https://github.com/twinfoundation/immutable-proof/commit/e94d0f5db93856b5b59cfd34e55252fa13a7f4e0))
25
+ * update dependencies ([7d6b321](https://github.com/twinfoundation/immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
26
+ * update framework core ([e708d4d](https://github.com/twinfoundation/immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
27
+ * use shared store mechanism ([#3](https://github.com/twinfoundation/immutable-proof/issues/3)) ([7042a40](https://github.com/twinfoundation/immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * Missing user and node identity on create ([#1](https://github.com/twinfoundation/immutable-proof/issues/1)) ([80ea2f9](https://github.com/twinfoundation/immutable-proof/commit/80ea2f901afc7531f4a522227a61e6fa1482484d))
33
+
34
+
35
+ ### Dependencies
36
+
37
+ * The following workspace dependencies were updated
38
+ * dependencies
39
+ * @twin.org/immutable-proof-models bumped from 0.0.2-next.0 to 0.0.2-next.1
40
+ * @twin.org/immutable-proof-task bumped from 0.0.2-next.0 to 0.0.2-next.1
41
+
3
42
  ## 0.0.1 (2025-07-09)
4
43
 
5
44
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "openapi": "3.1.0",
2
+ "openapi": "3.1.1",
3
3
  "info": {
4
4
  "title": "TWIN - Test Endpoints",
5
5
  "description": "REST API for TWIN - Test Endpoints.",
@@ -494,15 +494,15 @@
494
494
  {
495
495
  "type": "array",
496
496
  "minItems": 1,
497
+ "items": {
498
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
499
+ },
497
500
  "prefixItems": [
498
501
  {
499
502
  "type": "string",
500
503
  "const": "https://www.w3.org/ns/credentials/v2"
501
504
  }
502
- ],
503
- "items": {
504
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
505
- }
505
+ ]
506
506
  }
507
507
  ],
508
508
  "description": "JSON-LD Context."
@@ -554,6 +554,7 @@
554
554
  },
555
555
  {
556
556
  "type": "array",
557
+ "items": false,
557
558
  "prefixItems": [
558
559
  {
559
560
  "type": "string"
@@ -570,6 +571,7 @@
570
571
  },
571
572
  {
572
573
  "type": "array",
574
+ "items": false,
573
575
  "prefixItems": [
574
576
  {
575
577
  "type": "string"
@@ -635,7 +637,7 @@
635
637
  "type": "string",
636
638
  "description": "The stack trace for the error."
637
639
  },
638
- "inner": {
640
+ "cause": {
639
641
  "$ref": "#/components/schemas/Error"
640
642
  }
641
643
  },
@@ -688,7 +690,7 @@
688
690
  "type": "string",
689
691
  "description": "The stack trace for the error."
690
692
  },
691
- "inner": {
693
+ "cause": {
692
694
  "$ref": "#/components/schemas/Error"
693
695
  }
694
696
  },
@@ -28,14 +28,6 @@ The dependencies for the immutable proof connector.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### NAMESPACE
32
-
33
- > `readonly` `static` **NAMESPACE**: `string` = `"immutable-proof"`
34
-
35
- The namespace for the service.
36
-
37
- ***
38
-
39
31
  ### CLASS\_NAME
40
32
 
41
33
  > `readonly` **CLASS\_NAME**: `string`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-service",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-next.2",
4
4
  "description": "Immutable proof contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,22 +14,22 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
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"
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/entity": "next",
23
+ "@twin.org/entity-storage-models": "next",
24
+ "@twin.org/event-bus-models": "next",
25
+ "@twin.org/identity-models": "next",
26
+ "@twin.org/immutable-proof-models": "0.0.2-next.2",
27
+ "@twin.org/immutable-proof-task": "0.0.2-next.2",
28
+ "@twin.org/nameof": "next",
29
+ "@twin.org/standards-w3c-did": "next",
30
+ "@twin.org/vault-models": "next",
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",