@twin.org/attestation-models 0.0.2-next.4 → 0.0.3-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/es/dataTypes/attestationDataTypes.js +30 -0
- package/dist/es/dataTypes/attestationDataTypes.js.map +1 -0
- package/dist/es/factories/attestationConnectorFactory.js +9 -0
- package/dist/es/factories/attestationConnectorFactory.js.map +1 -0
- package/dist/es/index.js +16 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IAttestationComponent.js +2 -0
- package/dist/es/models/IAttestationComponent.js.map +1 -0
- package/dist/es/models/IAttestationConnector.js +2 -0
- package/dist/es/models/IAttestationConnector.js.map +1 -0
- package/dist/es/models/IAttestationInformation.js +2 -0
- package/dist/es/models/IAttestationInformation.js.map +1 -0
- package/dist/es/models/IAttestationJwtProof.js +2 -0
- package/dist/es/models/IAttestationJwtProof.js.map +1 -0
- package/dist/es/models/api/IAttestationCreateRequest.js +2 -0
- package/dist/es/models/api/IAttestationCreateRequest.js.map +1 -0
- package/dist/es/models/api/IAttestationDestroyRequest.js +4 -0
- package/dist/es/models/api/IAttestationDestroyRequest.js.map +1 -0
- package/dist/es/models/api/IAttestationGetRequest.js +2 -0
- package/dist/es/models/api/IAttestationGetRequest.js.map +1 -0
- package/dist/es/models/api/IAttestationGetResponse.js +2 -0
- package/dist/es/models/api/IAttestationGetResponse.js.map +1 -0
- package/dist/es/models/api/IAttestationTransferRequest.js +4 -0
- package/dist/es/models/api/IAttestationTransferRequest.js.map +1 -0
- package/dist/es/models/attestationContexts.js +33 -0
- package/dist/es/models/attestationContexts.js.map +1 -0
- package/dist/es/models/attestationTypes.js +17 -0
- package/dist/es/models/attestationTypes.js.map +1 -0
- package/dist/es/schemas/AttestationInformation.json +76 -0
- package/dist/es/schemas/AttestationJwtProof.json +42 -0
- package/dist/types/factories/attestationConnectorFactory.d.ts +1 -1
- package/dist/types/index.d.ts +13 -13
- package/dist/types/models/IAttestationComponent.d.ts +4 -8
- package/dist/types/models/IAttestationConnector.d.ts +1 -1
- package/dist/types/models/IAttestationInformation.d.ts +13 -5
- package/dist/types/models/IAttestationJwtProof.d.ts +4 -3
- package/dist/types/models/api/IAttestationGetResponse.d.ts +1 -1
- package/dist/types/models/attestationContexts.d.ts +20 -4
- package/docs/changelog.md +106 -26
- package/docs/examples.md +12 -1
- package/docs/reference/classes/AttestationDataTypes.md +1 -1
- package/docs/reference/interfaces/IAttestationComponent.md +7 -39
- package/docs/reference/interfaces/IAttestationConnector.md +4 -12
- package/docs/reference/interfaces/IAttestationCreateRequest.md +2 -2
- package/docs/reference/interfaces/IAttestationDestroyRequest.md +1 -1
- package/docs/reference/interfaces/IAttestationGetRequest.md +3 -3
- package/docs/reference/interfaces/IAttestationGetResponse.md +3 -3
- package/docs/reference/interfaces/IAttestationInformation.md +17 -17
- package/docs/reference/interfaces/IAttestationJwtProof.md +3 -3
- package/docs/reference/interfaces/IAttestationTransferRequest.md +2 -2
- package/docs/reference/variables/AttestationContexts.md +30 -6
- package/docs/reference/variables/AttestationTypes.md +2 -2
- package/package.json +8 -10
- package/dist/cjs/index.cjs +0 -217
- package/dist/esm/index.mjs +0 -212
package/docs/changelog.md
CHANGED
|
@@ -1,83 +1,163 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.0.
|
|
3
|
+
## [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
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **attestation-models:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
## [0.0.3-next.9](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.8...attestation-models-v0.0.3-next.9) (2026-05-12)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* typescript 6 update ([9484667](https://github.com/iotaledger/twin-attestation/commit/948466713dc980e4b2d89e72ebb927b3fe530280))
|
|
16
|
+
|
|
17
|
+
## [0.0.3-next.8](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.7...attestation-models-v0.0.3-next.8) (2026-04-27)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Miscellaneous Chores
|
|
21
|
+
|
|
22
|
+
* **attestation-models:** Synchronize repo versions
|
|
23
|
+
|
|
24
|
+
## [0.0.3-next.7](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.6...attestation-models-v0.0.3-next.7) (2026-02-25)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* update schemas ([c163f36](https://github.com/iotaledger/twin-attestation/commit/c163f3623d54a0e87a97cf5eab25327b9aeac0fe))
|
|
30
|
+
|
|
31
|
+
## [0.0.3-next.6](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.5...attestation-models-v0.0.3-next.6) (2026-02-11)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* correct context ordering ([c7cded2](https://github.com/iotaledger/twin-attestation/commit/c7cded248662b8b78ff41b19749bc182ff5105c0))
|
|
37
|
+
|
|
38
|
+
## [0.0.3-next.5](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.4...attestation-models-v0.0.3-next.5) (2026-02-11)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Miscellaneous Chores
|
|
42
|
+
|
|
43
|
+
* **attestation-models:** Synchronize repo versions
|
|
44
|
+
|
|
45
|
+
## [0.0.3-next.4](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.3...attestation-models-v0.0.3-next.4) (2026-02-11)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* add ts-to-jsonld-context tool ([df7edd0](https://github.com/iotaledger/twin-attestation/commit/df7edd0d32cabc2b0f9f6dc7b216f569f739324d))
|
|
51
|
+
* remove unused schemas causing conflict ([#27](https://github.com/iotaledger/twin-attestation/issues/27)) ([9723bc3](https://github.com/iotaledger/twin-attestation/commit/9723bc3757f87ce8a943f5f091a92d258f867892))
|
|
52
|
+
|
|
53
|
+
## [0.0.3-next.3](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.2...attestation-models-v0.0.3-next.3) (2026-01-21)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
* context updates ([#25](https://github.com/iotaledger/twin-attestation/issues/25)) ([1ea71b2](https://github.com/iotaledger/twin-attestation/commit/1ea71b28d874daef4d0bca594fb5dbf5f2a47571))
|
|
59
|
+
|
|
60
|
+
## [0.0.3-next.2](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.1...attestation-models-v0.0.3-next.2) (2026-01-14)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
|
|
65
|
+
* update contexts and namespaces ([#23](https://github.com/iotaledger/twin-attestation/issues/23)) ([7e7ffb4](https://github.com/iotaledger/twin-attestation/commit/7e7ffb4056bfe296dd3cedcaa7a9bfb91fd830d7))
|
|
66
|
+
|
|
67
|
+
## [0.0.3-next.1](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.3-next.0...attestation-models-v0.0.3-next.1) (2025-11-12)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Features
|
|
71
|
+
|
|
72
|
+
* add context id features ([#21](https://github.com/iotaledger/twin-attestation/issues/21)) ([640deab](https://github.com/iotaledger/twin-attestation/commit/640deabfc00340e619283f94570c5e1ec45e83af))
|
|
73
|
+
* add validate-locales ([a1f9e13](https://github.com/iotaledger/twin-attestation/commit/a1f9e13875a661f612ce16dd9896e7df20c6a7ff))
|
|
74
|
+
* eslint migration to flat config ([7c768ff](https://github.com/iotaledger/twin-attestation/commit/7c768ffae02456d60fd62ba8b4b488c307ceff32))
|
|
75
|
+
* release to production ([aa69a08](https://github.com/iotaledger/twin-attestation/commit/aa69a08fbd3897c8d72b0d32ec730f104ad31b33))
|
|
76
|
+
* release to production ([89ca987](https://github.com/iotaledger/twin-attestation/commit/89ca987963d9090abcfc1b62bc997e2c521944ec))
|
|
77
|
+
* update data type registration with fully qualified names ([5982245](https://github.com/iotaledger/twin-attestation/commit/59822454a027a9c6dfa72ffa9aabb9622b925929))
|
|
78
|
+
* update dependencies ([1d96d2e](https://github.com/iotaledger/twin-attestation/commit/1d96d2ee6e81a30396980f6f5e16e9658710d32d))
|
|
79
|
+
* update framework core ([02326d4](https://github.com/iotaledger/twin-attestation/commit/02326d41238862c13587c19bb3d04c1cb3b606d8))
|
|
80
|
+
* update ts-to-schema generation ([0f23298](https://github.com/iotaledger/twin-attestation/commit/0f23298f6e8accb19c0faaf74220cce02155b48a))
|
|
81
|
+
* use shared store mechanism ([#5](https://github.com/iotaledger/twin-attestation/issues/5)) ([3768cf7](https://github.com/iotaledger/twin-attestation/commit/3768cf7214d30a5429b7b08190539b517d7fafa0))
|
|
82
|
+
|
|
83
|
+
## [0.0.2-next.4](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.2-next.3...attestation-models-v0.0.2-next.4) (2025-10-09)
|
|
4
84
|
|
|
5
85
|
|
|
6
86
|
### Features
|
|
7
87
|
|
|
8
|
-
* add validate-locales ([a1f9e13](https://github.com/
|
|
88
|
+
* add validate-locales ([a1f9e13](https://github.com/iotaledger/twin-attestation/commit/a1f9e13875a661f612ce16dd9896e7df20c6a7ff))
|
|
9
89
|
|
|
10
|
-
## [0.0.2-next.3](https://github.com/
|
|
90
|
+
## [0.0.2-next.3](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.2-next.2...attestation-models-v0.0.2-next.3) (2025-09-29)
|
|
11
91
|
|
|
12
92
|
|
|
13
93
|
### Miscellaneous Chores
|
|
14
94
|
|
|
15
95
|
* **attestation-models:** Synchronize repo versions
|
|
16
96
|
|
|
17
|
-
## [0.0.2-next.2](https://github.com/
|
|
97
|
+
## [0.0.2-next.2](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.2-next.1...attestation-models-v0.0.2-next.2) (2025-08-29)
|
|
18
98
|
|
|
19
99
|
|
|
20
100
|
### Features
|
|
21
101
|
|
|
22
|
-
* eslint migration to flat config ([7c768ff](https://github.com/
|
|
102
|
+
* eslint migration to flat config ([7c768ff](https://github.com/iotaledger/twin-attestation/commit/7c768ffae02456d60fd62ba8b4b488c307ceff32))
|
|
23
103
|
|
|
24
|
-
## [0.0.2-next.1](https://github.com/
|
|
104
|
+
## [0.0.2-next.1](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.2-next.0...attestation-models-v0.0.2-next.1) (2025-08-20)
|
|
25
105
|
|
|
26
106
|
|
|
27
107
|
### Features
|
|
28
108
|
|
|
29
|
-
* release to production ([aa69a08](https://github.com/
|
|
30
|
-
* release to production ([89ca987](https://github.com/
|
|
31
|
-
* update data type registration with fully qualified names ([5982245](https://github.com/
|
|
32
|
-
* update dependencies ([1d96d2e](https://github.com/
|
|
33
|
-
* update framework core ([02326d4](https://github.com/
|
|
34
|
-
* update ts-to-schema generation ([0f23298](https://github.com/
|
|
35
|
-
* use shared store mechanism ([#5](https://github.com/
|
|
109
|
+
* release to production ([aa69a08](https://github.com/iotaledger/twin-attestation/commit/aa69a08fbd3897c8d72b0d32ec730f104ad31b33))
|
|
110
|
+
* release to production ([89ca987](https://github.com/iotaledger/twin-attestation/commit/89ca987963d9090abcfc1b62bc997e2c521944ec))
|
|
111
|
+
* update data type registration with fully qualified names ([5982245](https://github.com/iotaledger/twin-attestation/commit/59822454a027a9c6dfa72ffa9aabb9622b925929))
|
|
112
|
+
* update dependencies ([1d96d2e](https://github.com/iotaledger/twin-attestation/commit/1d96d2ee6e81a30396980f6f5e16e9658710d32d))
|
|
113
|
+
* update framework core ([02326d4](https://github.com/iotaledger/twin-attestation/commit/02326d41238862c13587c19bb3d04c1cb3b606d8))
|
|
114
|
+
* update ts-to-schema generation ([0f23298](https://github.com/iotaledger/twin-attestation/commit/0f23298f6e8accb19c0faaf74220cce02155b48a))
|
|
115
|
+
* use shared store mechanism ([#5](https://github.com/iotaledger/twin-attestation/issues/5)) ([3768cf7](https://github.com/iotaledger/twin-attestation/commit/3768cf7214d30a5429b7b08190539b517d7fafa0))
|
|
36
116
|
|
|
37
117
|
## 0.0.1 (2025-07-09)
|
|
38
118
|
|
|
39
119
|
|
|
40
120
|
### Features
|
|
41
121
|
|
|
42
|
-
* release to production ([aa69a08](https://github.com/
|
|
43
|
-
* release to production ([89ca987](https://github.com/
|
|
122
|
+
* release to production ([aa69a08](https://github.com/iotaledger/twin-attestation/commit/aa69a08fbd3897c8d72b0d32ec730f104ad31b33))
|
|
123
|
+
* release to production ([89ca987](https://github.com/iotaledger/twin-attestation/commit/89ca987963d9090abcfc1b62bc997e2c521944ec))
|
|
44
124
|
|
|
45
|
-
## [0.0.1-next.30](https://github.com/
|
|
125
|
+
## [0.0.1-next.30](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.1-next.29...attestation-models-v0.0.1-next.30) (2025-06-12)
|
|
46
126
|
|
|
47
127
|
|
|
48
128
|
### Features
|
|
49
129
|
|
|
50
|
-
* update dependencies ([1d96d2e](https://github.com/
|
|
130
|
+
* update dependencies ([1d96d2e](https://github.com/iotaledger/twin-attestation/commit/1d96d2ee6e81a30396980f6f5e16e9658710d32d))
|
|
51
131
|
|
|
52
|
-
## [0.0.1-next.29](https://github.com/
|
|
132
|
+
## [0.0.1-next.29](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.1-next.28...attestation-models-v0.0.1-next.29) (2025-06-03)
|
|
53
133
|
|
|
54
134
|
|
|
55
135
|
### Features
|
|
56
136
|
|
|
57
|
-
* update ts-to-schema generation ([0f23298](https://github.com/
|
|
137
|
+
* update ts-to-schema generation ([0f23298](https://github.com/iotaledger/twin-attestation/commit/0f23298f6e8accb19c0faaf74220cce02155b48a))
|
|
58
138
|
|
|
59
|
-
## [0.0.1-next.28](https://github.com/
|
|
139
|
+
## [0.0.1-next.28](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.1-next.27...attestation-models-v0.0.1-next.28) (2025-05-28)
|
|
60
140
|
|
|
61
141
|
|
|
62
142
|
### Features
|
|
63
143
|
|
|
64
|
-
* update data type registration with fully qualified names ([5982245](https://github.com/
|
|
144
|
+
* update data type registration with fully qualified names ([5982245](https://github.com/iotaledger/twin-attestation/commit/59822454a027a9c6dfa72ffa9aabb9622b925929))
|
|
65
145
|
|
|
66
|
-
## [0.0.1-next.27](https://github.com/
|
|
146
|
+
## [0.0.1-next.27](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.1-next.26...attestation-models-v0.0.1-next.27) (2025-05-06)
|
|
67
147
|
|
|
68
148
|
|
|
69
149
|
### Miscellaneous Chores
|
|
70
150
|
|
|
71
151
|
* **attestation-models:** Synchronize repo versions
|
|
72
152
|
|
|
73
|
-
## [0.0.1-next.26](https://github.com/
|
|
153
|
+
## [0.0.1-next.26](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.1-next.25...attestation-models-v0.0.1-next.26) (2025-04-17)
|
|
74
154
|
|
|
75
155
|
|
|
76
156
|
### Features
|
|
77
157
|
|
|
78
|
-
* use shared store mechanism ([#5](https://github.com/
|
|
158
|
+
* use shared store mechanism ([#5](https://github.com/iotaledger/twin-attestation/issues/5)) ([3768cf7](https://github.com/iotaledger/twin-attestation/commit/3768cf7214d30a5429b7b08190539b517d7fafa0))
|
|
79
159
|
|
|
80
|
-
## [0.0.1-next.25](https://github.com/
|
|
160
|
+
## [0.0.1-next.25](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.0.1-next.24...attestation-models-v0.0.1-next.25) (2025-03-28)
|
|
81
161
|
|
|
82
162
|
|
|
83
163
|
### Miscellaneous Chores
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Attestation Models Examples
|
|
2
|
+
|
|
3
|
+
Register the data types at startup so schemas and JSON-LD mappings are available before you parse or validate attestation payloads.
|
|
4
|
+
|
|
5
|
+
## AttestationDataTypes
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { AttestationDataTypes } from '@twin.org/attestation-models';
|
|
9
|
+
|
|
10
|
+
AttestationDataTypes.registerTypes();
|
|
11
|
+
console.log('Attestation data types registered.'); // Attestation data types registered.
|
|
12
|
+
```
|
|
@@ -6,19 +6,11 @@ Interface describing an attestation contract.
|
|
|
6
6
|
|
|
7
7
|
- `IComponent`
|
|
8
8
|
|
|
9
|
-
## Indexable
|
|
10
|
-
|
|
11
|
-
\[`key`: `string`\]: `any`
|
|
12
|
-
|
|
13
|
-
All methods are optional, so we introduce an index signature to allow
|
|
14
|
-
any additional properties or methods, which removes the TypeScript error where
|
|
15
|
-
the class has no properties in common with the type.
|
|
16
|
-
|
|
17
9
|
## Methods
|
|
18
10
|
|
|
19
|
-
### create()
|
|
11
|
+
### create() {#create}
|
|
20
12
|
|
|
21
|
-
> **create**(`attestationObject`, `namespace
|
|
13
|
+
> **create**(`attestationObject`, `namespace?`): `Promise`\<`string`\>
|
|
22
14
|
|
|
23
15
|
Attest the data and return the collated information.
|
|
24
16
|
|
|
@@ -36,18 +28,6 @@ The data to attest.
|
|
|
36
28
|
|
|
37
29
|
The namespace of the connector to use for the attestation, defaults to component configured namespace.
|
|
38
30
|
|
|
39
|
-
##### identity?
|
|
40
|
-
|
|
41
|
-
`string`
|
|
42
|
-
|
|
43
|
-
The identity to perform the attestation operation with.
|
|
44
|
-
|
|
45
|
-
##### nodeIdentity?
|
|
46
|
-
|
|
47
|
-
`string`
|
|
48
|
-
|
|
49
|
-
The node identity to include in the attestation.
|
|
50
|
-
|
|
51
31
|
#### Returns
|
|
52
32
|
|
|
53
33
|
`Promise`\<`string`\>
|
|
@@ -56,7 +36,7 @@ The id of the attestation.
|
|
|
56
36
|
|
|
57
37
|
***
|
|
58
38
|
|
|
59
|
-
### get()
|
|
39
|
+
### get() {#get}
|
|
60
40
|
|
|
61
41
|
> **get**(`id`): `Promise`\<[`IAttestationInformation`](IAttestationInformation.md)\>
|
|
62
42
|
|
|
@@ -78,9 +58,9 @@ The verified attestation details.
|
|
|
78
58
|
|
|
79
59
|
***
|
|
80
60
|
|
|
81
|
-
### transfer()
|
|
61
|
+
### transfer() {#transfer}
|
|
82
62
|
|
|
83
|
-
> **transfer**(`attestationId`, `holderIdentity`, `holderAddress
|
|
63
|
+
> **transfer**(`attestationId`, `holderIdentity`, `holderAddress`): `Promise`\<`void`\>
|
|
84
64
|
|
|
85
65
|
Transfer the attestation to a new holder.
|
|
86
66
|
|
|
@@ -104,12 +84,6 @@ The identity to transfer the attestation to.
|
|
|
104
84
|
|
|
105
85
|
The address to transfer the attestation to.
|
|
106
86
|
|
|
107
|
-
##### identity?
|
|
108
|
-
|
|
109
|
-
`string`
|
|
110
|
-
|
|
111
|
-
The identity to perform the attestation operation with.
|
|
112
|
-
|
|
113
87
|
#### Returns
|
|
114
88
|
|
|
115
89
|
`Promise`\<`void`\>
|
|
@@ -118,9 +92,9 @@ Nothing.
|
|
|
118
92
|
|
|
119
93
|
***
|
|
120
94
|
|
|
121
|
-
### destroy()
|
|
95
|
+
### destroy() {#destroy}
|
|
122
96
|
|
|
123
|
-
> **destroy**(`attestationId
|
|
97
|
+
> **destroy**(`attestationId`): `Promise`\<`void`\>
|
|
124
98
|
|
|
125
99
|
Destroy the attestation.
|
|
126
100
|
|
|
@@ -132,12 +106,6 @@ Destroy the attestation.
|
|
|
132
106
|
|
|
133
107
|
The attestation to transfer.
|
|
134
108
|
|
|
135
|
-
##### identity?
|
|
136
|
-
|
|
137
|
-
`string`
|
|
138
|
-
|
|
139
|
-
The identity to perform the attestation operation with.
|
|
140
|
-
|
|
141
109
|
#### Returns
|
|
142
110
|
|
|
143
111
|
`Promise`\<`void`\>
|
|
@@ -6,17 +6,9 @@ Interface describing an attestation connector.
|
|
|
6
6
|
|
|
7
7
|
- `IComponent`
|
|
8
8
|
|
|
9
|
-
## Indexable
|
|
10
|
-
|
|
11
|
-
\[`key`: `string`\]: `any`
|
|
12
|
-
|
|
13
|
-
All methods are optional, so we introduce an index signature to allow
|
|
14
|
-
any additional properties or methods, which removes the TypeScript error where
|
|
15
|
-
the class has no properties in common with the type.
|
|
16
|
-
|
|
17
9
|
## Methods
|
|
18
10
|
|
|
19
|
-
### create()
|
|
11
|
+
### create() {#create}
|
|
20
12
|
|
|
21
13
|
> **create**(`controller`, `verificationMethodId`, `attestationObject`): `Promise`\<`string`\>
|
|
22
14
|
|
|
@@ -50,7 +42,7 @@ The collated attestation data.
|
|
|
50
42
|
|
|
51
43
|
***
|
|
52
44
|
|
|
53
|
-
### get()
|
|
45
|
+
### get() {#get}
|
|
54
46
|
|
|
55
47
|
> **get**(`id`): `Promise`\<[`IAttestationInformation`](IAttestationInformation.md)\>
|
|
56
48
|
|
|
@@ -72,7 +64,7 @@ The verified attestation details.
|
|
|
72
64
|
|
|
73
65
|
***
|
|
74
66
|
|
|
75
|
-
### transfer()
|
|
67
|
+
### transfer() {#transfer}
|
|
76
68
|
|
|
77
69
|
> **transfer**(`controller`, `attestationId`, `holderIdentity`, `holderAddress`): `Promise`\<`void`\>
|
|
78
70
|
|
|
@@ -112,7 +104,7 @@ Nothing.
|
|
|
112
104
|
|
|
113
105
|
***
|
|
114
106
|
|
|
115
|
-
### destroy()
|
|
107
|
+
### destroy() {#destroy}
|
|
116
108
|
|
|
117
109
|
> **destroy**(`controller`, `attestationId`): `Promise`\<`void`\>
|
|
118
110
|
|
|
@@ -4,7 +4,7 @@ Attest the data and return the id of the attestation.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### body
|
|
7
|
+
### body {#body}
|
|
8
8
|
|
|
9
9
|
> **body**: `object`
|
|
10
10
|
|
|
@@ -18,6 +18,6 @@ The data object to attest.
|
|
|
18
18
|
|
|
19
19
|
#### namespace?
|
|
20
20
|
|
|
21
|
-
> `optional` **namespace
|
|
21
|
+
> `optional` **namespace?**: `string`
|
|
22
22
|
|
|
23
23
|
The namespace of the connector to use for the attestation, defaults to component configured namespace.
|
|
@@ -4,9 +4,9 @@ Verify that the proof is valid for the attestation.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### headers?
|
|
7
|
+
### headers? {#headers}
|
|
8
8
|
|
|
9
|
-
> `optional` **headers
|
|
9
|
+
> `optional` **headers?**: `object`
|
|
10
10
|
|
|
11
11
|
The headers which can be used to determine the response data type.
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ The headers which can be used to determine the response data type.
|
|
|
16
16
|
|
|
17
17
|
***
|
|
18
18
|
|
|
19
|
-
### pathParams
|
|
19
|
+
### pathParams {#pathparams}
|
|
20
20
|
|
|
21
21
|
> **pathParams**: `object`
|
|
22
22
|
|
|
@@ -4,9 +4,9 @@ The response to verifying the attestation.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### headers?
|
|
7
|
+
### headers? {#headers}
|
|
8
8
|
|
|
9
|
-
> `optional` **headers
|
|
9
|
+
> `optional` **headers?**: `object`
|
|
10
10
|
|
|
11
11
|
The headers which can be used to determine the response data type.
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ The headers which can be used to determine the response data type.
|
|
|
16
16
|
|
|
17
17
|
***
|
|
18
18
|
|
|
19
|
-
### body
|
|
19
|
+
### body {#body}
|
|
20
20
|
|
|
21
21
|
> **body**: [`IAttestationInformation`](IAttestationInformation.md)
|
|
22
22
|
|
|
@@ -4,15 +4,15 @@ Interface describing the collated attestation information.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### @context
|
|
7
|
+
### @context {#context}
|
|
8
8
|
|
|
9
|
-
> **@context**: \[`"https://schema.
|
|
9
|
+
> **@context**: \[`"https://schema.org"`, `"https://schema.twindev.org/attestation/"`, `"https://schema.twindev.org/common/"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
10
10
|
|
|
11
11
|
JSON-LD Context.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### type
|
|
15
|
+
### type {#type}
|
|
16
16
|
|
|
17
17
|
> **type**: `"Information"`
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ JSON-LD Type.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### id
|
|
23
|
+
### id {#id}
|
|
24
24
|
|
|
25
25
|
> **id**: `string`
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ The unique identifier of the attestation.
|
|
|
28
28
|
|
|
29
29
|
***
|
|
30
30
|
|
|
31
|
-
### dateCreated
|
|
31
|
+
### dateCreated {#datecreated}
|
|
32
32
|
|
|
33
33
|
> **dateCreated**: `string`
|
|
34
34
|
|
|
@@ -36,15 +36,15 @@ Created date/time of the attestation in ISO format.
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### dateTransferred?
|
|
39
|
+
### dateTransferred? {#datetransferred}
|
|
40
40
|
|
|
41
|
-
> `optional` **dateTransferred
|
|
41
|
+
> `optional` **dateTransferred?**: `string`
|
|
42
42
|
|
|
43
43
|
Transferred date/time of the attestation in ISO format, can be blank if holder identity is owner.
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
-
### ownerIdentity
|
|
47
|
+
### ownerIdentity {#owneridentity}
|
|
48
48
|
|
|
49
49
|
> **ownerIdentity**: `string`
|
|
50
50
|
|
|
@@ -52,15 +52,15 @@ The identity of the owner.
|
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
55
|
-
### holderIdentity?
|
|
55
|
+
### holderIdentity? {#holderidentity}
|
|
56
56
|
|
|
57
|
-
> `optional` **holderIdentity
|
|
57
|
+
> `optional` **holderIdentity?**: `string`
|
|
58
58
|
|
|
59
59
|
The identity of the current holder, can be undefined if owner is still the holder.
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
63
|
-
### attestationObject
|
|
63
|
+
### attestationObject {#attestationobject}
|
|
64
64
|
|
|
65
65
|
> **attestationObject**: `IJsonLdNodeObject`
|
|
66
66
|
|
|
@@ -68,24 +68,24 @@ The data that was attested.
|
|
|
68
68
|
|
|
69
69
|
***
|
|
70
70
|
|
|
71
|
-
### proof?
|
|
71
|
+
### proof? {#proof}
|
|
72
72
|
|
|
73
|
-
> `optional` **proof
|
|
73
|
+
> `optional` **proof?**: `IJsonLdNodeObject`
|
|
74
74
|
|
|
75
75
|
The proof for the attested data.
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
79
|
-
### verified?
|
|
79
|
+
### verified? {#verified}
|
|
80
80
|
|
|
81
|
-
> `optional` **verified
|
|
81
|
+
> `optional` **verified?**: `boolean`
|
|
82
82
|
|
|
83
83
|
Whether the attestation has been verified.
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
87
|
-
### verificationFailure?
|
|
87
|
+
### verificationFailure? {#verificationfailure}
|
|
88
88
|
|
|
89
|
-
> `optional` **verificationFailure
|
|
89
|
+
> `optional` **verificationFailure?**: `string`
|
|
90
90
|
|
|
91
91
|
The verification failure message.
|
|
@@ -4,7 +4,7 @@ Interface describing an attestation proof.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### @context
|
|
7
|
+
### @context {#context}
|
|
8
8
|
|
|
9
9
|
> **@context**: `"https://schema.twindev.org/attestation/"` \| \[`"https://schema.twindev.org/attestation/"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ JSON-LD Context.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### type
|
|
15
|
+
### type {#type}
|
|
16
16
|
|
|
17
17
|
> **type**: `"JwtProof"`
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ The type of the proof.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### value
|
|
23
|
+
### value {#value}
|
|
24
24
|
|
|
25
25
|
> **value**: `string`
|
|
26
26
|
|
|
@@ -4,7 +4,7 @@ Transfer the attestation to a new holder.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### pathParams
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
8
|
|
|
9
9
|
> **pathParams**: `object`
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ The attestation id to transfer.
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### body
|
|
21
|
+
### body {#body}
|
|
22
22
|
|
|
23
23
|
> **body**: `object`
|
|
24
24
|
|
|
@@ -6,14 +6,38 @@ The contexts of attestation data.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### Namespace {#namespace}
|
|
10
10
|
|
|
11
|
-
> `readonly` **
|
|
11
|
+
> `readonly` **Namespace**: `"https://schema.twindev.org/attestation/"` = `"https://schema.twindev.org/attestation/"`
|
|
12
12
|
|
|
13
|
-
The
|
|
13
|
+
The canonical RDF namespace URI for Attestation.
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Context {#context}
|
|
16
16
|
|
|
17
|
-
> `readonly` **
|
|
17
|
+
> `readonly` **Context**: `"https://schema.twindev.org/attestation/"` = `"https://schema.twindev.org/attestation/"`
|
|
18
18
|
|
|
19
|
-
The
|
|
19
|
+
The value to use in context for Attestation.
|
|
20
|
+
|
|
21
|
+
### JsonLdContext {#jsonldcontext}
|
|
22
|
+
|
|
23
|
+
> `readonly` **JsonLdContext**: `"https://schema.twindev.org/attestation/types.jsonld"` = `"https://schema.twindev.org/attestation/types.jsonld"`
|
|
24
|
+
|
|
25
|
+
The JSON-LD Context URL for Attestation.
|
|
26
|
+
|
|
27
|
+
### NamespaceCommon {#namespacecommon}
|
|
28
|
+
|
|
29
|
+
> `readonly` **NamespaceCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
|
|
30
|
+
|
|
31
|
+
The canonical RDF namespace URI for TWIN Common.
|
|
32
|
+
|
|
33
|
+
### ContextCommon {#contextcommon}
|
|
34
|
+
|
|
35
|
+
> `readonly` **ContextCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
|
|
36
|
+
|
|
37
|
+
The value to use in JSON-LD context for TWIN Common.
|
|
38
|
+
|
|
39
|
+
### JsonLdContextCommon {#jsonldcontextcommon}
|
|
40
|
+
|
|
41
|
+
> `readonly` **JsonLdContextCommon**: `"https://schema.twindev.org/common/types.jsonld"` = `"https://schema.twindev.org/common/types.jsonld"`
|
|
42
|
+
|
|
43
|
+
The JSON-LD Context URL for TWIN Common.
|
|
@@ -6,13 +6,13 @@ The types of attestation data.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### Information
|
|
9
|
+
### Information {#information}
|
|
10
10
|
|
|
11
11
|
> `readonly` **Information**: `"Information"` = `"Information"`
|
|
12
12
|
|
|
13
13
|
Represents attestation information.
|
|
14
14
|
|
|
15
|
-
### JwtProof
|
|
15
|
+
### JwtProof {#jwtproof}
|
|
16
16
|
|
|
17
17
|
> `readonly` **JwtProof**: `"JwtProof"` = `"JwtProof"`
|
|
18
18
|
|