"""Classify invented JSON shapes. No file input, secrets or network requests.
This is an educational clue finder, not a wallet validator.
"""
samples = {
    "presale-shaped": {"encseed": "NOT-REAL", "ethaddr": "NOT-AN-ADDRESS"},
    "v3-shaped": {"version": 3, "crypto": {"cipher": "aes-128-ctr", "kdf": "scrypt"}},
    "validator-shaped": {"version": 4, "crypto": {"kdf": {}, "checksum": {}, "cipher": {}}},
    "unknown": {"notes": "A filename alone does not identify a wallet"},
}
def clue(d):
    c = d.get("crypto", d.get("Crypto", {}))
    if "encseed" in d and "ethaddr" in d:
        return "presale-like fields; inspect origin"
    if d.get("version") == 3 and isinstance(c, dict) and "cipher" in c and "kdf" in c:
        return "V3-like fields; incomplete evidence"
    if d.get("version") == 4 and isinstance(c, dict) and all(k in c for k in ("kdf", "checksum", "cipher")):
        return "validator-like fields; incomplete evidence"
    return "unknown; preserve and investigate"
for name, sample in samples.items():
    print(name + ": " + clue(sample))
assert clue(samples["unknown"]).startswith("unknown")
