@twin.org/attestation-connector-open-attestation 0.0.2-next.4 → 0.0.3-next.2

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.
@@ -0,0 +1,6 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export * from "./models/IOpenAttestationConnectorConfig.js";
4
+ export * from "./models/IOpenAttestationConnectorConstructorOptions.js";
5
+ export * from "./openAttestationConnector.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yDAAyD,CAAC;AACxE,cAAc,+BAA+B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./models/IOpenAttestationConnectorConfig.js\";\nexport * from \"./models/IOpenAttestationConnectorConstructorOptions.js\";\nexport * from \"./openAttestationConnector.js\";\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=IOpenAttestationConnectorConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IOpenAttestationConnectorConfig.js","sourceRoot":"","sources":["../../../src/models/IOpenAttestationConnectorConfig.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Configuration for the Open Attestation Connector.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IOpenAttestationConnectorConfig {}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IOpenAttestationConnectorConstructorOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IOpenAttestationConnectorConstructorOptions.js","sourceRoot":"","sources":["../../../src/models/IOpenAttestationConnectorConstructorOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOpenAttestationConnectorConfig } from \"./IOpenAttestationConnectorConfig.js\";\n\n/**\n * Options for the Open Attestation connector constructor.\n */\nexport interface IOpenAttestationConnectorConstructorOptions {\n\t/**\n\t * The configuration for the connector.\n\t */\n\tconfig?: IOpenAttestationConnectorConfig;\n}\n"]}
@@ -1,9 +1,8 @@
1
- import { NotImplementedError } from '@twin.org/core';
2
-
1
+ import { NotImplementedError } from "@twin.org/core";
3
2
  /**
4
3
  * Class for performing attestation operations in entity storage.
5
4
  */
