@usherlabs/cex-broker 0.1.6 → 0.1.8

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.
@@ -73465,6 +73465,7 @@ class Exchange {
73465
73465
  this.countries = undefined;
73466
73466
  this.userAgent = undefined;
73467
73467
  this.user_agent = undefined;
73468
+ this.redact_exclusion = "api-key";
73468
73469
  this.userAgents = {
73469
73470
  chrome: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36",
73470
73471
  chrome39: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36",
@@ -73479,6 +73480,7 @@ class Exchange {
73479
73480
  this.httpsAgent = undefined;
73480
73481
  this.useVerity = false;
73481
73482
  this.verityProverUrl = "http://localhost:8080";
73483
+ this.verityMethods = ["fetchBalance", "fetchDepositAddress", "fetchDepositAddress", "fetchDepositAddresses", "fetchDepositAddressesByNetwork", "fetchDeposits", "withdraw", "fetchFundingHistory", "fetchWithdrawals", "fetchWithdrawal"];
73482
73484
  this.minFundingAddressLength = 1;
73483
73485
  this.substituteCommonCurrencyCodes = true;
73484
73486
  this.quoteJsonNumbers = true;
@@ -73973,9 +73975,9 @@ RequestBody:
73973
73975
  this.log("MethodCalled:", methodCalled + `
73974
73976
  `);
73975
73977
  }
73976
- if (this.useVerity && ["get", "post"].includes(method.toLowerCase()) && ["fetchBalance", "fetchDepositAddress", "fetchDepositAddress", "fetchDepositAddresses", "fetchDepositAddressesByNetwork", "fetchDeposits", "withdraw"].includes(methodCalled)) {
73978
+ if (this.useVerity && ["get", "post"].includes(method.toLowerCase()) && this.verityMethods.includes(methodCalled)) {
73977
73979
  const client = new import_verity_client.default.VerityClient({ prover_url: this.verityProverUrl });
73978
- const lowercase = Object.keys(axiosConfig.headers).map((h) => `req:header:${h.toLowerCase()}`).join(",");
73980
+ const lowercase = Object.keys(axiosConfig.headers).filter((header) => !header.toLowerCase().includes(this.redact_exclusion.toLowerCase())).map((h) => `req:header:${h.toLowerCase()}`).join(",");
73979
73981
  const response = await client.get(axiosConfig.url, axiosConfig).redact(lowercase);
73980
73982
  if (this.verbose) {
73981
73983
  this.log("verityProof:", response.proof, `
package/dist/index.js CHANGED
@@ -68512,6 +68512,7 @@ class Exchange {
68512
68512
  this.countries = undefined;
68513
68513
  this.userAgent = undefined;
68514
68514
  this.user_agent = undefined;
68515
+ this.redact_exclusion = "api-key";
68515
68516
  this.userAgents = {
68516
68517
  chrome: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36",
68517
68518
  chrome39: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36",
@@ -68526,6 +68527,7 @@ class Exchange {
68526
68527
  this.httpsAgent = undefined;
68527
68528
  this.useVerity = false;
68528
68529
  this.verityProverUrl = "http://localhost:8080";
68530
+ this.verityMethods = ["fetchBalance", "fetchDepositAddress", "fetchDepositAddress", "fetchDepositAddresses", "fetchDepositAddressesByNetwork", "fetchDeposits", "withdraw", "fetchFundingHistory", "fetchWithdrawals", "fetchWithdrawal"];
68529
68531
  this.minFundingAddressLength = 1;
68530
68532
  this.substituteCommonCurrencyCodes = true;
68531
68533
  this.quoteJsonNumbers = true;
@@ -69020,9 +69022,9 @@ RequestBody:
69020
69022
  this.log("MethodCalled:", methodCalled + `
69021
69023
  `);
69022
69024
  }
69023
- if (this.useVerity && ["get", "post"].includes(method.toLowerCase()) && ["fetchBalance", "fetchDepositAddress", "fetchDepositAddress", "fetchDepositAddresses", "fetchDepositAddressesByNetwork", "fetchDeposits", "withdraw"].includes(methodCalled)) {
69025
+ if (this.useVerity && ["get", "post"].includes(method.toLowerCase()) && this.verityMethods.includes(methodCalled)) {
69024
69026
  const client = new import_verity_client.default.VerityClient({ prover_url: this.verityProverUrl });
69025
- const lowercase = Object.keys(axiosConfig.headers).map((h) => `req:header:${h.toLowerCase()}`).join(",");
69027
+ const lowercase = Object.keys(axiosConfig.headers).filter((header) => !header.toLowerCase().includes(this.redact_exclusion.toLowerCase())).map((h) => `req:header:${h.toLowerCase()}`).join(",");
69026
69028
  const response = await client.get(axiosConfig.url, axiosConfig).redact(lowercase);
69027
69029
  if (this.verbose) {
69028
69030
  this.log("verityProof:", response.proof, `
@@ -286080,4 +286082,4 @@ export {
286080
286082
  CEXBroker as default
286081
286083
  };
286082
286084
 
286083
- //# debugId=3002E50F4599799964756E2164756E21
286085
+ //# debugId=18C1DCDB521AE71364756E2164756E21