@twin.org/immutable-proof-models 0.0.3-next.13 → 0.0.3-next.16
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 +0 -5
- package/dist/es/dataTypes/immutableProofDataTypes.js.map +1 -1
- package/dist/es/index.js +4 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IImmutableProofComponent.js.map +1 -1
- 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/api/IImmutableProofCreateRequest.js.map +1 -1
- package/dist/es/models/api/IImmutableProofGetResponse.js.map +1 -1
- 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/immutableProofTypes.js +0 -4
- package/dist/es/models/immutableProofTypes.js.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/models/IImmutableProofComponent.d.ts +17 -6
- package/dist/types/models/IImmutableProofCredential.d.ts +11 -0
- package/dist/types/models/IImmutableProofDataIntegrity.d.ts +10 -0
- package/dist/types/models/api/IImmutableProofCreateRequest.d.ts +10 -0
- package/dist/types/models/api/IImmutableProofGetResponse.d.ts +2 -2
- package/dist/types/models/api/IImmutableProofRemoveNotarizationRequest.d.ts +14 -0
- package/dist/types/models/api/IImmutableProofRemoveRequest.d.ts +14 -0
- package/dist/types/models/immutableProofTypes.d.ts +0 -4
- package/docs/changelog.md +44 -0
- package/docs/reference/index.md +4 -1
- package/docs/reference/interfaces/IImmutableProofComponent.md +43 -7
- package/docs/reference/interfaces/IImmutableProofCreateRequest.md +13 -0
- package/docs/reference/interfaces/IImmutableProofCredential.md +15 -0
- package/docs/reference/interfaces/IImmutableProofDataIntegrity.md +11 -0
- package/docs/reference/interfaces/IImmutableProofGetResponse.md +1 -1
- package/docs/reference/interfaces/IImmutableProofRemoveNotarizationRequest.md +17 -0
- package/docs/reference/interfaces/IImmutableProofRemoveRequest.md +17 -0
- package/docs/reference/variables/ImmutableProofTypes.md +0 -6
- package/package.json +1 -1
- package/dist/es/models/IImmutableProofReceipt.js +0 -2
- package/dist/es/models/IImmutableProofReceipt.js.map +0 -1
- package/dist/es/schemas/ImmutableProofReceipt.json +0 -39
- package/dist/types/models/IImmutableProofReceipt.d.ts +0 -26
- package/docs/reference/interfaces/IImmutableProofReceipt.md +0 -35
|
@@ -5,7 +5,6 @@ import { ImmutableProofContexts } from "../models/immutableProofContexts.js";
|
|
|
5
5
|
import { ImmutableProofTypes } from "../models/immutableProofTypes.js";
|
|
6
6
|
import ImmutableProofSchema from "../schemas/ImmutableProof.json" with { type: "json" };
|
|
7
7
|
import ImmutableProofFailureSchema from "../schemas/ImmutableProofFailure.json" with { type: "json" };
|
|
8
|
-
import ImmutableProofReceiptSchema from "../schemas/ImmutableProofReceipt.json" with { type: "json" };
|
|
9
8
|
import ImmutableProofVerificationSchema from "../schemas/ImmutableProofVerification.json" with { type: "json" };
|
|
10
9
|
/**
|
|
11
10
|
* Handle all the data types for immutable proof.
|
|
@@ -20,10 +19,6 @@ export class ImmutableProofDataTypes {
|
|
|
20
19
|
type: ImmutableProofTypes.ImmutableProof,
|
|
21
20
|
schema: ImmutableProofSchema
|
|
22
21
|
},
|
|
23
|
-
{
|
|
24
|
-
type: ImmutableProofTypes.ImmutableProofReceipt,
|
|
25
|
-
schema: ImmutableProofReceiptSchema
|
|
26
|
-
},
|
|
27
22
|
{
|
|
28
23
|
type: ImmutableProofTypes.ImmutableProofVerification,
|
|
29
24
|
schema: ImmutableProofVerificationSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"immutableProofDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/immutableProofDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,oBAAoB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,OAAO,2BAA2B,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,
|
|
1
|
+
{"version":3,"file":"immutableProofDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/immutableProofDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,oBAAoB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,OAAO,2BAA2B,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEhH;;GAEG;AACH,MAAM,OAAO,uBAAuB;IACnC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,mBAAmB,CAAC,cAAc;gBACxC,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,mBAAmB,CAAC,0BAA0B;gBACpD,MAAM,EAAE,gCAAgC;aACxC;YACD;gBACC,IAAI,EAAE,mBAAmB,CAAC,qBAAqB;gBAC/C,MAAM,EAAE,2BAA2B;aACnC;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,sBAAsB,CAAC,SAAS,EAChC,sBAAsB,CAAC,aAAa,EACpC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CACpD,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { ImmutableProofContexts } from \"../models/immutableProofContexts.js\";\nimport { ImmutableProofTypes } from \"../models/immutableProofTypes.js\";\nimport ImmutableProofSchema from \"../schemas/ImmutableProof.json\" with { type: \"json\" };\nimport ImmutableProofFailureSchema from \"../schemas/ImmutableProofFailure.json\" with { type: \"json\" };\nimport ImmutableProofVerificationSchema from \"../schemas/ImmutableProofVerification.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for immutable proof.\n */\nexport class ImmutableProofDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProof,\n\t\t\t\tschema: ImmutableProofSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProofVerification,\n\t\t\t\tschema: ImmutableProofVerificationSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ImmutableProofTypes.ImmutableProofFailure,\n\t\t\t\tschema: ImmutableProofFailureSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tImmutableProofContexts.Namespace,\n\t\t\tImmutableProofContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: t.type, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -4,12 +4,15 @@ export * from "./dataTypes/immutableProofDataTypes.js";
|
|
|
4
4
|
export * from "./models/api/IImmutableProofCreateRequest.js";
|
|
5
5
|
export * from "./models/api/IImmutableProofGetRequest.js";
|
|
6
6
|
export * from "./models/api/IImmutableProofGetResponse.js";
|
|
7
|
+
export * from "./models/api/IImmutableProofRemoveNotarizationRequest.js";
|
|
8
|
+
export * from "./models/api/IImmutableProofRemoveRequest.js";
|
|
7
9
|
export * from "./models/api/IImmutableProofVerifyRequest.js";
|
|
8
10
|
export * from "./models/api/IImmutableProofVerifyResponse.js";
|
|
9
11
|
export * from "./models/eventBus/IImmutableProofEventBusProofCreated.js";
|
|
10
12
|
export * from "./models/IImmutableProof.js";
|
|
11
13
|
export * from "./models/IImmutableProofComponent.js";
|
|
12
|
-
export * from "./models/
|
|
14
|
+
export * from "./models/IImmutableProofCredential.js";
|
|
15
|
+
export * from "./models/IImmutableProofDataIntegrity.js";
|
|
13
16
|
export * from "./models/IImmutableProofVerification.js";
|
|
14
17
|
export * from "./models/immutableProofContexts.js";
|
|
15
18
|
export * from "./models/immutableProofFailure.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -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,
|
|
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,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,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/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/immutableProofTopics.js\";\nexport * from \"./models/immutableProofTypes.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IImmutableProofComponent.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type {
|
|
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 { 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 Nothing.\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 Nothing.\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 \"@twin.org/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 an immutable proof state.\n */\nexport interface IImmutableProofDataIntegrity {\n\t/**\n\t * The notarization id.\n\t * @json-ld id\n\t */\n\tnotarizationId?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IImmutableProofCreateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\n\n/**\n * Create a proof.\n */\nexport interface IImmutableProofCreateRequest {\n\t/**\n\t * The parameters from the body.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The document to create the proof for.\n\t\t */\n\t\tdocument: IJsonLdNodeObject;\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IImmutableProofCreateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IImmutableProofCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\n\n/**\n * Create a proof.\n */\nexport interface IImmutableProofCreateRequest {\n\t/**\n\t * The parameters from the body.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The document to create the proof for.\n\t\t */\n\t\tdocument: IJsonLdNodeObject;\n\n\t\t/**\n\t\t * Optional settings for the proof.\n\t\t */\n\t\toptions?: {\n\t\t\t/**\n\t\t\t * An ISO 8601 date-time string specifying when the notarization lock expires.\n\t\t\t * If omitted, no deletion lock is applied.\n\t\t\t */\n\t\t\tdeleteLock?: string;\n\t\t};\n\t};\n}\n"]}
|
|
@@ -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 {
|
|
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 { 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"]}
|
|
@@ -9,10 +9,6 @@ export const ImmutableProofTypes = {
|
|
|
9
9
|
* Represents Immutable Proof.
|
|
10
10
|
*/
|
|
11
11
|
ImmutableProof: "ImmutableProof",
|
|
12
|
-
/**
|
|
13
|
-
* Represents Immutable Proof Receipt.
|
|
14
|
-
*/
|
|
15
|
-
ImmutableProofReceipt: "ImmutableProofReceipt",
|
|
16
12
|
/**
|
|
17
13
|
* Represents Immutable Proof Verification.
|
|
18
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"immutableProofTypes.js","sourceRoot":"","sources":["../../../src/models/immutableProofTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC;;OAEG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;OAEG;IACH,
|
|
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"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,12 +2,15 @@ export * from "./dataTypes/immutableProofDataTypes.js";
|
|
|
2
2
|
export * from "./models/api/IImmutableProofCreateRequest.js";
|
|
3
3
|
export * from "./models/api/IImmutableProofGetRequest.js";
|
|
4
4
|
export * from "./models/api/IImmutableProofGetResponse.js";
|
|
5
|
+
export * from "./models/api/IImmutableProofRemoveNotarizationRequest.js";
|
|
6
|
+
export * from "./models/api/IImmutableProofRemoveRequest.js";
|
|
5
7
|
export * from "./models/api/IImmutableProofVerifyRequest.js";
|
|
6
8
|
export * from "./models/api/IImmutableProofVerifyResponse.js";
|
|
7
9
|
export * from "./models/eventBus/IImmutableProofEventBusProofCreated.js";
|
|
8
10
|
export * from "./models/IImmutableProof.js";
|
|
9
11
|
export * from "./models/IImmutableProofComponent.js";
|
|
10
|
-
export * from "./models/
|
|
12
|
+
export * from "./models/IImmutableProofCredential.js";
|
|
13
|
+
export * from "./models/IImmutableProofDataIntegrity.js";
|
|
11
14
|
export * from "./models/IImmutableProofVerification.js";
|
|
12
15
|
export * from "./models/immutableProofContexts.js";
|
|
13
16
|
export * from "./models/immutableProofFailure.js";
|
|
@@ -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 {
|
|
3
|
+
import type { IImmutableProofCredential } from "./IImmutableProofCredential.js";
|
|
4
4
|
import type { IImmutableProofVerification } from "./IImmutableProofVerification.js";
|
|
5
5
|
/**
|
|
6
6
|
* Interface describing an immutable proof contract.
|
|
@@ -9,16 +9,20 @@ export interface IImmutableProofComponent extends IComponent {
|
|
|
9
9
|
/**
|
|
10
10
|
* Create a new proof.
|
|
11
11
|
* @param document The document to create the proof for.
|
|
12
|
+
* @param options Optional settings for the proof.
|
|
13
|
+
* @param options.deleteLock An ISO 8601 date-time string specifying when the notarization lock expires; if omitted no lock is applied.
|
|
12
14
|
* @returns The id of the new proof.
|
|
13
15
|
*/
|
|
14
|
-
create(document: IJsonLdNodeObject
|
|
16
|
+
create(document: IJsonLdNodeObject, options?: {
|
|
17
|
+
deleteLock?: string;
|
|
18
|
+
}): Promise<string>;
|
|
15
19
|
/**
|
|
16
20
|
* Get a proof.
|
|
17
21
|
* @param id The id of the proof to get.
|
|
18
22
|
* @returns The proof.
|
|
19
23
|
* @throws NotFoundError if the proof is not found.
|
|
20
24
|
*/
|
|
21
|
-
get(id: string): Promise<
|
|
25
|
+
get(id: string): Promise<IImmutableProofCredential>;
|
|
22
26
|
/**
|
|
23
27
|
* Verify a proof.
|
|
24
28
|
* @param id The id of the proof to verify.
|
|
@@ -27,10 +31,17 @@ export interface IImmutableProofComponent extends IComponent {
|
|
|
27
31
|
*/
|
|
28
32
|
verify(id: string): Promise<IImmutableProofVerification>;
|
|
29
33
|
/**
|
|
30
|
-
* Remove the
|
|
31
|
-
* @param id The id of the proof to remove
|
|
34
|
+
* Remove the proof and its notarization.
|
|
35
|
+
* @param id The id of the proof to remove.
|
|
32
36
|
* @returns Nothing.
|
|
33
37
|
* @throws NotFoundError if the proof is not found.
|
|
34
38
|
*/
|
|
35
|
-
|
|
39
|
+
remove(id: string): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Remove only the notarization for the proof, keeping the proof entity.
|
|
42
|
+
* @param id The id of the proof to remove the notarization from.
|
|
43
|
+
* @returns Nothing.
|
|
44
|
+
* @throws NotFoundError if the proof is not found.
|
|
45
|
+
*/
|
|
46
|
+
removeNotarization(id: string): Promise<void>;
|
|
36
47
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IDidVerifiableCredential, IProof } from "@twin.org/standards-w3c-did";
|
|
2
|
+
import type { IImmutableProofDataIntegrity } from "./IImmutableProofDataIntegrity.js";
|
|
3
|
+
/**
|
|
4
|
+
* Interface describing an immutable proof credential.
|
|
5
|
+
*/
|
|
6
|
+
export interface IImmutableProofCredential extends Omit<IDidVerifiableCredential, "proof"> {
|
|
7
|
+
/**
|
|
8
|
+
* The proof of the verifiable credential, which includes the data integrity information.
|
|
9
|
+
*/
|
|
10
|
+
proof?: IProof & IImmutableProofDataIntegrity;
|
|
11
|
+
}
|
|
@@ -11,5 +11,15 @@ export interface IImmutableProofCreateRequest {
|
|
|
11
11
|
* The document to create the proof for.
|
|
12
12
|
*/
|
|
13
13
|
document: IJsonLdNodeObject;
|
|
14
|
+
/**
|
|
15
|
+
* Optional settings for the proof.
|
|
16
|
+
*/
|
|
17
|
+
options?: {
|
|
18
|
+
/**
|
|
19
|
+
* An ISO 8601 date-time string specifying when the notarization lock expires.
|
|
20
|
+
* If omitted, no deletion lock is applied.
|
|
21
|
+
*/
|
|
22
|
+
deleteLock?: string;
|
|
23
|
+
};
|
|
14
24
|
};
|
|
15
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IDidVerifiableCredential } from "@twin.org/standards-w3c-did";
|
|
2
1
|
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
import type { IImmutableProofCredential } from "../IImmutableProofCredential.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:
|
|
16
|
+
body: IImmutableProofCredential;
|
|
17
17
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remove the notarization for a proof.
|
|
3
|
+
*/
|
|
4
|
+
export interface IImmutableProofRemoveNotarizationRequest {
|
|
5
|
+
/**
|
|
6
|
+
* The parameters from the path.
|
|
7
|
+
*/
|
|
8
|
+
pathParams: {
|
|
9
|
+
/**
|
|
10
|
+
* The id of the immutable proof to remove the notarization from.
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -6,10 +6,6 @@ export declare const ImmutableProofTypes: {
|
|
|
6
6
|
* Represents Immutable Proof.
|
|
7
7
|
*/
|
|
8
8
|
readonly ImmutableProof: "ImmutableProof";
|
|
9
|
-
/**
|
|
10
|
-
* Represents Immutable Proof Receipt.
|
|
11
|
-
*/
|
|
12
|
-
readonly ImmutableProofReceipt: "ImmutableProofReceipt";
|
|
13
9
|
/**
|
|
14
10
|
* Represents Immutable Proof Verification.
|
|
15
11
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.16](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-models-v0.0.3-next.15...immutable-proof-models-v0.0.3-next.16) (2026-05-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add context id features ([#14](https://github.com/iotaledger/twin-immutable-proof/issues/14)) ([ed5a594](https://github.com/iotaledger/twin-immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
|
|
9
|
+
* add missing proof type registration ([1e9f52b](https://github.com/iotaledger/twin-immutable-proof/commit/1e9f52b88ab201e97c9d2aa7611fb8f77a82d614))
|
|
10
|
+
* add ts-to-jsonld-context tool ([871191b](https://github.com/iotaledger/twin-immutable-proof/commit/871191b75cb82c2f6daaab08a71384ba92f02a64))
|
|
11
|
+
* add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
|
|
12
|
+
* eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
|
|
13
|
+
* immutable proof as vc ([#31](https://github.com/iotaledger/twin-immutable-proof/issues/31)) ([79cdb03](https://github.com/iotaledger/twin-immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
|
|
14
|
+
* replace verifiable storage with notarization as immutable proof ([#41](https://github.com/iotaledger/twin-immutable-proof/issues/41)) ([54f2154](https://github.com/iotaledger/twin-immutable-proof/commit/54f215469b0bdc9ea94cad572ca13b8533144104))
|
|
15
|
+
* typescript 6 update ([34d8aea](https://github.com/iotaledger/twin-immutable-proof/commit/34d8aea0ea0c1e1252de1882517abb1683d98313))
|
|
16
|
+
* update contexts ([#22](https://github.com/iotaledger/twin-immutable-proof/issues/22)) ([645b880](https://github.com/iotaledger/twin-immutable-proof/commit/645b8803540408c74e3891b2c5ff9aefd5908d9f))
|
|
17
|
+
* update contexts and namespaces ([#20](https://github.com/iotaledger/twin-immutable-proof/issues/20)) ([d38aa69](https://github.com/iotaledger/twin-immutable-proof/commit/d38aa696c73e4fcc304f08fb458d5900109abcb4))
|
|
18
|
+
* update data types to use fully qualified names ([e94d0f5](https://github.com/iotaledger/twin-immutable-proof/commit/e94d0f5db93856b5b59cfd34e55252fa13a7f4e0))
|
|
19
|
+
* update dependencies ([1ec6b18](https://github.com/iotaledger/twin-immutable-proof/commit/1ec6b18e93198a8fc4935700863cdab1c3df7b64))
|
|
20
|
+
* update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
|
|
21
|
+
* update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
|
|
22
|
+
* update remove methods ([#45](https://github.com/iotaledger/twin-immutable-proof/issues/45)) ([9db19bb](https://github.com/iotaledger/twin-immutable-proof/commit/9db19bb4c8e6f5d66139755e8b8a8071a77c4887))
|
|
23
|
+
* update schemas ([ab0569a](https://github.com/iotaledger/twin-immutable-proof/commit/ab0569adf3419beefd8aef7793fdbe5b2fe2d93e))
|
|
24
|
+
* update ts-to-schema generation ([c4fc864](https://github.com/iotaledger/twin-immutable-proof/commit/c4fc8646e7b8ee040d356f7f0f3b2d6f4ac63e40))
|
|
25
|
+
* update twindev schemas ([d2bb94b](https://github.com/iotaledger/twin-immutable-proof/commit/d2bb94b31e61f899e41dbca1b1aeb2b3bb70b229))
|
|
26
|
+
* use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* Missing user and node identity on create ([#1](https://github.com/iotaledger/twin-immutable-proof/issues/1)) ([80ea2f9](https://github.com/iotaledger/twin-immutable-proof/commit/80ea2f901afc7531f4a522227a61e6fa1482484d))
|
|
32
|
+
|
|
33
|
+
## [0.0.3-next.15](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-models-v0.0.3-next.14...immutable-proof-models-v0.0.3-next.15) (2026-05-29)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* update remove methods ([#45](https://github.com/iotaledger/twin-immutable-proof/issues/45)) ([9db19bb](https://github.com/iotaledger/twin-immutable-proof/commit/9db19bb4c8e6f5d66139755e8b8a8071a77c4887))
|
|
39
|
+
|
|
40
|
+
## [0.0.3-next.14](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-models-v0.0.3-next.13...immutable-proof-models-v0.0.3-next.14) (2026-05-28)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
* replace verifiable storage with notarization as immutable proof ([#41](https://github.com/iotaledger/twin-immutable-proof/issues/41)) ([54f2154](https://github.com/iotaledger/twin-immutable-proof/commit/54f215469b0bdc9ea94cad572ca13b8533144104))
|
|
46
|
+
|
|
3
47
|
## [0.0.3-next.13](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-models-v0.0.3-next.12...immutable-proof-models-v0.0.3-next.13) (2026-05-20)
|
|
4
48
|
|
|
5
49
|
|
package/docs/reference/index.md
CHANGED
|
@@ -8,11 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
- [IImmutableProof](interfaces/IImmutableProof.md)
|
|
10
10
|
- [IImmutableProofComponent](interfaces/IImmutableProofComponent.md)
|
|
11
|
-
- [
|
|
11
|
+
- [IImmutableProofCredential](interfaces/IImmutableProofCredential.md)
|
|
12
|
+
- [IImmutableProofDataIntegrity](interfaces/IImmutableProofDataIntegrity.md)
|
|
12
13
|
- [IImmutableProofVerification](interfaces/IImmutableProofVerification.md)
|
|
13
14
|
- [IImmutableProofCreateRequest](interfaces/IImmutableProofCreateRequest.md)
|
|
14
15
|
- [IImmutableProofGetRequest](interfaces/IImmutableProofGetRequest.md)
|
|
15
16
|
- [IImmutableProofGetResponse](interfaces/IImmutableProofGetResponse.md)
|
|
17
|
+
- [IImmutableProofRemoveNotarizationRequest](interfaces/IImmutableProofRemoveNotarizationRequest.md)
|
|
18
|
+
- [IImmutableProofRemoveRequest](interfaces/IImmutableProofRemoveRequest.md)
|
|
16
19
|
- [IImmutableProofVerifyRequest](interfaces/IImmutableProofVerifyRequest.md)
|
|
17
20
|
- [IImmutableProofVerifyResponse](interfaces/IImmutableProofVerifyResponse.md)
|
|
18
21
|
- [IImmutableProofEventBusProofCreated](interfaces/IImmutableProofEventBusProofCreated.md)
|
|
@@ -10,7 +10,7 @@ Interface describing an immutable proof contract.
|
|
|
10
10
|
|
|
11
11
|
### create() {#create}
|
|
12
12
|
|
|
13
|
-
> **create**(`document`): `Promise`\<`string`\>
|
|
13
|
+
> **create**(`document`, `options?`): `Promise`\<`string`\>
|
|
14
14
|
|
|
15
15
|
Create a new proof.
|
|
16
16
|
|
|
@@ -22,6 +22,16 @@ Create a new proof.
|
|
|
22
22
|
|
|
23
23
|
The document to create the proof for.
|
|
24
24
|
|
|
25
|
+
##### options?
|
|
26
|
+
|
|
27
|
+
Optional settings for the proof.
|
|
28
|
+
|
|
29
|
+
###### deleteLock?
|
|
30
|
+
|
|
31
|
+
`string`
|
|
32
|
+
|
|
33
|
+
An ISO 8601 date-time string specifying when the notarization lock expires; if omitted no lock is applied.
|
|
34
|
+
|
|
25
35
|
#### Returns
|
|
26
36
|
|
|
27
37
|
`Promise`\<`string`\>
|
|
@@ -32,7 +42,7 @@ The id of the new proof.
|
|
|
32
42
|
|
|
33
43
|
### get() {#get}
|
|
34
44
|
|
|
35
|
-
> **get**(`id`): `Promise
|
|
45
|
+
> **get**(`id`): `Promise`\<[`IImmutableProofCredential`](IImmutableProofCredential.md)\>
|
|
36
46
|
|
|
37
47
|
Get a proof.
|
|
38
48
|
|
|
@@ -46,7 +56,7 @@ The id of the proof to get.
|
|
|
46
56
|
|
|
47
57
|
#### Returns
|
|
48
58
|
|
|
49
|
-
`Promise
|
|
59
|
+
`Promise`\<[`IImmutableProofCredential`](IImmutableProofCredential.md)\>
|
|
50
60
|
|
|
51
61
|
The proof.
|
|
52
62
|
|
|
@@ -82,11 +92,37 @@ NotFoundError if the proof is not found.
|
|
|
82
92
|
|
|
83
93
|
***
|
|
84
94
|
|
|
85
|
-
###
|
|
95
|
+
### remove() {#remove}
|
|
96
|
+
|
|
97
|
+
> **remove**(`id`): `Promise`\<`void`\>
|
|
98
|
+
|
|
99
|
+
Remove the proof and its notarization.
|
|
100
|
+
|
|
101
|
+
#### Parameters
|
|
102
|
+
|
|
103
|
+
##### id
|
|
104
|
+
|
|
105
|
+
`string`
|
|
106
|
+
|
|
107
|
+
The id of the proof to remove.
|
|
108
|
+
|
|
109
|
+
#### Returns
|
|
110
|
+
|
|
111
|
+
`Promise`\<`void`\>
|
|
112
|
+
|
|
113
|
+
Nothing.
|
|
114
|
+
|
|
115
|
+
#### Throws
|
|
116
|
+
|
|
117
|
+
NotFoundError if the proof is not found.
|
|
118
|
+
|
|
119
|
+
***
|
|
120
|
+
|
|
121
|
+
### removeNotarization() {#removenotarization}
|
|
86
122
|
|
|
87
|
-
> **
|
|
123
|
+
> **removeNotarization**(`id`): `Promise`\<`void`\>
|
|
88
124
|
|
|
89
|
-
Remove the
|
|
125
|
+
Remove only the notarization for the proof, keeping the proof entity.
|
|
90
126
|
|
|
91
127
|
#### Parameters
|
|
92
128
|
|
|
@@ -94,7 +130,7 @@ Remove the verifiable storage for the proof.
|
|
|
94
130
|
|
|
95
131
|
`string`
|
|
96
132
|
|
|
97
|
-
The id of the proof to remove the
|
|
133
|
+
The id of the proof to remove the notarization from.
|
|
98
134
|
|
|
99
135
|
#### Returns
|
|
100
136
|
|
|
@@ -15,3 +15,16 @@ The parameters from the body.
|
|
|
15
15
|
> **document**: `IJsonLdNodeObject`
|
|
16
16
|
|
|
17
17
|
The document to create the proof for.
|
|
18
|
+
|
|
19
|
+
#### options?
|
|
20
|
+
|
|
21
|
+
> `optional` **options?**: `object`
|
|
22
|
+
|
|
23
|
+
Optional settings for the proof.
|
|
24
|
+
|
|
25
|
+
##### options.deleteLock?
|
|
26
|
+
|
|
27
|
+
> `optional` **deleteLock?**: `string`
|
|
28
|
+
|
|
29
|
+
An ISO 8601 date-time string specifying when the notarization lock expires.
|
|
30
|
+
If omitted, no deletion lock is applied.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Interface: IImmutableProofCredential
|
|
2
|
+
|
|
3
|
+
Interface describing an immutable proof credential.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `Omit`\<`IDidVerifiableCredential`, `"proof"`\>
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### proof? {#proof}
|
|
12
|
+
|
|
13
|
+
> `optional` **proof?**: IProof & IImmutableProofDataIntegrity
|
|
14
|
+
|
|
15
|
+
The proof of the verifiable credential, which includes the data integrity information.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IImmutableProofRemoveNotarizationRequest
|
|
2
|
+
|
|
3
|
+
Remove the notarization for a proof.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The parameters from the path.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The id of the immutable proof to remove the notarization from.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IImmutableProofRemoveRequest
|
|
2
|
+
|
|
3
|
+
Remove a proof.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The parameters from the path.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The id of the immutable proof to remove.
|
|
@@ -12,12 +12,6 @@ The types of immutable proof data.
|
|
|
12
12
|
|
|
13
13
|
Represents Immutable Proof.
|
|
14
14
|
|
|
15
|
-
### ImmutableProofReceipt {#immutableproofreceipt}
|
|
16
|
-
|
|
17
|
-
> `readonly` **ImmutableProofReceipt**: `"ImmutableProofReceipt"` = `"ImmutableProofReceipt"`
|
|
18
|
-
|
|
19
|
-
Represents Immutable Proof Receipt.
|
|
20
|
-
|
|
21
15
|
### ImmutableProofVerification {#immutableproofverification}
|
|
22
16
|
|
|
23
17
|
> `readonly` **ImmutableProofVerification**: `"ImmutableProofVerification"` = `"ImmutableProofVerification"`
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IImmutableProofReceipt.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofReceipt.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { ImmutableProofContexts } from \"./immutableProofContexts.js\";\nimport type { ImmutableProofTypes } from \"./immutableProofTypes.js\";\n\n/**\n * Interface describing an immutable proof receipt.\n */\nexport interface IImmutableProofReceipt {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?: [typeof ImmutableProofContexts.Context, typeof ImmutableProofContexts.ContextCommon];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof ImmutableProofTypes.ImmutableProofReceipt;\n\n\t/**\n\t * The immutable receipt detail for where the proof is stored.\n\t * @json-ld id\n\t */\n\timmutableReceipt?: IJsonLdNodeObject;\n\n\t/**\n\t * The verifiable storage id for where the proof is stored.\n\t * @json-ld id\n\t */\n\tverifiableStorageId?: string;\n}\n"]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schema.twindev.org/immutable-proof/ImmutableProofReceipt",
|
|
4
|
-
"title": "ImmutableProofReceipt",
|
|
5
|
-
"description": "Interface describing an immutable proof receipt.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"@context": {
|
|
9
|
-
"type": "array",
|
|
10
|
-
"prefixItems": [
|
|
11
|
-
{
|
|
12
|
-
"const": "https://schema.twindev.org/immutable-proof/"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"const": "https://schema.twindev.org/common/"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"items": false,
|
|
19
|
-
"minItems": 2,
|
|
20
|
-
"maxItems": 2,
|
|
21
|
-
"description": "JSON-LD Context."
|
|
22
|
-
},
|
|
23
|
-
"type": {
|
|
24
|
-
"const": "ImmutableProofReceipt",
|
|
25
|
-
"description": "JSON-LD Type."
|
|
26
|
-
},
|
|
27
|
-
"immutableReceipt": {
|
|
28
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
|
|
29
|
-
"description": "The immutable receipt detail for where the proof is stored."
|
|
30
|
-
},
|
|
31
|
-
"verifiableStorageId": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "The verifiable storage id for where the proof is stored."
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"required": [
|
|
37
|
-
"type"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
-
import type { ImmutableProofContexts } from "./immutableProofContexts.js";
|
|
3
|
-
import type { ImmutableProofTypes } from "./immutableProofTypes.js";
|
|
4
|
-
/**
|
|
5
|
-
* Interface describing an immutable proof receipt.
|
|
6
|
-
*/
|
|
7
|
-
export interface IImmutableProofReceipt {
|
|
8
|
-
/**
|
|
9
|
-
* JSON-LD Context.
|
|
10
|
-
*/
|
|
11
|
-
"@context"?: [typeof ImmutableProofContexts.Context, typeof ImmutableProofContexts.ContextCommon];
|
|
12
|
-
/**
|
|
13
|
-
* JSON-LD Type.
|
|
14
|
-
*/
|
|
15
|
-
type: typeof ImmutableProofTypes.ImmutableProofReceipt;
|
|
16
|
-
/**
|
|
17
|
-
* The immutable receipt detail for where the proof is stored.
|
|
18
|
-
* @json-ld id
|
|
19
|
-
*/
|
|
20
|
-
immutableReceipt?: IJsonLdNodeObject;
|
|
21
|
-
/**
|
|
22
|
-
* The verifiable storage id for where the proof is stored.
|
|
23
|
-
* @json-ld id
|
|
24
|
-
*/
|
|
25
|
-
verifiableStorageId?: string;
|
|
26
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Interface: IImmutableProofReceipt
|
|
2
|
-
|
|
3
|
-
Interface describing an immutable proof receipt.
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
### @context? {#context}
|
|
8
|
-
|
|
9
|
-
> `optional` **@context?**: \[`"https://schema.twindev.org/immutable-proof/"`, `"https://schema.twindev.org/common/"`\]
|
|
10
|
-
|
|
11
|
-
JSON-LD Context.
|
|
12
|
-
|
|
13
|
-
***
|
|
14
|
-
|
|
15
|
-
### type {#type}
|
|
16
|
-
|
|
17
|
-
> **type**: `"ImmutableProofReceipt"`
|
|
18
|
-
|
|
19
|
-
JSON-LD Type.
|
|
20
|
-
|
|
21
|
-
***
|
|
22
|
-
|
|
23
|
-
### immutableReceipt? {#immutablereceipt}
|
|
24
|
-
|
|
25
|
-
> `optional` **immutableReceipt?**: `IJsonLdNodeObject`
|
|
26
|
-
|
|
27
|
-
The immutable receipt detail for where the proof is stored.
|
|
28
|
-
|
|
29
|
-
***
|
|
30
|
-
|
|
31
|
-
### verifiableStorageId? {#verifiablestorageid}
|
|
32
|
-
|
|
33
|
-
> `optional` **verifiableStorageId?**: `string`
|
|
34
|
-
|
|
35
|
-
The verifiable storage id for where the proof is stored.
|