6
- class OpenAttestationConnector {
5
+ export class OpenAttestationConnector {
7
6
  /**
8
7
  * The namespace for the entities.
9
8
  */
@@ -18,6 +17,13 @@ class OpenAttestationConnector {
18
17
  */
19
18
  // eslint-disable-next-line @typescript-eslint/no-useless-constructor
20
19
  constructor(options) { }
20
+ /**
21
+ * Returns the class name of the component.
22
+ * @returns The class name of the component.
23
+ */
24
+ className() {
25
+ return OpenAttestationConnector.CLASS_NAME;
26
+ }
21
27
  /**
22
28
  * Attest the data and return the collated information.
23
29
  * @param controller The controller identity of the user to access the vault keys.
@@ -57,5 +63,4 @@ class OpenAttestationConnector {
57
63
  throw new NotImplementedError(OpenAttestationConnector.CLASS_NAME, "destroy");
58
64
  }
59
65
  }
60
-
61
- export { OpenAttestationConnector };
66
+ //# sourceMappingURL=openAttestationConnector.js.map
@@ -0,0 +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;;;;;;;OAOG;IACI,KAAK,CAAC,QAAQ,CACpB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EACtB,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 in entity storage.\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.\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 holderIdentity The holder identity of the attestation.\n\t * @param holderAddress The new controller address of the attestation belonging to the holder.\n\t * @returns Nothing.\n\t */\n\tpublic async transfer(\n\t\tcontroller: string,\n\t\tattestationId: string,\n\t\tholderIdentity: 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 Nothing.\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"]}
@@ -1,3 +1,3 @@
1
- export * from "./models/IOpenAttestationConnectorConfig";
2
- export * from "./models/IOpenAttestationConnectorConstructorOptions";
3
- export * from "./openAttestationConnector";
1
+ export * from "./models/IOpenAttestationConnectorConfig.js";
2
+ export * from "./models/IOpenAttestationConnectorConstructorOptions.js";
3
+ export * from "./openAttestationConnector.js";
@@ -1,4 +1,4 @@
1
- import type { IOpenAttestationConnectorConfig } from "./IOpenAttestationConnectorConfig";
1
+ import type { IOpenAttestationConnectorConfig } from "./IOpenAttestationConnectorConfig.js";
2
2
  /**
3
3
  * Options for the Open Attestation connector constructor.
4
4
  */
@@ -1,6 +1,6 @@
1
1
  import type { IAttestationConnector, IAttestationInformation } from "@twin.org/attestation-models";
2
2
  import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
3
- import type { IOpenAttestationConnectorConstructorOptions } from "./models/IOpenAttestationConnectorConstructorOptions";
3
+ import type { IOpenAttestationConnectorConstructorOptions } from "./models/IOpenAttestationConnectorConstructorOptions.js";
4
4
  /**
5
5
  * Class for performing attestation operations in entity storage.
6
6
  */
@@ -18,6 +18,11 @@ export declare class OpenAttestationConnector implements IAttestationConnector {
18
18
  * @param options The options for the attestation connector.
19
19
  */
20
20
  constructor(options: IOpenAttestationConnectorConstructorOptions);
21
+ /**
22
+ * Returns the class name of the component.
23
+ * @returns The class name of the component.
24
+ */
25
+ className(): string;
21
26
  /**
22
27
  * Attest the data and return the collated information.
23
28
  * @param controller The controller identity of the user to access the vault keys.
package/docs/changelog.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @twin.org/attestation-connector-open-attestation - Changelog
2
2
 
3
+ ## [0.0.3-next.2](https://github.com/twinfoundation/attestation/compare/attestation-connector-open-attestation-v0.0.3-next.1...attestation-connector-open-attestation-v0.0.3-next.2) (2026-01-14)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **attestation-connector-open-attestation:** Synchronize repo versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/attestation-models bumped from 0.0.3-next.1 to 0.0.3-next.2
16
+
17
+ ## [0.0.3-next.1](https://github.com/twinfoundation/attestation/compare/attestation-connector-open-attestation-v0.0.3-next.0...attestation-connector-open-attestation-v0.0.3-next.1) (2025-11-12)
18
+
19
+
20
+ ### Features
21
+
22
+ * add context id features ([#21](https://github.com/twinfoundation/attestation/issues/21)) ([640deab](https://github.com/twinfoundation/attestation/commit/640deabfc00340e619283f94570c5e1ec45e83af))
23
+ * add validate-locales ([a1f9e13](https://github.com/twinfoundation/attestation/commit/a1f9e13875a661f612ce16dd9896e7df20c6a7ff))
24
+ * eslint migration to flat config ([7c768ff](https://github.com/twinfoundation/attestation/commit/7c768ffae02456d60fd62ba8b4b488c307ceff32))
25
+ * release to production ([aa69a08](https://github.com/twinfoundation/attestation/commit/aa69a08fbd3897c8d72b0d32ec730f104ad31b33))
26
+ * release to production ([89ca987](https://github.com/twinfoundation/attestation/commit/89ca987963d9090abcfc1b62bc997e2c521944ec))
27
+ * update dependencies ([1d96d2e](https://github.com/twinfoundation/attestation/commit/1d96d2ee6e81a30396980f6f5e16e9658710d32d))
28
+ * update framework core ([02326d4](https://github.com/twinfoundation/attestation/commit/02326d41238862c13587c19bb3d04c1cb3b606d8))
29
+ * use shared store mechanism ([#5](https://github.com/twinfoundation/attestation/issues/5)) ([3768cf7](https://github.com/twinfoundation/attestation/commit/3768cf7214d30a5429b7b08190539b517d7fafa0))
30
+
31
+
32
+ ### Dependencies
33
+
34
+ * The following workspace dependencies were updated
35
+ * dependencies
36
+ * @twin.org/attestation-models bumped from 0.0.3-next.0 to 0.0.3-next.1
37
+
3
38
  ## [0.0.2-next.4](https://github.com/twinfoundation/attestation/compare/attestation-connector-open-attestation-v0.0.2-next.3...attestation-connector-open-attestation-v0.0.2-next.4) (2025-10-09)
4
39
 
5
40
 
@@ -44,6 +44,24 @@ Runtime name for the class.
44
44
 
45
45
  ## Methods
46
46
 
47
+ ### className()
48
+
49
+ > **className**(): `string`
50
+
51
+ Returns the class name of the component.
52
+
53
+ #### Returns
54
+
55
+ `string`
56
+
57
+ The class name of the component.
58
+
59
+ #### Implementation of
60
+
61
+ `IAttestationConnector.className`
62
+
63
+ ***
64
+
47
65
  ### create()
48
66
 
49
67
  > **create**(`controller`, `verificationMethodId`, `attestationObject`): `Promise`\<`string`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/attestation-connector-open-attestation",
3
- "version": "0.0.2-next.4",
3
+ "version": "0.0.3-next.2",
4
4
  "description": "Attestation connector implementation using OpenAttestation",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,27 +15,25 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@govtechsg/open-attestation": "6.9.7",
18
- "@twin.org/attestation-models": "0.0.2-next.4",
18
+ "@twin.org/attestation-models": "0.0.3-next.2",
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/data-json-ld": "next",
21
21
  "@twin.org/entity": "next",
22
22
  "@twin.org/nameof": "next",
23
23
  "@twin.org/standards-w3c-did": "next"
24
24
  },
25
- "main": "./dist/cjs/index.cjs",
26
- "module": "./dist/esm/index.mjs",
25
+ "main": "./dist/es/index.js",
27
26
  "types": "./dist/types/index.d.ts",
28
27
  "exports": {
29
28
  ".": {
30
29
  "types": "./dist/types/index.d.ts",
31
- "require": "./dist/cjs/index.cjs",
32
- "import": "./dist/esm/index.mjs"
30
+ "import": "./dist/es/index.js",
31
+ "default": "./dist/es/index.js"
33
32
  },
34
33
  "./locales/*.json": "./locales/*.json"
35
34
  },
36
35
  "files": [
37
- "dist/cjs",
38
- "dist/esm",
36
+ "dist/es",
39
37
  "dist/types",
40
38
  "locales",
41
39
  "docs"
@@ -1,63 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@twin.org/core');
4
-
5
- /**
6
- * Class for performing attestation operations in entity storage.
7
- */
8
- class OpenAttestationConnector {
9
- /**
10
- * The namespace for the entities.
11
- */
12
- static NAMESPACE = "open-attestation";
13
- /**
14
- * Runtime name for the class.
15
- */
16
- static CLASS_NAME = "OpenAttestationConnector";
17
- /**
18
- * Create a new instance of OpenAttestationConnector.
19
- * @param options The options for the attestation connector.
20
- */
21
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
22
- constructor(options) { }
23
- /**
24
- * Attest the data and return the collated information.
25
- * @param controller The controller identity of the user to access the vault keys.
26
- * @param verificationMethodId The identity verification method to use for attesting the data.
27
- * @param attestationObject The data to attest.
28
- * @returns The id.
29
- */
30
- async create(controller, verificationMethodId, attestationObject) {
31
- throw new core.NotImplementedError(OpenAttestationConnector.CLASS_NAME, "attest");
32
- }
33
- /**
34
- * Resolve and verify the attestation id.
35
- * @param id The attestation id to verify.
36
- * @returns The verified attestation details.
37
- */
38
- async get(id) {
39
- throw new core.NotImplementedError(OpenAttestationConnector.CLASS_NAME, "verify");
40
- }
41
- /**
42
- * Transfer the attestation to a new holder.
43
- * @param controller The controller identity of the user to access the vault keys.
44
- * @param attestationId The attestation to transfer.
45
- * @param holderIdentity The holder identity of the attestation.
46
- * @param holderAddress The new controller address of the attestation belonging to the holder.
47
- * @returns Nothing.
48
- */
49
- async transfer(controller, attestationId, holderIdentity, holderAddress) {
50
- throw new core.NotImplementedError(OpenAttestationConnector.CLASS_NAME, "transfer");
51
- }
52
- /**
53
- * Destroy the attestation.
54
- * @param controller The controller identity of the user to access the vault keys.
55
- * @param attestationId The attestation to destroy.
56
- * @returns Nothing.
57
- */
58
- async destroy(controller, attestationId) {
59
- throw new core.NotImplementedError(OpenAttestationConnector.CLASS_NAME, "destroy");
60
- }
61
- }
62
-
63
- exports.OpenAttestationConnector = OpenAttestationConnector;