Public API, badges, receipt format, audit spec.
Public API
All public routes are read-only, need no key, and return JSON errors that never echo internals. Base: https://api.byteguard.io
GET /scan/:addressScan a token mint or programIn: Solana address
Out: address, kind, tokenProgram, slot, verdict, flags[], scannedAt
30/min per IP · cached 30 sOut: address, kind, tokenProgram, slot, verdict, flags[], scannedAt
GET /scan/:address/badge.svgScanner badgeIn: Solana address
Out: SVG of the verdict
30/min · cached 5 minOut: SVG of the verdict
GET /audit/repo/:owner/:repoRepository audit historyIn: owner, repo
Out: audits[] (id, commit, path, spec, status, verdict, finishedAt), newest first, max 100
60/min per IP · cached 30 sOut: audits[] (id, commit, path, spec, status, verdict, finishedAt), newest first, max 100
GET /audit/:owner/:repo/badge.svgAudit badgeIn: owner, repo
Out: SVG: critical / issues found / clean / incomplete + short commit, or not audited
60/min · cached 5 minOut: SVG: critical / issues found / clean / incomplete + short commit, or not audited
GET /receipts/:idFetch a receiptIn: receipt id
Out: v, id, status, keys, spec, files, entries[], head
60/min · cached 30 sOut: v, id, status, keys, spec, files, entries[], head
GET /log/sthLatest signed log snapshotIn: —
Out: payload, key_id, sig
60/min · cached 60 sOut: payload, key_id, sig
GET /log/pubkeyLog public keysIn: —
Out: keys[] (key_id, public_key, lms_type, ots_type, created_at, retired_at)
60/min · cached 5 minOut: keys[] (key_id, public_key, lms_type, ots_type, created_at, retired_at)
GET /healthHealthIn: —
Out: ok, service, db, worker (up / stale / none)
noneOut: ok, service, db, worker (up / stale / none)
Audit badge
byteguard auditclean · 85c5293[](https://app.byteguard.io/audit/OWNER/REPO)
<a href="https://app.byteguard.io/audit/OWNER/REPO"><img src="https://api.byteguard.io/audit/OWNER/REPO/badge.svg" alt="ByteGuard audit"></a>
Scanner badge
byteguard scancaution[](https://app.byteguard.io/scan/MINT)
Badges are cached 5 minutes. A badge links to its proof; it is not proof itself. A receipt proves the audit ran as stated. It does not prove the code is safe.
Receipt format
Fields: v, id, status, keys, spec, files[], entries[] (output + inclusion proof), head. Checkable offline.
- 1Receipt key. matches the key pinned in this app.
- 2Entry signatures. every log entry is validly signed.
- 3One-time keys used once. no LM-OTS key was reused.
- 4Entry order. the commit entry precedes any model call.
- 5Audit spec. the spec hash matches.
- 6Source files. the count and total bytes match.
- 7Seed. derived from the Solana block at the target slot.
- 8Model output. matches its hashes.
- 9Verdict. recomputed from the recorded output.
- 10Signed tree head. the head signature verifies.
- 11Log inclusion. the entries are in the signed tree.
- 12Solana block. the block hash matches the public chain.
Audit spec
What the audit looks for:
Signer and owner checksAccount type confusionPDA seeds and bumpsArithmeticUnchecked CPI targetsClosed-account reuseToken mint and ownerToken-2022 trapsDuplicate mutable accountsUnchecked accountsAuthority and upgradeOracle staleness
Verdict rules. Critical: any critical finding. Issues found: any high finding and no critical. Clean: only medium, low or info findings, or none. Incomplete: the model's answer failed twice.
Input limits. Public GitHub repositories; Anchor or native Rust; only .rs, Cargo.toml and Anchor.toml are read; about 400 KB of source at most.
Future
Gate proxy setup (pip index, npm registry)Planned (Phase 6)
CI integration and merge gatePlanned (Phase 6)
Leash agent APIPlanned (Phase 7)
Running a conforming nodePlanned (Phase 4)