@twin.org/attestation-connector-open-attestation 0.0.3-next.9 → 0.9.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NotImplementedError } from "@twin.org/core";
|
|
2
2
|
/**
|
|
3
|
-
* Class for performing attestation operations
|
|
3
|
+
* Class for performing attestation operations using the Open Attestation standard.
|
|
4
4
|
*/
|
|
5
5
|
export class OpenAttestationConnector {
|
|
6
6
|
/**
|
|
@@ -29,7 +29,7 @@ export class OpenAttestationConnector {
|
|
|
29
29
|
* @param controller The controller identity of the user to access the vault keys.
|
|
30
30
|
* @param verificationMethodId The identity verification method to use for attesting the data.
|
|
31
31
|
* @param attestationObject The data to attest.
|
|
32
|
-
* @returns The id.
|
|
32
|
+
* @returns The id of the created attestation.
|
|
33
33
|
*/
|
|
34
34
|
async create(controller, verificationMethodId, attestationObject) {
|
|
35
35
|
throw new NotImplementedError(OpenAttestationConnector.CLASS_NAME, "attest");
|
|
@@ -46,18 +46,17 @@ export class OpenAttestationConnector {
|
|
|
46
46
|
* Transfer the attestation to a new holder.
|
|
47
47
|
* @param controller The controller identity of the user to access the vault keys.
|
|
48
48
|
* @param attestationId The attestation to transfer.
|
|
49
|
-
* @param holderIdentity The holder identity of the attestation.
|
|
50
49
|
* @param holderAddress The new controller address of the attestation belonging to the holder.
|
|
51
|
-
* @returns
|
|
50
|
+
* @returns A promise that resolves when the transfer is complete.
|
|
52
51
|
*/
|
|
53
|
-
async transfer(controller, attestationId,
|
|
52
|
+
async transfer(controller, attestationId, holderAddress) {
|
|
54
53
|
throw new NotImplementedError(OpenAttestationConnector.CLASS_NAME, "transfer");
|
|
55
54
|
}
|
|
56
55
|
/**
|
|
57
56
|
* Destroy the attestation.
|
|
58
57
|
* @param controller The controller identity of the user to access the vault keys.
|
|
59
58
|
* @param attestationId The attestation to destroy.
|
|
60
|
-
* @returns
|
|
59
|
+
* @returns A promise that resolves when the attestation has been destroyed.
|
|
61
60
|
*/
|
|
62
61
|
async destroy(controller, attestationId) {
|
|
63
62
|
throw new NotImplementedError(OpenAttestationConnector.CLASS_NAME, "destroy");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openAttestationConnector.js","sourceRoot":"","sources":["../../src/openAttestationConnector.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAKrD;;GAEG;AACH,MAAM,OAAO,wBAAwB;IACpC;;OAEG;IACI,MAAM,CAAU,SAAS,GAAW,kBAAkB,CAAC;IAE9D;;OAEG;IACI,MAAM,CAAU,UAAU,8BAA8C;IAE/E;;;OAGG;IACH,qEAAqE;IACrE,YAAY,OAAoD,IAAG,CAAC;IAEpE;;;OAGG;IACI,SAAS;QACf,OAAO,wBAAwB,CAAC,UAAU,CAAC;IAC5C,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CAClB,UAAkB,EAClB,oBAA4B,EAC5B,iBAAoC;QAEpC,MAAM,IAAI,mBAAmB,CAAC,wBAAwB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC9E,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,GAAG,CAAC,EAAU;QAC1B,MAAM,IAAI,mBAAmB,CAAC,wBAAwB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC9E,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"openAttestationConnector.js","sourceRoot":"","sources":["../../src/openAttestationConnector.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAKrD;;GAEG;AACH,MAAM,OAAO,wBAAwB;IACpC;;OAEG;IACI,MAAM,CAAU,SAAS,GAAW,kBAAkB,CAAC;IAE9D;;OAEG;IACI,MAAM,CAAU,UAAU,8BAA8C;IAE/E;;;OAGG;IACH,qEAAqE;IACrE,YAAY,OAAoD,IAAG,CAAC;IAEpE;;;OAGG;IACI,SAAS;QACf,OAAO,wBAAwB,CAAC,UAAU,CAAC;IAC5C,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CAClB,UAAkB,EAClB,oBAA4B,EAC5B,iBAAoC;QAEpC,MAAM,IAAI,mBAAmB,CAAC,wBAAwB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC9E,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,GAAG,CAAC,EAAU;QAC1B,MAAM,IAAI,mBAAmB,CAAC,wBAAwB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,QAAQ,CACpB,UAAkB,EAClB,aAAqB,EACrB,aAAqB;QAErB,MAAM,IAAI,mBAAmB,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAChF,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,OAAO,CAAC,UAAkB,EAAE,aAAqB;QAC7D,MAAM,IAAI,mBAAmB,CAAC,wBAAwB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC/E,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAttestationConnector, IAttestationInformation } from \"@twin.org/attestation-models\";\nimport { NotImplementedError } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { IOpenAttestationConnectorConstructorOptions } from \"./models/IOpenAttestationConnectorConstructorOptions.js\";\n\n/**\n * Class for performing attestation operations using the Open Attestation standard.\n */\nexport class OpenAttestationConnector implements IAttestationConnector {\n\t/**\n\t * The namespace for the entities.\n\t */\n\tpublic static readonly NAMESPACE: string = \"open-attestation\";\n\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<OpenAttestationConnector>();\n\n\t/**\n\t * Create a new instance of OpenAttestationConnector.\n\t * @param options The options for the attestation connector.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(options: IOpenAttestationConnectorConstructorOptions) {}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn OpenAttestationConnector.CLASS_NAME;\n\t}\n\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 id of the created attestation.\n\t */\n\tpublic async create(\n\t\tcontroller: string,\n\t\tverificationMethodId: string,\n\t\tattestationObject: IJsonLdNodeObject\n\t): Promise<string> {\n\t\tthrow new NotImplementedError(OpenAttestationConnector.CLASS_NAME, \"attest\");\n\t}\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\tpublic async get(id: string): Promise<IAttestationInformation> {\n\t\tthrow new NotImplementedError(OpenAttestationConnector.CLASS_NAME, \"verify\");\n\t}\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 A promise that resolves when the transfer is complete.\n\t */\n\tpublic async transfer(\n\t\tcontroller: string,\n\t\tattestationId: string,\n\t\tholderAddress: string\n\t): Promise<void> {\n\t\tthrow new NotImplementedError(OpenAttestationConnector.CLASS_NAME, \"transfer\");\n\t}\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 A promise that resolves when the attestation has been destroyed.\n\t */\n\tpublic async destroy(controller: string, attestationId: string): Promise<void> {\n\t\tthrow new NotImplementedError(OpenAttestationConnector.CLASS_NAME, \"destroy\");\n\t}\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import type { IAttestationConnector, IAttestationInformation } from "@twin.org/a
|
|
|
2
2
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
3
|
import type { IOpenAttestationConnectorConstructorOptions } from "./models/IOpenAttestationConnectorConstructorOptions.js";
|
|
4
4
|
/**
|
|
5
|
-
* Class for performing attestation operations
|
|
5
|
+
* Class for performing attestation operations using the Open Attestation standard.
|
|
6
6
|
*/
|
|
7
7
|
export declare class OpenAttestationConnector implements IAttestationConnector {
|
|
8
8
|
/**
|
|
@@ -28,7 +28,7 @@ export declare class OpenAttestationConnector implements IAttestationConnector {
|
|
|
28
28
|
* @param controller The controller identity of the user to access the vault keys.
|
|
29
29
|
* @param verificationMethodId The identity verification method to use for attesting the data.
|
|
30
30
|
* @param attestationObject The data to attest.
|
|
31
|
-
* @returns The id.
|
|
31
|
+
* @returns The id of the created attestation.
|
|
32
32
|
*/
|
|
33
33
|
create(controller: string, verificationMethodId: string, attestationObject: IJsonLdNodeObject): Promise<string>;
|
|
34
34
|
/**
|
|
@@ -41,16 +41,15 @@ export declare class OpenAttestationConnector implements IAttestationConnector {
|
|
|
41
41
|
* Transfer the attestation to a new holder.
|
|
42
42
|
* @param controller The controller identity of the user to access the vault keys.
|
|
43
43
|
* @param attestationId The attestation to transfer.
|
|
44
|
-
* @param holderIdentity The holder identity of the attestation.
|
|
45
44
|
* @param holderAddress The new controller address of the attestation belonging to the holder.
|
|
46
|
-
* @returns
|
|
45
|
+
* @returns A promise that resolves when the transfer is complete.
|
|
47
46
|
*/
|
|
48
|
-
transfer(controller: string, attestationId: string,
|
|
47
|
+
transfer(controller: string, attestationId: string, holderAddress: string): Promise<void>;
|
|
49
48
|
/**
|
|
50
49
|
* Destroy the attestation.
|
|
51
50
|
* @param controller The controller identity of the user to access the vault keys.
|
|
52
51
|
* @param attestationId The attestation to destroy.
|
|
53
|
-
* @returns
|
|
52
|
+
* @returns A promise that resolves when the attestation has been destroyed.
|
|
54
53
|
*/
|
|
55
54
|
destroy(controller: string, attestationId: string): Promise<void>;
|
|
56
55
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.0](https://github.com/iotaledger/twin-attestation/compare/attestation-connector-open-attestation-v0.9.0...attestation-connector-open-attestation-v0.9.0) (2026-06-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* release to production ([aa69a08](https://github.com/iotaledger/twin-attestation/commit/aa69a08fbd3897c8d72b0d32ec730f104ad31b33))
|
|
9
|
+
* release to production ([89ca987](https://github.com/iotaledger/twin-attestation/commit/89ca987963d9090abcfc1b62bc997e2c521944ec))
|
|
10
|
+
* release to production ([#48](https://github.com/iotaledger/twin-attestation/issues/48)) ([7dacf79](https://github.com/iotaledger/twin-attestation/commit/7dacf796d2e7c987a7cd1cd907b4cfc72ce8f4f1))
|
|
11
|
+
|
|
12
|
+
## [0.9.0-next.1](https://github.com/iotaledger/twin-attestation/compare/attestation-connector-open-attestation-v0.9.0-next.0...attestation-connector-open-attestation-v0.9.0-next.1) (2026-06-24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add context id features ([#21](https://github.com/iotaledger/twin-attestation/issues/21)) ([640deab](https://github.com/iotaledger/twin-attestation/commit/640deabfc00340e619283f94570c5e1ec45e83af))
|
|
18
|
+
* add validate-locales ([a1f9e13](https://github.com/iotaledger/twin-attestation/commit/a1f9e13875a661f612ce16dd9896e7df20c6a7ff))
|
|
19
|
+
* eslint migration to flat config ([7c768ff](https://github.com/iotaledger/twin-attestation/commit/7c768ffae02456d60fd62ba8b4b488c307ceff32))
|
|
20
|
+
* release to production ([aa69a08](https://github.com/iotaledger/twin-attestation/commit/aa69a08fbd3897c8d72b0d32ec730f104ad31b33))
|
|
21
|
+
* release to production ([89ca987](https://github.com/iotaledger/twin-attestation/commit/89ca987963d9090abcfc1b62bc997e2c521944ec))
|
|
22
|
+
* remove holder identity ([#38](https://github.com/iotaledger/twin-attestation/issues/38)) ([4862d7f](https://github.com/iotaledger/twin-attestation/commit/4862d7f22345b82bcb90f27adc0d64ed75484813))
|
|
23
|
+
* typescript 6 update ([9484667](https://github.com/iotaledger/twin-attestation/commit/948466713dc980e4b2d89e72ebb927b3fe530280))
|
|
24
|
+
* update dependencies ([1d96d2e](https://github.com/iotaledger/twin-attestation/commit/1d96d2ee6e81a30396980f6f5e16e9658710d32d))
|
|
25
|
+
* update framework core ([02326d4](https://github.com/iotaledger/twin-attestation/commit/02326d41238862c13587c19bb3d04c1cb3b606d8))
|
|
26
|
+
* use shared store mechanism ([#5](https://github.com/iotaledger/twin-attestation/issues/5)) ([3768cf7](https://github.com/iotaledger/twin-attestation/commit/3768cf7214d30a5429b7b08190539b517d7fafa0))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Dependencies
|
|
30
|
+
|
|
31
|
+
* The following workspace dependencies were updated
|
|
32
|
+
* dependencies
|
|
33
|
+
* @twin.org/attestation-models bumped from 0.9.0-next.0 to 0.9.0-next.1
|
|
34
|
+
|
|
35
|
+
## [0.0.3-next.12](https://github.com/iotaledger/twin-attestation/compare/attestation-connector-open-attestation-v0.0.3-next.11...attestation-connector-open-attestation-v0.0.3-next.12) (2026-06-01)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Miscellaneous Chores
|
|
39
|
+
|
|
40
|
+
* **attestation-connector-open-attestation:** Synchronize repo versions
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Dependencies
|
|
44
|
+
|
|
45
|
+
* The following workspace dependencies were updated
|
|
46
|
+
* dependencies
|
|
47
|
+
* @twin.org/attestation-models bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
48
|
+
|
|
49
|
+
## [0.0.3-next.11](https://github.com/iotaledger/twin-attestation/compare/attestation-connector-open-attestation-v0.0.3-next.10...attestation-connector-open-attestation-v0.0.3-next.11) (2026-05-22)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
* remove holder identity ([#38](https://github.com/iotaledger/twin-attestation/issues/38)) ([4862d7f](https://github.com/iotaledger/twin-attestation/commit/4862d7f22345b82bcb90f27adc0d64ed75484813))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Dependencies
|
|
58
|
+
|
|
59
|
+
* The following workspace dependencies were updated
|
|
60
|
+
* dependencies
|
|
61
|
+
* @twin.org/attestation-models bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
62
|
+
|
|
63
|
+
## [0.0.3-next.10](https://github.com/iotaledger/twin-attestation/compare/attestation-connector-open-attestation-v0.0.3-next.9...attestation-connector-open-attestation-v0.0.3-next.10) (2026-05-20)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Miscellaneous Chores
|
|
67
|
+
|
|
68
|
+
* **attestation-connector-open-attestation:** Synchronize repo versions
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Dependencies
|
|
72
|
+
|
|
73
|
+
* The following workspace dependencies were updated
|
|
74
|
+
* dependencies
|
|
75
|
+
* @twin.org/attestation-models bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
76
|
+
|
|
3
77
|
## [0.0.3-next.9](https://github.com/iotaledger/twin-attestation/compare/attestation-connector-open-attestation-v0.0.3-next.8...attestation-connector-open-attestation-v0.0.3-next.9) (2026-05-12)
|
|
4
78
|
|
|
5
79
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Class: OpenAttestationConnector
|
|
2
2
|
|
|
3
|
-
Class for performing attestation operations
|
|
3
|
+
Class for performing attestation operations using the Open Attestation standard.
|
|
4
4
|
|
|
5
5
|
## Implements
|
|
6
6
|
|
|
@@ -92,7 +92,7 @@ The data to attest.
|
|
|
92
92
|
|
|
93
93
|
`Promise`\<`string`\>
|
|
94
94
|
|
|
95
|
-
The id.
|
|
95
|
+
The id of the created attestation.
|
|
96
96
|
|
|
97
97
|
#### Implementation of
|
|
98
98
|
|
|
@@ -128,7 +128,7 @@ The verified attestation details.
|
|
|
128
128
|
|
|
129
129
|
### transfer() {#transfer}
|
|
130
130
|
|
|
131
|
-
> **transfer**(`controller`, `attestationId`, `
|
|
131
|
+
> **transfer**(`controller`, `attestationId`, `holderAddress`): `Promise`\<`void`\>
|
|
132
132
|
|
|
133
133
|
Transfer the attestation to a new holder.
|
|
134
134
|
|
|
@@ -146,12 +146,6 @@ The controller identity of the user to access the vault keys.
|
|
|
146
146
|
|
|
147
147
|
The attestation to transfer.
|
|
148
148
|
|
|
149
|
-
##### holderIdentity
|
|
150
|
-
|
|
151
|
-
`string`
|
|
152
|
-
|
|
153
|
-
The holder identity of the attestation.
|
|
154
|
-
|
|
155
149
|
##### holderAddress
|
|
156
150
|
|
|
157
151
|
`string`
|
|
@@ -162,7 +156,7 @@ The new controller address of the attestation belonging to the holder.
|
|
|
162
156
|
|
|
163
157
|
`Promise`\<`void`\>
|
|
164
158
|
|
|
165
|
-
|
|
159
|
+
A promise that resolves when the transfer is complete.
|
|
166
160
|
|
|
167
161
|
#### Implementation of
|
|
168
162
|
|
|
@@ -194,7 +188,7 @@ The attestation to destroy.
|
|
|
194
188
|
|
|
195
189
|
`Promise`\<`void`\>
|
|
196
190
|
|
|
197
|
-
|
|
191
|
+
A promise that resolves when the attestation has been destroyed.
|
|
198
192
|
|
|
199
193
|
#### Implementation of
|
|
200
194
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/attestation-connector-open-attestation",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Attestation connector for OpenAttestation-compatible document workflows.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/iotaledger/attestation.git",
|
|
7
|
+
"url": "git+https://github.com/iotaledger/twin-attestation.git",
|
|
8
8
|
"directory": "packages/attestation-connector-open-attestation"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@govtechsg/open-attestation": "6.9.7",
|
|
18
|
-
"@twin.org/attestation-models": "0.0
|
|
19
|
-
"@twin.org/core": "
|
|
20
|
-
"@twin.org/data-json-ld": "
|
|
21
|
-
"@twin.org/entity": "
|
|
22
|
-
"@twin.org/nameof": "
|
|
23
|
-
"@twin.org/standards-w3c-did": "
|
|
18
|
+
"@twin.org/attestation-models": "^0.9.0",
|
|
19
|
+
"@twin.org/core": "^0.9.0",
|
|
20
|
+
"@twin.org/data-json-ld": "^0.9.0",
|
|
21
|
+
"@twin.org/entity": "^0.9.0",
|
|
22
|
+
"@twin.org/nameof": "^0.9.0",
|
|
23
|
+
"@twin.org/standards-w3c-did": "^0.9.0"
|
|
24
24
|
},
|
|
25
25
|
"main": "./dist/es/index.js",
|
|
26
26
|
"types": "./dist/types/index.d.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"integration"
|
|
54
54
|
],
|
|
55
55
|
"bugs": {
|
|
56
|
-
"url": "git+https://github.com/iotaledger/attestation/issues"
|
|
56
|
+
"url": "git+https://github.com/iotaledger/twin-attestation/issues"
|
|
57
57
|
},
|
|
58
58
|
"homepage": "https://twindev.org"
|
|
59
59
|
}
|