@twin.org/immutable-proof-rest-client 0.0.1-next.25 → 0.0.1-next.27

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.
@@ -22,21 +22,21 @@ class ImmutableProofClient extends apiCore.BaseRestClient {
22
22
  super("ImmutableProofClient", config, "immutable-proof");
23
23
  }
24
24
  /**
25
- * Create a new authentication proof.
26
- * @param proofObject The object for the proof as JSON-LD.
27
- * @returns The id of the new authentication proof.
25
+ * Create a new proof.
26
+ * @param document The document to create the proof for.
27
+ * @returns The id of the new proof.
28
28
  */
29
- async create(proofObject) {
30
- core.Guards.object(this.CLASS_NAME, "proofObject", proofObject);
29
+ async create(document) {
30
+ core.Guards.object(this.CLASS_NAME, "document", document);
31
31
  const response = await this.fetch("/", "POST", {
32
32
  body: {
33
- proofObject
33
+ document
34
34
  }
35
35
  });
36
36
  return response.headers[web.HeaderTypes.Location];
37
37
  }
38
38
  /**
39
- * Get an authentication proof.
39
+ * Get a proof.
40
40
  * @param id The id of the proof to get.
41
41
  * @returns The proof.
42
42
  * @throws NotFoundError if the proof is not found.
@@ -54,7 +54,7 @@ class ImmutableProofClient extends apiCore.BaseRestClient {
54
54
  return response.body;
55
55
  }
56
56
  /**
57
- * Verify an authentication proof.
57
+ * Verify a proof.
58
58
  * @param id The id of the proof to verify.
59
59
  * @returns The result of the verification and any failures.
60
60
  * @throws NotFoundError if the proof is not found.
@@ -20,21 +20,21 @@ class ImmutableProofClient extends BaseRestClient {
20
20
  super("ImmutableProofClient", config, "immutable-proof");
21
21
  }
22
22
  /**
23
- * Create a new authentication proof.
24
- * @param proofObject The object for the proof as JSON-LD.
25
- * @returns The id of the new authentication proof.
23
+ * Create a new proof.
24
+ * @param document The document to create the proof for.
25
+ * @returns The id of the new proof.
26
26
  */
27
- async create(proofObject) {
28
- Guards.object(this.CLASS_NAME, "proofObject", proofObject);
27
+ async create(document) {
28
+ Guards.object(this.CLASS_NAME, "document", document);
29
29
  const response = await this.fetch("/", "POST", {
30
30
  body: {
31
- proofObject
31
+ document
32
32
  }
33
33
  });
34
34
  return response.headers[HeaderTypes.Location];
35
35
  }
36
36
  /**
37
- * Get an authentication proof.
37
+ * Get a proof.
38
38
  * @param id The id of the proof to get.
39
39
  * @returns The proof.
40
40
  * @throws NotFoundError if the proof is not found.
@@ -52,7 +52,7 @@ class ImmutableProofClient extends BaseRestClient {
52
52
  return response.body;
53
53
  }
54
54
  /**
55
- * Verify an authentication proof.
55
+ * Verify a proof.
56
56
  * @param id The id of the proof to verify.
57
57
  * @returns The result of the verification and any failures.
58
58
  * @throws NotFoundError if the proof is not found.
@@ -16,20 +16,20 @@ export declare class ImmutableProofClient extends BaseRestClient implements IImm
16
16
  */
17
17
  constructor(config: IBaseRestClientConfig);
18
18
  /**
19
- * Create a new authentication proof.
20
- * @param proofObject The object for the proof as JSON-LD.
21
- * @returns The id of the new authentication proof.
19
+ * Create a new proof.
20
+ * @param document The document to create the proof for.
21
+ * @returns The id of the new proof.
22
22
  */
23
- create(proofObject: IJsonLdNodeObject): Promise<string>;
23
+ create(document: IJsonLdNodeObject): Promise<string>;
24
24
  /**
25
- * Get an authentication proof.
25
+ * Get a proof.
26
26
  * @param id The id of the proof to get.
27
27
  * @returns The proof.
28
28
  * @throws NotFoundError if the proof is not found.
29
29
  */
30
30
  get(id: string): Promise<IImmutableProof>;
31
31
  /**
32
- * Verify an authentication proof.
32
+ * Verify a proof.
33
33
  * @param id The id of the proof to verify.
34
34
  * @returns The result of the verification and any failures.
35
35
  * @throws NotFoundError if the proof is not found.
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/immutable-proof-rest-client - Changelog
2
2
 
3
- ## v0.0.1-next.25
3
+ ## v0.0.1-next.27
4
4
 
5
5
  - Initial Release
@@ -50,23 +50,23 @@ Runtime name for the class.
50
50
 
51
51
  ### create()
52
52
 
53
- > **create**(`proofObject`): `Promise`\<`string`\>
53
+ > **create**(`document`): `Promise`\<`string`\>
54
54
 
55
- Create a new authentication proof.
55
+ Create a new proof.
56
56
 
57
57
  #### Parameters
58
58
 
59
- ##### proofObject
59
+ ##### document
60
60
 
61
61
  `IJsonLdNodeObject`
62
62
 
63
- The object for the proof as JSON-LD.
63
+ The document to create the proof for.
64
64
 
65
65
  #### Returns
66
66
 
67
67
  `Promise`\<`string`\>
68
68
 
69
- The id of the new authentication proof.
69
+ The id of the new proof.
70
70
 
71
71
  #### Implementation of
72
72
 
@@ -78,7 +78,7 @@ The id of the new authentication proof.
78
78
 
79
79
  > **get**(`id`): `Promise`\<`IImmutableProof`\>
80
80
 
81
- Get an authentication proof.
81
+ Get a proof.
82
82
 
83
83
  #### Parameters
84
84
 
@@ -108,7 +108,7 @@ NotFoundError if the proof is not found.
108
108
 
109
109
  > **verify**(`id`): `Promise`\<`IImmutableProofVerification`\>
110
110
 
111
- Verify an authentication proof.
111
+ Verify a proof.
112
112
 
113
113
  #### Parameters
114
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-rest-client",
3
- "version": "0.0.1-next.25",
3
+ "version": "0.0.1-next.27",
4
4
  "description": "Immutable Proof contract implementation which can connect to REST endpoints",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/data-json-ld": "next",
21
21
  "@twin.org/entity": "next",
22
- "@twin.org/immutable-proof-models": "0.0.1-next.25",
22
+ "@twin.org/immutable-proof-models": "0.0.1-next.27",
23
23
  "@twin.org/nameof": "next",
24
24
  "@twin.org/web": "next"
25
25
  },