@twin.org/immutable-proof-models 0.0.3-next.1 → 0.0.3-next.10

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.
Files changed (37) hide show
  1. package/dist/es/dataTypes/immutableProofDataTypes.js +2 -2
  2. package/dist/es/dataTypes/immutableProofDataTypes.js.map +1 -1
  3. package/dist/es/index.js +1 -0
  4. package/dist/es/index.js.map +1 -1
  5. package/dist/es/models/IImmutableProof.js.map +1 -1
  6. package/dist/es/models/IImmutableProofComponent.js.map +1 -1
  7. package/dist/es/models/IImmutableProofReceipt.js +2 -0
  8. package/dist/es/models/IImmutableProofReceipt.js.map +1 -0
  9. package/dist/es/models/IImmutableProofVerification.js.map +1 -1
  10. package/dist/es/models/api/IImmutableProofGetResponse.js.map +1 -1
  11. package/dist/es/models/immutableProofContexts.js +20 -4
  12. package/dist/es/models/immutableProofContexts.js.map +1 -1
  13. package/dist/es/models/immutableProofFailure.js +4 -8
  14. package/dist/es/models/immutableProofFailure.js.map +1 -1
  15. package/dist/es/models/immutableProofTypes.js +4 -0
  16. package/dist/es/models/immutableProofTypes.js.map +1 -1
  17. package/dist/es/schemas/ImmutableProof.json +16 -38
  18. package/dist/types/index.d.ts +1 -0
  19. package/dist/types/models/IImmutableProof.d.ts +6 -27
  20. package/dist/types/models/IImmutableProofComponent.d.ts +2 -2
  21. package/dist/types/models/IImmutableProofReceipt.d.ts +26 -0
  22. package/dist/types/models/IImmutableProofVerification.d.ts +3 -1
  23. package/dist/types/models/api/IImmutableProofGetResponse.d.ts +2 -2
  24. package/dist/types/models/immutableProofContexts.d.ts +20 -4
  25. package/dist/types/models/immutableProofFailure.d.ts +4 -8
  26. package/dist/types/models/immutableProofTypes.d.ts +4 -0
  27. package/docs/changelog.md +63 -0
  28. package/docs/reference/index.md +1 -0
  29. package/docs/reference/interfaces/IImmutableProof.md +10 -41
  30. package/docs/reference/interfaces/IImmutableProofComponent.md +2 -2
  31. package/docs/reference/interfaces/IImmutableProofGetResponse.md +1 -1
  32. package/docs/reference/interfaces/IImmutableProofReceipt.md +37 -0
  33. package/docs/reference/interfaces/IImmutableProofVerification.md +2 -0
  34. package/docs/reference/variables/ImmutableProofContexts.md +30 -6
  35. package/docs/reference/variables/ImmutableProofFailure.md +6 -12
  36. package/docs/reference/variables/ImmutableProofTypes.md +6 -0
  37. package/package.json +1 -1
