@eluvio/elv-client-js 3.1.97 → 3.2.2
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 +4 -1
- package/dist/src/Utils.js +20 -3
- package/dist/src/index.js +11 -0
- package/dist/src/marketplaceClient/ClientMethods.js +1918 -0
- package/dist/src/marketplaceClient/Configuration.js +29 -0
- package/dist/src/marketplaceClient/Utils.js +304 -0
- package/dist/src/marketplaceClient/index.js +1553 -0
- package/dist/src/walletClient/ClientMethods.js +1828 -0
- package/dist/src/walletClient/Configuration.js +29 -0
- package/dist/src/walletClient/Utils.js +290 -0
- package/dist/src/walletClient/index.js +1459 -0
- package/package.json +5 -3
- package/src/ElvClient.js +4 -1
- package/src/Utils.js +22 -3
- package/src/index.js +7 -0
- package/src/walletClient/ClientMethods.js +1016 -0
- package/src/walletClient/Configuration.js +40 -0
- package/src/walletClient/README.md +185 -0
- package/src/walletClient/Utils.js +234 -0
- package/src/walletClient/index.js +884 -0
- package/testScripts/TestMarketplaceClient.js +25 -0
- package/package-lock.json +0 -22001
package/dist/src/ElvClient.js
CHANGED
|
@@ -62,6 +62,9 @@ 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>.
|
|
65
68
|
*/
|
|
66
69
|
|
|
67
70
|
|
|
@@ -173,7 +176,7 @@ function () {
|
|
|
173
176
|
/**
|
|
174
177
|
* Create a new ElvClient
|
|
175
178
|
*
|
|
176
|
-
* NOTE: It is highly recommended to use
|
|
179
|
+
* NOTE: It is highly recommended to use the <a href="#.FromConfigurationUrl">FromConfigurationUrl</a> or <a href="#.FromNetworkName">FromNetworkName</a> method
|
|
177
180
|
* automatically import the client settings from the fabric
|
|
178
181
|
*
|
|
179
182
|
* @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
|
-
* const Utils = require("@eluvio/elv-client-js/src/Utils)
|
|
39
|
+
* `const Utils = require("@eluvio/elv-client-js/src/Utils)`
|
|
40
40
|
*
|
|
41
41
|
* or
|
|
42
42
|
*
|
|
43
|
-
* import Utils from "@eluvio/elv-client-js/src/Utils"
|
|
43
|
+
* `import Utils from "@eluvio/elv-client-js/src/Utils"`
|
|
44
44
|
*
|
|
45
45
|
*
|
|
46
|
-
* It can be accessed from ElvClient and FrameClient as client.utils
|
|
46
|
+
* It can be accessed from ElvClient and FrameClient as `client.utils`
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
|
|
@@ -473,12 +473,29 @@ 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
|
+
},
|
|
476
490
|
B58: function B58(arr) {
|
|
477
491
|
return bs58.encode(Buffer.from(arr));
|
|
478
492
|
},
|
|
479
493
|
FromB58: function FromB58(str) {
|
|
480
494
|
return bs58.decode(str);
|
|
481
495
|
},
|
|
496
|
+
FromB58ToStr: function FromB58ToStr(str) {
|
|
497
|
+
return new TextDecoder().decode(Utils.FromB58(str));
|
|
498
|
+
},
|
|
482
499
|
|
|
483
500
|
/**
|
|
484
501
|
* Decode the given fabric authorization token
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|