Developers

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 program
In: Solana address
Out: address, kind, tokenProgram, slot, verdict, flags[], scannedAt
30/min per IP · cached 30 s
GET /scan/:address/badge.svgScanner badge
In: Solana address
Out: SVG of the verdict
30/min · cached 5 min
GET /audit/repo/:owner/:repoRepository audit history
In: owner, repo
Out: audits[] (id, commit, path, spec, status, verdict, finishedAt), newest first, max 100
60/min per IP · cached 30 s
GET /audit/:owner/:repo/badge.svgAudit badge
In: owner, repo
Out: SVG: critical / issues found / clean / incomplete + short commit, or not audited
60/min · cached 5 min
GET /receipts/:idFetch a receipt
In: receipt id
Out: v, id, status, keys, spec, files, entries[], head
60/min · cached 30 s
GET /log/sthLatest signed log snapshot
In: —
Out: payload, key_id, sig
60/min · cached 60 s
GET /log/pubkeyLog public keys
In: —
Out: keys[] (key_id, public_key, lms_type, ots_type, created_at, retired_at)
60/min · cached 5 min
GET /healthHealth
In: —
Out: ok, service, db, worker (up / stale / none)
none

Audit badge

byteguard auditclean · 85c5293
[![ByteGuard audit](https://api.byteguard.io/audit/OWNER/REPO/badge.svg)](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
[![ByteGuard scan](https://api.byteguard.io/scan/MINT/badge.svg)](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.

  1. 1Receipt key. matches the key pinned in this app.
  2. 2Entry signatures. every log entry is validly signed.
  3. 3One-time keys used once. no LM-OTS key was reused.
  4. 4Entry order. the commit entry precedes any model call.
  5. 5Audit spec. the spec hash matches.
  6. 6Source files. the count and total bytes match.
  7. 7Seed. derived from the Solana block at the target slot.
  8. 8Model output. matches its hashes.
  9. 9Verdict. recomputed from the recorded output.
  10. 10Signed tree head. the head signature verifies.
  11. 11Log inclusion. the entries are in the signed tree.
  12. 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)
Docs · ByteGuard