@twin.org/attestation-models 0.0.1-next.14 → 0.0.1-next.16

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.
@@ -42,7 +42,7 @@ var properties$1 = {
42
42
  }
43
43
  ],
44
44
  additionalItems: {
45
- type: "string"
45
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
46
46
  }
47
47
  }
48
48
  ],
@@ -126,7 +126,7 @@ var properties = {
126
126
  }
127
127
  ],
128
128
  additionalItems: {
129
- type: "string"
129
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
130
130
  }
131
131
  }
132
132
  ],
@@ -40,7 +40,7 @@ var properties$1 = {
40
40
  }
41
41
  ],
42
42
  additionalItems: {
43
- type: "string"
43
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
44
44
  }
45
45
  }
46
46
  ],
@@ -124,7 +124,7 @@ var properties = {
124
124
  }
125
125
  ],
126
126
  additionalItems: {
127
- type: "string"
127
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
128
128
  }
129
129
  }
130
130
  ],
@@ -7,14 +7,13 @@ import type { IAttestationInformation } from "./IAttestationInformation";
7
7
  export interface IAttestationComponent extends IComponent {
8
8
  /**
9
9
  * Attest the data and return the collated information.
10
- * @param verificationMethodId The identity verification method to use for attesting the data.
11
10
  * @param attestationObject The data to attest.
12
11
  * @param namespace The namespace of the connector to use for the attestation, defaults to component configured namespace.
13
12
  * @param identity The identity to perform the attestation operation with.
14
13
  * @param nodeIdentity The node identity to include in the attestation.
15
14
  * @returns The id of the attestation.
16
15
  */
17
- create(verificationMethodId: string, attestationObject: IJsonLdNodeObject, namespace?: string, identity?: string, nodeIdentity?: string): Promise<string>;
16
+ create(attestationObject: IJsonLdNodeObject, namespace?: string, identity?: string, nodeIdentity?: string): Promise<string>;
18
17
  /**
19
18
  * Resolve and verify the attestation id.
20
19
  * @param id The attestation id to verify.
@@ -1,4 +1,4 @@
1
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
1
+ import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
2
  import type { AttestationTypes } from "./attestationTypes";
3
3
  /**
4
4
  * Interface describing the collated attestation information.
@@ -7,7 +7,7 @@ export interface IAttestationInformation {
7
7
  /**
8
8
  * JSON-LD Context.
9
9
  */
10
- "@context": typeof AttestationTypes.ContextRoot | [typeof AttestationTypes.ContextRoot, ...string[]];
10
+ "@context": typeof AttestationTypes.ContextRoot | [typeof AttestationTypes.ContextRoot, ...IJsonLdContextDefinitionElement[]];
11
11
  /**
12
12
  * JSON-LD Type.
13
13
  */
@@ -1,3 +1,4 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
1
2
  import type { AttestationTypes } from "./attestationTypes";
2
3
  /**
3
4
  * Interface describing an attestation proof.
@@ -6,7 +7,7 @@ export interface IAttestationJwtProof {
6
7
  /**
7
8
  * JSON-LD Context.
8
9
  */
9
- "@context": typeof AttestationTypes.ContextRoot | [typeof AttestationTypes.ContextRoot, ...string[]];
10
+ "@context": typeof AttestationTypes.ContextRoot | [typeof AttestationTypes.ContextRoot, ...IJsonLdContextDefinitionElement[]];
10
11
  /**
11
12
  * The type of the proof.
12
13
  */
@@ -7,10 +7,6 @@ export interface IAttestationCreateRequest {
7
7
  * The data to be used in the signing.
8
8
  */
9
9
  body: {
10
- /**
11
- * The identity verification method to use for attesting the data.
12
- */
13
- verificationMethodId: string;
14
10
  /**
15
11
  * The data object to attest.
16
12
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/attestation-models - Changelog
2
2
 
3
- ## v0.0.1-next.14
3
+ ## v0.0.1-next.16
4
4
 
5
5
  - Initial Release
@@ -10,18 +10,12 @@ Interface describing an attestation contract.
10
10
 
11
11
  ### create()
12
12
 
13
- > **create**(`verificationMethodId`, `attestationObject`, `namespace`?, `identity`?, `nodeIdentity`?): `Promise`\<`string`\>
13
+ > **create**(`attestationObject`, `namespace`?, `identity`?, `nodeIdentity`?): `Promise`\<`string`\>
14
14
 
15
15
  Attest the data and return the collated information.
16
16
 
17
17
  #### Parameters
18
18
 
19
- ##### verificationMethodId
20
-
21
- `string`
22
-
23
- The identity verification method to use for attesting the data.
24
-
25
19
  ##### attestationObject
26
20
 
27
21
  `IJsonLdNodeObject`
@@ -10,12 +10,6 @@ Attest the data and return the id of the attestation.
10
10
 
11
11
  The data to be used in the signing.
12
12
 
13
- #### verificationMethodId
14
-
15
- > **verificationMethodId**: `string`
16
-
17
- The identity verification method to use for attesting the data.
18
-
19
13
  #### attestationObject
20
14
 
21
15
  > **attestationObject**: `IJsonLdNodeObject`
@@ -6,7 +6,7 @@ Interface describing the collated attestation information.
6
6
 
7
7
  ### @context
8
8
 
9
- > **@context**: `"https://schema.twindev.org/attestation/"` \| \[`"https://schema.twindev.org/attestation/"`, `...string[]`\]
9
+ > **@context**: `"https://schema.twindev.org/attestation/"` \| \[`"https://schema.twindev.org/attestation/"`, `...IJsonLdContextDefinitionElement[]`\]
10
10
 
11
11
  JSON-LD Context.
12
12
 
@@ -6,7 +6,7 @@ Interface describing an attestation proof.
6
6
 
7
7
  ### @context
8
8
 
9
- > **@context**: `"https://schema.twindev.org/attestation/"` \| \[`"https://schema.twindev.org/attestation/"`, `...string[]`\]
9
+ > **@context**: `"https://schema.twindev.org/attestation/"` \| \[`"https://schema.twindev.org/attestation/"`, `...IJsonLdContextDefinitionElement[]`\]
10
10
 
11
11
  JSON-LD Context.
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/attestation-models",
3
- "version": "0.0.1-next.14",
3
+ "version": "0.0.1-next.16",
4
4
  "description": "Models which define the structure of the attestation connectors and services",
5
5
  "repository": {
6
6
  "type": "git",