@twin.org/immutable-proof-rest-client 0.0.1-next.11 → 0.0.1-next.13
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.
package/dist/cjs/index.cjs
CHANGED
|
@@ -56,22 +56,17 @@ class ImmutableProofClient extends apiCore.BaseRestClient {
|
|
|
56
56
|
/**
|
|
57
57
|
* Verify an authentication proof.
|
|
58
58
|
* @param id The id of the proof to verify.
|
|
59
|
-
* @param proofObject The object to verify as JSON-LD.
|
|
60
59
|
* @returns The result of the verification and any failures.
|
|
61
60
|
* @throws NotFoundError if the proof is not found.
|
|
62
61
|
*/
|
|
63
|
-
async verify(id
|
|
62
|
+
async verify(id) {
|
|
64
63
|
core.Guards.stringValue(this.CLASS_NAME, "id", id);
|
|
65
|
-
core.Guards.object(this.CLASS_NAME, "proofObject", proofObject);
|
|
66
64
|
const response = await this.fetch("/:id", "POST", {
|
|
67
65
|
headers: {
|
|
68
66
|
[web.HeaderTypes.Accept]: web.MimeTypes.JsonLd
|
|
69
67
|
},
|
|
70
68
|
pathParams: {
|
|
71
69
|
id
|
|
72
|
-
},
|
|
73
|
-
body: {
|
|
74
|
-
proofObject
|
|
75
70
|
}
|
|
76
71
|
});
|
|
77
72
|
return response.body;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -54,22 +54,17 @@ class ImmutableProofClient extends BaseRestClient {
|
|
|
54
54
|
/**
|
|
55
55
|
* Verify an authentication proof.
|
|
56
56
|
* @param id The id of the proof to verify.
|
|
57
|
-
* @param proofObject The object to verify as JSON-LD.
|
|
58
57
|
* @returns The result of the verification and any failures.
|
|
59
58
|
* @throws NotFoundError if the proof is not found.
|
|
60
59
|
*/
|
|
61
|
-
async verify(id
|
|
60
|
+
async verify(id) {
|
|
62
61
|
Guards.stringValue(this.CLASS_NAME, "id", id);
|
|
63
|
-
Guards.object(this.CLASS_NAME, "proofObject", proofObject);
|
|
64
62
|
const response = await this.fetch("/:id", "POST", {
|
|
65
63
|
headers: {
|
|
66
64
|
[HeaderTypes.Accept]: MimeTypes.JsonLd
|
|
67
65
|
},
|
|
68
66
|
pathParams: {
|
|
69
67
|
id
|
|
70
|
-
},
|
|
71
|
-
body: {
|
|
72
|
-
proofObject
|
|
73
68
|
}
|
|
74
69
|
});
|
|
75
70
|
return response.body;
|
|
@@ -31,11 +31,10 @@ export declare class ImmutableProofClient extends BaseRestClient implements IImm
|
|
|
31
31
|
/**
|
|
32
32
|
* Verify an authentication proof.
|
|
33
33
|
* @param id The id of the proof to verify.
|
|
34
|
-
* @param proofObject The object to verify as JSON-LD.
|
|
35
34
|
* @returns The result of the verification and any failures.
|
|
36
35
|
* @throws NotFoundError if the proof is not found.
|
|
37
36
|
*/
|
|
38
|
-
verify(id: string
|
|
37
|
+
verify(id: string): Promise<IImmutableProofVerification>;
|
|
39
38
|
/**
|
|
40
39
|
* Remove the immutable storage for the proof.
|
|
41
40
|
* @param id The id of the proof to remove the storage from.
|
package/docs/changelog.md
CHANGED
|
@@ -100,7 +100,7 @@ NotFoundError if the proof is not found.
|
|
|
100
100
|
|
|
101
101
|
### verify()
|
|
102
102
|
|
|
103
|
-
> **verify**(`id
|
|
103
|
+
> **verify**(`id`): `Promise`\<`IImmutableProofVerification`\>
|
|
104
104
|
|
|
105
105
|
Verify an authentication proof.
|
|
106
106
|
|
|
@@ -110,10 +110,6 @@ Verify an authentication proof.
|
|
|
110
110
|
|
|
111
111
|
The id of the proof to verify.
|
|
112
112
|
|
|
113
|
-
• **proofObject**: `IJsonLdNodeObject`
|
|
114
|
-
|
|
115
|
-
The object to verify as JSON-LD.
|
|
116
|
-
|
|
117
113
|
#### Returns
|
|
118
114
|
|
|
119
115
|
`Promise`\<`IImmutableProofVerification`\>
|
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.
|
|
3
|
+
"version": "0.0.1-next.13",
|
|
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.
|
|
22
|
+
"@twin.org/immutable-proof-models": "0.0.1-next.13",
|
|
23
23
|
"@twin.org/nameof": "next",
|
|
24
24
|
"@twin.org/web": "next"
|
|
25
25
|
},
|