@twin.org/immutable-proof-models 0.0.3-next.12 → 0.0.3-next.14

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.
@@ -5,7 +5,6 @@ import { ImmutableProofContexts } from "../models/immutableProofContexts.js";
5
5
  import { ImmutableProofTypes } from "../models/immutableProofTypes.js";
6
6
  import ImmutableProofSchema from "../schemas/ImmutableProof.json" with { type: "json" };
7
7
  import ImmutableProofFailureSchema from "../schemas/ImmutableProofFailure.json" with { type: "json" };
8
- import ImmutableProofReceiptSchema from "../schemas/ImmutableProofReceipt.json" with { type: "json" };
9
8
  import ImmutableProofVerificationSchema from "../schemas/ImmutableProofVerification.json" with { type: "json" };
10
9
  /**
11
10
  * Handle all the data types for immutable proof.
@@ -20,10 +19,6 @@ export class ImmutableProofDataTypes {
20
19
  type: ImmutableProofTypes.ImmutableProof,
21
20
  schema: ImmutableProofSchema
22
21
  },
23
- {
24
- type: ImmutableProofTypes.ImmutableProofReceipt,
25
- schema: ImmutableProofReceiptSchema
26
- },
27
22
  {
28
23
  type: ImmutableProofTypes.ImmutableProofVerification,
29
24
  schema: ImmutableProofVerificationSchema
@@ -1 +1 @@
1
- {"version":3,"file":"immutableProofDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/immutableProofDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,oBAAoB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,OAAO,2BAA2B,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,2BAA2B,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEhH;;GAEG;AACH,MAAM,OAAO,uBAAuB;IACnC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,mBAAmB,CAAC,cAAc;gBACxC,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,mBAAmB,CAAC,qBAAqB;gBAC/C,MAAM,EAAE,2BAA2B;aACnC;YACD;gBACC,IAAI,EAAE,mBAAmB,CAAC,0BAA0B;gBACpD,MAAM,EAAE,gCAAgC;aACxC;YACD;gBACC,IAAI,EAAE,mBAAmB,CAAC,qBAAqB;gBAC/C,MAAM,EAAE,2BAA2B;aACnC;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,sBAAsB,CAAC,SAAS,EAChC,sBAAsB,CAAC,aAAa,EACpC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CACpD,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { ImmutableProofContexts } from \"../models/immutableProofContexts.js\";\nimport { ImmutableProofTypes } from \"../models/immutableProofTypes.js\";\nimport ImmutableProofSchema from \"../schemas/ImmutableProof.json\" with { type: \"json\" };\nimport ImmutableProofFailureSchema from \"../schemas/ImmutableProofFailure.json\" with { type: \"json\" };\nimport ImmutableProofReceiptSchema from \"../schemas/ImmutableProofReceipt.json\" with { type: \"json\" };\nimport ImmutableProofVerificationSchema from \"../schemas/ImmutableProofVerification.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for immutable proof.\n */\nexport class ImmutableProofDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProof,\n\t\t\t\tschema: ImmutableProofSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProofReceipt,\n\t\t\t\tschema: ImmutableProofReceiptSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProofVerification,\n\t\t\t\tschema: ImmutableProofVerificationSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProofFailure,\n\t\t\t\tschema: ImmutableProofFailureSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tImmutableProofContexts.Namespace,\n\t\t\tImmutableProofContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: t.type, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"immutableProofDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/immutableProofDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,oBAAoB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,OAAO,2BAA2B,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEhH;;GAEG;AACH,MAAM,OAAO,uBAAuB;IACnC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,mBAAmB,CAAC,cAAc;gBACxC,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,mBAAmB,CAAC,0BAA0B;gBACpD,MAAM,EAAE,gCAAgC;aACxC;YACD;gBACC,IAAI,EAAE,mBAAmB,CAAC,qBAAqB;gBAC/C,MAAM,EAAE,2BAA2B;aACnC;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,sBAAsB,CAAC,SAAS,EAChC,sBAAsB,CAAC,aAAa,EACpC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CACpD,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { ImmutableProofContexts } from \"../models/immutableProofContexts.js\";\nimport { ImmutableProofTypes } from \"../models/immutableProofTypes.js\";\nimport ImmutableProofSchema from \"../schemas/ImmutableProof.json\" with { type: \"json\" };\nimport ImmutableProofFailureSchema from \"../schemas/ImmutableProofFailure.json\" with { type: \"json\" };\nimport ImmutableProofVerificationSchema from \"../schemas/ImmutableProofVerification.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for immutable proof.\n */\nexport class ImmutableProofDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProof,\n\t\t\t\tschema: ImmutableProofSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProofVerification,\n\t\t\t\tschema: ImmutableProofVerificationSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProofFailure,\n\t\t\t\tschema: ImmutableProofFailureSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tImmutableProofContexts.Namespace,\n\t\t\tImmutableProofContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: t.type, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
package/dist/es/index.js CHANGED
@@ -9,7 +9,6 @@ export * from "./models/api/IImmutableProofVerifyResponse.js";
9
9
  export * from "./models/eventBus/IImmutableProofEventBusProofCreated.js";
