@3sixty/immutable-proof-models 0.0.0-stage → 0.20.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +24 -2
- package/dist/es/compiled/validators.js +294 -0
- package/dist/es/compiled/validators.js.map +1 -0
- package/dist/es/dataTypes/immutableProofDataTypes.js +55 -0
- package/dist/es/dataTypes/immutableProofDataTypes.js.map +1 -0
- package/dist/es/index.js +24 -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/IImmutableProofCredential.js +2 -0
- package/dist/es/models/IImmutableProofCredential.js.map +1 -0
- package/dist/es/models/IImmutableProofDataIntegrity.js +4 -0
- package/dist/es/models/IImmutableProofDataIntegrity.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/IImmutableProofRemoveNotarizationRequest.js +4 -0
- package/dist/es/models/api/IImmutableProofRemoveNotarizationRequest.js.map +1 -0
- package/dist/es/models/api/IImmutableProofRemoveRequest.js +4 -0
- package/dist/es/models/api/IImmutableProofRemoveRequest.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/immutableProofMetricIds.js +33 -0
- package/dist/es/models/immutableProofMetricIds.js.map +1 -0
- package/dist/es/models/immutableProofMetrics.js +42 -0
- package/dist/es/models/immutableProofMetrics.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 +39 -0
- package/dist/es/schemas/ImmutableProofCredential.json +25 -0
- package/dist/es/schemas/ImmutableProofDataIntegrity.json +13 -0
- package/dist/es/schemas/ImmutableProofFailure.json +24 -0
- package/dist/es/schemas/ImmutableProofVerification.json +30 -0
- package/dist/types/compiled/validators.d.ts +21 -0
- package/dist/types/dataTypes/immutableProofDataTypes.d.ts +9 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/models/IImmutableProof.d.ts +24 -0
- package/dist/types/models/IImmutableProofComponent.d.ts +47 -0
- package/dist/types/models/IImmutableProofCredential.d.ts +11 -0
- package/dist/types/models/IImmutableProofDataIntegrity.d.ts +10 -0
- package/dist/types/models/IImmutableProofVerification.d.ts +26 -0
- package/dist/types/models/api/IImmutableProofCreateRequest.d.ts +25 -0
- package/dist/types/models/api/IImmutableProofGetRequest.d.ts +21 -0
- package/dist/types/models/api/IImmutableProofGetResponse.d.ts +17 -0
- package/dist/types/models/api/IImmutableProofRemoveNotarizationRequest.d.ts +14 -0
- package/dist/types/models/api/IImmutableProofRemoveRequest.d.ts +14 -0
- package/dist/types/models/api/IImmutableProofVerifyRequest.d.ts +21 -0
- package/dist/types/models/api/IImmutableProofVerifyResponse.d.ts +17 -0
- package/dist/types/models/eventBus/IImmutableProofEventBusProofCreated.d.ts +9 -0
- package/dist/types/models/immutableProofContexts.d.ts +33 -0
- package/dist/types/models/immutableProofFailure.d.ts +25 -0
- package/dist/types/models/immutableProofMetricIds.d.ts +33 -0
- package/dist/types/models/immutableProofMetrics.d.ts +5 -0
- package/dist/types/models/immutableProofTopics.d.ts +13 -0
- package/dist/types/models/immutableProofTypes.d.ts +21 -0
- package/docs/changelog.md +0 -0
- package/docs/examples.md +72 -0
- package/docs/reference/classes/ImmutableProofDataTypes.md +25 -0
- package/docs/reference/index.md +43 -0
- package/docs/reference/interfaces/IImmutableProof.md +35 -0
- package/docs/reference/interfaces/IImmutableProofComponent.md +143 -0
- package/docs/reference/interfaces/IImmutableProofCreateRequest.md +30 -0
- package/docs/reference/interfaces/IImmutableProofCredential.md +15 -0
- package/docs/reference/interfaces/IImmutableProofDataIntegrity.md +11 -0
- package/docs/reference/interfaces/IImmutableProofEventBusProofCreated.md +11 -0
- package/docs/reference/interfaces/IImmutableProofGetRequest.md +29 -0
- package/docs/reference/interfaces/IImmutableProofGetResponse.md +23 -0
- package/docs/reference/interfaces/IImmutableProofRemoveNotarizationRequest.md +17 -0
- package/docs/reference/interfaces/IImmutableProofRemoveRequest.md +17 -0
- package/docs/reference/interfaces/IImmutableProofVerification.md +35 -0
- package/docs/reference/interfaces/IImmutableProofVerifyRequest.md +29 -0
- package/docs/reference/interfaces/IImmutableProofVerifyResponse.md +23 -0
- package/docs/reference/type-aliases/ImmutableProofContexts.md +5 -0
- package/docs/reference/type-aliases/ImmutableProofFailure.md +5 -0
- package/docs/reference/type-aliases/ImmutableProofMetricIds.md +5 -0
- package/docs/reference/type-aliases/ImmutableProofTopics.md +5 -0
- package/docs/reference/type-aliases/ImmutableProofTypes.md +5 -0
- package/docs/reference/variables/CompiledImmutableProof.md +5 -0
- package/docs/reference/variables/CompiledImmutableProofCredential.md +5 -0
- package/docs/reference/variables/CompiledImmutableProofDataIntegrity.md +5 -0
- package/docs/reference/variables/CompiledImmutableProofFailure.md +5 -0
- package/docs/reference/variables/CompiledImmutableProofVerification.md +5 -0
- package/docs/reference/variables/ImmutableProofContexts.md +43 -0
- package/docs/reference/variables/ImmutableProofFailure.md +31 -0
- package/docs/reference/variables/ImmutableProofMetricIds.md +43 -0
- package/docs/reference/variables/ImmutableProofMetrics.md +5 -0
- package/docs/reference/variables/ImmutableProofTopics.md +13 -0
- package/docs/reference/variables/ImmutableProofTypes.md +25 -0
- package/locales/en.json +3 -0
- package/package.json +56 -5
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./compiled/validators.js";
|
|
4
|
+
export * from "./dataTypes/immutableProofDataTypes.js";
|
|
5
|
+
export * from "./models/api/IImmutableProofCreateRequest.js";
|
|
6
|
+
export * from "./models/api/IImmutableProofGetRequest.js";
|
|
7
|
+
export * from "./models/api/IImmutableProofGetResponse.js";
|
|
8
|
+
export * from "./models/api/IImmutableProofRemoveNotarizationRequest.js";
|
|
9
|
+
export * from "./models/api/IImmutableProofRemoveRequest.js";
|
|
10
|
+
export * from "./models/api/IImmutableProofVerifyRequest.js";
|
|
11
|
+
export * from "./models/api/IImmutableProofVerifyResponse.js";
|
|
12
|
+
export * from "./models/eventBus/IImmutableProofEventBusProofCreated.js";
|
|
13
|
+
export * from "./models/IImmutableProof.js";
|
|
14
|
+
export * from "./models/IImmutableProofComponent.js";
|
|
15
|
+
export * from "./models/IImmutableProofCredential.js";
|
|
16
|
+
export * from "./models/IImmutableProofDataIntegrity.js";
|
|
17
|
+
export * from "./models/IImmutableProofVerification.js";
|
|
18
|
+
export * from "./models/immutableProofContexts.js";
|
|
19
|
+
export * from "./models/immutableProofFailure.js";
|
|
20
|
+
export * from "./models/immutableProofMetricIds.js";
|
|
21
|
+
export * from "./models/immutableProofMetrics.js";
|
|
22
|
+
export * from "./models/immutableProofTopics.js";
|
|
23
|
+
export * from "./models/immutableProofTypes.js";
|
|
24
|
+
//# 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,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0DAA0D,CAAC;AACzE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,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 \"./compiled/validators.js\";\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/IImmutableProofRemoveNotarizationRequest.js\";\nexport * from \"./models/api/IImmutableProofRemoveRequest.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/IImmutableProofCredential.js\";\nexport * from \"./models/IImmutableProofDataIntegrity.js\";\nexport * from \"./models/IImmutableProofVerification.js\";\nexport * from \"./models/immutableProofContexts.js\";\nexport * from \"./models/immutableProofFailure.js\";\nexport * from \"./models/immutableProofMetricIds.js\";\nexport * from \"./models/immutableProofMetrics.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 \"@3sixty/core\";\nimport type { IJsonLdNodeObject } from \"@3sixty/data-json-ld\";\nimport type { IImmutableProofCredential } from \"./IImmutableProofCredential.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 * @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<IImmutableProofCredential>;\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 proof and its notarization.\n\t * @param id The id of the proof to remove.\n\t * @returns A promise that resolves when the proof and its notarization have been removed.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tremove(id: string): Promise<void>;\n\n\t/**\n\t * Remove only the notarization for the proof, keeping the proof entity.\n\t * @param id The id of the proof to remove the notarization from.\n\t * @returns A promise that resolves when the notarization has been removed.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tremoveNotarization(id: string): Promise<void>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IImmutableProofCredential.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofCredential.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IDidVerifiableCredential, IProof } from \"@3sixty/standards-w3c-did\";\nimport type { IImmutableProofDataIntegrity } from \"./IImmutableProofDataIntegrity.js\";\n\n/**\n * Interface describing an immutable proof credential.\n */\nexport interface IImmutableProofCredential extends Omit<IDidVerifiableCredential, \"proof\"> {\n\t/**\n\t * The proof of the verifiable credential, which includes the data integrity information.\n\t */\n\tproof?: IProof & IImmutableProofDataIntegrity;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IImmutableProofDataIntegrity.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofDataIntegrity.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface describing additional data integrity fields attached.\n */\nexport interface IImmutableProofDataIntegrity {\n\t/**\n\t * The notarization id.\n\t * @json-ld id\n\t */\n\tnotarizationId?: 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 \"@3sixty/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"]}
|
|
@@ -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 \"@3sixty/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 { HeaderTypes, MimeTypes } from \"@3sixty/web\";\nimport type { IImmutableProofCredential } from \"../IImmutableProofCredential.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: IImmutableProofCredential;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IImmutableProofRemoveNotarizationRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofRemoveNotarizationRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Remove the notarization for a proof.\n */\nexport interface IImmutableProofRemoveNotarizationRequest {\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 remove the notarization from.\n\t\t */\n\t\tid: string;\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IImmutableProofRemoveRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofRemoveRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Remove a proof.\n */\nexport interface IImmutableProofRemoveRequest {\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 remove.\n\t\t */\n\t\tid: string;\n\t};\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 \"@3sixty/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 \"@3sixty/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.3sixty.global/immutable-proof/",
|
|
12
|
+
/**
|
|
13
|
+
* The value to use in context for Immutable Proof.
|
|
14
|
+
*/
|
|
15
|
+
Context: "https://schema.3sixty.global/immutable-proof/",
|
|
16
|
+
/**
|
|
17
|
+
* The JSON-LD Context URL for Immutable Proof.
|
|
18
|
+
*/
|
|
19
|
+
JsonLdContext: "https://schema.3sixty.global/immutable-proof/types.jsonld",
|
|
20
|
+
/**
|
|
21
|
+
* The canonical RDF namespace URI for TWIN Common.
|
|
22
|
+
*/
|
|
23
|
+
NamespaceCommon: "https://schema.3sixty.global/common/",
|
|
24
|
+
/**
|
|
25
|
+
* The value to use in JSON-LD context for TWIN Common.
|
|
26
|
+
*/
|
|
27
|
+
ContextCommon: "https://schema.3sixty.global/common/",
|
|
28
|
+
/**
|
|
29
|
+
* The JSON-LD Context URL for TWIN Common.
|
|
30
|
+
*/
|
|
31
|
+
JsonLdContextCommon: "https://schema.3sixty.global/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,+CAA+C;IAE1D;;OAEG;IACH,OAAO,EAAE,+CAA+C;IAExD;;OAEG;IACH,aAAa,EAAE,2DAA2D;IAE1E;;OAEG;IACH,eAAe,EAAE,sCAAsC;IAEvD;;OAEG;IACH,aAAa,EAAE,sCAAsC;IAErD;;OAEG;IACH,mBAAmB,EAAE,kDAAkD;CAC9D,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.3sixty.global/immutable-proof/\",\n\n\t/**\n\t * The value to use in context for Immutable Proof.\n\t */\n\tContext: \"https://schema.3sixty.global/immutable-proof/\",\n\n\t/**\n\t * The JSON-LD Context URL for Immutable Proof.\n\t */\n\tJsonLdContext: \"https://schema.3sixty.global/immutable-proof/types.jsonld\",\n\n\t/**\n\t * The canonical RDF namespace URI for TWIN Common.\n\t */\n\tNamespaceCommon: \"https://schema.3sixty.global/common/\",\n\n\t/**\n\t * The value to use in JSON-LD context for TWIN Common.\n\t */\n\tContextCommon: \"https://schema.3sixty.global/common/\",\n\n\t/**\n\t * The JSON-LD Context URL for TWIN Common.\n\t */\n\tJsonLdContextCommon: \"https://schema.3sixty.global/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,33 @@
|
|
|
1
|
+
// Copyright 2026 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Metric IDs for the immutable proof service.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const ImmutableProofMetricIds = {
|
|
8
|
+
/**
|
|
9
|
+
* Number of proofs created.
|
|
10
|
+
*/
|
|
11
|
+
ProofsCreated: "ip_proofs_created",
|
|
12
|
+
/**
|
|
13
|
+
* Number of proof verifications succeeded.
|
|
14
|
+
*/
|
|
15
|
+
VerificationsSucceeded: "ip_verifications_succeeded",
|
|
16
|
+
/**
|
|
17
|
+
* Number of proof verifications failed.
|
|
18
|
+
*/
|
|
19
|
+
VerificationsFailed: "ip_verifications_failed",
|
|
20
|
+
/**
|
|
21
|
+
* Number of proofs removed.
|
|
22
|
+
*/
|
|
23
|
+
ProofsRemoved: "ip_proofs_removed",
|
|
24
|
+
/**
|
|
25
|
+
* Number of notarizations removed.
|
|
26
|
+
*/
|
|
27
|
+
NotarizationsRemoved: "ip_notarizations_removed",
|
|
28
|
+
/**
|
|
29
|
+
* Time in milliseconds from a proof being requested to its notarization completing.
|
|
30
|
+
*/
|
|
31
|
+
ProofCompletionLag: "ip_proof_completion_lag"
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=immutableProofMetricIds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"immutableProofMetricIds.js","sourceRoot":"","sources":["../../../src/models/immutableProofMetricIds.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC;;OAEG;IACH,aAAa,EAAE,mBAAmB;IAElC;;OAEG;IACH,sBAAsB,EAAE,4BAA4B;IAEpD;;OAEG;IACH,mBAAmB,EAAE,yBAAyB;IAE9C;;OAEG;IACH,aAAa,EAAE,mBAAmB;IAElC;;OAEG;IACH,oBAAoB,EAAE,0BAA0B;IAEhD;;OAEG;IACH,kBAAkB,EAAE,yBAAyB;CACpC,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Metric IDs for the immutable proof service.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ImmutableProofMetricIds = {\n\t/**\n\t * Number of proofs created.\n\t */\n\tProofsCreated: \"ip_proofs_created\",\n\n\t/**\n\t * Number of proof verifications succeeded.\n\t */\n\tVerificationsSucceeded: \"ip_verifications_succeeded\",\n\n\t/**\n\t * Number of proof verifications failed.\n\t */\n\tVerificationsFailed: \"ip_verifications_failed\",\n\n\t/**\n\t * Number of proofs removed.\n\t */\n\tProofsRemoved: \"ip_proofs_removed\",\n\n\t/**\n\t * Number of notarizations removed.\n\t */\n\tNotarizationsRemoved: \"ip_notarizations_removed\",\n\n\t/**\n\t * Time in milliseconds from a proof being requested to its notarization completing.\n\t */\n\tProofCompletionLag: \"ip_proof_completion_lag\"\n} as const;\n\n/**\n * Union type of all immutable proof service metric ID string values.\n */\nexport type ImmutableProofMetricIds =\n\t(typeof ImmutableProofMetricIds)[keyof typeof ImmutableProofMetricIds];\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright 2026 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { MetricType } from "@3sixty/telemetry-models";
|
|
4
|
+
import { ImmutableProofMetricIds } from "./immutableProofMetricIds.js";
|
|
5
|
+
/**
|
|
6
|
+
* Metrics registered by the immutable proof service.
|
|
7
|
+
*/
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
+
export const ImmutableProofMetrics = [
|
|
10
|
+
{
|
|
11
|
+
id: ImmutableProofMetricIds.ProofsCreated,
|
|
12
|
+
label: "Proofs created",
|
|
13
|
+
type: MetricType.Counter
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: ImmutableProofMetricIds.VerificationsSucceeded,
|
|
17
|
+
label: "Proof verifications succeeded",
|
|
18
|
+
type: MetricType.Counter
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: ImmutableProofMetricIds.VerificationsFailed,
|
|
22
|
+
label: "Proof verifications failed",
|
|
23
|
+
type: MetricType.Counter
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: ImmutableProofMetricIds.ProofsRemoved,
|
|
27
|
+
label: "Proofs removed",
|
|
28
|
+
type: MetricType.Counter
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: ImmutableProofMetricIds.NotarizationsRemoved,
|
|
32
|
+
label: "Notarizations removed",
|
|
33
|
+
type: MetricType.Counter
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: ImmutableProofMetricIds.ProofCompletionLag,
|
|
37
|
+
label: "Proof completion lag",
|
|
38
|
+
type: MetricType.Gauge,
|
|
39
|
+
unit: "ms"
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
//# sourceMappingURL=immutableProofMetrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"immutableProofMetrics.js","sourceRoot":"","sources":["../../../src/models/immutableProofMetrics.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAyB,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAuB;IACxD;QACC,EAAE,EAAE,uBAAuB,CAAC,aAAa;QACzC,KAAK,EAAE,gBAAgB;QACvB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,uBAAuB,CAAC,sBAAsB;QAClD,KAAK,EAAE,+BAA+B;QACtC,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,uBAAuB,CAAC,mBAAmB;QAC/C,KAAK,EAAE,4BAA4B;QACnC,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,uBAAuB,CAAC,aAAa;QACzC,KAAK,EAAE,gBAAgB;QACvB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,uBAAuB,CAAC,oBAAoB;QAChD,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,uBAAuB,CAAC,kBAAkB;QAC9C,KAAK,EAAE,sBAAsB;QAC7B,IAAI,EAAE,UAAU,CAAC,KAAK;QACtB,IAAI,EAAE,IAAI;KACV;CACD,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { type ITelemetryMetric, MetricType } from \"@3sixty/telemetry-models\";\nimport { ImmutableProofMetricIds } from \"./immutableProofMetricIds.js\";\n\n/**\n * Metrics registered by the immutable proof service.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ImmutableProofMetrics: ITelemetryMetric[] = [\n\t{\n\t\tid: ImmutableProofMetricIds.ProofsCreated,\n\t\tlabel: \"Proofs created\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: ImmutableProofMetricIds.VerificationsSucceeded,\n\t\tlabel: \"Proof verifications succeeded\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: ImmutableProofMetricIds.VerificationsFailed,\n\t\tlabel: \"Proof verifications failed\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: ImmutableProofMetricIds.ProofsRemoved,\n\t\tlabel: \"Proofs removed\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: ImmutableProofMetricIds.NotarizationsRemoved,\n\t\tlabel: \"Notarizations removed\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: ImmutableProofMetricIds.ProofCompletionLag,\n\t\tlabel: \"Proof completion lag\",\n\t\ttype: MetricType.Gauge,\n\t\tunit: \"ms\"\n\t}\n];\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 Verification.
|
|
14
|
+
*/
|
|
15
|
+
ImmutableProofVerification: "ImmutableProofVerification",
|
|
16
|
+
/**
|
|
17
|
+
* Represents Immutable Proof Failure.
|
|
18
|
+
*/
|
|
19
|
+
ImmutableProofFailure: "ImmutableProofFailure"
|
|
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,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"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.3sixty.global/immutable-proof/ImmutableProof",
|
|
4
|
+
"title": "ImmutableProof",
|
|
5
|
+
"description": "Interface describing an immutable proof state.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"@context": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"prefixItems": [
|
|
11
|
+
{
|
|
12
|
+
"const": "https://schema.3sixty.global/immutable-proof/"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"const": "https://schema.3sixty.global/common/"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"items": false,
|
|
19
|
+
"minItems": 2,
|
|
20
|
+
"maxItems": 2,
|
|
21
|
+
"description": "JSON-LD Context."
|
|
22
|
+
},
|
|
23
|
+
"type": {
|
|
24
|
+
"const": "ImmutableProof",
|
|
25
|
+
"description": "JSON-LD Type."
|
|
26
|
+
},
|
|
27
|
+
"id": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The id of the object associated with the proof."
|
|
30
|
+
},
|
|
31
|
+
"proofIntegrity": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The integrity hash of the object associated with the proof."
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": [
|
|
37
|
+
"proofIntegrity"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.3sixty.global/immutable-proof/ImmutableProofCredential",
|
|
4
|
+
"title": "ImmutableProofCredential",
|
|
5
|
+
"description": "Interface describing an immutable proof credential.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"proof": {
|
|
9
|
+
"allOf": [
|
|
10
|
+
{
|
|
11
|
+
"$ref": "https://schema.3sixty.global/w3c-did/Proof"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"$ref": "https://schema.3sixty.global/immutable-proof/ImmutableProofDataIntegrity"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"description": "The proof of the verifiable credential, which includes the data integrity information."
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"allOf": [
|
|
21
|
+
{
|
|
22
|
+
"$ref": "https://schema.3sixty.global/w3c-did/DidVerifiableCredential"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.3sixty.global/immutable-proof/ImmutableProofDataIntegrity",
|
|
4
|
+
"title": "ImmutableProofDataIntegrity",
|
|
5
|
+
"description": "Interface describing additional data integrity fields attached.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"notarizationId": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The notarization id."
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.3sixty.global/immutable-proof/ImmutableProofFailure",
|
|
4
|
+
"title": "ImmutableProofFailure",
|
|
5
|
+
"description": "The failure reason of the proof.",
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"const": "notIssued",
|
|
9
|
+
"description": "Proof not yet issued."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"const": "proofMissing",
|
|
13
|
+
"description": "Proof missing."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"const": "verificationFailure",
|
|
17
|
+
"description": "Verification failure."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"const": "revoked",
|
|
21
|
+
"description": "Revoked."
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.3sixty.global/immutable-proof/ImmutableProofVerification",
|
|
4
|
+
"title": "ImmutableProofVerification",
|
|
5
|
+
"description": "Interface describing an immutable proof verification.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"@context": {
|
|
9
|
+
"const": "https://schema.3sixty.global/immutable-proof/",
|
|
10
|
+
"description": "JSON-LD Context."
|
|
11
|
+
},
|
|
12
|
+
"type": {
|
|
13
|
+
"const": "ImmutableProofVerification",
|
|
14
|
+
"description": "JSON-LD Type."
|
|
15
|
+
},
|
|
16
|
+
"verified": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"description": "Was the verification successful."
|
|
19
|
+
},
|
|
20
|
+
"failure": {
|
|
21
|
+
"$ref": "https://schema.3sixty.global/immutable-proof/ImmutableProofFailure",
|
|
22
|
+
"description": "If the verification was unsuccessful the failure reason."
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": [
|
|
26
|
+
"@context",
|
|
27
|
+
"type",
|
|
28
|
+
"verified"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ICompiledValidator } from "@3sixty/data-core";
|
|
2
|
+
/**
|
|
3
|
+
* Compiled validator for the ImmutableProof schema.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CompiledImmutableProof: ICompiledValidator;
|
|
6
|
+
/**
|
|
7
|
+
* Compiled validator for the ImmutableProofCredential schema.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CompiledImmutableProofCredential: ICompiledValidator;
|
|
10
|
+
/**
|
|
11
|
+
* Compiled validator for the ImmutableProofDataIntegrity schema.
|
|
12
|
+
*/
|
|
13
|
+
export declare const CompiledImmutableProofDataIntegrity: ICompiledValidator;
|
|
14
|
+
/**
|
|
15
|
+
* Compiled validator for the ImmutableProofVerification schema.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CompiledImmutableProofVerification: ICompiledValidator;
|
|
18
|
+
/**
|
|
19
|
+
* Compiled validator for the ImmutableProofFailure schema.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CompiledImmutableProofFailure: ICompiledValidator;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from "./compiled/validators.js";
|
|
2
|
+
export * from "./dataTypes/immutableProofDataTypes.js";
|
|
3
|
+
export * from "./models/api/IImmutableProofCreateRequest.js";
|
|
4
|
+
export * from "./models/api/IImmutableProofGetRequest.js";
|
|
5
|
+
export * from "./models/api/IImmutableProofGetResponse.js";
|
|
6
|
+
export * from "./models/api/IImmutableProofRemoveNotarizationRequest.js";
|
|
7
|
+
export * from "./models/api/IImmutableProofRemoveRequest.js";
|
|
8
|
+
export * from "./models/api/IImmutableProofVerifyRequest.js";
|
|
9
|
+
export * from "./models/api/IImmutableProofVerifyResponse.js";
|
|
10
|
+
export * from "./models/eventBus/IImmutableProofEventBusProofCreated.js";
|
|
11
|
+
export * from "./models/IImmutableProof.js";
|
|
12
|
+
export * from "./models/IImmutableProofComponent.js";
|
|
13
|
+
export * from "./models/IImmutableProofCredential.js";
|
|
14
|
+
export * from "./models/IImmutableProofDataIntegrity.js";
|
|
15
|
+
export * from "./models/IImmutableProofVerification.js";
|
|
16
|
+
export * from "./models/immutableProofContexts.js";
|
|
17
|
+
export * from "./models/immutableProofFailure.js";
|
|
18
|
+
export * from "./models/immutableProofMetricIds.js";
|
|
19
|
+
export * from "./models/immutableProofMetrics.js";
|
|
20
|
+
export * from "./models/immutableProofTopics.js";
|
|
21
|
+
export * from "./models/immutableProofTypes.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ImmutableProofContexts } from "./immutableProofContexts.js";
|
|
2
|
+
import type { ImmutableProofTypes } from "./immutableProofTypes.js";
|
|
3
|
+
/**
|
|
4
|
+
* Interface describing an immutable proof state.
|
|
5
|
+
*/
|
|
6
|
+
export interface IImmutableProof {
|
|
7
|
+
/**
|
|
8
|
+
* JSON-LD Context.
|
|
9
|
+
*/
|
|
10
|
+
"@context"?: [typeof ImmutableProofContexts.Context, typeof ImmutableProofContexts.ContextCommon];
|
|
11
|
+
/**
|
|
12
|
+
* JSON-LD Type.
|
|
13
|
+
*/
|
|
14
|
+
type?: typeof ImmutableProofTypes.ImmutableProof;
|
|
15
|
+
/**
|
|
16
|
+
* The id of the object associated with the proof.
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The integrity hash of the object associated with the proof.
|
|
21
|
+
* @json-ld namespace:twin-common
|
|
22
|
+
*/
|
|
23
|
+
proofIntegrity: string;
|
|
24
|
+
}
|