@twin.org/immutable-proof-models 0.0.2-next.3 → 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.
- package/dist/es/dataTypes/immutableProofDataTypes.js +23 -0
- package/dist/es/dataTypes/immutableProofDataTypes.js.map +1 -0
- package/dist/es/index.js +18 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IImmutableProof.js +2 -0
- package/dist/es/models/IImmutableProof.js.map +1 -0
- package/dist/es/models/IImmutableProofComponent.js +2 -0
- package/dist/es/models/IImmutableProofComponent.js.map +1 -0
- package/dist/es/models/IImmutableProofReceipt.js +2 -0
- package/dist/es/models/IImmutableProofReceipt.js.map +1 -0
- package/dist/es/models/IImmutableProofVerification.js +2 -0
- package/dist/es/models/IImmutableProofVerification.js.map +1 -0
- package/dist/es/models/api/IImmutableProofCreateRequest.js +2 -0
- package/dist/es/models/api/IImmutableProofCreateRequest.js.map +1 -0
- package/dist/es/models/api/IImmutableProofGetRequest.js +2 -0
- package/dist/es/models/api/IImmutableProofGetRequest.js.map +1 -0
- package/dist/es/models/api/IImmutableProofGetResponse.js +2 -0
- package/dist/es/models/api/IImmutableProofGetResponse.js.map +1 -0
- package/dist/es/models/api/IImmutableProofVerifyRequest.js +2 -0
- package/dist/es/models/api/IImmutableProofVerifyRequest.js.map +1 -0
- package/dist/es/models/api/IImmutableProofVerifyResponse.js +2 -0
- package/dist/es/models/api/IImmutableProofVerifyResponse.js.map +1 -0
- package/dist/es/models/eventBus/IImmutableProofEventBusProofCreated.js +4 -0
- package/dist/es/models/eventBus/IImmutableProofEventBusProofCreated.js.map +1 -0
- package/dist/es/models/immutableProofContexts.js +33 -0
- package/dist/es/models/immutableProofContexts.js.map +1 -0
- package/dist/es/models/immutableProofFailure.js +25 -0
- package/dist/es/models/immutableProofFailure.js.map +1 -0
- package/dist/es/models/immutableProofTopics.js +13 -0
- package/dist/es/models/immutableProofTopics.js.map +1 -0
- package/dist/es/models/immutableProofTypes.js +21 -0
- package/dist/es/models/immutableProofTypes.js.map +1 -0
- package/dist/es/schemas/ImmutableProof.json +40 -0
- package/dist/types/index.d.ts +15 -14
- package/dist/types/models/IImmutableProof.d.ts +8 -37
- package/dist/types/models/IImmutableProofComponent.d.ts +5 -8
- package/dist/types/models/IImmutableProofReceipt.d.ts +26 -0
- package/dist/types/models/IImmutableProofVerification.d.ts +6 -4
- package/dist/types/models/api/IImmutableProofGetResponse.d.ts +2 -2
- package/dist/types/models/api/IImmutableProofVerifyResponse.d.ts +1 -1
- package/dist/types/models/immutableProofContexts.d.ts +20 -4
- package/dist/types/models/immutableProofFailure.d.ts +4 -8
- package/dist/types/models/immutableProofTypes.d.ts +4 -0
- package/docs/changelog.md +83 -0
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/IImmutableProof.md +10 -57
- package/docs/reference/interfaces/IImmutableProofComponent.md +4 -30
- package/docs/reference/interfaces/IImmutableProofGetResponse.md +1 -1
- package/docs/reference/interfaces/IImmutableProofReceipt.md +37 -0
- package/docs/reference/interfaces/IImmutableProofVerification.md +2 -0
- package/docs/reference/variables/ImmutableProofContexts.md +30 -6
- package/docs/reference/variables/ImmutableProofFailure.md +6 -12
- package/docs/reference/variables/ImmutableProofTypes.md +6 -0
- package/package.json +5 -7
- package/dist/cjs/index.cjs +0 -184
- package/dist/esm/index.mjs +0 -178
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { DataTypeHandlerFactory } from "@twin.org/data-core";
|
|
4
|
+
import { ImmutableProofContexts } from "../models/immutableProofContexts.js";
|
|
5
|
+
import { ImmutableProofTypes } from "../models/immutableProofTypes.js";
|
|
6
|
+
import ImmutableProofSchema from "../schemas/ImmutableProof.json" with { type: "json" };
|
|
7
|
+
/**
|
|
8
|
+
* Handle all the data types for immutable proof.
|
|
9
|
+
*/
|
|
10
|
+
export class ImmutableProofDataTypes {
|
|
11
|
+
/**
|
|
12
|
+
* Register all the data types.
|
|
13
|
+
*/
|
|
14
|
+
static registerTypes() {
|
|
15
|
+
DataTypeHandlerFactory.register(`${ImmutableProofContexts.Namespace}${ImmutableProofTypes.ImmutableProof}`, () => ({
|
|
16
|
+
namespace: ImmutableProofContexts.Namespace,
|
|
17
|
+
type: ImmutableProofTypes.ImmutableProof,
|
|
18
|
+
defaultValue: {},
|
|
19
|
+
jsonSchema: async () => ImmutableProofSchema
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=immutableProofDataTypes.js.map
|
|
@@ -0,0 +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,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
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./dataTypes/immutableProofDataTypes.js";
|
|
4
|
+
export * from "./models/api/IImmutableProofCreateRequest.js";
|
|
5
|
+
export * from "./models/api/IImmutableProofGetRequest.js";
|
|
6
|
+
export * from "./models/api/IImmutableProofGetResponse.js";
|
|
7
|
+
export * from "./models/api/IImmutableProofVerifyRequest.js";
|
|
8
|
+
export * from "./models/api/IImmutableProofVerifyResponse.js";
|
|
9
|
+
export * from "./models/eventBus/IImmutableProofEventBusProofCreated.js";
|
|
10
|
+
export * from "./models/IImmutableProof.js";
|
|
11
|
+
export * from "./models/IImmutableProofComponent.js";
|
|
12
|
+
export * from "./models/IImmutableProofReceipt.js";
|
|
13
|
+
export * from "./models/IImmutableProofVerification.js";
|
|
14
|
+
export * from "./models/immutableProofContexts.js";
|
|
15
|
+
export * from "./models/immutableProofFailure.js";
|
|
16
|
+
export * from "./models/immutableProofTopics.js";
|
|
17
|
+
export * from "./models/immutableProofTypes.js";
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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"]}
|
|
@@ -0,0 +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 { 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"]}
|
|
@@ -0,0 +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"]}
|
|
@@ -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"]}
|
|
@@ -0,0 +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.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"]}
|
|
@@ -0,0 +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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IImmutableProofGetRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofGetRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Get a proof.\n */\nexport interface IImmutableProofGetRequest {\n\t/**\n\t * The headers which can be used to determine the response data type.\n\t */\n\theaders?: {\n\t\t[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;\n\t};\n\n\t/**\n\t * The parameters from the path.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the immutable proof to get.\n\t\t */\n\t\tid: string;\n\t};\n}\n"]}
|
|
@@ -0,0 +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 { 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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IImmutableProofVerifyRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofVerifyRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Verify a proof.\n */\nexport interface IImmutableProofVerifyRequest {\n\t/**\n\t * The headers which can be used to determine the response data type.\n\t */\n\theaders?: {\n\t\t[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;\n\t};\n\n\t/**\n\t * The parameters from the path.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the immutable proof to verify.\n\t\t */\n\t\tid: string;\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IImmutableProofVerifyResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofVerifyResponse.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 { IImmutableProofVerification } from \"../IImmutableProofVerification.js\";\n\n/**\n * Response to verifying an immutable proof.\n */\nexport interface IImmutableProofVerifyResponse {\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: IImmutableProofVerification;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IImmutableProofEventBusProofCreated.js","sourceRoot":"","sources":["../../../../src/models/eventBus/IImmutableProofEventBusProofCreated.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Event bus payload for proof created.\n */\nexport interface IImmutableProofEventBusProofCreated {\n\t/**\n\t * The id of the proof created.\n\t */\n\tid: string;\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The contexts of immutable proof data.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const ImmutableProofContexts = {
|
|
8
|
+
/**
|
|
9
|
+
* The canonical RDF namespace URI for Immutable Proof.
|
|
10
|
+
*/
|
|
11
|
+
Namespace: "https://schema.twindev.org/immutable-proof/",
|
|
12
|
+
/**
|
|
13
|
+
* The value to use in context for Immutable Proof.
|
|
14
|
+
*/
|
|
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"
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=immutableProofContexts.js.map
|
|
@@ -0,0 +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,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"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The failure reason of the proof.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const ImmutableProofFailure = {
|
|
8
|
+
/**
|
|
9
|
+
* Proof not yet issued.
|
|
10
|
+
*/
|
|
11
|
+
NotIssued: "notIssued",
|
|
12
|
+
/**
|
|
13
|
+
* Proof missing.
|
|
14
|
+
*/
|
|
15
|
+
ProofMissing: "proofMissing",
|
|
16
|
+
/**
|
|
17
|
+
* Verification failure.
|
|
18
|
+
*/
|
|
19
|
+
VerificationFailure: "verificationFailure",
|
|
20
|
+
/**
|
|
21
|
+
* Revoked.
|
|
22
|
+
*/
|
|
23
|
+
Revoked: "revoked"
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=immutableProofFailure.js.map
|
|
@@ -0,0 +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,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"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The topics for immutable proof event bus notifications.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const ImmutableProofTopics = {
|
|
8
|
+
/**
|
|
9
|
+
* A proof was created.
|
|
10
|
+
*/
|
|
11
|
+
ProofCreated: "immutable-proof:proof-created"
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=immutableProofTopics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"immutableProofTopics.js","sourceRoot":"","sources":["../../../src/models/immutableProofTopics.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;;OAEG;IACH,YAAY,EAAE,+BAA+B;CACpC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The topics for immutable proof event bus notifications.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ImmutableProofTopics = {\n\t/**\n\t * A proof was created.\n\t */\n\tProofCreated: \"immutable-proof:proof-created\"\n} as const;\n\n/**\n * The topics for immutable proof event bus notifications.\n */\nexport type ImmutableProofTopics = (typeof ImmutableProofTopics)[keyof typeof ImmutableProofTopics];\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The types of immutable proof data.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const ImmutableProofTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* Represents Immutable Proof.
|
|
10
|
+
*/
|
|
11
|
+
ImmutableProof: "ImmutableProof",
|
|
12
|
+
/**
|
|
13
|
+
* Represents Immutable Proof Receipt.
|
|
14
|
+
*/
|
|
15
|
+
ImmutableProofReceipt: "ImmutableProofReceipt",
|
|
16
|
+
/**
|
|
17
|
+
* Represents Immutable Proof Verification.
|
|
18
|
+
*/
|
|
19
|
+
ImmutableProofVerification: "ImmutableProofVerification"
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=immutableProofTypes.js.map
|
|
@@ -0,0 +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;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"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/immutable-proof/ImmutableProof",
|
|
4
|
+
"description": "Interface describing an immutable proof state.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"@context": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": {
|
|
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."
|
|
22
|
+
},
|
|
23
|
+
"type": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"const": "ImmutableProof",
|
|
26
|
+
"description": "JSON-LD Type."
|
|
27
|
+
},
|
|
28
|
+
"id": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "The id of the object associated with the proof."
|
|
31
|
+
},
|
|
32
|
+
"proofIntegrity": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The integrity hash of the object associated with the proof. json-ld namespace:twin-common"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": [
|
|
38
|
+
"proofIntegrity"
|
|
39
|
+
]
|
|
40
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export * from "./dataTypes/immutableProofDataTypes";
|
|
2
|
-
export * from "./models/api/IImmutableProofCreateRequest";
|
|
3
|
-
export * from "./models/api/IImmutableProofGetRequest";
|
|
4
|
-
export * from "./models/api/IImmutableProofGetResponse";
|
|
5
|
-
export * from "./models/api/IImmutableProofVerifyRequest";
|
|
6
|
-
export * from "./models/api/IImmutableProofVerifyResponse";
|
|
7
|
-
export * from "./models/eventBus/IImmutableProofEventBusProofCreated";
|
|
8
|
-
export * from "./models/IImmutableProof";
|
|
9
|
-
export * from "./models/IImmutableProofComponent";
|
|
10
|
-
export * from "./models/
|
|
11
|
-
export * from "./models/
|
|
12
|
-
export * from "./models/
|
|
13
|
-
export * from "./models/
|
|
14
|
-
export * from "./models/
|
|
1
|
+
export * from "./dataTypes/immutableProofDataTypes.js";
|
|
2
|
+
export * from "./models/api/IImmutableProofCreateRequest.js";
|
|
3
|
+
export * from "./models/api/IImmutableProofGetRequest.js";
|
|
4
|
+
export * from "./models/api/IImmutableProofGetResponse.js";
|
|
5
|
+
export * from "./models/api/IImmutableProofVerifyRequest.js";
|
|
6
|
+
export * from "./models/api/IImmutableProofVerifyResponse.js";
|
|
7
|
+
export * from "./models/eventBus/IImmutableProofEventBusProofCreated.js";
|
|
8
|
+
export * from "./models/IImmutableProof.js";
|
|
9
|
+
export * from "./models/IImmutableProofComponent.js";
|
|
10
|
+
export * from "./models/IImmutableProofReceipt.js";
|
|
11
|
+
export * from "./models/IImmutableProofVerification.js";
|
|
12
|
+
export * from "./models/immutableProofContexts.js";
|
|
13
|
+
export * from "./models/immutableProofFailure.js";
|
|
14
|
+
export * from "./models/immutableProofTopics.js";
|
|
15
|
+
export * from "./models/immutableProofTypes.js";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { ImmutableProofContexts } from "./immutableProofContexts";
|
|
4
|
-
import type { ImmutableProofTypes } from "./immutableProofTypes";
|
|
1
|
+
import type { ImmutableProofContexts } from "./immutableProofContexts.js";
|
|
2
|
+
import type { ImmutableProofTypes } from "./immutableProofTypes.js";
|
|
5
3
|
/**
|
|
6
4
|
* Interface describing an immutable proof state.
|
|
7
5
|
*/
|
|
@@ -9,45 +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
|
|
21
|
-
/**
|
|
22
|
-
* The id of the proof.
|
|
23
|
-
*/
|
|
24
|
-
id: string;
|
|
25
|
-
/**
|
|
26
|
-
* The id of the node who created the proof.
|
|
27
|
-
*/
|
|
28
|
-
nodeIdentity: string;
|
|
29
|
-
/**
|
|
30
|
-
* The id of the user who created the proof.
|
|
31
|
-
*/
|
|
32
|
-
userIdentity: string;
|
|
14
|
+
type?: typeof ImmutableProofTypes.ImmutableProof;
|
|
33
15
|
/**
|
|
34
16
|
* The id of the object associated with the proof.
|
|
35
17
|
*/
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* The hash of the object associated with the proof.
|
|
39
|
-
*/
|
|
40
|
-
proofObjectHash: string;
|
|
41
|
-
/**
|
|
42
|
-
* The verifiable storage id for where the proof is stored.
|
|
43
|
-
*/
|
|
44
|
-
verifiableStorageId?: string;
|
|
45
|
-
/**
|
|
46
|
-
* The proof which can be undefined if it has not yet been issued.
|
|
47
|
-
*/
|
|
48
|
-
proof?: IDataIntegrityProof;
|
|
18
|
+
id?: string;
|
|
49
19
|
/**
|
|
50
|
-
* The
|
|
20
|
+
* The integrity hash of the object associated with the proof.
|
|
21
|
+
* json-ld namespace:twin-common
|
|
51
22
|
*/
|
|
52
|
-
|
|
23
|
+
proofIntegrity: string;
|
|
53
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
2
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
|
-
import type {
|
|
4
|
-
import type { IImmutableProofVerification } from "./IImmutableProofVerification";
|
|
3
|
+
import type { IDidVerifiableCredential } from "@twin.org/standards-w3c-did";
|
|
4
|
+
import type { IImmutableProofVerification } from "./IImmutableProofVerification.js";
|
|
5
5
|
/**
|
|
6
6
|
* Interface describing an immutable proof contract.
|
|
7
7
|
*/
|
|
@@ -9,18 +9,16 @@ 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 userIdentity The identity to create the immutable proof operation with.
|
|
13
|
-
* @param nodeIdentity The node identity to use for vault operations.
|
|
14
12
|
* @returns The id of the new proof.
|
|
15
13
|
*/
|
|
16
|
-
create(document: IJsonLdNodeObject
|
|
14
|
+
create(document: IJsonLdNodeObject): Promise<string>;
|
|
17
15
|
/**
|
|
18
16
|
* Get a proof.
|
|
19
17
|
* @param id The id of the proof to get.
|
|
20
18
|
* @returns The proof.
|
|
21
19
|
* @throws NotFoundError if the proof is not found.
|
|
22
20
|
*/
|
|
23
|
-
get(id: string): Promise<
|
|
21
|
+
get(id: string): Promise<IDidVerifiableCredential>;
|
|
24
22
|
/**
|
|
25
23
|
* Verify a proof.
|
|
26
24
|
* @param id The id of the proof to verify.
|
|
@@ -31,9 +29,8 @@ export interface IImmutableProofComponent extends IComponent {
|
|
|
31
29
|
/**
|
|
32
30
|
* Remove the verifiable storage for the proof.
|
|
33
31
|
* @param id The id of the proof to remove the storage from.
|
|
34
|
-
* @param nodeIdentity The node identity to use for vault operations.
|
|
35
32
|
* @returns Nothing.
|
|
36
33
|
* @throws NotFoundError if the proof is not found.
|
|
37
34
|
*/
|
|
38
|
-
removeVerifiable(id: string
|
|
35
|
+
removeVerifiable(id: string): Promise<void>;
|
|
39
36
|
}
|
|
@@ -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
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ImmutableProofContexts } from "./immutableProofContexts";
|
|
2
|
-
import type { ImmutableProofFailure } from "./immutableProofFailure";
|
|
3
|
-
import type { ImmutableProofTypes } from "./immutableProofTypes";
|
|
1
|
+
import type { ImmutableProofContexts } from "./immutableProofContexts.js";
|
|
2
|
+
import type { ImmutableProofFailure } from "./immutableProofFailure.js";
|
|
3
|
+
import type { ImmutableProofTypes } from "./immutableProofTypes.js";
|
|
4
4
|
/**
|
|
5
5
|
* Interface describing an immutable proof verification.
|
|
6
6
|
*/
|
|
@@ -8,17 +8,19 @@ export interface IImmutableProofVerification {
|
|
|
8
8
|
/**
|
|
9
9
|
* JSON-LD Context.
|
|
10
10
|
*/
|
|
11
|
-
"@context": typeof ImmutableProofContexts.
|
|
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";
|
|
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:
|
|
16
|
+
body: IDidVerifiableCredential;
|
|
17
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
-
import type { IImmutableProofVerification } from "../IImmutableProofVerification";
|
|
2
|
+
import type { IImmutableProofVerification } from "../IImmutableProofVerification.js";
|
|
3
3
|
/**
|
|
4
4
|
* Response to verifying an immutable proof.
|
|
5
5
|
*/
|
|
@@ -3,13 +3,29 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const ImmutableProofContexts: {
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The canonical RDF namespace URI for Immutable Proof.
|
|
7
7
|
*/
|
|
8
|
-
readonly
|
|
8
|
+
readonly Namespace: "https://schema.twindev.org/immutable-proof/";
|
|
9
9
|
/**
|
|
10
|
-
* The context
|
|
10
|
+
* The value to use in context for Immutable Proof.
|
|
11
11
|
*/
|
|
12
|
-
readonly
|
|
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
|
-
*
|
|
14
|
+
* Verification failure.
|
|
15
15
|
*/
|
|
16
|
-
readonly
|
|
16
|
+
readonly VerificationFailure: "verificationFailure";
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Revoked.
|
|
19
19
|
*/
|
|
20
|
-
readonly
|
|
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
|
*/
|