@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.
@@ -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 ElvClient.FromConfiguration to
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;