@twin.org/immutable-proof-task 0.0.3-next.9 → 0.9.0

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TWIN Immutable Proof Task
2
2
 
3
- Background task for generating the proof.
3
+ This package provides background processing for immutable proof generation. It accepts prepared task payloads, resolves the configured identity connector, and produces verifiable credential output for downstream storage and verification.
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,15 +1,16 @@
1
1
  // Copyright 2024 IOTA Stiftung.
2
2
  // SPDX-License-Identifier: Apache-2.0.
3
3
  import { ContextIdStore } from "@twin.org/context";
4
- import { Guards, Is } from "@twin.org/core";
4
+ import { Guards, Is, ObjectHelper } from "@twin.org/core";
5
5
  import { EngineCore } from "@twin.org/engine-core";
6
6
  import { IdentityConnectorFactory } from "@twin.org/identity-models";
7
+ import { NotarizationConnectorFactory, NotarizationMode } from "@twin.org/notarization-models";
7
8
  const CLASS_NAME = "ImmutableProofTask";
8
9
  /**
9
- * Process a proof.
10
- * @param engineCloneData The engine clone data.
11
- * @param payload The payload to process.
12
- * @returns The proof.
10
+ * Process a proof task by creating a verifiable credential and notarizing it.
11
+ * @param engineCloneData The engine clone data used to initialize a cloned engine instance when running in a separate thread.
12
+ * @param payload The payload containing the proof parameters.
13
+ * @returns The task result containing the verifiable credential and notarization id.
13
14
  */
