@eluvio/elv-client-js 3.2.0 → 3.2.4
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 +1 -1
- package/dist/ElvClient-node-min.js +1 -1
- package/dist/ElvFrameClient-min.js +2 -2
- package/dist/ElvPermissionsClient-min.js +3 -3
- package/dist/src/ElvClient.js +1 -4
- package/dist/src/Utils.js +3 -20
- package/package.json +3 -5
- package/src/ElvClient.js +1 -4
- package/src/Utils.js +3 -22
- package/utilities/ProductionMasterCreate.js +2 -2
- package/dist/src/index.js +0 -11
- package/dist/src/marketplaceClient/ClientMethods.js +0 -1918
- package/dist/src/marketplaceClient/Configuration.js +0 -29
- package/dist/src/marketplaceClient/Utils.js +0 -304
- package/dist/src/marketplaceClient/index.js +0 -1553
- package/dist/src/walletClient/ClientMethods.js +0 -1828
- package/dist/src/walletClient/Configuration.js +0 -29
- package/dist/src/walletClient/Utils.js +0 -290
- package/dist/src/walletClient/index.js +0 -1459
- package/package-lock.json +0 -22001
- package/src/index.js +0 -7
- package/src/walletClient/ClientMethods.js +0 -1016
- package/src/walletClient/Configuration.js +0 -40
- package/src/walletClient/README.md +0 -185
- package/src/walletClient/Utils.js +0 -234
- package/src/walletClient/index.js +0 -884
- package/testScripts/TestMarketplaceClient.js +0 -25
package/dist/src/ElvClient.js
CHANGED
|
@@ -62,9 +62,6 @@ if (Utils.Platform() === Utils.PLATFORM_NODE) {
|
|
|
62
62
|
/**
|
|
63
63
|
* See the Modules section on the sidebar for details about methods related to interacting with the Fabric.
|
|
64
64
|
*
|
|
65
|
-
* <br/>
|
|
66
|
-
*
|
|
67
|
-
* For information about the Eluvio Wallet Client, go <a href="wallet-client/index.html">here</a>.
|
|
68
65
|
*/
|
|
69
66
|
|
|
70
67
|
|
|
@@ -176,7 +173,7 @@ function () {
|
|
|
176
173
|
/**
|
|
177
174
|
* Create a new ElvClient
|
|
178
175
|
*
|
|
179
|
-
* NOTE: It is highly recommended to use
|
|
176
|
+
* NOTE: It is highly recommended to use ElvClient.FromConfiguration to
|
|
180
177
|
* automatically import the client settings from the fabric
|
|
181
178
|
*
|
|
182
179
|
* @constructor
|
package/dist/src/Utils.js
CHANGED
|
@@ -36,14 +36,14 @@ var _require$utils = require("ethers").utils,
|
|
|
36
36
|
*
|
|
37
37
|
* Utils can be imported separately from the client:
|
|
38
38
|
*
|
|
39
|
-
*
|
|
39
|
+
* const Utils = require("@eluvio/elv-client-js/src/Utils)
|
|
40
40
|
*
|
|
41
41
|
* or
|
|
42
42
|
*
|
|
43
|
-
*
|
|
43
|
+
* import Utils from "@eluvio/elv-client-js/src/Utils"
|
|
44
44
|
*
|
|
45
45
|
*
|
|
46
|
-
* It can be accessed from ElvClient and FrameClient as
|
|
46
|
+
* It can be accessed from ElvClient and FrameClient as client.utils
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
|
|
@@ -473,29 +473,12 @@ var Utils = {
|
|
|
473
473
|
FromB64: function FromB64(str) {
|
|
474
474
|
return Buffer.from(str, "base64").toString("utf-8");
|
|
475
475
|
},
|
|
476
|
-
FromB64URL: function FromB64URL(str) {
|
|
477
|
-
str = str.replace(/-/g, "+").replace(/_/g, "/");
|
|
478
|
-
var pad = str.length % 4;
|
|
479
|
-
|
|
480
|
-
if (pad) {
|
|
481
|
-
if (pad === 1) {
|
|
482
|
-
throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
str += new Array(5 - pad).join("=");
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
return Utils.FromB64(str);
|
|
489
|
-
},
|
|
490
476
|
B58: function B58(arr) {
|
|
491
477
|
return bs58.encode(Buffer.from(arr));
|
|
492
478
|
},
|
|
493
479
|
FromB58: function FromB58(str) {
|
|
494
480
|
return bs58.decode(str);
|
|
495
481
|
},
|
|
496
|
-
FromB58ToStr: function FromB58ToStr(str) {
|
|
497
|
-
return new TextDecoder().decode(Utils.FromB58(str));
|
|
498
|
-
},
|
|
499
482
|
|
|
500
483
|
/**
|
|
501
484
|
* Decode the given fabric authorization token
|
package/package.json
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eluvio/elv-client-js",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "Javascript client for the Eluvio Content Fabric",
|
|
5
|
-
"main": "src/
|
|
5
|
+
"main": "src/ElvClient.js",
|
|
6
6
|
"author": "Kevin Talmadge",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://github.com/eluv-io/elv-client-js",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"bump-version": "npm --git-tag-version --no-commit-hooks version patch",
|
|
11
11
|
"build": "npm run build-docs && npm run build-dist && npm run build-frame-client && npm run build-permissions-client && npm run build-prod",
|
|
12
|
-
"build-docs": "node build/BuildDocs.js &&
|
|
13
|
-
"build-client-docs": "./node_modules/.bin/jsdoc --configure ./.jsdoc.json --readme README.md",
|
|
14
|
-
"build-wallet-client-docs": "./node_modules/.bin/jsdoc --configure ./.jsdoc-mc.json --readme ./src/walletClient/README.md",
|
|
12
|
+
"build-docs": "node build/BuildDocs.js && ./node_modules/.bin/jsdoc --configure ./.jsdoc.json --readme README.md",
|
|
15
13
|
"build-dist": "node ./node_modules/@babel/cli/bin/babel.js --source-type=unambiguous --presets=@babel/preset-env --plugins @babel/plugin-transform-runtime src --out-dir dist/src",
|
|
16
14
|
"build-contracts": "node build/BuildContracts.js",
|
|
17
15
|
"build-frame-client": "webpack -p --progress --entry ./dist/src/FrameClient.js --output-filename ElvFrameClient-min.js --devtool none --optimize-minimize && mv test/bundle-analysis/index.html test/bundle-analysis/frame-client.html",
|
package/src/ElvClient.js
CHANGED
|
@@ -39,9 +39,6 @@ if(Utils.Platform() === Utils.PLATFORM_NODE) {
|
|
|
39
39
|
/**
|
|
40
40
|
* See the Modules section on the sidebar for details about methods related to interacting with the Fabric.
|
|
41
41
|
*
|
|
42
|
-
* <br/>
|
|
43
|
-
*
|
|
44
|
-
* For information about the Eluvio Wallet Client, go <a href="wallet-client/index.html">here</a>.
|
|
45
42
|
*/
|
|
46
43
|
class ElvClient {
|
|
47
44
|
Log(message, error = false) {
|
|
@@ -119,7 +116,7 @@ class ElvClient {
|
|
|
119
116
|
/**
|
|
120
117
|
* Create a new ElvClient
|
|
121
118
|
*
|
|
122
|
-
* NOTE: It is highly recommended to use
|
|
119
|
+
* NOTE: It is highly recommended to use ElvClient.FromConfiguration to
|
|
123
120
|
* automatically import the client settings from the fabric
|
|
124
121
|
*
|
|
125
122
|
* @constructor
|
package/src/Utils.js
CHANGED
|
@@ -18,14 +18,14 @@ const {
|
|
|
18
18
|
*
|
|
19
19
|
* Utils can be imported separately from the client:
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* const Utils = require("@eluvio/elv-client-js/src/Utils)
|
|
22
22
|
*
|
|
23
23
|
* or
|
|
24
24
|
*
|
|
25
|
-
*
|
|
25
|
+
* import Utils from "@eluvio/elv-client-js/src/Utils"
|
|
26
26
|
*
|
|
27
27
|
*
|
|
28
|
-
* It can be accessed from ElvClient and FrameClient as
|
|
28
|
+
* It can be accessed from ElvClient and FrameClient as client.utils
|
|
29
29
|
*/
|
|
30
30
|
const Utils = {
|
|
31
31
|
name: "Utils",
|
|
@@ -442,21 +442,6 @@ const Utils = {
|
|
|
442
442
|
return Buffer.from(str, "base64").toString("utf-8");
|
|
443
443
|
},
|
|
444
444
|
|
|
445
|
-
FromB64URL: str => {
|
|
446
|
-
str = str.replace(/-/g, "+").replace(/_/g, "/");
|
|
447
|
-
|
|
448
|
-
const pad = str.length % 4;
|
|
449
|
-
if(pad) {
|
|
450
|
-
if(pad === 1) {
|
|
451
|
-
throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
str += new Array(5-pad).join("=");
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
return Utils.FromB64(str);
|
|
458
|
-
},
|
|
459
|
-
|
|
460
445
|
B58: arr => {
|
|
461
446
|
return bs58.encode(Buffer.from(arr));
|
|
462
447
|
},
|
|
@@ -465,10 +450,6 @@ const Utils = {
|
|
|
465
450
|
return bs58.decode(str);
|
|
466
451
|
},
|
|
467
452
|
|
|
468
|
-
FromB58ToStr: str => {
|
|
469
|
-
return new TextDecoder().decode(Utils.FromB58(str));
|
|
470
|
-
},
|
|
471
|
-
|
|
472
453
|
/**
|
|
473
454
|
* Decode the given fabric authorization token
|
|
474
455
|
*
|
|
@@ -110,7 +110,7 @@ class ProductionMasterCreate extends Utility {
|
|
|
110
110
|
objectId: id,
|
|
111
111
|
writeToken: write_token,
|
|
112
112
|
metadata: streams,
|
|
113
|
-
metadataSubtree: "/production_master/variants/default"
|
|
113
|
+
metadataSubtree: "/production_master/variants/default/streams"
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
const finalizeResponse = await client.FinalizeContentObject({
|
|
@@ -181,4 +181,4 @@ if(require.main === module) {
|
|
|
181
181
|
Utility.cmdLineInvoke(ProductionMasterCreate);
|
|
182
182
|
} else {
|
|
183
183
|
module.exports = ProductionMasterCreate;
|
|
184
|
-
}
|
|
184
|
+
}
|
package/dist/src/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var _require = require("./ElvClient.js"),
|
|
2
|
-
ElvClient = _require.ElvClient;
|
|
3
|
-
|
|
4
|
-
var _require2 = require("./walletClient/index.js"),
|
|
5
|
-
ElvMarketplaceClient = _require2.ElvMarketplaceClient;
|
|
6
|
-
|
|
7
|
-
var Utils = require("./Utils.js");
|
|
8
|
-
|
|
9
|
-
exports.ElvClient = ElvClient;
|
|
10
|
-
exports.ElvMarketplaceClient = ElvMarketplaceClient;
|
|
11
|
-
exports.Utils = Utils;
|