nexart.iodocs

    Browser Verification

    Verify CERs and Project Bundles directly in the browser using the async SDK.

    Overview

    As of @nexart/ai-execution@1.2.0, the SDK provides async, browser-safe verification functions. You no longer need to write your own browser verifier.

    These functions use the Web Crypto API internally and have no Node.js dependencies.

    Public verification limitation
    When verifying via public endpoints in the browser, snapshot.input and snapshot.output are redacted.
    • Full envelope verification (Layer 3) is NOT possible from public data alone.
    • Receipt verification (Layer 2) IS possible.
    • certificateHash verification (Layer 1) IS possible against the public-safe representation.
    Full envelope verification requires the unredacted bundle (e.g. when verifying an artifact you hold locally).

    Verify a CER

    Verify a single CER in the browser
    import { verifyCerAsync } from "@nexart/ai-execution";
    
    const result = await verifyCerAsync(cerBundle);
    
    if (result.status === "VERIFIED") {
      console.log("CER is intact and verified");
    } else {
      console.log("Verification failed:", result.checks);
    }

    Verify a Project Bundle

    Verify a Project Bundle in the browser
    import { verifyProjectBundleAsync } from "@nexart/ai-execution";
    
    const result = await verifyProjectBundleAsync(projectBundle);
    
    if (result.status === "VERIFIED") {
      console.log("All steps verified, projectHash intact");
      console.log("Steps:", result.steps.length);
    } else {
      console.log("Verification failed:", result.checks);
    }

    Verify a Snapshot

    Verify a snapshot
    import { verifySnapshotAsync } from "@nexart/ai-execution";
    
    const result = await verifySnapshotAsync(snapshot);
    // Verifies snapshot hash integrity

    Environment Compatibility

    ModeEnvironmentFunctions
    SyncNode 18+verifyProjectBundle(), verifyCer()
    AsyncBrowser, Edge, Node 18+verifyProjectBundleAsync(), verifyCerAsync(), verifySnapshotAsync()

    See AI Execution SDK for the full API reference.