Files
stealth/backend/requests/wallet.http
LORDBABUINO ccc61d663e Feat: Wire frontend to backend scan endpoint, replace UTXO report with findings
- Add GET /api/wallet/scan endpoint that shells out to detect.py
- Add CORS config and detect.py script path to application.properties
- walletService.js now calls the real scan endpoint instead of mock
- Replace UtxoCard-based ReportScreen with FindingCard-based layout
- FindingCard: collapsible card with data-driven details panel (address groups, string lists, key-value scalars)
- VulnerabilityBadge: all 14 finding types labeled, severity lowercased, critical style added
- ReportScreen: summary bar shows findings/warnings/txs analyzed; clean banner; separate warnings section
2026-02-27 02:06:31 -03:00

54 lines
2.0 KiB
HTTP

@baseUrl = http://localhost:8080
@descriptor = wpkh([a1b2c3d4/84h/0h/0h]xpub6CatWdiZynkCminahu8Gmr7FAVnQXBTSMaBxn6qmBNkdm9tDkFzWmjmDrLBCQSTa7BHgpEjCXzMTCyDsQLSmcGYJHBB7cTwpqLNRKGP47uw/0/*)#qwer1234
### Analyze wallet
# @name analyze
POST {{baseUrl}}/api/wallet/analyze
Content-Type: application/json
{
"descriptor": "{{descriptor}}"
}
> {%
client.test("status is 200", function() {
client.assert(response.status === 200, "expected 200");
});
client.test("response has analysisId", function() {
client.assert(typeof response.body.analysisId === "string", "expected analysisId string");
client.assert(response.body.analysisId.length > 0, "expected non-empty analysisId");
});
%}
### Get UTXOs
GET {{baseUrl}}/api/wallet/{{analyze.response.body.$.analysisId}}/utxos
### Scan descriptor
# @name scan
GET {{baseUrl}}/api/wallet/scan?descriptor={{descriptor}}
> {%
client.test("status is 200", function() {
client.assert(response.status === 200, "expected 200");
});
client.test("response has descriptor", function() {
client.assert(typeof response.body.descriptor === "string", "expected descriptor string");
});
client.test("summary totals are correct", function() {
client.assert(response.body.summary.total === 5, "expected 5 utxos");
client.assert(response.body.summary.clean === 1, "expected 1 clean");
client.assert(response.body.summary.vulnerable === 4, "expected 4 vulnerable");
});
client.test("utxos array has 5 items", function() {
client.assert(response.body.utxos.length === 5, "expected 5 utxos in array");
});
client.test("each utxo has required fields", function() {
response.body.utxos.forEach(function(utxo) {
client.assert(typeof utxo.txid === "string", "expected txid");
client.assert(typeof utxo.address === "string", "expected address");
client.assert(typeof utxo.amountBtc === "number", "expected amountBtc");
client.assert(Array.isArray(utxo.vulnerabilities), "expected vulnerabilities array");
});
});
%}