@@ -12,8 +12,8 @@ export class ImmutableProofDataTypes {
12
12
  * Register all the data types.
13
13
  */
14
14
  static registerTypes() {
15
- DataTypeHandlerFactory.register(`${ImmutableProofContexts.ContextRoot}${ImmutableProofTypes.ImmutableProof}`, () => ({
16
- context: ImmutableProofContexts.ContextRoot,
15
+ DataTypeHandlerFactory.register(`${ImmutableProofContexts.Namespace}${ImmutableProofTypes.ImmutableProof}`, () => ({
16
+ namespace: ImmutableProofContexts.Namespace,
17
17
  type: ImmutableProofTypes.ImmutableProof,
18
18
  defaultValue: {},
19
19
  jsonSchema: async () => ImmutableProofSchema
@@ -1 +1 @@
1
- {"version":3,"file":"immutableProofDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/immutableProofDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,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;AAExF;;GAEG;AACH,MAAM,OAAO,uBAAuB;IACnC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,sBAAsB,CAAC,WAAW,GAAG,mBAAmB,CAAC,cAAc,EAAE,EAC5E,GAAG,EAAE,CAAC,CAAC;YACN,OAAO,EAAE,sBAAsB,CAAC,WAAW;YAC3C,IAAI,EAAE,mBAAmB,CAAC,cAAc;YACxC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,oBAAmC;SAC3D,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory, type IJsonSchema } 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\" };\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\tDataTypeHandlerFactory.register(\n\t\t\t`${ImmutableProofContexts.ContextRoot}${ImmutableProofTypes.ImmutableProof}`,\n\t\t\t() => ({\n\t\t\t\tcontext: ImmutableProofContexts.ContextRoot,\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProof,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => ImmutableProofSchema as IJsonSchema\n\t\t\t})\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,sBAAsB,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,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;AAExF;;GAEG;AACH,MAAM,OAAO,uBAAuB;IACnC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,sBAAsB,CAAC,SAAS,GAAG,mBAAmB,CAAC,cAAc,EAAE,EAC1E,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,sBAAsB,CAAC,SAAS;YAC3C,IAAI,EAAE,mBAAmB,CAAC,cAAc;YACxC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,oBAAmC;SAC3D,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory, type IJsonSchema } 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\" };\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\tDataTypeHandlerFactory.register(\n\t\t\t`${ImmutableProofContexts.Namespace}${ImmutableProofTypes.ImmutableProof}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: ImmutableProofContexts.Namespace,\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProof,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => ImmutableProofSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
package/dist/es/index.js CHANGED
@@ -9,6 +9,7 @@ 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";
12
13
  export * from "./models/IImmutableProofVerification.js";
13
14
  export * from "./models/immutableProofContexts.js";
14
15
  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,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
+ {"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 +1 @@
1
- {"version":3,"file":"IImmutableProof.js","sourceRoot":"","sources":["../../../src/models/IImmutableProof.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IDataIntegrityProof } from \"@twin.org/standards-w3c-did\";\nimport type { ImmutableProofContexts } from \"./immutableProofContexts.js\";\nimport type { ImmutableProofTypes } from \"./immutableProofTypes.js\";\n\n/**\n * Interface describing an immutable proof state.\n */\nexport interface IImmutableProof {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof ImmutableProofContexts.ContextRoot,\n\t\ttypeof ImmutableProofContexts.ContextRootCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof ImmutableProofTypes.ImmutableProof;\n\n\t/**\n\t * The id of the proof.\n\t */\n\tid: string;\n\n\t/**\n\t * The id of the object associated with the proof.\n\t */\n\tproofObjectId?: string;\n\n\t/**\n\t * The hash of the object associated with the proof.\n\t */\n\tproofObjectHash: string;\n\n\t/**\n\t * The verifiable storage id for where the proof is stored.\n\t */\n\tverifiableStorageId?: string;\n\n\t/**\n\t * The proof which can be undefined if it has not yet been issued.\n\t */\n\tproof?: IDataIntegrityProof;\n\n\t/**\n\t * The immutable receipt detail for where the proof is stored.\n\t */\n\timmutableReceipt?: IJsonLdNodeObject;\n}\n"]}
1
+ {"version":3,"file":"IImmutableProof.js","sourceRoot":"","sources":["../../../src/models/IImmutableProof.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ImmutableProofContexts } from \"./immutableProofContexts.js\";\nimport type { ImmutableProofTypes } from \"./immutableProofTypes.js\";\n\n/**\n * Interface describing an immutable proof state.\n */\nexport interface IImmutableProof {\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.ImmutableProof;\n\n\t/**\n\t * The id of the object associated with the proof.\n\t */\n\tid?: string;\n\n\t/**\n\t * The integrity hash of the object associated with the proof.\n\t * json-ld namespace:twin-common\n\t */\n\tproofIntegrity: string;\n}\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 { IImmutableProof } from \"./IImmutableProof.js\";\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<IImmutableProof>;\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 * @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"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IImmutableProofReceipt.js.map
@@ -0,0 +1 @@
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 +1 @@
1
- {"version":3,"file":"IImmutableProofVerification.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofVerification.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ImmutableProofContexts } from \"./immutableProofContexts.js\";\nimport type { ImmutableProofFailure } from \"./immutableProofFailure.js\";\nimport type { ImmutableProofTypes } from \"./immutableProofTypes.js\";\n\n/**\n * Interface describing an immutable proof verification.\n */\nexport interface IImmutableProofVerification {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": typeof ImmutableProofContexts.ContextRoot;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof ImmutableProofTypes.ImmutableProofVerification;\n\n\t/**\n\t * Was the verification successful.\n\t */\n\tverified: boolean;\n\n\t/**\n\t * If the verification was unsuccessful the failure reason.\n\t */\n\tfailure?: ImmutableProofFailure;\n}\n"]}
1
+ {"version":3,"file":"IImmutableProofVerification.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofVerification.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ImmutableProofContexts } from \"./immutableProofContexts.js\";\nimport type { ImmutableProofFailure } from \"./immutableProofFailure.js\";\nimport type { ImmutableProofTypes } from \"./immutableProofTypes.js\";\n\n/**\n * Interface describing an immutable proof verification.\n */\nexport interface IImmutableProofVerification {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": typeof ImmutableProofContexts.Context;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof ImmutableProofTypes.ImmutableProofVerification;\n\n\t/**\n\t * Was the verification successful.\n\t * json-ld namespace:twin-common\n\t */\n\tverified: boolean;\n\n\t/**\n\t * If the verification was unsuccessful the failure reason.\n\t * json-ld type:schema:Text\n\t */\n\tfailure?: ImmutableProofFailure;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IImmutableProofGetResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofGetResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\nimport type { IImmutableProof } from \"../IImmutableProof.js\";\n\n/**\n * Response to getting an immutable proof.\n */\nexport interface IImmutableProofGetResponse {\n\t/**\n\t * The headers which can be used to determine the response data type.\n\t */\n\theaders?: {\n\t\t[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;\n\t};\n\n\t/**\n\t * The response body.\n\t */\n\tbody: IImmutableProof;\n}\n"]}
1
+ {"version":3,"file":"IImmutableProofGetResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofGetResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IDidVerifiableCredential } from \"@twin.org/standards-w3c-did\";\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Response to getting an immutable proof.\n */\nexport interface IImmutableProofGetResponse {\n\t/**\n\t * The headers which can be used to determine the response data type.\n\t */\n\theaders?: {\n\t\t[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;\n\t};\n\n\t/**\n\t * The response body.\n\t */\n\tbody: IDidVerifiableCredential;\n}\n"]}
@@ -6,12 +6,28 @@
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
7
  export const ImmutableProofContexts = {
8
8
  /**
9
- * The context root for the immutable proof types.
9
+ * The canonical RDF namespace URI for Immutable Proof.
10
10
  */
11
- ContextRoot: "https://schema.twindev.org/immutable-proof/",
11
+ Namespace: "https://schema.twindev.org/immutable-proof/",
12
12
  /**
13
- * The context root for the common types.
13
+ * The value to use in context for Immutable Proof.
14
14
  */
15
- ContextRootCommon: "https://schema.twindev.org/common/"
15
+ Context: "https://schema.twindev.org/immutable-proof/",
16
+ /**
17
+ * The JSON-LD Context URL for Immutable Proof.
18
+ */
19
+ JsonLdContext: "https://schema.twindev.org/immutable-proof/types.jsonld",
20
+ /**
21
+ * The canonical RDF namespace URI for TWIN Common.
22
+ */
23
+ NamespaceCommon: "https://schema.twindev.org/common/",
24
+ /**
25
+ * The value to use in JSON-LD context for TWIN Common.
26
+ */
27
+ ContextCommon: "https://schema.twindev.org/common/",
28
+ /**
29
+ * The JSON-LD Context URL for TWIN Common.
30
+ */
31
+ JsonLdContextCommon: "https://schema.twindev.org/common/types.jsonld"
16
32
  };
17
33
  //# sourceMappingURL=immutableProofContexts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"immutableProofContexts.js","sourceRoot":"","sources":["../../../src/models/immutableProofContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,WAAW,EAAE,6CAA6C;IAE1D;;OAEG;IACH,iBAAiB,EAAE,oCAAoC;CAC9C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of immutable proof data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ImmutableProofContexts = {\n\t/**\n\t * The context root for the immutable proof types.\n\t */\n\tContextRoot: \"https://schema.twindev.org/immutable-proof/\",\n\n\t/**\n\t * The context root for the common types.\n\t */\n\tContextRootCommon: \"https://schema.twindev.org/common/\"\n} as const;\n\n/**\n * The contexts of immutable proof data.\n */\nexport type ImmutableProofContexts =\n\t(typeof ImmutableProofContexts)[keyof typeof ImmutableProofContexts];\n"]}
1
+ {"version":3,"file":"immutableProofContexts.js","sourceRoot":"","sources":["../../../src/models/immutableProofContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,SAAS,EAAE,6CAA6C;IAExD;;OAEG;IACH,OAAO,EAAE,6CAA6C;IAEtD;;OAEG;IACH,aAAa,EAAE,yDAAyD;IAExE;;OAEG;IACH,eAAe,EAAE,oCAAoC;IAErD;;OAEG;IACH,aAAa,EAAE,oCAAoC;IAEnD;;OAEG;IACH,mBAAmB,EAAE,gDAAgD;CAC5D,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of immutable proof data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ImmutableProofContexts = {\n\t/**\n\t * The canonical RDF namespace URI for Immutable Proof.\n\t */\n\tNamespace: \"https://schema.twindev.org/immutable-proof/\",\n\n\t/**\n\t * The value to use in context for Immutable Proof.\n\t */\n\tContext: \"https://schema.twindev.org/immutable-proof/\",\n\n\t/**\n\t * The JSON-LD Context URL for Immutable Proof.\n\t */\n\tJsonLdContext: \"https://schema.twindev.org/immutable-proof/types.jsonld\",\n\n\t/**\n\t * The canonical RDF namespace URI for TWIN Common.\n\t */\n\tNamespaceCommon: \"https://schema.twindev.org/common/\",\n\n\t/**\n\t * The value to use in JSON-LD context for TWIN Common.\n\t */\n\tContextCommon: \"https://schema.twindev.org/common/\",\n\n\t/**\n\t * The JSON-LD Context URL for TWIN Common.\n\t */\n\tJsonLdContextCommon: \"https://schema.twindev.org/common/types.jsonld\"\n} as const;\n\n/**\n * The contexts of immutable proof data.\n */\nexport type ImmutableProofContexts =\n\t(typeof ImmutableProofContexts)[keyof typeof ImmutableProofContexts];\n"]}
@@ -14,16 +14,12 @@ export const ImmutableProofFailure = {
14
14
  */
15
15
  ProofMissing: "proofMissing",
16
16
  /**
17
- * Crypto suite mismatch.
17
+ * Verification failure.
18
18
  */
19
- CryptoSuiteMismatch: "cryptoSuiteMismatch",
19
+ VerificationFailure: "verificationFailure",
20
20
  /**
21
- * Proof type.
21
+ * Revoked.
22
22
  */
23
- ProofTypeMismatch: "proofTypeMismatch",
24
- /**
25
- * Signature mismatch.
26
- */
27
- SignatureMismatch: "signatureMismatch"
23
+ Revoked: "revoked"
28
24
  };
29
25
  //# sourceMappingURL=immutableProofFailure.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"immutableProofFailure.js","sourceRoot":"","sources":["../../../src/models/immutableProofFailure.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;IAEtC;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;CAC7B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The failure reason of the proof.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ImmutableProofFailure = {\n\t/**\n\t * Proof not yet issued.\n\t */\n\tNotIssued: \"notIssued\",\n\n\t/**\n\t * Proof missing.\n\t */\n\tProofMissing: \"proofMissing\",\n\n\t/**\n\t * Crypto suite mismatch.\n\t */\n\tCryptoSuiteMismatch: \"cryptoSuiteMismatch\",\n\n\t/**\n\t * Proof type.\n\t */\n\tProofTypeMismatch: \"proofTypeMismatch\",\n\n\t/**\n\t * Signature mismatch.\n\t */\n\tSignatureMismatch: \"signatureMismatch\"\n} as const;\n\n/**\n * The failure reason of the proof.\n */\nexport type ImmutableProofFailure =\n\t(typeof ImmutableProofFailure)[keyof typeof ImmutableProofFailure];\n"]}
1
+ {"version":3,"file":"immutableProofFailure.js","sourceRoot":"","sources":["../../../src/models/immutableProofFailure.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The failure reason of the proof.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ImmutableProofFailure = {\n\t/**\n\t * Proof not yet issued.\n\t */\n\tNotIssued: \"notIssued\",\n\n\t/**\n\t * Proof missing.\n\t */\n\tProofMissing: \"proofMissing\",\n\n\t/**\n\t * Verification failure.\n\t */\n\tVerificationFailure: \"verificationFailure\",\n\n\t/**\n\t * Revoked.\n\t */\n\tRevoked: \"revoked\"\n} as const;\n\n/**\n * The failure reason of the proof.\n */\nexport type ImmutableProofFailure =\n\t(typeof ImmutableProofFailure)[keyof typeof ImmutableProofFailure];\n"]}
@@ -9,6 +9,10 @@ export const ImmutableProofTypes = {
9
9
  * Represents Immutable Proof.
10
10
  */
11
11
  ImmutableProof: "ImmutableProof",
12
+ /**
13
+ * Represents Immutable Proof Receipt.
14
+ */
15
+ ImmutableProofReceipt: "ImmutableProofReceipt",
12
16
  /**
13
17
  * Represents Immutable Proof Verification.
14
18
  */
@@ -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,0BAA0B,EAAE,4BAA4B;CAC/C,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} 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,qBAAqB,EAAE,uBAAuB;IAE9C;;OAEG;IACH,0BAA0B,EAAE,4BAA4B;CAC/C,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} as const;\n\n/**\n * The types of immutable proof data.\n */\nexport type ImmutableProofTypes = (typeof ImmutableProofTypes)[keyof typeof ImmutableProofTypes];\n"]}
@@ -6,21 +6,19 @@
6
6
  "properties": {
7
7
  "@context": {
8
8
  "type": "array",
9
- "minItems": 2,
10
- "description": "JSON-LD Context.",
11
- "prefixItems": [
12
- {
13
- "type": "string",
14
- "const": "https://schema.twindev.org/immutable-proof/"
15
- },
16
- {
17
- "type": "string",
18
- "const": "https://schema.twindev.org/common/"
19
- }
20
- ],
21
9
  "items": {
22
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
23
- }
10
+ "allOf": [
11
+ {
12
+ "type": "string",
13
+ "const": "https://schema.twindev.org/immutable-proof/"
14
+ },
15
+ {
16
+ "type": "string",
17
+ "const": "https://schema.twindev.org/common/"
18
+ }
19
+ ]
20
+ },
21
+ "description": "JSON-LD Context."
24
22
  },
25
23
  "type": {
26
24
  "type": "string",
@@ -28,35 +26,15 @@
28
26
  "description": "JSON-LD Type."
29
27
  },
30
28
  "id": {
31
- "type": "string",
32
- "description": "The id of the proof."
33
- },
34
- "proofObjectId": {
35
29
  "type": "string",
36
30
  "description": "The id of the object associated with the proof."
37
31
  },
38
- "proofObjectHash": {
39
- "type": "string",
40
- "description": "The hash of the object associated with the proof."
41
- },
42
- "verifiableStorageId": {
32
+ "proofIntegrity": {
43
33
  "type": "string",
44
- "description": "The verifiable storage id for where the proof is stored."
45
- },
46
- "proof": {
47
- "$ref": "https://schema.twindev.org/w3c-did/DataIntegrityProof",
48
- "description": "The proof which can be undefined if it has not yet been issued."
49
- },
50
- "immutableReceipt": {
51
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
52
- "description": "The immutable receipt detail for where the proof is stored."
34
+ "description": "The integrity hash of the object associated with the proof. json-ld namespace:twin-common"
53
35
  }
54
36
  },
55
37
  "required": [
56
- "@context",
57
- "type",
58
- "id",
59
- "proofObjectHash"
60
- ],
61
- "additionalProperties": false
38
+ "proofIntegrity"
39
+ ]
62
40
  }
@@ -7,6 +7,7 @@ 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";
10
11
  export * from "./models/IImmutableProofVerification.js";
11
12
  export * from "./models/immutableProofContexts.js";
12
13
  export * from "./models/immutableProofFailure.js";
@@ -1,5 +1,3 @@
1
- import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
- import type { IDataIntegrityProof } from "@twin.org/standards-w3c-did";
3
1
  import type { ImmutableProofContexts } from "./immutableProofContexts.js";
4
2
  import type { ImmutableProofTypes } from "./immutableProofTypes.js";
5
3
  /**
@@ -9,37 +7,18 @@ export interface IImmutableProof {
9
7
  /**
10
8
  * JSON-LD Context.
11
9
  */
12
- "@context": [
13
- typeof ImmutableProofContexts.ContextRoot,
14
- typeof ImmutableProofContexts.ContextRootCommon,
15
- ...IJsonLdContextDefinitionElement[]
16
- ];
10
+ "@context"?: [typeof ImmutableProofContexts.Context, typeof ImmutableProofContexts.ContextCommon];
17
11
  /**
18
12
  * JSON-LD Type.
19
13
  */
20
- type: typeof ImmutableProofTypes.ImmutableProof;
21
- /**
22
- * The id of the proof.
23
- */
24
- id: string;
14
+ type?: typeof ImmutableProofTypes.ImmutableProof;
25
15
  /**
26
16
  * The id of the object associated with the proof.
27
17
  */
28
- proofObjectId?: string;
29
- /**
30
- * The hash of the object associated with the proof.
31
- */
32
- proofObjectHash: string;
33
- /**
34
- * The verifiable storage id for where the proof is stored.
35
- */
36
- verifiableStorageId?: string;
37
- /**
38
- * The proof which can be undefined if it has not yet been issued.
39
- */
40
- proof?: IDataIntegrityProof;
18
+ id?: string;
41
19
  /**
42
- * The immutable receipt detail for where the proof is stored.
20
+ * The integrity hash of the object associated with the proof.
21
+ * json-ld namespace:twin-common
43
22
  */
44
- immutableReceipt?: IJsonLdNodeObject;
23
+ proofIntegrity: string;
45
24
  }
@@ -1,6 +1,6 @@
1
1
  import type { IComponent } from "@twin.org/core";
2
2
  import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
3
- import type { IImmutableProof } from "./IImmutableProof.js";
3
+ import type { IDidVerifiableCredential } from "@twin.org/standards-w3c-did";
4
4
  import type { IImmutableProofVerification } from "./IImmutableProofVerification.js";
5
5
  /**
6
6
  * Interface describing an immutable proof contract.
@@ -18,7 +18,7 @@ export interface IImmutableProofComponent extends IComponent {
18
18
  * @returns The proof.
19
19
  * @throws NotFoundError if the proof is not found.
20
20
  */
21
- get(id: string): Promise<IImmutableProof>;
21
+ get(id: string): Promise<IDidVerifiableCredential>;
22
22
  /**
23
23
  * Verify a proof.
24
24
  * @param id The id of the proof to verify.
@@ -0,0 +1,26 @@
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
+ }
@@ -8,17 +8,19 @@ export interface IImmutableProofVerification {
8
8
  /**
9
9
  * JSON-LD Context.
10
10
  */
11
- "@context": typeof ImmutableProofContexts.ContextRoot;
11
+ "@context": typeof ImmutableProofContexts.Context;
12
12
  /**
13
13
  * JSON-LD Type.
14
14
  */
15
15
  type: typeof ImmutableProofTypes.ImmutableProofVerification;
16
16
  /**
17
17
  * Was the verification successful.
18
+ * json-ld namespace:twin-common
18
19
  */
19
20
  verified: boolean;
20
21
  /**
21
22
  * If the verification was unsuccessful the failure reason.
23
+ * json-ld type:schema:Text
22
24
  */
23
25
  failure?: ImmutableProofFailure;
24
26
  }
@@ -1,5 +1,5 @@
1
+ import type { IDidVerifiableCredential } from "@twin.org/standards-w3c-did";
1
2
  import type { HeaderTypes, MimeTypes } from "@twin.org/web";
2
- import type { IImmutableProof } from "../IImmutableProof.js";
3
3
  /**
4
4
  * Response to getting an immutable proof.
5
5
  */
@@ -13,5 +13,5 @@ export interface IImmutableProofGetResponse {
13
13
  /**
14
14
  * The response body.
15
15
  */
16
- body: IImmutableProof;
16
+ body: IDidVerifiableCredential;
17
17
  }
@@ -3,13 +3,29 @@
3
3
  */
4
4
  export declare const ImmutableProofContexts: {
5
5
  /**
6
- * The context root for the immutable proof types.
6
+ * The canonical RDF namespace URI for Immutable Proof.
7
7
  */
8
- readonly ContextRoot: "https://schema.twindev.org/immutable-proof/";
8
+ readonly Namespace: "https://schema.twindev.org/immutable-proof/";
9
9
  /**
10
- * The context root for the common types.
10
+ * The value to use in context for Immutable Proof.
11
11
  */
12
- readonly ContextRootCommon: "https://schema.twindev.org/common/";
12
+ readonly Context: "https://schema.twindev.org/immutable-proof/";
13
+ /**
14
+ * The JSON-LD Context URL for Immutable Proof.
15
+ */
16
+ readonly JsonLdContext: "https://schema.twindev.org/immutable-proof/types.jsonld";
17
+ /**
18
+ * The canonical RDF namespace URI for TWIN Common.
19
+ */
20
+ readonly NamespaceCommon: "https://schema.twindev.org/common/";
21
+ /**
22
+ * The value to use in JSON-LD context for TWIN Common.
23
+ */
24
+ readonly ContextCommon: "https://schema.twindev.org/common/";
25
+ /**
26
+ * The JSON-LD Context URL for TWIN Common.
27
+ */
28
+ readonly JsonLdContextCommon: "https://schema.twindev.org/common/types.jsonld";
13
29
  };
14
30
  /**
15
31
  * The contexts of immutable proof data.
@@ -11,17 +11,13 @@ export declare const ImmutableProofFailure: {
11
11
  */
12
12
  readonly ProofMissing: "proofMissing";
13
13
  /**
14
- * Crypto suite mismatch.
14
+ * Verification failure.
15
15
  */
16
- readonly CryptoSuiteMismatch: "cryptoSuiteMismatch";
16
+ readonly VerificationFailure: "verificationFailure";
17
17
  /**
18
- * Proof type.
18
+ * Revoked.
19
19
  */
20
- readonly ProofTypeMismatch: "proofTypeMismatch";
21
- /**
22
- * Signature mismatch.
23
- */
24
- readonly SignatureMismatch: "signatureMismatch";
20
+ readonly Revoked: "revoked";
25
21
  };
26
22
  /**
27
23
  * The failure reason of the proof.
@@ -6,6 +6,10 @@ 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";
9
13
  /**
10
14
  * Represents Immutable Proof Verification.
11
15
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,68 @@
1
1
  # @twin.org/immutable-proof-models - Changelog
2
2
 
3
+ ## [0.0.3-next.10](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.9...immutable-proof-models-v0.0.3-next.10) (2026-02-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * update schemas ([ab0569a](https://github.com/twinfoundation/immutable-proof/commit/ab0569adf3419beefd8aef7793fdbe5b2fe2d93e))
9
+
10
+ ## [0.0.3-next.9](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.8...immutable-proof-models-v0.0.3-next.9) (2026-02-13)
11
+
12
+
13
+ ### Miscellaneous Chores
14
+
15
+ * **immutable-proof-models:** Synchronize repo versions
16
+
17
+ ## [0.0.3-next.8](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.7...immutable-proof-models-v0.0.3-next.8) (2026-02-10)
18
+
19
+
20
+ ### Features
21
+
22
+ * immutable proof as vc ([#31](https://github.com/twinfoundation/immutable-proof/issues/31)) ([79cdb03](https://github.com/twinfoundation/immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
23
+
24
+ ## [0.0.3-next.7](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.6...immutable-proof-models-v0.0.3-next.7) (2026-02-05)
25
+
26
+
27
+ ### Features
28
+
29
+ * add ts-to-jsonld-context tool ([871191b](https://github.com/twinfoundation/immutable-proof/commit/871191b75cb82c2f6daaab08a71384ba92f02a64))
30
+
31
+ ## [0.0.3-next.6](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.5...immutable-proof-models-v0.0.3-next.6) (2026-01-21)
32
+
33
+
34
+ ### Features
35
+
36
+ * update contexts ([#22](https://github.com/twinfoundation/immutable-proof/issues/22)) ([645b880](https://github.com/twinfoundation/immutable-proof/commit/645b8803540408c74e3891b2c5ff9aefd5908d9f))
37
+
38
+ ## [0.0.3-next.5](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.4...immutable-proof-models-v0.0.3-next.5) (2026-01-14)
39
+
40
+
41
+ ### Features
42
+
43
+ * update contexts and namespaces ([#20](https://github.com/twinfoundation/immutable-proof/issues/20)) ([d38aa69](https://github.com/twinfoundation/immutable-proof/commit/d38aa696c73e4fcc304f08fb458d5900109abcb4))
44
+
45
+ ## [0.0.3-next.4](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.3...immutable-proof-models-v0.0.3-next.4) (2026-01-07)
46
+
47
+
48
+ ### Miscellaneous Chores
49
+
50
+ * **immutable-proof-models:** Synchronize repo versions
51
+
52
+ ## [0.0.3-next.3](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.2...immutable-proof-models-v0.0.3-next.3) (2025-11-28)
53
+
54
+
55
+ ### Miscellaneous Chores
56
+
57
+ * **immutable-proof-models:** Synchronize repo versions
58
+
59
+ ## [0.0.3-next.2](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.1...immutable-proof-models-v0.0.3-next.2) (2025-11-28)
60
+
61
+
62
+ ### Miscellaneous Chores
63
+
64
+ * **immutable-proof-models:** Synchronize repo versions
65
+
3
66
  ## [0.0.3-next.1](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-models-v0.0.3-next.0...immutable-proof-models-v0.0.3-next.1) (2025-11-12)
4
67
 
5
68
 
@@ -8,6 +8,7 @@
8
8
 
9
9
  - [IImmutableProof](interfaces/IImmutableProof.md)
10
10
  - [IImmutableProofComponent](interfaces/IImmutableProofComponent.md)
11
+ - [IImmutableProofReceipt](interfaces/IImmutableProofReceipt.md)
11
12
  - [IImmutableProofVerification](interfaces/IImmutableProofVerification.md)
12
13
  - [IImmutableProofCreateRequest](interfaces/IImmutableProofCreateRequest.md)
13
14
  - [IImmutableProofGetRequest](interfaces/IImmutableProofGetRequest.md)
@@ -4,64 +4,33 @@ Interface describing an immutable proof state.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### @context
7
+ ### @context?
8
8
 
9
- > **@context**: \[`"https://schema.twindev.org/immutable-proof/"`, `"https://schema.twindev.org/common/"`, `...IJsonLdContextDefinitionElement[]`\]
9
+ > `optional` **@context**: \[`"https://schema.twindev.org/immutable-proof/"`, `"https://schema.twindev.org/common/"`\]
10
10
 
11
11
  JSON-LD Context.
12
12
 
13
13
  ***
14
14
 
15
- ### type
15
+ ### type?
16
16
 
17
- > **type**: `"ImmutableProof"`
17
+ > `optional` **type**: `"ImmutableProof"`
18
18
 
19
19
  JSON-LD Type.
20
20
 
21
21
  ***
22
22
 
23
- ### id
23
+ ### id?
24
24
 
25
- > **id**: `string`
26
-
27
- The id of the proof.
28
-
29
- ***
30
-
31
- ### proofObjectId?
32
-
33
- > `optional` **proofObjectId**: `string`
25
+ > `optional` **id**: `string`
34
26
 
35
27
  The id of the object associated with the proof.
36
28
 
37
29
  ***
38
30
 
39
- ### proofObjectHash
40
-
41
- > **proofObjectHash**: `string`
42
-
43
- The hash of the object associated with the proof.
44
-
45
- ***
46
-
47
- ### verifiableStorageId?
48
-
49
- > `optional` **verifiableStorageId**: `string`
50
-
51
- The verifiable storage id for where the proof is stored.
52
-
53
- ***
54
-
55
- ### proof?
56
-
57
- > `optional` **proof**: `IDataIntegrityProof`
58
-
59
- The proof which can be undefined if it has not yet been issued.
60
-
61
- ***
62
-
63
- ### immutableReceipt?
31
+ ### proofIntegrity
64
32
 
65
- > `optional` **immutableReceipt**: `IJsonLdNodeObject`
33
+ > **proofIntegrity**: `string`
66
34
 
67
- The immutable receipt detail for where the proof is stored.
35
+ The integrity hash of the object associated with the proof.
36
+ json-ld namespace:twin-common
@@ -32,7 +32,7 @@ The id of the new proof.
32
32
 
33
33
  ### get()
34
34
 
35
- > **get**(`id`): `Promise`\<[`IImmutableProof`](IImmutableProof.md)\>
35
+ > **get**(`id`): `Promise`\<`IDidVerifiableCredential`\>
36
36
 
37
37
  Get a proof.
38
38
 
@@ -46,7 +46,7 @@ The id of the proof to get.
46
46
 
47
47
  #### Returns
48
48
 
49
- `Promise`\<[`IImmutableProof`](IImmutableProof.md)\>
49
+ `Promise`\<`IDidVerifiableCredential`\>
50
50
 
51
51
  The proof.
52
52
 
@@ -18,6 +18,6 @@ The headers which can be used to determine the response data type.
18
18
 
19
19
  ### body
20
20
 
21
- > **body**: [`IImmutableProof`](IImmutableProof.md)
21
+ > **body**: `IDidVerifiableCredential`
22
22
 
23
23
  The response body.
@@ -0,0 +1,37 @@
1
+ # Interface: IImmutableProofReceipt
2
+
3
+ Interface describing an immutable proof receipt.
4
+
5
+ ## Properties
6
+
7
+ ### @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
16
+
17
+ > **type**: `"ImmutableProofReceipt"`
18
+
19
+ JSON-LD Type.
20
+
21
+ ***
22
+
23
+ ### immutableReceipt?
24
+
25
+ > `optional` **immutableReceipt**: `IJsonLdNodeObject`
26
+
27
+ The immutable receipt detail for where the proof is stored.
28
+ json-ld id
29
+
30
+ ***
31
+
32
+ ### verifiableStorageId?
33
+
34
+ > `optional` **verifiableStorageId**: `string`
35
+
36
+ The verifiable storage id for where the proof is stored.
37
+ json-ld id
@@ -25,6 +25,7 @@ JSON-LD Type.
25
25
  > **verified**: `boolean`
26
26
 
27
27
  Was the verification successful.
28
+ json-ld namespace:twin-common
28
29
 
29
30
  ***
30
31
 
@@ -33,3 +34,4 @@ Was the verification successful.
33
34
  > `optional` **failure**: [`ImmutableProofFailure`](../type-aliases/ImmutableProofFailure.md)
34
35
 
35
36
  If the verification was unsuccessful the failure reason.
37
+ json-ld type:schema:Text
@@ -6,14 +6,38 @@ The contexts of immutable proof data.
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### ContextRoot
9
+ ### Namespace
10
10
 
11
- > `readonly` **ContextRoot**: `"https://schema.twindev.org/immutable-proof/"` = `"https://schema.twindev.org/immutable-proof/"`
11
+ > `readonly` **Namespace**: `"https://schema.twindev.org/immutable-proof/"` = `"https://schema.twindev.org/immutable-proof/"`
12
12
 
13
- The context root for the immutable proof types.
13
+ The canonical RDF namespace URI for Immutable Proof.
14
14
 
15
- ### ContextRootCommon
15
+ ### Context
16
16
 
17
- > `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
17
+ > `readonly` **Context**: `"https://schema.twindev.org/immutable-proof/"` = `"https://schema.twindev.org/immutable-proof/"`
18
18
 
19
- The context root for the common types.
19
+ The value to use in context for Immutable Proof.
20
+
21
+ ### JsonLdContext
22
+
23
+ > `readonly` **JsonLdContext**: `"https://schema.twindev.org/immutable-proof/types.jsonld"` = `"https://schema.twindev.org/immutable-proof/types.jsonld"`
24
+
25
+ The JSON-LD Context URL for Immutable Proof.
26
+
27
+ ### NamespaceCommon
28
+
29
+ > `readonly` **NamespaceCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
30
+
31
+ The canonical RDF namespace URI for TWIN Common.
32
+
33
+ ### ContextCommon
34
+
35
+ > `readonly` **ContextCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
36
+
37
+ The value to use in JSON-LD context for TWIN Common.
38
+
39
+ ### JsonLdContextCommon
40
+
41
+ > `readonly` **JsonLdContextCommon**: `"https://schema.twindev.org/common/types.jsonld"` = `"https://schema.twindev.org/common/types.jsonld"`
42
+
43
+ The JSON-LD Context URL for TWIN Common.
@@ -18,20 +18,14 @@ Proof not yet issued.
18
18
 
19
19
  Proof missing.
20
20
 
21
- ### CryptoSuiteMismatch
21
+ ### VerificationFailure
22
22
 
23
- > `readonly` **CryptoSuiteMismatch**: `"cryptoSuiteMismatch"` = `"cryptoSuiteMismatch"`
23
+ > `readonly` **VerificationFailure**: `"verificationFailure"` = `"verificationFailure"`
24
24
 
25
- Crypto suite mismatch.
25
+ Verification failure.
26
26
 
27
- ### ProofTypeMismatch
27
+ ### Revoked
28
28
 
29
- > `readonly` **ProofTypeMismatch**: `"proofTypeMismatch"` = `"proofTypeMismatch"`
29
+ > `readonly` **Revoked**: `"revoked"` = `"revoked"`
30
30
 
31
- Proof type.
32
-
33
- ### SignatureMismatch
34
-
35
- > `readonly` **SignatureMismatch**: `"signatureMismatch"` = `"signatureMismatch"`
36
-
37
- Signature mismatch.
31
+ Revoked.
@@ -12,6 +12,12 @@ The types of immutable proof data.
12
12
 
13
13
  Represents Immutable Proof.
14
14
 
15
+ ### ImmutableProofReceipt
16
+
17
+ > `readonly` **ImmutableProofReceipt**: `"ImmutableProofReceipt"` = `"ImmutableProofReceipt"`
18
+
19
+ Represents Immutable Proof Receipt.
20
+
15
21
  ### ImmutableProofVerification
16
22
 
17
23
  > `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.1",
3
+ "version": "0.0.3-next.10",
4
4
  "description": "Models which define the structure of the immutable proof connectors and services",
5
5
  "repository": {
6
6
  "type": "git",