10
10
  export * from "./models/IImmutableProof.js";
11
11
  export * from "./models/IImmutableProofComponent.js";
12
- export * from "./models/IImmutableProofReceipt.js";
13
12
  export * from "./models/IImmutableProofVerification.js";
14
13
  export * from "./models/immutableProofContexts.js";
15
14
  export * from "./models/immutableProofFailure.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/immutableProofDataTypes.js\";\nexport * from \"./models/api/IImmutableProofCreateRequest.js\";\nexport * from \"./models/api/IImmutableProofGetRequest.js\";\nexport * from \"./models/api/IImmutableProofGetResponse.js\";\nexport * from \"./models/api/IImmutableProofVerifyRequest.js\";\nexport * from \"./models/api/IImmutableProofVerifyResponse.js\";\nexport * from \"./models/eventBus/IImmutableProofEventBusProofCreated.js\";\nexport * from \"./models/IImmutableProof.js\";\nexport * from \"./models/IImmutableProofComponent.js\";\nexport * from \"./models/IImmutableProofReceipt.js\";\nexport * from \"./models/IImmutableProofVerification.js\";\nexport * from \"./models/immutableProofContexts.js\";\nexport * from \"./models/immutableProofFailure.js\";\nexport * from \"./models/immutableProofTopics.js\";\nexport * from \"./models/immutableProofTypes.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/immutableProofDataTypes.js\";\nexport * from \"./models/api/IImmutableProofCreateRequest.js\";\nexport * from \"./models/api/IImmutableProofGetRequest.js\";\nexport * from \"./models/api/IImmutableProofGetResponse.js\";\nexport * from \"./models/api/IImmutableProofVerifyRequest.js\";\nexport * from \"./models/api/IImmutableProofVerifyResponse.js\";\nexport * from \"./models/eventBus/IImmutableProofEventBusProofCreated.js\";\nexport * from \"./models/IImmutableProof.js\";\nexport * from \"./models/IImmutableProofComponent.js\";\nexport * from \"./models/IImmutableProofVerification.js\";\nexport * from \"./models/immutableProofContexts.js\";\nexport * from \"./models/immutableProofFailure.js\";\nexport * from \"./models/immutableProofTopics.js\";\nexport * from \"./models/immutableProofTypes.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IImmutableProofComponent.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IDidVerifiableCredential } from \"@twin.org/standards-w3c-did\";\nimport type { IImmutableProofVerification } from \"./IImmutableProofVerification.js\";\n\n/**\n * Interface describing an immutable proof contract.\n */\nexport interface IImmutableProofComponent extends IComponent {\n\t/**\n\t * Create a new proof.\n\t * @param document The document to create the proof for.\n\t * @returns The id of the new proof.\n\t */\n\tcreate(document: IJsonLdNodeObject): Promise<string>;\n\n\t/**\n\t * Get a proof.\n\t * @param id The id of the proof to get.\n\t * @returns The proof.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tget(id: string): Promise<IDidVerifiableCredential>;\n\n\t/**\n\t * Verify a proof.\n\t * @param id The id of the proof to verify.\n\t * @returns The result of the verification and any failures.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tverify(id: string): Promise<IImmutableProofVerification>;\n\n\t/**\n\t * Remove the verifiable storage for the proof.\n\t * @param id The id of the proof to remove the storage from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tremoveVerifiable(id: string): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"IImmutableProofComponent.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IDidVerifiableCredential } from \"@twin.org/standards-w3c-did\";\nimport type { IImmutableProofVerification } from \"./IImmutableProofVerification.js\";\n\n/**\n * Interface describing an immutable proof contract.\n */\nexport interface IImmutableProofComponent extends IComponent {\n\t/**\n\t * Create a new proof.\n\t * @param document The document to create the proof for.\n\t * @param options Optional settings for the proof.\n\t * @param options.deleteLock An ISO 8601 date-time string specifying when the notarization lock expires; if omitted no lock is applied.\n\t * @returns The id of the new proof.\n\t */\n\tcreate(document: IJsonLdNodeObject, options?: { deleteLock?: string }): Promise<string>;\n\n\t/**\n\t * Get a proof.\n\t * @param id The id of the proof to get.\n\t * @returns The proof.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tget(id: string): Promise<IDidVerifiableCredential>;\n\n\t/**\n\t * Verify a proof.\n\t * @param id The id of the proof to verify.\n\t * @returns The result of the verification and any failures.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tverify(id: string): Promise<IImmutableProofVerification>;\n\n\t/**\n\t * Remove the verifiable storage for the proof.\n\t * @param id The id of the proof to remove the storage from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tremoveVerifiable(id: string): Promise<void>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IImmutableProofCreateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\n\n/**\n * Create a proof.\n */\nexport interface IImmutableProofCreateRequest {\n\t/**\n\t * The parameters from the body.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The document to create the proof for.\n\t\t */\n\t\tdocument: IJsonLdNodeObject;\n\t};\n}\n"]}
