open-index/open-npm huggingface dataset:
npm package: @guardianchain-llc/gc1-verify
Description: Offline verification tool for GC-1 evidence capsules. Works without network connectivity. Verifies Ed25519 signatures, Merkle proofs, and canonical hashes.
Author: GuardianChain LLC
Latest version: 1.0.0

# @guardianchain/gc1-verify

Offline evidence verification for GC-1 capsules. **No network required.**

Designed for air-gapped environments, SCIFs, classified networks, and any context where you need to verify evidence integrity without contacting the evidence provider.

## Install

```bash
npm install -g @guardianchain/gc1-verify
```

## CLI Usage

```bash
# Verify a complete evidence bundle
gc1-verify bundle.json

# Verify a canonical hash against blockchain calldata
gc1-verify --hash <capsuleId> <contentHash> <anchorClass> [calldataHash]

# Verify an Ed25519 certificate
gc1-verify --cert certificate.json

# Verify a Merkle inclusion proof
gc1-verify --merkle proof.json
```

## Programmatic Usage

```typescript
import {
  verifyEvidenceBundle,
  verifyCertificate,
  verifyCanonicalHash,
  computeCanonicalHash,
  verifyMerkleProof,
} from '@guardianchain/gc1-verify';

// Verify a complete evidence bundle
const result = verifyEvidenceBundle({
  capsuleId: '7c1a0b77-bd49-4c90-8bad-8e715c43912e',
  contentHash: 'a1b2c3...64chars',
  anchorClass: 'SOVEREIGN_TIER_1',
  certificate: { /* Ed25519 cert */ },
  anchors: [{ chain: 'base', txHash: '0x...', calldataHash: '...' }],
});

console.log(result.summary.verdict); // 'VERIFIED' | 'PARTIAL' | 'FAILED'
```

## What It Verifies

1. **Canonical Hash**: Recomputes `SHA-256(capsuleId + contentHash + anchorClass)` and compares against blockchain calldata
2. **Ed25519 Certificate**: Verifies the signature using the embedded public key
3. **Merkle Proof**: Verifies batch inclusion by walking the proof path to the root
4. **Cross-checks**: Certificate contentHash matches bundle contentHash

## No Dependencies

Uses only Node.js built-in `crypto` module. No GC-1-specific libraries required.

## Protocol Specification

See [GC-1 Forward Verification Protocol v1](https://guardianchain.io/gc1/docs) for the complete specification.

## License

MIT - GuardianChain, LLC
npm package: @guardianstack/guardian-js
Description: SDK to load Fraud Detection Agent via CDN and initialize it
Latest version: 0.2.7

## Guardian JS SDK (`@guardianstack/guardian-js`)

Client-side SDK to initialize the Guardian Fraud Detection Agent and create an identification event from the browser. It returns a request id you can send to your backend to fetch the full event and decide whether to pass or apply additional checks.

---

### Installation

```bash
npm install @guardianstack/guardian-js
# or
yarn add @guardianstack/guardian-js
# or
pnpm add @guardianstack/guardian-js
```

---

### Quick start (npm, ESM)

```ts
import { loadAgent } from "@guardianstack/guardian-js";

async function main() {
  // Initialize with your site key
  const api = await loadAgent({
    siteKey: "YOUR_SITE_KEY",
  });

  // Create an identification event and get its request id
  const response = await api.get();
  const body = response && (await response.json());
  const requestId = body?.requestId;

  // Send requestId to your backend to retrieve the full event
  // and decide whether to pass or perform additional checks
}

main();
```

- Backend SDK: fetch the event by `requestId` and implement your decisioning with the server SDK: [Guardian JS Server SDK on npm](https://www.npmjs.com/package/@guardianstack/guardianjs-server)

---

### API (client)

- `loadAgent({ siteKey: string, debug?: boolean, collectionTimeoutMs?: number, onError?: (error: Error) => void }) => Promise<Agent>`
  - Initializes the browser Agent. `collectionTimeoutMs` limits how long the agent waits to collect signals before rejecting; `onError` is called on errors (including timeouts).
- `Agent.get() => Promise<Response | undefined>`
  - Creates an identification event and returns a response containing a `requestId`. Send this `requestId` to your backend to fetch the event and decide whether to pass or add additional checks.

---

### License

MIT © Mugshot Labs