@eluvio/elv-client-js 4.0.140 → 4.0.142
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
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.
|
|
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.
|
|
1208
|
+
signer: wallet.AddAccount({privateKey: this.defaultKey})
|
|
1205
1209
|
});
|
|
1206
1210
|
|
|
1207
1211
|
const {urls} = await client.authClient.KMSInfo({
|
|
@@ -1099,7 +1099,7 @@ exports.PublishContentVersion = async function({objectId, versionHash, awaitComm
|
|
|
1099
1099
|
let h;
|
|
1100
1100
|
|
|
1101
1101
|
try {
|
|
1102
|
-
h = await this.
|
|
1102
|
+
h = await this.LatestVersionHash({objectId});
|
|
1103
1103
|
|
|
1104
1104
|
if(h === versionHash) {
|
|
1105
1105
|
this.Log(`Commit confirmed on fabric node: ${versionHash}`);
|