1
+ {"version":3,"file":"IImmutableProofCreateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\n\n/**\n * Create a proof.\n */\nexport interface IImmutableProofCreateRequest {\n\t/**\n\t * The parameters from the body.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The document to create the proof for.\n\t\t */\n\t\tdocument: IJsonLdNodeObject;\n\n\t\t/**\n\t\t * Optional settings for the proof.\n\t\t */\n\t\toptions?: {\n\t\t\t/**\n\t\t\t * An ISO 8601 date-time string specifying when the notarization lock expires.\n\t\t\t * If omitted, no deletion lock is applied.\n\t\t\t */\n\t\t\tdeleteLock?: string;\n\t\t};\n\t};\n}\n"]}
@@ -9,10 +9,6 @@ export const ImmutableProofTypes = {
9
9
  * Represents Immutable Proof.
10
10
  */
11
11
  ImmutableProof: "ImmutableProof",
12
- /**
13
- * Represents Immutable Proof Receipt.
14
- */
15
- ImmutableProofReceipt: "ImmutableProofReceipt",
16
12
  /**
17
13
  * Represents Immutable Proof Verification.
18
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"immutableProofTypes.js","sourceRoot":"","sources":["../../../src/models/immutableProofTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC;;OAEG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;OAEG;IACH,qBAAqB,EAAE,uBAAuB;IAE9C;;OAEG;IACH,0BAA0B,EAAE,4BAA4B;IAExD;;OAEG;IACH,qBAAqB,EAAE,uBAAuB;CACrC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types of immutable proof data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ImmutableProofTypes = {\n\t/**\n\t * Represents Immutable Proof.\n\t */\n\tImmutableProof: \"ImmutableProof\",\n\n\t/**\n\t * Represents Immutable Proof Receipt.\n\t */\n\tImmutableProofReceipt: \"ImmutableProofReceipt\",\n\n\t/**\n\t * Represents Immutable Proof Verification.\n\t */\n\tImmutableProofVerification: \"ImmutableProofVerification\",\n\n\t/**\n\t * Represents Immutable Proof Failure.\n\t */\n\tImmutableProofFailure: \"ImmutableProofFailure\"\n} as const;\n\n/**\n * The types of immutable proof data.\n */\nexport type ImmutableProofTypes = (typeof ImmutableProofTypes)[keyof typeof ImmutableProofTypes];\n"]}
1
+ {"version":3,"file":"immutableProofTypes.js","sourceRoot":"","sources":["../../../src/models/immutableProofTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC;;OAEG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;OAEG;IACH,0BAA0B,EAAE,4BAA4B;IAExD;;OAEG;IACH,qBAAqB,EAAE,uBAAuB;CACrC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types of immutable proof data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ImmutableProofTypes = {\n\t/**\n\t * Represents Immutable Proof.\n\t */\n\tImmutableProof: \"ImmutableProof\",\n\n\t/**\n\t * Represents Immutable Proof Verification.\n\t */\n\tImmutableProofVerification: \"ImmutableProofVerification\",\n\n\t/**\n\t * Represents Immutable Proof Failure.\n\t */\n\tImmutableProofFailure: \"ImmutableProofFailure\"\n} as const;\n\n/**\n * The types of immutable proof data.\n */\nexport type ImmutableProofTypes = (typeof ImmutableProofTypes)[keyof typeof ImmutableProofTypes];\n"]}
@@ -3,7 +3,7 @@
3
3
  "$id": "https://schema.twindev.org/immutable-proof/ImmutableProofFailure",
