@eluvio/elv-client-js 4.0.143 → 4.0.145
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/ElvClient-min.js +15 -14
- package/dist/ElvClient-node-min.js +14 -13
- package/dist/ElvFrameClient-min.js +10 -10
- package/dist/ElvPermissionsClient-min.js +9 -9
- package/dist/ElvWalletClient-min.js +15 -14
- package/dist/ElvWalletClient-node-min.js +14 -13
- package/dist/src/AuthorizationClient.js +11 -14
- package/dist/src/ContentObjectAudit.js +3 -3
- package/dist/src/ContentObjectVerification.js +3 -3
- package/dist/src/Crypto.js +2 -2
- package/dist/src/ElvClient.js +532 -401
- package/dist/src/ElvWallet.js +7 -5
- package/dist/src/EthClient.js +9 -10
- package/dist/src/FrameClient.js +10 -11
- package/dist/src/HttpClient.js +5 -5
- package/dist/src/Id.js +1 -2
- package/dist/src/PermissionsClient.js +31 -19
- package/dist/src/RemoteSigner.js +10 -11
- package/dist/src/UserProfileClient.js +35 -20
- package/dist/src/Utils.js +2 -3
- package/dist/src/Validation.js +10 -2
- package/dist/src/client/ABRPublishing.js +438 -238
- package/dist/src/client/AccessGroups.js +2 -2
- package/dist/src/client/ContentAccess.js +281 -344
- package/dist/src/client/ContentManagement.js +100 -84
- package/dist/src/client/Contracts.js +430 -2
- package/dist/src/client/Files.js +2 -2
- package/dist/src/client/LiveConf.js +43 -26
- package/dist/src/client/LiveStream.js +65 -63
- package/dist/src/client/NFT.js +2 -2
- package/dist/src/client/Shares.js +47 -24
- package/dist/src/walletClient/ClientMethods.js +2 -2
- package/dist/src/walletClient/Profile.js +2 -2
- package/dist/src/walletClient/Utils.js +2 -2
- package/dist/src/walletClient/index.js +359 -280
- package/package.json +2 -2
- package/src/FrameClient.js +1 -0
- package/src/Validation.js +9 -3
- package/src/client/ABRPublishing.js +176 -160
- package/src/client/Contracts.js +258 -0
- package/src/walletClient/index.js +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eluvio/elv-client-js",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.145",
|
|
4
4
|
"description": "Javascript client for the Eluvio Content Fabric",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Kevin Talmadge",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"hash.js": "^1.1.7",
|
|
74
74
|
"isarray": "^2.0.5",
|
|
75
75
|
"js-polyfills": "^0.1.42",
|
|
76
|
-
"jsonpath-plus": "^
|
|
76
|
+
"jsonpath-plus": "^10.3.0",
|
|
77
77
|
"kind-of": "^6.0.3",
|
|
78
78
|
"lodash": "^4.17.19",
|
|
79
79
|
"lodash.isequal": "^4.5.0",
|
package/src/FrameClient.js
CHANGED
package/src/Validation.js
CHANGED
|
@@ -30,11 +30,17 @@ exports.ValidateVersion = (versionHash) => {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
// Validates that write token is in valid format and is properly encoded.
|
|
34
|
+
// If objectId is also supplied, then write token's encoded object id is checked to make sure it matches
|
|
35
|
+
// the supplied object id.
|
|
36
|
+
exports.ValidateWriteToken = (writeToken, objectId = "") => {
|
|
34
37
|
if(!writeToken) {
|
|
35
38
|
throw Error("Write token not specified");
|
|
36
|
-
} else
|
|
37
|
-
|
|
39
|
+
} else {
|
|
40
|
+
const decoded = Utils.DecodeWriteToken(writeToken);
|
|
41
|
+
if(objectId && objectId !== decoded.objectId) {
|
|
42
|
+
throw Error(`Object id (${objectId}) does not match the the id (${decoded.objectId}) decoded from write token (${writeToken})`);
|
|
43
|
+
}
|
|
38
44
|
}
|
|
39
45
|
};
|
|
40
46
|
|