@eluvio/elv-client-js 4.2.9 → 4.2.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "4.2.9",
3
+ "version": "4.2.10",
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 @@ class RemoteSigner extends Ethers.Signer {
73
73
  this.signer = this.provider.getSigner(this.address);
74
74
  }
75
75
 
76
- async RetrieveCSAT({email, nonce, installId, tenantId, force=false, duration=24}) {
76
+ async RetrieveCSAT({email, nonce, installId, tenantId, force=false, duration=24, appName}) {
77
77
  if(nonce && !installId) {
78
78
  const buf = await crypto.subtle.digest("SHA-512", new TextEncoder("utf-8").encode(nonce));
79
79
  installId = Array.prototype.map.call(new Uint8Array(buf), x=>(("00"+x.toString(16)).slice(-2))).join("");
@@ -87,6 +87,7 @@ class RemoteSigner extends Ethers.Signer {
87
87
  install_id: installId,
88
88
  force,
89
89
  tid: tenantId,
90
+ app_name: appName,
90
91
  exp: parseInt(duration * 60 * 60)
91
92
  },
92
93
  path: UrlJoin("as", "wlt", "sign", "csat"),
@@ -483,6 +483,7 @@ class ElvWalletClient {
483
483
  extraData={},
484
484
  nonce,
485
485
  installId,
486
+ appName,
486
487
  createRemoteToken=true,
487
488
  force=false,
488
489
  tokenDuration=24
@@ -498,7 +499,7 @@ class ElvWalletClient {
498
499
  let fabricToken, refreshToken, expiresAt;
499
500
  if(createRemoteToken && this.client.signer.remoteSigner) {
500
501
  expiresAt = Date.now() + tokenDuration * 60 * 60 * 1000;
501
- const tokenResponse = await this.client.signer.RetrieveCSAT({email, nonce, installId, tenantId, force, duration: tokenDuration});
502
+ const tokenResponse = await this.client.signer.RetrieveCSAT({email, nonce, installId, appName, tenantId, force, duration: tokenDuration});
502
503
  fabricToken = tokenResponse.token;
503
504
  nonce = tokenResponse.nonce || nonce;
504
505
  installId = tokenResponse.installId || installId;