chenzehaoo/moon_guard/lib/verify does not have a README file

    TyposquatResult

    pub(all) struct TyposquatResult {
    suspect : String
    similar_to : String
    distance : Int
    attack_type : String
    }

    VerifyResult

    pub(all) struct VerifyResult {
    package_name : String
    is_valid : Bool
    signature_ok : Bool
    trust_status : String
    errors : Array[String]
    warnings : Array[String]
    }

    audit_package

    fn audit_package(package_name : String, _package_version : String, manifest :
    Manifest
    , entries : Array[
    FileEntry
    ], signature_hex : String, signer_key_id : String, trust_store :
    TrustStore
    ) -> VerifyResult

    Full verification pipeline that ties together manifest integrity, signature verification, and trust-store lookup into one call. Used by the moon_guard audit CLI subcommand.

    batch_typosquat_check

    fn batch_typosquat_check(packages : Array[String], known_good : Array[String]) -> Array[TyposquatResult]

    detect_typosquat

    fn detect_typosquat(package_name : String, known_packages : Array[String]) -> Array[TyposquatResult]

    detect_typosquat_strict

    fn detect_typosquat_strict(package_name : String, known_packages : Array[String]) -> Array[TyposquatResult]

    Stronger variant that also flags look-alike Unicode / ASCII substitution (1 vs l, 0 vs o, rn vs m) which classic Levenshtein misses.

    generate_demo_keypair

    Generate a fresh keypair from a 32-byte seed (64 hex chars) and emit both the public and secret halves in hex. Used by moon_guard keygen.

    signature_to_hex

    fn signature_to_hex(sig :
    Signature
    ) -> String

    Convenience helper for the CLI: hex-encode a (Signature r, s) pair without forcing callers to know the inner layout.

    typosquat_summary

    fn typosquat_summary(packages : Array[String], known_good : Array[String]) -> Array[
    TyposquatSummaryEntry
    ]

    Aggregate batch detector: per-package hit counts grouped by suspect.

    verify_package

    fn verify_package(package_name : String, signature_hex : String, public_key_hex : String, content : String) -> VerifyResult

    Default is_valid threshold: signature must verify, all file hashes must match the manifest, and the signer must be trusted.