@twin.org/attestation-models 0.0.1-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.
Files changed (35) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +21 -0
  3. package/dist/cjs/index.cjs +193 -0
  4. package/dist/esm/index.mjs +189 -0
  5. package/dist/types/dataTypes/attestationDataTypes.d.ts +9 -0
  6. package/dist/types/factories/attestationConnectorFactory.d.ts +6 -0
  7. package/dist/types/index.d.ts +12 -0
  8. package/dist/types/models/IAttestationComponent.d.ts +39 -0
  9. package/dist/types/models/IAttestationConnector.d.ts +39 -0
  10. package/dist/types/models/IAttestationInformation.d.ts +51 -0
  11. package/dist/types/models/IAttestationJwtProof.d.ts +18 -0
  12. package/dist/types/models/api/IAttestationCreateRequest.d.ts +23 -0
  13. package/dist/types/models/api/IAttestationDestroyRequest.d.ts +14 -0
  14. package/dist/types/models/api/IAttestationGetRequest.d.ts +21 -0
  15. package/dist/types/models/api/IAttestationGetResponse.d.ts +17 -0
  16. package/dist/types/models/api/IAttestationTransferRequest.d.ts +23 -0
  17. package/dist/types/models/attestationTypes.d.ts +21 -0
  18. package/docs/changelog.md +5 -0
  19. package/docs/examples.md +1 -0
  20. package/docs/reference/classes/AttestationDataTypes.md +25 -0
  21. package/docs/reference/index.md +26 -0
  22. package/docs/reference/interfaces/IAttestationComponent.md +115 -0
  23. package/docs/reference/interfaces/IAttestationConnector.md +115 -0
  24. package/docs/reference/interfaces/IAttestationCreateRequest.md +29 -0
  25. package/docs/reference/interfaces/IAttestationDestroyRequest.md +17 -0
  26. package/docs/reference/interfaces/IAttestationGetRequest.md +29 -0
  27. package/docs/reference/interfaces/IAttestationGetResponse.md +23 -0
  28. package/docs/reference/interfaces/IAttestationInformation.md +91 -0
  29. package/docs/reference/interfaces/IAttestationJwtProof.md +27 -0
  30. package/docs/reference/interfaces/IAttestationTransferRequest.md +31 -0
  31. package/docs/reference/type-aliases/AttestationTypes.md +5 -0
  32. package/docs/reference/variables/AttestationConnectorFactory.md +5 -0
  33. package/docs/reference/variables/AttestationTypes.md +25 -0
  34. package/locales/en.json +3 -0
  35. package/package.json +43 -0
