@twin.org/attestation-models 0.0.3-next.10 → 0.0.3-next.11
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/models/IAttestationComponent.js.map +1 -1
- package/dist/es/models/IAttestationConnector.js.map +1 -1
- package/dist/es/models/IAttestationInformation.js.map +1 -1
- package/dist/es/models/api/IAttestationTransferRequest.js.map +1 -1
- package/dist/es/schemas/AttestationInformation.json +1 -5
- package/dist/types/models/IAttestationComponent.d.ts +1 -2
- package/dist/types/models/IAttestationConnector.d.ts +1 -2
- package/dist/types/models/IAttestationInformation.d.ts +1 -6
- package/dist/types/models/api/IAttestationTransferRequest.d.ts +0 -4
- package/docs/changelog.md +7 -0
- package/docs/reference/interfaces/IAttestationComponent.md +1 -7
- package/docs/reference/interfaces/IAttestationConnector.md +1 -7
- package/docs/reference/interfaces/IAttestationInformation.md +1 -9
- package/docs/reference/interfaces/IAttestationTransferRequest.md +0 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAttestationComponent.js","sourceRoot":"","sources":["../../../src/models/IAttestationComponent.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 { IAttestationInformation } from \"./IAttestationInformation.js\";\n\n/**\n * Interface describing an attestation contract.\n */\nexport interface IAttestationComponent extends IComponent {\n\t/**\n\t * Attest the data and return the collated information.\n\t * @param attestationObject The data to attest.\n\t * @param namespace The namespace of the connector to use for the attestation, defaults to component configured namespace.\n\t * @returns The id of the attestation.\n\t */\n\tcreate(attestationObject: IJsonLdNodeObject, namespace?: string): Promise<string>;\n\n\t/**\n\t * Resolve and verify the attestation id.\n\t * @param id The attestation id to verify.\n\t * @returns The verified attestation details.\n\t */\n\tget(id: string): Promise<IAttestationInformation>;\n\n\t/**\n\t * Transfer the attestation to a new holder.\n\t * @param attestationId The attestation to transfer.\n\t * @param
|
|
1
|
+
{"version":3,"file":"IAttestationComponent.js","sourceRoot":"","sources":["../../../src/models/IAttestationComponent.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 { IAttestationInformation } from \"./IAttestationInformation.js\";\n\n/**\n * Interface describing an attestation contract.\n */\nexport interface IAttestationComponent extends IComponent {\n\t/**\n\t * Attest the data and return the collated information.\n\t * @param attestationObject The data to attest.\n\t * @param namespace The namespace of the connector to use for the attestation, defaults to component configured namespace.\n\t * @returns The id of the attestation.\n\t */\n\tcreate(attestationObject: IJsonLdNodeObject, namespace?: string): Promise<string>;\n\n\t/**\n\t * Resolve and verify the attestation id.\n\t * @param id The attestation id to verify.\n\t * @returns The verified attestation details.\n\t */\n\tget(id: string): Promise<IAttestationInformation>;\n\n\t/**\n\t * Transfer the attestation to a new holder.\n\t * @param attestationId The attestation to transfer.\n\t * @param holderAddress The address to transfer the attestation to.\n\t * @returns Nothing.\n\t */\n\ttransfer(attestationId: string, holderAddress: string): Promise<void>;\n\n\t/**\n\t * Destroy the attestation.\n\t * @param attestationId The attestation to transfer.\n\t * @returns Nothing.\n\t */\n\tdestroy(attestationId: string): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAttestationConnector.js","sourceRoot":"","sources":["../../../src/models/IAttestationConnector.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 { IAttestationInformation } from \"./IAttestationInformation.js\";\n\n/**\n * Interface describing an attestation connector.\n */\nexport interface IAttestationConnector extends IComponent {\n\t/**\n\t * Attest the data and return the collated information.\n\t * @param controller The controller identity of the user to access the vault keys.\n\t * @param verificationMethodId The identity verification method to use for attesting the data.\n\t * @param attestationObject The data to attest.\n\t * @returns The collated attestation data.\n\t */\n\tcreate(\n\t\tcontroller: string,\n\t\tverificationMethodId: string,\n\t\tattestationObject: IJsonLdNodeObject\n\t): Promise<string>;\n\n\t/**\n\t * Resolve and verify the attestation id.\n\t * @param id The attestation id to verify.\n\t * @returns The verified attestation details.\n\t */\n\tget(id: string): Promise<IAttestationInformation>;\n\n\t/**\n\t * Transfer the attestation to a new holder.\n\t * @param controller The controller identity of the user to access the vault keys.\n\t * @param attestationId The attestation to transfer.\n\t * @param
|
|
1
|
+
{"version":3,"file":"IAttestationConnector.js","sourceRoot":"","sources":["../../../src/models/IAttestationConnector.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 { IAttestationInformation } from \"./IAttestationInformation.js\";\n\n/**\n * Interface describing an attestation connector.\n */\nexport interface IAttestationConnector extends IComponent {\n\t/**\n\t * Attest the data and return the collated information.\n\t * @param controller The controller identity of the user to access the vault keys.\n\t * @param verificationMethodId The identity verification method to use for attesting the data.\n\t * @param attestationObject The data to attest.\n\t * @returns The collated attestation data.\n\t */\n\tcreate(\n\t\tcontroller: string,\n\t\tverificationMethodId: string,\n\t\tattestationObject: IJsonLdNodeObject\n\t): Promise<string>;\n\n\t/**\n\t * Resolve and verify the attestation id.\n\t * @param id The attestation id to verify.\n\t * @returns The verified attestation details.\n\t */\n\tget(id: string): Promise<IAttestationInformation>;\n\n\t/**\n\t * Transfer the attestation to a new holder.\n\t * @param controller The controller identity of the user to access the vault keys.\n\t * @param attestationId The attestation to transfer.\n\t * @param holderAddress The new controller address of the attestation belonging to the holder.\n\t * @returns Nothing.\n\t */\n\ttransfer(controller: string, attestationId: string, holderAddress: string): Promise<void>;\n\n\t/**\n\t * Destroy the attestation.\n\t * @param controller The controller identity of the user to access the vault keys.\n\t * @param attestationId The attestation to destroy.\n\t * @returns Nothing.\n\t */\n\tdestroy(controller: string, attestationId: string): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAttestationInformation.js","sourceRoot":"","sources":["../../../src/models/IAttestationInformation.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { AttestationContexts } from \"./attestationContexts.js\";\nimport type { AttestationTypes } from \"./attestationTypes.js\";\n\n/**\n * Interface describing the collated attestation information.\n */\nexport interface IAttestationInformation {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof AttestationContexts.Context,\n\t\ttypeof AttestationContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AttestationTypes.Information;\n\n\t/**\n\t * The unique identifier of the attestation.\n\t */\n\tid: string;\n\n\t/**\n\t * Created date/time of the attestation in ISO format.\n\t * @json-ld namespace:schema\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * Transferred date/time of the attestation in ISO format, can be blank if
|
|
1
|
+
{"version":3,"file":"IAttestationInformation.js","sourceRoot":"","sources":["../../../src/models/IAttestationInformation.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { AttestationContexts } from \"./attestationContexts.js\";\nimport type { AttestationTypes } from \"./attestationTypes.js\";\n\n/**\n * Interface describing the collated attestation information.\n */\nexport interface IAttestationInformation {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof AttestationContexts.Context,\n\t\ttypeof AttestationContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AttestationTypes.Information;\n\n\t/**\n\t * The unique identifier of the attestation.\n\t */\n\tid: string;\n\n\t/**\n\t * Created date/time of the attestation in ISO format.\n\t * @json-ld namespace:schema\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * Transferred date/time of the attestation in ISO format, can be blank if not yet transferred.\n\t * @json-ld type:schema:Date\n\t */\n\tdateTransferred?: string;\n\n\t/**\n\t * The identity of the owner.\n\t * @json-ld type:schema:identifier\n\t */\n\townerIdentity: string;\n\n\t/**\n\t * The data that was attested.\n\t * @json-ld namespace:twin-common\n\t */\n\tattestationObject: IJsonLdNodeObject;\n\n\t/**\n\t * The proof for the attested data.\n\t * @json-ld namespace:twin-attestation\n\t */\n\tproof?: IJsonLdNodeObject;\n\n\t/**\n\t * Whether the attestation has been verified.\n\t * @json-ld namespace:twin-common\n\t */\n\tverified?: boolean;\n\n\t/**\n\t * The verification failure message.\n\t * @json-ld type:schema:Text\n\t */\n\tverificationFailure?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAttestationTransferRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAttestationTransferRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Transfer the attestation to a new holder.\n */\nexport interface IAttestationTransferRequest {\n\t/**\n\t * The parameters to be used in the transfer.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The attestation id to transfer.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The parameters to be used in the transfer.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The new holder
|
|
1
|
+
{"version":3,"file":"IAttestationTransferRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAttestationTransferRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Transfer the attestation to a new holder.\n */\nexport interface IAttestationTransferRequest {\n\t/**\n\t * The parameters to be used in the transfer.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The attestation id to transfer.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The parameters to be used in the transfer.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The new holder address.\n\t\t */\n\t\tholderAddress: string;\n\t};\n}\n"]}
|
|
@@ -38,16 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dateTransferred": {
|
|
40
40
|
"type": "string",
|
|
41
|
-
"description": "Transferred date/time of the attestation in ISO format, can be blank if
|
|
41
|
+
"description": "Transferred date/time of the attestation in ISO format, can be blank if not yet transferred."
|
|
42
42
|
},
|
|
43
43
|
"ownerIdentity": {
|
|
44
44
|
"type": "string",
|
|
45
45
|
"description": "The identity of the owner."
|
|
46
46
|
},
|
|
47
|
-
"holderIdentity": {
|
|
48
|
-
"type": "string",
|
|
49
|
-
"description": "The identity of the current holder, can be undefined if owner is still the holder."
|
|
50
|
-
},
|
|
51
47
|
"attestationObject": {
|
|
52
48
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
|
|
53
49
|
"description": "The data that was attested."
|
|
@@ -21,11 +21,10 @@ export interface IAttestationComponent extends IComponent {
|
|
|
21
21
|
/**
|
|
22
22
|
* Transfer the attestation to a new holder.
|
|
23
23
|
* @param attestationId The attestation to transfer.
|
|
24
|
-
* @param holderIdentity The identity to transfer the attestation to.
|
|
25
24
|
* @param holderAddress The address to transfer the attestation to.
|
|
26
25
|
* @returns Nothing.
|
|
27
26
|
*/
|
|
28
|
-
transfer(attestationId: string,
|
|
27
|
+
transfer(attestationId: string, holderAddress: string): Promise<void>;
|
|
29
28
|
/**
|
|
30
29
|
* Destroy the attestation.
|
|
31
30
|
* @param attestationId The attestation to transfer.
|
|
@@ -23,11 +23,10 @@ export interface IAttestationConnector extends IComponent {
|
|
|
23
23
|
* Transfer the attestation to a new holder.
|
|
24
24
|
* @param controller The controller identity of the user to access the vault keys.
|
|
25
25
|
* @param attestationId The attestation to transfer.
|
|
26
|
-
* @param holderIdentity The holder identity of the attestation.
|
|
27
26
|
* @param holderAddress The new controller address of the attestation belonging to the holder.
|
|
28
27
|
* @returns Nothing.
|
|
29
28
|
*/
|
|
30
|
-
transfer(controller: string, attestationId: string,
|
|
29
|
+
transfer(controller: string, attestationId: string, holderAddress: string): Promise<void>;
|
|
31
30
|
/**
|
|
32
31
|
* Destroy the attestation.
|
|
33
32
|
* @param controller The controller identity of the user to access the vault keys.
|
|
@@ -29,7 +29,7 @@ export interface IAttestationInformation {
|
|
|
29
29
|
*/
|
|
30
30
|
dateCreated: string;
|
|
31
31
|
/**
|
|
32
|
-
* Transferred date/time of the attestation in ISO format, can be blank if
|
|
32
|
+
* Transferred date/time of the attestation in ISO format, can be blank if not yet transferred.
|
|
33
33
|
* @json-ld type:schema:Date
|
|
34
34
|
*/
|
|
35
35
|
dateTransferred?: string;
|
|
@@ -38,11 +38,6 @@ export interface IAttestationInformation {
|
|
|
38
38
|
* @json-ld type:schema:identifier
|
|
39
39
|
*/
|
|
40
40
|
ownerIdentity: string;
|
|
41
|
-
/**
|
|
42
|
-
* The identity of the current holder, can be undefined if owner is still the holder.
|
|
43
|
-
* @json-ld type:schema:identifier
|
|
44
|
-
*/
|
|
45
|
-
holderIdentity?: string;
|
|
46
41
|
/**
|
|
47
42
|
* The data that was attested.
|
|
48
43
|
* @json-ld namespace:twin-common
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.11](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.10...attestation-models-v0.0.3-next.11) (2026-05-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* remove holder identity ([#38](https://github.com/iotaledger/twin-attestation/issues/38)) ([4862d7f](https://github.com/iotaledger/twin-attestation/commit/4862d7f22345b82bcb90f27adc0d64ed75484813))
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.10](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.9...attestation-models-v0.0.3-next.10) (2026-05-20)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -60,7 +60,7 @@ The verified attestation details.
|
|
|
60
60
|
|
|
61
61
|
### transfer() {#transfer}
|
|
62
62
|
|
|
63
|
-
> **transfer**(`attestationId`, `
|
|
63
|
+
> **transfer**(`attestationId`, `holderAddress`): `Promise`\<`void`\>
|
|
64
64
|
|
|
65
65
|
Transfer the attestation to a new holder.
|
|
66
66
|
|
|
@@ -72,12 +72,6 @@ Transfer the attestation to a new holder.
|
|
|
72
72
|
|
|
73
73
|
The attestation to transfer.
|
|
74
74
|
|
|
75
|
-
##### holderIdentity
|
|
76
|
-
|
|
77
|
-
`string`
|
|
78
|
-
|
|
79
|
-
The identity to transfer the attestation to.
|
|
80
|
-
|
|
81
75
|
##### holderAddress
|
|
82
76
|
|
|
83
77
|
`string`
|
|
@@ -66,7 +66,7 @@ The verified attestation details.
|
|
|
66
66
|
|
|
67
67
|
### transfer() {#transfer}
|
|
68
68
|
|
|
69
|
-
> **transfer**(`controller`, `attestationId`, `
|
|
69
|
+
> **transfer**(`controller`, `attestationId`, `holderAddress`): `Promise`\<`void`\>
|
|
70
70
|
|
|
71
71
|
Transfer the attestation to a new holder.
|
|
72
72
|
|
|
@@ -84,12 +84,6 @@ The controller identity of the user to access the vault keys.
|
|
|
84
84
|
|
|
85
85
|
The attestation to transfer.
|
|
86
86
|
|
|
87
|
-
##### holderIdentity
|
|
88
|
-
|
|
89
|
-
`string`
|
|
90
|
-
|
|
91
|
-
The holder identity of the attestation.
|
|
92
|
-
|
|
93
87
|
##### holderAddress
|
|
94
88
|
|
|
95
89
|
`string`
|
|
@@ -40,7 +40,7 @@ Created date/time of the attestation in ISO format.
|
|
|
40
40
|
|
|
41
41
|
> `optional` **dateTransferred?**: `string`
|
|
42
42
|
|
|
43
|
-
Transferred date/time of the attestation in ISO format, can be blank if
|
|
43
|
+
Transferred date/time of the attestation in ISO format, can be blank if not yet transferred.
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
@@ -52,14 +52,6 @@ The identity of the owner.
|
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
55
|
-
### holderIdentity? {#holderidentity}
|
|
56
|
-
|
|
57
|
-
> `optional` **holderIdentity?**: `string`
|
|
58
|
-
|
|
59
|
-
The identity of the current holder, can be undefined if owner is still the holder.
|
|
60
|
-
|
|
61
|
-
***
|
|
62
|
-
|
|
63
55
|
### attestationObject {#attestationobject}
|
|
64
56
|
|
|
65
57
|
> **attestationObject**: `IJsonLdNodeObject`
|