14
15
  export async function processProofTask(engineCloneData, payload) {
15
16
  Guards.objectValue(CLASS_NAME, "payload", payload);
@@ -17,6 +18,7 @@ export async function processProofTask(engineCloneData, payload) {
17
18
  Guards.stringValue(CLASS_NAME, "payload.identityConnectorType", payload.identityConnectorType);
18
19
  Guards.stringValue(CLASS_NAME, "payload.verificationMethodId", payload.verificationMethodId);
19
20
  Guards.object(CLASS_NAME, "payload.credentialSubject", payload.credentialSubject);
21
+ Guards.stringValue(CLASS_NAME, "payload.notarizationConnectorType", payload.notarizationConnectorType);
20
22
  let engine;
21
23
  try {
22
24
  if (!Is.empty(engineCloneData)) {
@@ -28,9 +30,22 @@ export async function processProofTask(engineCloneData, payload) {
28
30
  }
29
31
  const identityConnector = IdentityConnectorFactory.get(payload.identityConnectorType);
30
32
  const result = await identityConnector.createVerifiableCredential(payload.identity, `${payload.identity}#${payload.verificationMethodId}`, payload.proofId, payload.credentialSubject);
33
+ // The proof context is always the last one in the generated vc contexts
34
+ // as that was the last operation performed, so we can extract it and use it for the proof itself.
35
+ // Remove verificationMethod to reduce linkage to the issuing identity (reinstated on verify).
36
+ const proof = result.verifiableCredential.proof;
37
+ proof["@context"] = result.verifiableCredential["@context"][result.verifiableCredential["@context"].length - 1];
38
+ delete proof.verificationMethod;
39
+ const notarizationConnector = NotarizationConnectorFactory.get(payload.notarizationConnectorType);
40
+ const notarizationId = await notarizationConnector.create(payload.identity, {
41
+ mode: NotarizationMode.Locked,
42
+ data: ObjectHelper.toBytes(proof),
43
+ deleteLockDateTime: payload.deleteLockDateTime
44
+ });
31
45
  return {
32
46
  proofId: payload.proofId,
33
- verifiableCredential: result.verifiableCredential
47
+ verifiableCredential: result.verifiableCredential,
48
+ notarizationId
34
49
  };
35
50
  }
36
51
  finally {
@@ -1 +1 @@
1
- {"version":3,"file":"immutableProofTask.js","sourceRoot":"","sources":["../../src/immutableProofTask.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAKrE,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,eAAiC,EACjC,OAAmC;IAEnC,MAAM,CAAC,WAAW,CAA6B,UAAU,aAAmB,OAAO,CAAC,CAAC;IACrF,MAAM,CAAC,WAAW,CAAC,UAAU,sBAA4B,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3E,MAAM,CAAC,WAAW,CACjB,UAAU,mCAEV,OAAO,CAAC,qBAAqB,CAC7B,CAAC;IACF,MAAM,CAAC,WAAW,CACjB,UAAU,kCAEV,OAAO,CAAC,oBAAoB,CAC5B,CAAC;IACF,MAAM,CAAC,MAAM,CACZ,UAAU,+BAEV,OAAO,CAAC,iBAAiB,CACzB,CAAC;IAEF,IAAI,MAA+B,CAAC;IACpC,IAAI,CAAC;QACJ,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC;YAChC,uFAAuF;YACvF,2DAA2D;YAC3D,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;YAC1B,MAAM,CAAC,aAAa,CAAC,eAAe,EAAE,MAAM,cAAc,CAAC,aAAa,EAAE,EAAE,IAAI,CAAC,CAAC;YAClF,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACtB,CAAC;QAED,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAEtF,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,0BAA0B,CAChE,OAAO,CAAC,QAAQ,EAChB,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,oBAAoB,EAAE,EACrD,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,iBAAiB,CACzB,CAAC;QAEF,OAAO;YACN,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;SACjD,CAAC;IACH,CAAC;YAAS,CAAC;QACV,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YACvB,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;IACF,CAAC;AACF,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdStore } from \"@twin.org/context\";\nimport { Guards, Is } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { EngineCore } from \"@twin.org/engine-core\";\nimport type { IEngineCore, IEngineCoreClone } from \"@twin.org/engine-models\";\nimport { IdentityConnectorFactory } from \"@twin.org/identity-models\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { IImmutableProofTaskPayload } from \"./models/IImmutableProofTaskPayload.js\";\nimport type { IImmutableProofTaskResult } from \"./models/IImmutableProofTaskResult.js\";\n\nconst CLASS_NAME = \"ImmutableProofTask\";\n\n/**\n * Process a proof.\n * @param engineCloneData The engine clone data.\n * @param payload The payload to process.\n * @returns The proof.\n */\nexport async function processProofTask(\n\tengineCloneData: IEngineCoreClone,\n\tpayload: IImmutableProofTaskPayload\n): Promise<IImmutableProofTaskResult> {\n\tGuards.objectValue<IImmutableProofTaskPayload>(CLASS_NAME, nameof(payload), payload);\n\tGuards.stringValue(CLASS_NAME, nameof(payload.identity), payload.identity);\n\tGuards.stringValue(\n\t\tCLASS_NAME,\n\t\tnameof(payload.identityConnectorType),\n\t\tpayload.identityConnectorType\n\t);\n\tGuards.stringValue(\n\t\tCLASS_NAME,\n\t\tnameof(payload.verificationMethodId),\n\t\tpayload.verificationMethodId\n\t);\n\tGuards.object<IJsonLdNodeObject>(\n\t\tCLASS_NAME,\n\t\tnameof(payload.credentialSubject),\n\t\tpayload.credentialSubject\n\t);\n\n\tlet engine: IEngineCore | undefined;\n\ttry {\n\t\tif (!Is.empty(engineCloneData)) {\n\t\t\t// If the clone data is not empty we use it to create a new engine as it's a new thread\n\t\t\t// otherwise we assume the factories are already populated.\n\t\t\tengine = new EngineCore();\n\t\t\tengine.populateClone(engineCloneData, await ContextIdStore.getContextIds(), true);\n\t\t\tawait engine.start();\n\t\t}\n\n\t\tconst identityConnector = IdentityConnectorFactory.get(payload.identityConnectorType);\n\n\t\tconst result = await identityConnector.createVerifiableCredential(\n\t\t\tpayload.identity,\n\t\t\t`${payload.identity}#${payload.verificationMethodId}`,\n\t\t\tpayload.proofId,\n\t\t\tpayload.credentialSubject\n\t\t);\n\n\t\treturn {\n\t\t\tproofId: payload.proofId,\n\t\t\tverifiableCredential: result.verifiableCredential\n\t\t};\n\t} finally {\n\t\tif (!Is.empty(engine)) {\n\t\t\tawait engine.stop();\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"immutableProofTask.js","sourceRoot":"","sources":["../../src/immutableProofTask.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdStore } from \"@twin.org/context\";\nimport { Guards, Is, ObjectHelper } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { EngineCore } from \"@twin.org/engine-core\";\nimport type { IEngineCore, IEngineCoreClone } from \"@twin.org/engine-models\";\nimport { IdentityConnectorFactory } from \"@twin.org/identity-models\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { NotarizationConnectorFactory, NotarizationMode } from \"@twin.org/notarization-models\";\nimport type { IProof } from \"@twin.org/standards-w3c-did\";\nimport type { IImmutableProofTaskPayload } from \"./models/IImmutableProofTaskPayload.js\";\nimport type { IImmutableProofTaskResult } from \"./models/IImmutableProofTaskResult.js\";\n\nconst CLASS_NAME = \"ImmutableProofTask\";\n\n/**\n * Process a proof task by creating a verifiable credential and notarizing it.\n * @param engineCloneData The engine clone data used to initialize a cloned engine instance when running in a separate thread.\n * @param payload The payload containing the proof parameters.\n * @returns The task result containing the verifiable credential and notarization id.\n */\nexport async function processProofTask(\n\tengineCloneData: IEngineCoreClone,\n\tpayload: IImmutableProofTaskPayload\n): Promise<IImmutableProofTaskResult> {\n\tGuards.objectValue<IImmutableProofTaskPayload>(CLASS_NAME, nameof(payload), payload);\n\tGuards.stringValue(CLASS_NAME, nameof(payload.identity), payload.identity);\n\tGuards.stringValue(\n\t\tCLASS_NAME,\n\t\tnameof(payload.identityConnectorType),\n\t\tpayload.identityConnectorType\n\t);\n\tGuards.stringValue(\n\t\tCLASS_NAME,\n\t\tnameof(payload.verificationMethodId),\n\t\tpayload.verificationMethodId\n\t);\n\tGuards.object<IJsonLdNodeObject>(\n\t\tCLASS_NAME,\n\t\tnameof(payload.credentialSubject),\n\t\tpayload.credentialSubject\n\t);\n\tGuards.stringValue(\n\t\tCLASS_NAME,\n\t\tnameof(payload.notarizationConnectorType),\n\t\tpayload.notarizationConnectorType\n\t);\n\n\tlet engine: IEngineCore | undefined;\n\ttry {\n\t\tif (!Is.empty(engineCloneData)) {\n\t\t\t// If the clone data is not empty we use it to create a new engine as it's a new thread\n\t\t\t// otherwise we assume the factories are already populated.\n\t\t\tengine = new EngineCore();\n\t\t\tengine.populateClone(engineCloneData, await ContextIdStore.getContextIds(), true);\n\t\t\tawait engine.start();\n\t\t}\n\n\t\tconst identityConnector = IdentityConnectorFactory.get(payload.identityConnectorType);\n\n\t\tconst result = await identityConnector.createVerifiableCredential(\n\t\t\tpayload.identity,\n\t\t\t`${payload.identity}#${payload.verificationMethodId}`,\n\t\t\tpayload.proofId,\n\t\t\tpayload.credentialSubject\n\t\t);\n\n\t\t// The proof context is always the last one in the generated vc contexts\n\t\t// as that was the last operation performed, so we can extract it and use it for the proof itself.\n\t\t// Remove verificationMethod to reduce linkage to the issuing identity (reinstated on verify).\n\t\tconst proof: IProof = result.verifiableCredential.proof as IProof;\n\t\tproof[\"@context\"] = result.verifiableCredential[\"@context\"][\n\t\t\tresult.verifiableCredential[\"@context\"].length - 1\n\t\t] as IProof[\"@context\"];\n\t\tdelete proof.verificationMethod;\n\n\t\tconst notarizationConnector = NotarizationConnectorFactory.get(\n\t\t\tpayload.notarizationConnectorType\n\t\t);\n\t\tconst notarizationId = await notarizationConnector.create(payload.identity, {\n\t\t\tmode: NotarizationMode.Locked,\n\t\t\tdata: ObjectHelper.toBytes(proof),\n\t\t\tdeleteLockDateTime: payload.deleteLockDateTime\n\t\t});\n\n\t\treturn {\n\t\t\tproofId: payload.proofId,\n\t\t\tverifiableCredential: result.verifiableCredential,\n\t\t\tnotarizationId\n\t\t};\n\t} finally {\n\t\tif (!Is.empty(engine)) {\n\t\t\tawait engine.stop();\n\t\t}\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IImmutableProofTaskPayload.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofTaskPayload.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IImmutableProof } from \"@twin.org/immutable-proof-models\";\n\n/**\n * The payload for the immutable proof task.\n */\nexport interface IImmutableProofTaskPayload {\n\t/**\n\t * The proof id.\n\t */\n\tproofId: string;\n\n\t/**\n\t * The identity to create the proof for.\n\t */\n\tidentity: string;\n\n\t/**\n\t * The identity connector type.\n\t */\n\tidentityConnectorType: string;\n\n\t/**\n\t * The assertion method id.\n\t */\n\tverificationMethodId: string;\n\n\t/**\n\t * The subject to create the proof for.\n\t */\n\tcredentialSubject: IImmutableProof;\n}\n"]}
1
+ {"version":3,"file":"IImmutableProofTaskPayload.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofTaskPayload.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IImmutableProof } from \"@twin.org/immutable-proof-models\";\n\n/**\n * The payload for the immutable proof task.\n */\nexport interface IImmutableProofTaskPayload {\n\t/**\n\t * The proof id.\n\t */\n\tproofId: string;\n\n\t/**\n\t * The identity to create the proof for.\n\t */\n\tidentity: string;\n\n\t/**\n\t * The identity connector type.\n\t */\n\tidentityConnectorType: string;\n\n\t/**\n\t * The assertion method id.\n\t */\n\tverificationMethodId: string;\n\n\t/**\n\t * The subject to create the proof for.\n\t */\n\tcredentialSubject: IImmutableProof;\n\n\t/**\n\t * The notarization connector type.\n\t */\n\tnotarizationConnectorType: string;\n\n\t/**\n\t * An ISO 8601 date-time string specifying when the notarization lock expires.\n\t * If omitted, no deletion lock is applied.\n\t */\n\tdeleteLockDateTime?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IImmutableProofTaskResult.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofTaskResult.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IDidVerifiableCredential } from \"@twin.org/standards-w3c-did\";\n\n/**\n * The result for the immutable proof task.\n */\nexport interface IImmutableProofTaskResult {\n\t/**\n\t * The proof id.\n\t */\n\tproofId: string;\n\n\t/**\n\t * The proof, we only generate a single proof, so restrict to a single proof.\n\t */\n\tverifiableCredential: IDidVerifiableCredential;\n}\n"]}
1
+ {"version":3,"file":"IImmutableProofTaskResult.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofTaskResult.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IDidVerifiableCredential } from \"@twin.org/standards-w3c-did\";\n\n/**\n * The result for the immutable proof task.\n */\nexport interface IImmutableProofTaskResult {\n\t/**\n\t * The proof id.\n\t */\n\tproofId: string;\n\n\t/**\n\t * The verifiable credential produced by the proof task.\n\t */\n\tverifiableCredential: IDidVerifiableCredential;\n\n\t/**\n\t * The notarization id returned after storing the proof.\n\t */\n\tnotarizationId: string;\n}\n"]}
@@ -2,9 +2,9 @@ import type { IEngineCoreClone } from "@twin.org/engine-models";
2
2
  import type { IImmutableProofTaskPayload } from "./models/IImmutableProofTaskPayload.js";
3
3
  import type { IImmutableProofTaskResult } from "./models/IImmutableProofTaskResult.js";
4
4
  /**
5
- * Process a proof.
6
- * @param engineCloneData The engine clone data.
7
- * @param payload The payload to process.
8
- * @returns The proof.
5
+ * Process a proof task by creating a verifiable credential and notarizing it.
6
+ * @param engineCloneData The engine clone data used to initialize a cloned engine instance when running in a separate thread.
7
+ * @param payload The payload containing the proof parameters.
8
+ * @returns The task result containing the verifiable credential and notarization id.
9
9
  */
10
10
  export declare function processProofTask(engineCloneData: IEngineCoreClone, payload: IImmutableProofTaskPayload): Promise<IImmutableProofTaskResult>;
@@ -23,4 +23,13 @@ export interface IImmutableProofTaskPayload {
23
23
  * The subject to create the proof for.
24
24
  */
25
25
  credentialSubject: IImmutableProof;
26
+ /**
27
+ * The notarization connector type.
28
+ */
29
+ notarizationConnectorType: string;
30
+ /**
31
+ * An ISO 8601 date-time string specifying when the notarization lock expires.
32
+ * If omitted, no deletion lock is applied.
33
+ */
34
+ deleteLockDateTime?: string;
26
35
  }
@@ -8,7 +8,11 @@ export interface IImmutableProofTaskResult {
8
8
  */
9
9
  proofId: string;
10
10
  /**
11
- * The proof, we only generate a single proof, so restrict to a single proof.
11
+ * The verifiable credential produced by the proof task.
12
12
  */
13
13
  verifiableCredential: IDidVerifiableCredential;
14
+ /**
15
+ * The notarization id returned after storing the proof.
16
+ */
17
+ notarizationId: string;
14
18
  }
package/docs/changelog.md CHANGED
@@ -1,11 +1,180 @@
1
- # @twin.org/immutable-proof-task - Changelog
1
+ # Changelog
2
2
 
3
- ## [0.0.3-next.9](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.3-next.8...immutable-proof-task-v0.0.3-next.9) (2026-02-13)
3
+ ## [0.9.0](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.9.0...immutable-proof-task-v0.9.0) (2026-06-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * release to production ([cb7ecff](https://github.com/iotaledger/twin-immutable-proof/commit/cb7ecff3e9a1ec8b4391d7efea4a58057b8b66c6))
9
+ * release to production ([#58](https://github.com/iotaledger/twin-immutable-proof/issues/58)) ([e1d8c04](https://github.com/iotaledger/twin-immutable-proof/commit/e1d8c04c4d2c764980ed44b320c3ce6218c9b70b))
10
+
11
+ ## [0.9.0-next.1](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.9.0-next.0...immutable-proof-task-v0.9.0-next.1) (2026-06-24)
12
+
13
+
14
+ ### Features
15
+
16
+ * add context id features ([#14](https://github.com/iotaledger/twin-immutable-proof/issues/14)) ([ed5a594](https://github.com/iotaledger/twin-immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
17
+ * add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
18
+ * eslint migration to flat config ([9e63e42](https://github.com/iotaledger/twin-immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
19
+ * eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
20
+ * immutable proof as vc ([#31](https://github.com/iotaledger/twin-immutable-proof/issues/31)) ([79cdb03](https://github.com/iotaledger/twin-immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
21
+ * replace verifiable storage with notarization as immutable proof ([#41](https://github.com/iotaledger/twin-immutable-proof/issues/41)) ([54f2154](https://github.com/iotaledger/twin-immutable-proof/commit/54f215469b0bdc9ea94cad572ca13b8533144104))
22
+ * typescript 6 update ([34d8aea](https://github.com/iotaledger/twin-immutable-proof/commit/34d8aea0ea0c1e1252de1882517abb1683d98313))
23
+ * update background tasks ([f25741c](https://github.com/iotaledger/twin-immutable-proof/commit/f25741c704e2c8311bc98bc69d4d926c523c781e))
24
+ * update dependencies ([1ec6b18](https://github.com/iotaledger/twin-immutable-proof/commit/1ec6b18e93198a8fc4935700863cdab1c3df7b64))
25
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
26
+ * update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
27
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * package dependencies ([4514e66](https://github.com/iotaledger/twin-immutable-proof/commit/4514e6632f40a91659e3dc92c474459fc146130c))
33
+ * pass context ids to populateClone ([#24](https://github.com/iotaledger/twin-immutable-proof/issues/24)) ([f360e71](https://github.com/iotaledger/twin-immutable-proof/commit/f360e71d6895d9abbc85e1f5ffb2579e9d9666ac))
34
+ * use async getStore in tests ([ec0b3b3](https://github.com/iotaledger/twin-immutable-proof/commit/ec0b3b38271fddf38a4b521cf871cc9cc01049f4))
35
+
36
+
37
+ ### Dependencies
38
+
39
+ * The following workspace dependencies were updated
40
+ * dependencies
41
+ * @twin.org/immutable-proof-models bumped from 0.9.0-next.0 to 0.9.0-next.1
42
+
43
+ ## [0.0.3-next.17](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.16...immutable-proof-task-v0.0.3-next.17) (2026-06-11)
44
+
45
+
46
+ ### Miscellaneous Chores
47
+
48
+ * **immutable-proof-task:** Synchronize repo versions
49
+
50
+
51
+ ### Dependencies
52
+
53
+ * The following workspace dependencies were updated
54
+ * dependencies
55
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.16 to 0.0.3-next.17
56
+
57
+ ## [0.0.3-next.16](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.15...immutable-proof-task-v0.0.3-next.16) (2026-05-29)
58
+
59
+
60
+ ### Features
61
+
62
+ * add context id features ([#14](https://github.com/iotaledger/twin-immutable-proof/issues/14)) ([ed5a594](https://github.com/iotaledger/twin-immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
63
+ * add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
64
+ * eslint migration to flat config ([9e63e42](https://github.com/iotaledger/twin-immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
65
+ * eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
66
+ * immutable proof as vc ([#31](https://github.com/iotaledger/twin-immutable-proof/issues/31)) ([79cdb03](https://github.com/iotaledger/twin-immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
67
+ * replace verifiable storage with notarization as immutable proof ([#41](https://github.com/iotaledger/twin-immutable-proof/issues/41)) ([54f2154](https://github.com/iotaledger/twin-immutable-proof/commit/54f215469b0bdc9ea94cad572ca13b8533144104))
68
+ * typescript 6 update ([34d8aea](https://github.com/iotaledger/twin-immutable-proof/commit/34d8aea0ea0c1e1252de1882517abb1683d98313))
69
+ * update background tasks ([f25741c](https://github.com/iotaledger/twin-immutable-proof/commit/f25741c704e2c8311bc98bc69d4d926c523c781e))
70
+ * update dependencies ([1ec6b18](https://github.com/iotaledger/twin-immutable-proof/commit/1ec6b18e93198a8fc4935700863cdab1c3df7b64))
71
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
72
+ * update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
73
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
74
+
75
+
76
+ ### Bug Fixes
77
+
78
+ * package dependencies ([4514e66](https://github.com/iotaledger/twin-immutable-proof/commit/4514e6632f40a91659e3dc92c474459fc146130c))
79
+ * pass context ids to populateClone ([#24](https://github.com/iotaledger/twin-immutable-proof/issues/24)) ([f360e71](https://github.com/iotaledger/twin-immutable-proof/commit/f360e71d6895d9abbc85e1f5ffb2579e9d9666ac))
80
+
81
+
82
+ ### Dependencies
83
+
84
+ * The following workspace dependencies were updated
85
+ * dependencies
86
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.15 to 0.0.3-next.16
87
+
88
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.14...immutable-proof-task-v0.0.3-next.15) (2026-05-29)
89
+
90
+
91
+ ### Miscellaneous Chores
92
+
93
+ * **immutable-proof-task:** Synchronize repo versions
94
+
95
+
96
+ ### Dependencies
97
+
98
+ * The following workspace dependencies were updated
99
+ * dependencies
100
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.14 to 0.0.3-next.15
101
+
102
+ ## [0.0.3-next.14](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.13...immutable-proof-task-v0.0.3-next.14) (2026-05-28)
103
+
104
+
105
+ ### Features
106
+
107
+ * replace verifiable storage with notarization as immutable proof ([#41](https://github.com/iotaledger/twin-immutable-proof/issues/41)) ([54f2154](https://github.com/iotaledger/twin-immutable-proof/commit/54f215469b0bdc9ea94cad572ca13b8533144104))
108
+
109
+
110
+ ### Dependencies
111
+
112
+ * The following workspace dependencies were updated
113
+ * dependencies
114
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.13 to 0.0.3-next.14
115
+
116
+ ## [0.0.3-next.13](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.12...immutable-proof-task-v0.0.3-next.13) (2026-05-20)
117
+
118
+
119
+ ### Features
120
+
121
+ * update dependencies ([1ec6b18](https://github.com/iotaledger/twin-immutable-proof/commit/1ec6b18e93198a8fc4935700863cdab1c3df7b64))
122
+
123
+
124
+ ### Dependencies
125
+
126
+ * The following workspace dependencies were updated
127
+ * dependencies
128
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.12 to 0.0.3-next.13
129
+
130
+ ## [0.0.3-next.12](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.11...immutable-proof-task-v0.0.3-next.12) (2026-05-12)
131
+
132
+
133
+ ### Features
134
+
135
+ * typescript 6 update ([34d8aea](https://github.com/iotaledger/twin-immutable-proof/commit/34d8aea0ea0c1e1252de1882517abb1683d98313))
136
+
137
+
138
+ ### Dependencies
139
+
140
+ * The following workspace dependencies were updated
141
+ * dependencies
142
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.11 to 0.0.3-next.12
143
+
144
+ ## [0.0.3-next.11](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.10...immutable-proof-task-v0.0.3-next.11) (2026-03-25)
145
+
146
+
147
+ ### Miscellaneous Chores
148
+
149
+ * **immutable-proof-task:** Synchronize repo versions
150
+
151
+
152
+ ### Dependencies
153
+
154
+ * The following workspace dependencies were updated
155
+ * dependencies
156
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.10 to 0.0.3-next.11
157
+
158
+ ## [0.0.3-next.10](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.9...immutable-proof-task-v0.0.3-next.10) (2026-02-25)
159
+
160
+
161
+ ### Miscellaneous Chores
162
+
163
+ * **immutable-proof-task:** Synchronize repo versions
164
+
165
+
166
+ ### Dependencies
167
+
168
+ * The following workspace dependencies were updated
169
+ * dependencies
170
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.9 to 0.0.3-next.10
171
+
172
+ ## [0.0.3-next.9](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.8...immutable-proof-task-v0.0.3-next.9) (2026-02-13)
4
173
 
5
174
 
6
175
  ### Bug Fixes
7
176
 
8
- * package dependencies ([4514e66](https://github.com/twinfoundation/immutable-proof/commit/4514e6632f40a91659e3dc92c474459fc146130c))
177
+ * package dependencies ([4514e66](https://github.com/iotaledger/twin-immutable-proof/commit/4514e6632f40a91659e3dc92c474459fc146130c))
9
178
 
10
179
 
11
180
  ### Dependencies
@@ -14,128 +183,128 @@
14
183
  * dependencies
15
184
  * @twin.org/immutable-proof-models bumped from 0.0.3-next.8 to 0.0.3-next.9
16
185
 
17
- ## [0.0.3-next.8](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.3-next.7...immutable-proof-task-v0.0.3-next.8) (2026-02-10)
186
+ ## [0.0.3-next.8](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.7...immutable-proof-task-v0.0.3-next.8) (2026-02-10)
18
187
 
19
188
 
20
189
  ### Features
21
190
 
22
- * immutable proof as vc ([#31](https://github.com/twinfoundation/immutable-proof/issues/31)) ([79cdb03](https://github.com/twinfoundation/immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
191
+ * immutable proof as vc ([#31](https://github.com/iotaledger/twin-immutable-proof/issues/31)) ([79cdb03](https://github.com/iotaledger/twin-immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
23
192
 
24
- ## [0.0.3-next.7](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.3-next.6...immutable-proof-task-v0.0.3-next.7) (2026-02-05)
193
+ ## [0.0.3-next.7](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.6...immutable-proof-task-v0.0.3-next.7) (2026-02-05)
25
194
 
26
195
 
27
196
  ### Bug Fixes
28
197
 
29
- * pass context ids to populateClone ([#24](https://github.com/twinfoundation/immutable-proof/issues/24)) ([f360e71](https://github.com/twinfoundation/immutable-proof/commit/f360e71d6895d9abbc85e1f5ffb2579e9d9666ac))
198
+ * pass context ids to populateClone ([#24](https://github.com/iotaledger/twin-immutable-proof/issues/24)) ([f360e71](https://github.com/iotaledger/twin-immutable-proof/commit/f360e71d6895d9abbc85e1f5ffb2579e9d9666ac))
30
199
 
31
- ## [0.0.3-next.6](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.3-next.5...immutable-proof-task-v0.0.3-next.6) (2026-01-21)
200
+ ## [0.0.3-next.6](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.5...immutable-proof-task-v0.0.3-next.6) (2026-01-21)
32
201
 
33
202
 
34
203
  ### Miscellaneous Chores
35
204
 
36
205
  * **immutable-proof-task:** Synchronize repo versions
37
206
 
38
- ## [0.0.3-next.5](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.3-next.4...immutable-proof-task-v0.0.3-next.5) (2026-01-14)
207
+ ## [0.0.3-next.5](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.4...immutable-proof-task-v0.0.3-next.5) (2026-01-14)
39
208
 
40
209
 
41
210
  ### Miscellaneous Chores
42
211
 
43
212
  * **immutable-proof-task:** Synchronize repo versions
44
213
 
45
- ## [0.0.3-next.4](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.3-next.3...immutable-proof-task-v0.0.3-next.4) (2026-01-07)
214
+ ## [0.0.3-next.4](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.3...immutable-proof-task-v0.0.3-next.4) (2026-01-07)
46
215
 
47
216
 
48
217
  ### Miscellaneous Chores
49
218
 
50
219
  * **immutable-proof-task:** Synchronize repo versions
51
220
 
52
- ## [0.0.3-next.3](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.3-next.2...immutable-proof-task-v0.0.3-next.3) (2025-11-28)
221
+ ## [0.0.3-next.3](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.2...immutable-proof-task-v0.0.3-next.3) (2025-11-28)
53
222
 
54
223
 
55
224
  ### Miscellaneous Chores
56
225
 
57
226
  * **immutable-proof-task:** Synchronize repo versions
58
227
 
59
- ## [0.0.3-next.2](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.3-next.1...immutable-proof-task-v0.0.3-next.2) (2025-11-28)
228
+ ## [0.0.3-next.2](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.1...immutable-proof-task-v0.0.3-next.2) (2025-11-28)
60
229
 
61
230
 
62
231
  ### Features
63
232
 
64
- * update background tasks ([f25741c](https://github.com/twinfoundation/immutable-proof/commit/f25741c704e2c8311bc98bc69d4d926c523c781e))
233
+ * update background tasks ([f25741c](https://github.com/iotaledger/twin-immutable-proof/commit/f25741c704e2c8311bc98bc69d4d926c523c781e))
65
234
 
66
- ## [0.0.3-next.1](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.3-next.0...immutable-proof-task-v0.0.3-next.1) (2025-11-12)
235
+ ## [0.0.3-next.1](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.3-next.0...immutable-proof-task-v0.0.3-next.1) (2025-11-12)
67
236
 
68
237
 
69
238
  ### Features
70
239
 
71
- * add context id features ([#14](https://github.com/twinfoundation/immutable-proof/issues/14)) ([ed5a594](https://github.com/twinfoundation/immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
72
- * add validate-locales ([d6a7c07](https://github.com/twinfoundation/immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
73
- * eslint migration to flat config ([9e63e42](https://github.com/twinfoundation/immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
74
- * eslint migration to flat config ([c8536f2](https://github.com/twinfoundation/immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
75
- * update dependencies ([7d6b321](https://github.com/twinfoundation/immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
76
- * update framework core ([e708d4d](https://github.com/twinfoundation/immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
77
- * use shared store mechanism ([#3](https://github.com/twinfoundation/immutable-proof/issues/3)) ([7042a40](https://github.com/twinfoundation/immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
240
+ * add context id features ([#14](https://github.com/iotaledger/twin-immutable-proof/issues/14)) ([ed5a594](https://github.com/iotaledger/twin-immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
241
+ * add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
242
+ * eslint migration to flat config ([9e63e42](https://github.com/iotaledger/twin-immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
243
+ * eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
244
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
245
+ * update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
246
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
78
247
 
79
- ## [0.0.2-next.3](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.2-next.2...immutable-proof-task-v0.0.2-next.3) (2025-10-09)
248
+ ## [0.0.2-next.3](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.2-next.2...immutable-proof-task-v0.0.2-next.3) (2025-10-09)
80
249
 
81
250
 
82
251
  ### Features
83
252
 
84
- * add validate-locales ([d6a7c07](https://github.com/twinfoundation/immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
85
- * eslint migration to flat config ([9e63e42](https://github.com/twinfoundation/immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
253
+ * add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
254
+ * eslint migration to flat config ([9e63e42](https://github.com/iotaledger/twin-immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
86
255
 
87
- ## [0.0.2-next.2](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.2-next.1...immutable-proof-task-v0.0.2-next.2) (2025-08-29)
256
+ ## [0.0.2-next.2](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.2-next.1...immutable-proof-task-v0.0.2-next.2) (2025-08-29)
88
257
 
89
258
 
90
259
  ### Features
91
260
 
92
- * eslint migration to flat config ([c8536f2](https://github.com/twinfoundation/immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
261
+ * eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
93
262
 
94
- ## [0.0.2-next.1](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.2-next.0...immutable-proof-task-v0.0.2-next.1) (2025-08-20)
263
+ ## [0.0.2-next.1](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.2-next.0...immutable-proof-task-v0.0.2-next.1) (2025-08-20)
95
264
 
96
265
 
97
266
  ### Features
98
267
 
99
- * update dependencies ([7d6b321](https://github.com/twinfoundation/immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
100
- * update framework core ([e708d4d](https://github.com/twinfoundation/immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
101
- * use shared store mechanism ([#3](https://github.com/twinfoundation/immutable-proof/issues/3)) ([7042a40](https://github.com/twinfoundation/immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
268
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
269
+ * update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
270
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
102
271
 
103
272
  ## 0.0.1 (2025-07-09)
104
273
 
105
274
 
106
275
  ### Features
107
276
 
108
- * release to production ([cb7ecff](https://github.com/twinfoundation/immutable-proof/commit/cb7ecff3e9a1ec8b4391d7efea4a58057b8b66c6))
277
+ * release to production ([cb7ecff](https://github.com/iotaledger/twin-immutable-proof/commit/cb7ecff3e9a1ec8b4391d7efea4a58057b8b66c6))
109
278
 
110
- ## [0.0.1-next.35](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.1-next.34...immutable-proof-task-v0.0.1-next.35) (2025-06-12)
279
+ ## [0.0.1-next.35](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.1-next.34...immutable-proof-task-v0.0.1-next.35) (2025-06-12)
111
280
 
112
281
 
113
282
  ### Features
114
283
 
115
- * update dependencies ([7d6b321](https://github.com/twinfoundation/immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
284
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
116
285
 
117
- ## [0.0.1-next.34](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.1-next.33...immutable-proof-task-v0.0.1-next.34) (2025-06-03)
286
+ ## [0.0.1-next.34](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.1-next.33...immutable-proof-task-v0.0.1-next.34) (2025-06-03)
118
287
 
119
288
 
120
289
  ### Miscellaneous Chores
121
290
 
122
291
  * **immutable-proof-task:** Synchronize repo versions
123
292
 
124
- ## [0.0.1-next.33](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.1-next.32...immutable-proof-task-v0.0.1-next.33) (2025-05-28)
293
+ ## [0.0.1-next.33](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.1-next.32...immutable-proof-task-v0.0.1-next.33) (2025-05-28)
125
294
 
126
295
 
127
296
  ### Miscellaneous Chores
128
297
 
129
298
  * **immutable-proof-task:** Synchronize repo versions
130
299
 
131
- ## [0.0.1-next.32](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.1-next.31...immutable-proof-task-v0.0.1-next.32) (2025-04-17)
300
+ ## [0.0.1-next.32](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.1-next.31...immutable-proof-task-v0.0.1-next.32) (2025-04-17)
132
301
 
133
302
 
134
303
  ### Features
135
304
 
136
- * use shared store mechanism ([#3](https://github.com/twinfoundation/immutable-proof/issues/3)) ([7042a40](https://github.com/twinfoundation/immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
305
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
137
306
 
138
- ## [0.0.1-next.31](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-task-v0.0.1-next.30...immutable-proof-task-v0.0.1-next.31) (2025-03-28)
307
+ ## [0.0.1-next.31](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-task-v0.0.1-next.30...immutable-proof-task-v0.0.1-next.31) (2025-03-28)
139
308
 
140
309
 
141
310
  ### Miscellaneous Chores
package/docs/examples.md CHANGED
@@ -1 +1,49 @@
1
- # @twin.org/immutable-proof-task - Examples
1
+ # Immutable Proof Task Examples
2
+
3
+ These snippets show how to prepare payloads and execute background task processing for immutable proof generation.
4
+
5
+ ## processProofTask
6
+
7
+ ```typescript
8
+ import type { IImmutableProofTaskPayload } from '@twin.org/immutable-proof-task';
9
+
10
+ const payload: IImmutableProofTaskPayload = {
11
+ proofId: 'immutable-proof:01JABCDEF1234567890',
12
+ identity: 'did:iota:tst:issuer',
13
+ identityConnectorType: 'identity',
14
+ verificationMethodId: 'immutable-proof-assertion',
15
+ credentialSubject: {
16
+ '@context': ['https://schema.twindev.org/immutable-proof', 'https://schema.twindev.org/common'],
17
+ type: 'ImmutableProof',
18
+ id: 'https://example.org/documents/100',
19
+ proofIntegrity: 'yEr9VvYCGDh2Ww1YwQMehUy4LlW35mLhX8j8R8U6x0g='
20
+ }
21
+ };
22
+
23
+ console.log(payload.identity); // did:iota:tst:issuer
24
+ ```
25
+
26
+ ```typescript
27
+ import { processProofTask } from '@twin.org/immutable-proof-task';
28
+ import type { IEngineCoreClone } from '@twin.org/engine-models';
29
+
30
+ const engineCloneData: IEngineCoreClone = {
31
+ factories: {},
32
+ components: {}
33
+ };
34
+
35
+ const result = await processProofTask(engineCloneData, {
36
+ proofId: 'immutable-proof:01JABCDEF1234567890',
37
+ identity: 'did:iota:tst:issuer',
38
+ identityConnectorType: 'identity',
39
+ verificationMethodId: 'immutable-proof-assertion',
40
+ credentialSubject: {
41
+ '@context': ['https://schema.twindev.org/immutable-proof', 'https://schema.twindev.org/common'],
42
+ type: 'ImmutableProof',
43
+ id: 'https://example.org/documents/100',
44
+ proofIntegrity: 'yEr9VvYCGDh2Ww1YwQMehUy4LlW35mLhX8j8R8U6x0g='
45
+ }
46
+ });
47
+
48
+ console.log(result.proofId); // immutable-proof:01JABCDEF1234567890
49
+ ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **processProofTask**(`engineCloneData`, `payload`): `Promise`\<[`IImmutableProofTaskResult`](../interfaces/IImmutableProofTaskResult.md)\>
4
4
 
5
- Process a proof.
5
+ Process a proof task by creating a verifiable credential and notarizing it.
6
6
 
7
7
  ## Parameters
8
8
 
@@ -10,16 +10,16 @@ Process a proof.
10
10
 
11
11
  `IEngineCoreClone`
12
12
 
13
- The engine clone data.
13
+ The engine clone data used to initialize a cloned engine instance when running in a separate thread.
14
14
 
15
15
  ### payload
16
16
 
17
17
  [`IImmutableProofTaskPayload`](../interfaces/IImmutableProofTaskPayload.md)
18
18
 
19
- The payload to process.
19
+ The payload containing the proof parameters.
20
20
 
21
21
  ## Returns
22
22
 
23
23
  `Promise`\<[`IImmutableProofTaskResult`](../interfaces/IImmutableProofTaskResult.md)\>
24
24
 
25
- The proof.
25
+ The task result containing the verifiable credential and notarization id.
@@ -4,7 +4,7 @@ The payload for the immutable proof task.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### proofId
7
+ ### proofId {#proofid}
8
8
 
9
9
  > **proofId**: `string`
10
10
 
@@ -12,7 +12,7 @@ The proof id.
12
12
 
13
13
  ***
14
14
 
15
- ### identity
15
+ ### identity {#identity}
16
16
 
17
17
  > **identity**: `string`
18
18
 
@@ -20,7 +20,7 @@ The identity to create the proof for.
20
20
 
21
21
  ***
22
22
 
23
- ### identityConnectorType
23
+ ### identityConnectorType {#identityconnectortype}
24
24
 
25
25
  > **identityConnectorType**: `string`
26
26
 
@@ -28,7 +28,7 @@ The identity connector type.
28
28
 
29
29
  ***
30
30
 
31
- ### verificationMethodId
31
+ ### verificationMethodId {#verificationmethodid}
32
32
 
33
33
  > **verificationMethodId**: `string`
34
34
 
@@ -36,8 +36,25 @@ The assertion method id.
36
36
 
37
37
  ***
38
38
 
39
- ### credentialSubject
39
+ ### credentialSubject {#credentialsubject}
40
40
 
41
41
  > **credentialSubject**: `IImmutableProof`
42
42
 
43
43
  The subject to create the proof for.
44
+
45
+ ***
46
+
47
+ ### notarizationConnectorType {#notarizationconnectortype}
48
+
49
+ > **notarizationConnectorType**: `string`
50
+
51
+ The notarization connector type.
52
+
53
+ ***
54
+
55
+ ### deleteLockDateTime? {#deletelockdatetime}
56
+
57
+ > `optional` **deleteLockDateTime?**: `string`
58
+
59
+ An ISO 8601 date-time string specifying when the notarization lock expires.
60
+ If omitted, no deletion lock is applied.
@@ -4,7 +4,7 @@ The result for the immutable proof task.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### proofId
7
+ ### proofId {#proofid}
8
8
 
9
9
  > **proofId**: `string`
10
10
 
@@ -12,8 +12,16 @@ The proof id.
12
12
 
13
13
  ***
14
14
 
15
- ### verifiableCredential
15
+ ### verifiableCredential {#verifiablecredential}
16
16
 
17
17
  > **verifiableCredential**: `IDidVerifiableCredential`
18
18
 
19
- The proof, we only generate a single proof, so restrict to a single proof.
19
+ The verifiable credential produced by the proof task.
20
+
21
+ ***
22
+
23
+ ### notarizationId {#notarizationid}
24
+
25
+ > **notarizationId**: `string`
26
+
27
+ The notarization id returned after storing the proof.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-task",
3
- "version": "0.0.3-next.9",
4
- "description": "Background task for generating the proof",
3
+ "version": "0.9.0",
4
+ "description": "Background proof processing that creates verifiable credentials from prepared payloads",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/immutable-proof.git",
7
+ "url": "git+https://github.com/iotaledger/twin-immutable-proof.git",
8
8
  "directory": "packages/immutable-proof-task"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -14,15 +14,16 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/context": "next",
18
- "@twin.org/core": "next",
19
- "@twin.org/data-json-ld": "next",
20
- "@twin.org/engine-core": "next",
21
- "@twin.org/engine-models": "next",
22
- "@twin.org/identity-models": "next",
23
- "@twin.org/immutable-proof-models": "0.0.3-next.9",
24
- "@twin.org/nameof": "next",
25
- "@twin.org/standards-w3c-did": "next"
17
+ "@twin.org/context": "^0.9.0",
18
+ "@twin.org/core": "^0.9.0",
19
+ "@twin.org/data-json-ld": "^0.9.0",
20
+ "@twin.org/engine-core": "^0.9.0-next.1",
21
+ "@twin.org/engine-models": "^0.9.0-next.1",
22
+ "@twin.org/identity-models": "^0.9.0",
23
+ "@twin.org/immutable-proof-models": "^0.9.0",
24
+ "@twin.org/nameof": "^0.9.0",
25
+ "@twin.org/notarization-models": "^0.9.0",
26
+ "@twin.org/standards-w3c-did": "^0.9.0"
26
27
  },
27
28
  "main": "./dist/es/index.js",
28
29
  "types": "./dist/types/index.d.ts",
@@ -49,7 +50,7 @@
49
50
  "immutable-proof"
50
51
  ],
51
52
  "bugs": {
52
- "url": "git+https://github.com/twinfoundation/immutable-proof/issues"
53
+ "url": "git+https://github.com/iotaledger/twin-immutable-proof/issues"
53
54
  },
54
55
  "homepage": "https://twindev.org"
55
56
  }