4
4
  "title": "ImmutableProofFailure",
5
5
  "description": "The failure reason of the proof.",
6
- "oneOf": [
6
+ "anyOf": [
7
7
  {
8
8
  "const": "notIssued",
9
9
  "description": "Proof not yet issued."
@@ -7,7 +7,6 @@ export * from "./models/api/IImmutableProofVerifyResponse.js";
7
7
  export * from "./models/eventBus/IImmutableProofEventBusProofCreated.js";
8
8
  export * from "./models/IImmutableProof.js";
9
9
  export * from "./models/IImmutableProofComponent.js";
10
- export * from "./models/IImmutableProofReceipt.js";
11
10
  export * from "./models/IImmutableProofVerification.js";
12
11
  export * from "./models/immutableProofContexts.js";
13
12
  export * from "./models/immutableProofFailure.js";
@@ -9,9 +9,13 @@ export interface IImmutableProofComponent extends IComponent {
9
9
  /**
10
10
  * Create a new proof.
11
11
  * @param document The document to create the proof for.
12
+ * @param options Optional settings for the proof.
13
+ * @param options.deleteLock An ISO 8601 date-time string specifying when the notarization lock expires; if omitted no lock is applied.
12
14
  * @returns The id of the new proof.
13
15
  */
14
- create(document: IJsonLdNodeObject): Promise<string>;
16
+ create(document: IJsonLdNodeObject, options?: {
17
+ deleteLock?: string;
18
+ }): Promise<string>;
15
19
  /**
16
20
  * Get a proof.
17
21
  * @param id The id of the proof to get.
@@ -11,5 +11,15 @@ export interface IImmutableProofCreateRequest {
11
11
  * The document to create the proof for.
12
12
  */
13
13
  document: IJsonLdNodeObject;
14
+ /**
15
+ * Optional settings for the proof.
16
+ */
17
+ options?: {
18
+ /**
19
+ * An ISO 8601 date-time string specifying when the notarization lock expires.
20
+ * If omitted, no deletion lock is applied.
21
+ */
22
+ deleteLock?: string;
23
+ };
14
24
  };
15
25
  }
@@ -6,10 +6,6 @@ export declare const ImmutableProofTypes: {
6
6
  * Represents Immutable Proof.
7
7
  */
8
8
  readonly ImmutableProof: "ImmutableProof";
9
- /**
10
- * Represents Immutable Proof Receipt.
11
- */
12
- readonly ImmutableProofReceipt: "ImmutableProofReceipt";
13
9
  /**
14
10
  * Represents Immutable Proof Verification.
15
11
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.14](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-models-v0.0.3-next.13...immutable-proof-models-v0.0.3-next.14) (2026-05-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * 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))
9
+
10
+ ## [0.0.3-next.13](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-models-v0.0.3-next.12...immutable-proof-models-v0.0.3-next.13) (2026-05-20)
11
+
12
+
13
+ ### Features
14
+
15
+ * update dependencies ([1ec6b18](https://github.com/iotaledger/twin-immutable-proof/commit/1ec6b18e93198a8fc4935700863cdab1c3df7b64))
16
+
3
17
  ## [0.0.3-next.12](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-models-v0.0.3-next.11...immutable-proof-models-v0.0.3-next.12) (2026-05-12)
4
18
 
5
19
 
@@ -8,7 +8,6 @@
8
8
 
9
9
  - [IImmutableProof](interfaces/IImmutableProof.md)
10
10
  - [IImmutableProofComponent](interfaces/IImmutableProofComponent.md)
11
- - [IImmutableProofReceipt](interfaces/IImmutableProofReceipt.md)
12
11
  - [IImmutableProofVerification](interfaces/IImmutableProofVerification.md)
13
12
  - [IImmutableProofCreateRequest](interfaces/IImmutableProofCreateRequest.md)
14
13
  - [IImmutableProofGetRequest](interfaces/IImmutableProofGetRequest.md)
@@ -10,7 +10,7 @@ Interface describing an immutable proof contract.
10
10
 
11
11
  ### create() {#create}
12
12
 
13
- > **create**(`document`): `Promise`\<`string`\>
13
+ > **create**(`document`, `options?`): `Promise`\<`string`\>
14
14
 
15
15
  Create a new proof.
16
16
 
@@ -22,6 +22,16 @@ Create a new proof.
22
22
 
23
23
  The document to create the proof for.
24
24
 
25
+ ##### options?
26
+
27
+ Optional settings for the proof.
28
+
29
+ ###### deleteLock?
30
+
31
+ `string`
32
+
33
+ An ISO 8601 date-time string specifying when the notarization lock expires; if omitted no lock is applied.
34
+
25
35
  #### Returns
26
36
 
27
37
  `Promise`\<`string`\>
@@ -15,3 +15,16 @@ The parameters from the body.
15
15
  > **document**: `IJsonLdNodeObject`
16
16
 
17
17
  The document to create the proof for.
18
+
19
+ #### options?
20
+
21
+ > `optional` **options?**: `object`
22
+
23
+ Optional settings for the proof.
24
+
25
+ ##### options.deleteLock?
26
+
27
+ > `optional` **deleteLock?**: `string`
28
+
29
+ An ISO 8601 date-time string specifying when the notarization lock expires.
30
+ If omitted, no deletion lock is applied.
@@ -12,12 +12,6 @@ The types of immutable proof data.
12
12
 
13
13
  Represents Immutable Proof.
14
14
 
15
- ### ImmutableProofReceipt {#immutableproofreceipt}
16
-
17
- > `readonly` **ImmutableProofReceipt**: `"ImmutableProofReceipt"` = `"ImmutableProofReceipt"`
18
-
19
- Represents Immutable Proof Receipt.
20
-
21
15
  ### ImmutableProofVerification {#immutableproofverification}
22
16
 
23
17
  > `readonly` **ImmutableProofVerification**: `"ImmutableProofVerification"` = `"ImmutableProofVerification"`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-models",
3
- "version": "0.0.3-next.12",
3
+ "version": "0.0.3-next.14",
4
4
  "description": "Shared model contracts, schema types, and context constants for immutable proof workflows",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IImmutableProofReceipt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IImmutableProofReceipt.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofReceipt.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { ImmutableProofContexts } from \"./immutableProofContexts.js\";\nimport type { ImmutableProofTypes } from \"./immutableProofTypes.js\";\n\n/**\n * Interface describing an immutable proof receipt.\n */\nexport interface IImmutableProofReceipt {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?: [typeof ImmutableProofContexts.Context, typeof ImmutableProofContexts.ContextCommon];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof ImmutableProofTypes.ImmutableProofReceipt;\n\n\t/**\n\t * The immutable receipt detail for where the proof is stored.\n\t * @json-ld id\n\t */\n\timmutableReceipt?: IJsonLdNodeObject;\n\n\t/**\n\t * The verifiable storage id for where the proof is stored.\n\t * @json-ld id\n\t */\n\tverifiableStorageId?: string;\n}\n"]}
@@ -1,39 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schema.twindev.org/immutable-proof/ImmutableProofReceipt",
4
- "title": "ImmutableProofReceipt",
5
- "description": "Interface describing an immutable proof receipt.",
6
- "type": "object",
7
- "properties": {
8
- "@context": {
9
- "type": "array",
10
- "prefixItems": [
11
- {
12
- "const": "https://schema.twindev.org/immutable-proof/"
13
- },
14
- {
15
- "const": "https://schema.twindev.org/common/"
16
- }
17
- ],
18
- "items": false,
19
- "minItems": 2,
20
- "maxItems": 2,
21
- "description": "JSON-LD Context."
22
- },
23
- "type": {
24
- "const": "ImmutableProofReceipt",
25
- "description": "JSON-LD Type."
26
- },
27
- "immutableReceipt": {
28
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
29
- "description": "The immutable receipt detail for where the proof is stored."
30
- },
31
- "verifiableStorageId": {
32
- "type": "string",
33
- "description": "The verifiable storage id for where the proof is stored."
34
- }
35
- },
36
- "required": [
37
- "type"
38
- ]
39
- }
@@ -1,26 +0,0 @@
1
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
- import type { ImmutableProofContexts } from "./immutableProofContexts.js";
3
- import type { ImmutableProofTypes } from "./immutableProofTypes.js";
4
- /**
5
- * Interface describing an immutable proof receipt.
6
- */
7
- export interface IImmutableProofReceipt {
8
- /**
9
- * JSON-LD Context.
10
- */
11
- "@context"?: [typeof ImmutableProofContexts.Context, typeof ImmutableProofContexts.ContextCommon];
12
- /**
13
- * JSON-LD Type.
14
- */
15
- type: typeof ImmutableProofTypes.ImmutableProofReceipt;
16
- /**
17
- * The immutable receipt detail for where the proof is stored.
18
- * @json-ld id
19
- */
20
- immutableReceipt?: IJsonLdNodeObject;
21
- /**
22
- * The verifiable storage id for where the proof is stored.
23
- * @json-ld id
24
- */
25
- verifiableStorageId?: string;
26
- }
@@ -1,35 +0,0 @@
1
- # Interface: IImmutableProofReceipt
2
-
3
- Interface describing an immutable proof receipt.
4
-
5
- ## Properties
6
-
7
- ### @context? {#context}
8
-
9
- > `optional` **@context?**: \[`"https://schema.twindev.org/immutable-proof/"`, `"https://schema.twindev.org/common/"`\]
10
-
11
- JSON-LD Context.
12
-
13
- ***
14
-
15
- ### type {#type}
16
-
17
- > **type**: `"ImmutableProofReceipt"`
18
-
19
- JSON-LD Type.
20
-
21
- ***
22
-
23
- ### immutableReceipt? {#immutablereceipt}
24
-
25
- > `optional` **immutableReceipt?**: `IJsonLdNodeObject`
26
-
27
- The immutable receipt detail for where the proof is stored.
28
-
29
- ***
30
-
31
- ### verifiableStorageId? {#verifiablestorageid}
32
-
33
- > `optional` **verifiableStorageId?**: `string`
34
-
35
- The verifiable storage id for where the proof is stored.