@eluvio/elv-client-js 4.0.140 → 4.0.141

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/ElvClient.js +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "4.0.140",
3
+ "version": "4.0.141",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/index.js",
6
6
  "author": "Kevin Talmadge",
package/src/ElvClient.js CHANGED
@@ -202,6 +202,10 @@ class ElvClient {
202
202
 
203
203
  this.debug = false;
204
204
 
205
+ // Use a default key when client is unauthed. This key should not be used for any other purpose.
206
+ // Break it up to avoid automatic private key detection warnings
207
+ this.defaultKey = "0x" + "5d52d808f10f64f0dffff8c73edff" + "3f7b467411216e2350940f869e6ac5a7db6";
208
+
205
209
  this.InitializeClients({staticToken});
206
210
  }
207
211
 
@@ -433,7 +437,7 @@ class ElvClient {
433
437
 
434
438
  if(!this.signer) {
435
439
  const wallet = this.GenerateWallet();
436
- const signer = wallet.AddAccountFromMnemonic({mnemonic: wallet.GenerateMnemonic()});
440
+ const signer = wallet.AddAccount({privateKey: this.defaultKey});
437
441
  signer.anonymous = true;
438
442
 
439
443
  this.SetSigner({signer, reset: false});
@@ -1201,7 +1205,7 @@ class ElvClient {
1201
1205
  // Make dummy client with dummy account to allow calling of contracts
1202
1206
  const client = await ElvClient.FromConfigurationUrl({configUrl: this.configUrl});
1203
1207
  client.SetSigner({
1204
- signer: wallet.AddAccountFromMnemonic({mnemonic: wallet.GenerateMnemonic()})
1208
+ signer: wallet.AddAccount({privateKey: this.defaultKey})
1205
1209
  });
1206
1210
 
1207
1211
  const {urls} = await client.authClient.KMSInfo({