SDK
A read-only scan API and a live grade badge. No key needed.
TypeScript SDK
Scan client, badge helpers, vault instruction builders and XMSS key tools. MIT licensed.
install
npm install github:josefalberic/hashguard-sdkTry it
JavaScript
const r = await fetch("/api/scan?address=JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4");
const report = await r.json();
console.log(report.grade, report.score, report.exposed.length);GET /api/scan?address=<base58>
Returns JSON. Amounts are strings of base units unless the name ends in Ui or Usd.
| Field | Type | Meaning |
|---|---|---|
| address | string | The address you asked about. |
| kind | string | wallet, program, mint, vault, pda or empty. |
| score | number | 0 to 100. Higher is safer. |
| grade | string | A to F, from the score. |
| summary | string | One plain sentence. |
| atRiskUsd | number | Dollar value one exposed key controls. |
| exposed[] | object | id, severity, title, detail, items[], fix? |
| safe[] | object | title, detail. Titles that start with “Not checked” are unknown. |
| holdings | object | Wallets only. sol in lamports, solUsd, tokens[] (max 50). |
Errors: 400 not an address, 502 the Solana RPC did not answer. Both send { "error": "…" }.
GET /api/badge/<address>
Returns an SVG, Hashguard · PQ grade X, in the grade color. It always answers 200: a bad address says invalid and an RPC error says unavailable. Wrap it in a link to the report yourself.
Badge embed
HTML
<a href="/scan/JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4">
<img src="/api/badge/JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4" alt="Hashguard PQ grade" height="22">
</a>Markdown
[](/scan/JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4)Honest limits
- Mainnet only. The scan reads chain state and never asks for a signature.
- Each check waits at most 6 seconds. A slow or failed check shows as “Not checked”, not as safe.
- USD values come from Helius prices. A token with no price has no usd field.
- The badge is cached for 10 minutes, so a fix can take that long to show.
- There is no API key and no promised rate limit yet. Cache results on your side.
- The grade measures exposure to a future quantum computer. It is not an audit of the code.
The vault routes are devnet only and are not part of the public SDK yet.