@twin.org/immutable-proof-task 0.0.3-next.8 → 0.9.0-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.
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,127 +1,302 @@
1
- # @twin.org/immutable-proof-task - Changelog
1
+ # Changelog
2
2
 
3
- ## [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)
3
+ ## [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)
4
4
 
5
5
 
6
6
  ### Features
7
7
 
8
- * immutable proof as vc ([#31](https://github.com/twinfoundation/immutable-proof/issues/31)) ([79cdb03](https://github.com/twinfoundation/immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
8
+ * add context id features ([#14](https://github.com/iotaledger/twin-immutable-proof/issues/14)) ([ed5a594](https://github.com/iotaledger/twin-immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
9
+ * add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
10
+ * eslint migration to flat config ([9e63e42](https://github.com/iotaledger/twin-immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
11
+ * eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
12
+ * immutable proof as vc ([#31](https://github.com/iotaledger/twin-immutable-proof/issues/31)) ([79cdb03](https://github.com/iotaledger/twin-immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
13
+ * 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))
14
+ * typescript 6 update ([34d8aea](https://github.com/iotaledger/twin-immutable-proof/commit/34d8aea0ea0c1e1252de1882517abb1683d98313))
15
+ * update background tasks ([f25741c](https://github.com/iotaledger/twin-immutable-proof/commit/f25741c704e2c8311bc98bc69d4d926c523c781e))
16
+ * update dependencies ([1ec6b18](https://github.com/iotaledger/twin-immutable-proof/commit/1ec6b18e93198a8fc4935700863cdab1c3df7b64))
17
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
18
+ * update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
19
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
9
20
 
10
- ## [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)
21
+
22
+ ### Bug Fixes
23
+
24
+ * package dependencies ([4514e66](https://github.com/iotaledger/twin-immutable-proof/commit/4514e6632f40a91659e3dc92c474459fc146130c))
25
+ * 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))
26
+ * use async getStore in tests ([ec0b3b3](https://github.com/iotaledger/twin-immutable-proof/commit/ec0b3b38271fddf38a4b521cf871cc9cc01049f4))
27
+
28
+
29
+ ### Dependencies
30
+
31
+ * The following workspace dependencies were updated
32
+ * dependencies
33
+ * @twin.org/immutable-proof-models bumped from 0.9.0-next.0 to 0.9.0-next.1
34
+
35
+ ## [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)
36
+
37
+
38
+ ### Miscellaneous Chores
39
+
40
+ * **immutable-proof-task:** Synchronize repo versions
41
+
42
+
43
+ ### Dependencies
44
+
45
+ * The following workspace dependencies were updated
46
+ * dependencies
47
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.16 to 0.0.3-next.17
48
+
49
+ ## [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)
50
+
51
+
52
+ ### Features
53
+
54
+ * add context id features ([#14](https://github.com/iotaledger/twin-immutable-proof/issues/14)) ([ed5a594](https://github.com/iotaledger/twin-immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
55
+ * add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
56
+ * eslint migration to flat config ([9e63e42](https://github.com/iotaledger/twin-immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
57
+ * eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
58
+ * immutable proof as vc ([#31](https://github.com/iotaledger/twin-immutable-proof/issues/31)) ([79cdb03](https://github.com/iotaledger/twin-immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
59
+ * 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))
60
+ * typescript 6 update ([34d8aea](https://github.com/iotaledger/twin-immutable-proof/commit/34d8aea0ea0c1e1252de1882517abb1683d98313))
61
+ * update background tasks ([f25741c](https://github.com/iotaledger/twin-immutable-proof/commit/f25741c704e2c8311bc98bc69d4d926c523c781e))
62
+ * update dependencies ([1ec6b18](https://github.com/iotaledger/twin-immutable-proof/commit/1ec6b18e93198a8fc4935700863cdab1c3df7b64))
63
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
64
+ * update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
65
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
66
+
67
+
68
+ ### Bug Fixes
69
+
70
+ * package dependencies ([4514e66](https://github.com/iotaledger/twin-immutable-proof/commit/4514e6632f40a91659e3dc92c474459fc146130c))
71
+ * 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))
72
+
73
+
74
+ ### Dependencies
75
+
76
+ * The following workspace dependencies were updated
77
+ * dependencies
78
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.15 to 0.0.3-next.16
79
+
80
+ ## [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)
81
+
82
+
83
+ ### Miscellaneous Chores
84
+
85
+ * **immutable-proof-task:** Synchronize repo versions
86
+
87
+
88
+ ### Dependencies
89
+
90
+ * The following workspace dependencies were updated
91
+ * dependencies
92
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.14 to 0.0.3-next.15
93
+
94
+ ## [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)
95
+
96
+
97
+ ### Features
98
+
99
+ * 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))
100
+
101
+
102
+ ### Dependencies
103
+
104
+ * The following workspace dependencies were updated
105
+ * dependencies
106
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.13 to 0.0.3-next.14
107
+
108
+ ## [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)
109
+
110
+
111
+ ### Features
112
+
113
+ * update dependencies ([1ec6b18](https://github.com/iotaledger/twin-immutable-proof/commit/1ec6b18e93198a8fc4935700863cdab1c3df7b64))
114
+
115
+
116
+ ### Dependencies
117
+
118
+ * The following workspace dependencies were updated
119
+ * dependencies
120
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.12 to 0.0.3-next.13
121
+
122
+ ## [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)
123
+
124
+
125
+ ### Features
126
+
127
+ * typescript 6 update ([34d8aea](https://github.com/iotaledger/twin-immutable-proof/commit/34d8aea0ea0c1e1252de1882517abb1683d98313))
128
+
129
+
130
+ ### Dependencies
131
+
132
+ * The following workspace dependencies were updated
133
+ * dependencies
134
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.11 to 0.0.3-next.12
135
+
136
+ ## [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)
137
+
138
+
139
+ ### Miscellaneous Chores
140
+
141
+ * **immutable-proof-task:** Synchronize repo versions
142
+
143
+
144
+ ### Dependencies
145
+
146
+ * The following workspace dependencies were updated
147
+ * dependencies
148
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.10 to 0.0.3-next.11
149
+
150
+ ## [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)
151
+
152
+
153
+ ### Miscellaneous Chores
154
+
155
+ * **immutable-proof-task:** Synchronize repo versions
156
+
157
+
158
+ ### Dependencies
159
+
160
+ * The following workspace dependencies were updated
161
+ * dependencies
162
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.9 to 0.0.3-next.10
163
+
164
+ ## [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)
165
+
166
+
167
+ ### Bug Fixes
168
+
169
+ * package dependencies ([4514e66](https://github.com/iotaledger/twin-immutable-proof/commit/4514e6632f40a91659e3dc92c474459fc146130c))
170
+
171
+
172
+ ### Dependencies
173
+
174
+ * The following workspace dependencies were updated
175
+ * dependencies
176
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.8 to 0.0.3-next.9
177
+
178
+ ## [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)
179
+
180
+
181
+ ### Features
182
+
183
+ * immutable proof as vc ([#31](https://github.com/iotaledger/twin-immutable-proof/issues/31)) ([79cdb03](https://github.com/iotaledger/twin-immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
184
+
185
+ ## [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)
11
186
 
12
187
 
13
188
  ### Bug Fixes
14
189
 
15
- * pass context ids to populateClone ([#24](https://github.com/twinfoundation/immutable-proof/issues/24)) ([f360e71](https://github.com/twinfoundation/immutable-proof/commit/f360e71d6895d9abbc85e1f5ffb2579e9d9666ac))
190
+ * 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))
16
191
 
17
- ## [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)
192
+ ## [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)
18
193
 
19
194
 
20
195
  ### Miscellaneous Chores
21
196
 
22
197
  * **immutable-proof-task:** Synchronize repo versions
23
198
 
24
- ## [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)
199
+ ## [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)
25
200
 
26
201
 
27
202
  ### Miscellaneous Chores
28
203
 
29
204
  * **immutable-proof-task:** Synchronize repo versions
30
205
 
31
- ## [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)
206
+ ## [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)
32
207
 
33
208
 
34
209
  ### Miscellaneous Chores
35
210
 
36
211
  * **immutable-proof-task:** Synchronize repo versions
37
212
 
38
- ## [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)
213
+ ## [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)
39
214
 
40
215
 
41
216
  ### Miscellaneous Chores
42
217
 
43
218
  * **immutable-proof-task:** Synchronize repo versions
44
219
 
45
- ## [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)
220
+ ## [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)
46
221
 
47
222
 
48
223
  ### Features
49
224
 
50
- * update background tasks ([f25741c](https://github.com/twinfoundation/immutable-proof/commit/f25741c704e2c8311bc98bc69d4d926c523c781e))
225
+ * update background tasks ([f25741c](https://github.com/iotaledger/twin-immutable-proof/commit/f25741c704e2c8311bc98bc69d4d926c523c781e))
51
226
 
52
- ## [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)
227
+ ## [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)
53
228
 
54
229
 
55
230
  ### Features
56
231
 
57
- * add context id features ([#14](https://github.com/twinfoundation/immutable-proof/issues/14)) ([ed5a594](https://github.com/twinfoundation/immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
58
- * add validate-locales ([d6a7c07](https://github.com/twinfoundation/immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
59
- * eslint migration to flat config ([9e63e42](https://github.com/twinfoundation/immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
60
- * eslint migration to flat config ([c8536f2](https://github.com/twinfoundation/immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
61
- * update dependencies ([7d6b321](https://github.com/twinfoundation/immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
62
- * update framework core ([e708d4d](https://github.com/twinfoundation/immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
63
- * use shared store mechanism ([#3](https://github.com/twinfoundation/immutable-proof/issues/3)) ([7042a40](https://github.com/twinfoundation/immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
232
+ * add context id features ([#14](https://github.com/iotaledger/twin-immutable-proof/issues/14)) ([ed5a594](https://github.com/iotaledger/twin-immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
233
+ * add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
234
+ * eslint migration to flat config ([9e63e42](https://github.com/iotaledger/twin-immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
235
+ * eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
236
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
237
+ * update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
238
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
64
239
 
65
- ## [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)
240
+ ## [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)
66
241
 
67
242
 
68
243
  ### Features
69
244
 
70
- * add validate-locales ([d6a7c07](https://github.com/twinfoundation/immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
71
- * eslint migration to flat config ([9e63e42](https://github.com/twinfoundation/immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
245
+ * add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
246
+ * eslint migration to flat config ([9e63e42](https://github.com/iotaledger/twin-immutable-proof/commit/9e63e420ba686db78dca806d111f646c057083d6))
72
247
 
73
- ## [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)
248
+ ## [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)
74
249
 
75
250
 
76
251
  ### Features
77
252
 
78
- * eslint migration to flat config ([c8536f2](https://github.com/twinfoundation/immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
253
+ * eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
79
254
 
80
- ## [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)
255
+ ## [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)
81
256
 
82
257
 
83
258
  ### Features
84
259
 
85
- * update dependencies ([7d6b321](https://github.com/twinfoundation/immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
86
- * update framework core ([e708d4d](https://github.com/twinfoundation/immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
87
- * use shared store mechanism ([#3](https://github.com/twinfoundation/immutable-proof/issues/3)) ([7042a40](https://github.com/twinfoundation/immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
260
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
261
+ * update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
262
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
88
263
 
89
264
  ## 0.0.1 (2025-07-09)
90
265
 
91
266
 
92
267
  ### Features
93
268
 
94
- * release to production ([cb7ecff](https://github.com/twinfoundation/immutable-proof/commit/cb7ecff3e9a1ec8b4391d7efea4a58057b8b66c6))
269
+ * release to production ([cb7ecff](https://github.com/iotaledger/twin-immutable-proof/commit/cb7ecff3e9a1ec8b4391d7efea4a58057b8b66c6))
95
270
 
96
- ## [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)
271
+ ## [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)
97
272
 
98
273
 
99
274
  ### Features
100
275
 
101
- * update dependencies ([7d6b321](https://github.com/twinfoundation/immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
276
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
102
277
 
103
- ## [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)
278
+ ## [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)
104
279
 
105
280
 
106
281
  ### Miscellaneous Chores
107
282
 
108
283
  * **immutable-proof-task:** Synchronize repo versions
109
284
 
110
- ## [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)
285
+ ## [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)
111
286
 
112
287
 
113
288
  ### Miscellaneous Chores
114
289
 
115
290
  * **immutable-proof-task:** Synchronize repo versions
116
291
 
117
- ## [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)
292
+ ## [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)
118
293
 
119
294
 
120
295
  ### Features
121
296
 
122
- * use shared store mechanism ([#3](https://github.com/twinfoundation/immutable-proof/issues/3)) ([7042a40](https://github.com/twinfoundation/immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
297
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
123
298
 
124
- ## [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)
299
+ ## [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)
125
300
 
126
301
 
127
302
  ### 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.8",
4
- "description": "Background task for generating the proof",
3
+ "version": "0.9.0-next.1",
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.8",
24
- "@twin.org/nameof": "next",
25
- "@twin.org/standards-w3c-did": "next"
17
+ "@twin.org/context": "0.9.0-next.1",
18
+ "@twin.org/core": "0.9.0-next.1",
19
+ "@twin.org/data-json-ld": "0.9.0-next.1",
20
+ "@twin.org/engine-core": "0.0.3-next.56",
21
+ "@twin.org/engine-models": "0.0.3-next.56",
22
+ "@twin.org/identity-models": "0.9.0-next.1",
23
+ "@twin.org/immutable-proof-models": "0.9.0-next.1",
24
+ "@twin.org/nameof": "0.9.0-next.1",
25
+ "@twin.org/notarization-models": "0.9.0-next.1",
26
+ "@twin.org/standards-w3c-did": "0.9.0-next.1"
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
  }