@@ -0,0 +1,91 @@
1
+ # Interface: IAttestationInformation
2
+
3
+ Interface describing the collated attestation information.
4
+
5
+ ## Properties
6
+
7
+ ### @context
8
+
9
+ > **@context**: `"https://schema.twindev.org/attestation/"` \| [`"https://schema.twindev.org/attestation/"`, `...string[]`]
10
+
11
+ JSON-LD Context.
12
+
13
+ ***
14
+
15
+ ### type
16
+
17
+ > **type**: `"Information"`
18
+
19
+ JSON-LD Type.
20
+
21
+ ***
22
+
23
+ ### id
24
+
25
+ > **id**: `string`
26
+
27
+ The unique identifier of the attestation.
28
+
29
+ ***
30
+
31
+ ### dateCreated
32
+
33
+ > **dateCreated**: `string`
34
+
35
+ Created date/time of the attestation in ISO format.
36
+
37
+ ***
38
+
39
+ ### dateTransferred?
40
+
41
+ > `optional` **dateTransferred**: `string`
42
+
43
+ Transferred date/time of the attestation in ISO format, can be blank if holder identity is owner.
44
+
45
+ ***
46
+
47
+ ### ownerIdentity
48
+
49
+ > **ownerIdentity**: `string`
50
+
51
+ The identity of the owner.
52
+
53
+ ***
54
+
55
+ ### 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
+ ### attestationObject
64
+
65
+ > **attestationObject**: `IJsonLdNodeObject`
66
+
67
+ The data that was attested.
68
+
69
+ ***
70
+
71
+ ### proof?
72
+
73
+ > `optional` **proof**: `IJsonLdNodeObject`
74
+
75
+ The proof for the attested data.
76
+
77
+ ***
78
+
79
+ ### verified?
80
+
81
+ > `optional` **verified**: `boolean`
82
+
83
+ Whether the attestation has been verified.
84
+
85
+ ***
86
+
87
+ ### verificationFailure?
88
+
89
+ > `optional` **verificationFailure**: `string`
90
+
91
+ The verification failure message.
@@ -0,0 +1,27 @@
1
+ # Interface: IAttestationJwtProof
2
+
3
+ Interface describing an attestation proof.
4
+
5
+ ## Properties
6
+
7
+ ### @context
8
+
9
+ > **@context**: `"https://schema.twindev.org/attestation/"` \| [`"https://schema.twindev.org/attestation/"`, `...string[]`]
10
+
11
+ JSON-LD Context.
12
+
13
+ ***
14
+
15
+ ### type
16
+
17
+ > **type**: `"JwtProof"`
18
+
19
+ The type of the proof.
20
+
21
+ ***
22
+
23
+ ### value
24
+
25
+ > **value**: `string`
26
+
27
+ The value of the proof.
@@ -0,0 +1,31 @@
1
+ # Interface: IAttestationTransferRequest
2
+
3
+ Transfer the attestation to a new holder.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The parameters to be used in the transfer.
12
+
13
+ #### id
14
+
15
+ > **id**: `string`
16
+
17
+ The attestation id to verify.
18
+
19
+ ***
20
+
21
+ ### body
22
+
23
+ > **body**: `object`
24
+
25
+ The parameters to be used in the transfer.
26
+
27
+ #### holderIdentity
28
+
29
+ > **holderIdentity**: `string`
30
+
31
+ The new holder identity.
@@ -0,0 +1,5 @@
1
+ # Type Alias: AttestationTypes
2
+
3
+ > **AttestationTypes**: *typeof* [`AttestationTypes`](../variables/AttestationTypes.md)\[keyof *typeof* [`AttestationTypes`](../variables/AttestationTypes.md)\]
4
+
5
+ The types of attestation data.
@@ -0,0 +1,5 @@
1
+ # Variable: AttestationConnectorFactory
2
+
3
+ > `const` **AttestationConnectorFactory**: `Factory`\<[`IAttestationConnector`](../interfaces/IAttestationConnector.md)\>
4
+
5
+ Factory for creating attestation connectors.
@@ -0,0 +1,25 @@
1
+ # Variable: AttestationTypes
2
+
3
+ > `const` **AttestationTypes**: `object`
4
+
5
+ The types of attestation data.
6
+
7
+ ## Type declaration
8
+
9
+ ### ContextRoot
10
+
11
+ > `readonly` **ContextRoot**: `"https://schema.twindev.org/attestation/"` = `"https://schema.twindev.org/attestation/"`
12
+
13
+ The context root for the attestation types.
14
+
15
+ ### Information
16
+
17
+ > `readonly` **Information**: `"Information"` = `"Information"`
18
+
19
+ Represents attestation information.
20
+
21
+ ### JwtProof
22
+
23
+ > `readonly` **JwtProof**: `"JwtProof"` = `"JwtProof"`
24
+
25
+ Represents attestation JWT proof.
@@ -0,0 +1,3 @@
1
+ {
2
+ "error": {}
3
+ }
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@twin.org/attestation-models",
3
+ "version": "0.0.1-next.10",
4
+ "description": "Models which define the structure of the attestation connectors and services",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/twinfoundation/attestation.git",
8
+ "directory": "packages/attestation-models"
9
+ },
10
+ "author": "martyn.janes@iota.org",
11
+ "license": "Apache-2.0",
12
+ "type": "module",
13
+ "engines": {
14
+ "node": ">=20.0.0"
15
+ },
16
+ "dependencies": {
17
+ "@twin.org/core": "next",
18
+ "@twin.org/data-core": "next",
19
+ "@twin.org/data-json-ld": "next",
20
+ "@twin.org/entity": "next",
21
+ "@twin.org/nameof": "next",
22
+ "@twin.org/standards-w3c-did": "next",
23
+ "@twin.org/web": "next"
24
+ },
25
+ "main": "./dist/cjs/index.cjs",
26
+ "module": "./dist/esm/index.mjs",
27
+ "types": "./dist/types/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "require": "./dist/cjs/index.cjs",
31
+ "import": "./dist/esm/index.mjs",
32
+ "types": "./dist/types/index.d.ts"
33
+ },
34
+ "./locales/*.json": "./locales/*.json"
35
+ },
36
+ "files": [
37
+ "dist/cjs",
38
+ "dist/esm",
39
+ "dist/types",
40
+ "locales",
41
+ "docs"
42
+ ]
43
+ }