- Added datawells subcommand

- Altered the request format to match the new api request structure
- Altered max results per page to reflect updated Dehashed API max (10000)
This commit is contained in:
Evan Hosinski
2026-04-07 09:09:12 -04:00
parent da53a787fe
commit 5c36b034b6
11 changed files with 499 additions and 63 deletions
+10 -2
View File
@@ -198,7 +198,7 @@ func (dcv2 *DehashedClientV2) Search(searchRequest DehashedSearchRequest) (int,
req.Header.Set("Dehashed-Api-Key", dcv2.apiKey)
if dcv2.debug {
headers := req.Header.Clone()
headers := redactedHeaders(req.Header)
h := fmt.Sprintf("Headers: %v\n", headers)
debug.PrintJson(h)
zap.L().Info("v2_search_debug",
@@ -286,7 +286,7 @@ func (dcv2 *DehashedClientV2) Search(searchRequest DehashedSearchRequest) (int,
}
dcv2.results = append(dcv2.results, responseResults.Entries...)
return responseResults.TotalResults, responseResults.Balance, nil
return len(responseResults.Entries), responseResults.Balance, nil
}
func (dcv2 *DehashedClientV2) GetResults() sqlite.DehashedResults {
@@ -304,3 +304,11 @@ func enquoteSpaced(s string) string {
}
return s
}
func redactedHeaders(headers http.Header) http.Header {
redacted := headers.Clone()
if redacted.Get("Dehashed-Api-Key") != "" {
redacted.Set("Dehashed-Api-Key", "[REDACTED]")
}
return redacted
}