open-index/open-npm huggingface dataset:
npm package: @hackshield/verify
Description: Hackathon Integrity Infrastructure — hash files, record on-chain, verify proof of prior art
Author: HackShield
Latest version: 1.0.0

# @hackshield/verify

Hackathon Integrity SDK — hash files, record on-chain, verify proof of prior art.

## Install

```bash
npm install @hackshield/verify
```

## Quick Start

```javascript
const { hashFile, record, verify } = require('@hackshield/verify');

// 1. Hash your file
const hash = await hashFile('pitch-deck.pdf');
console.log(hash); // e3b0c44298fc1c149afbf4c8996fb924...

// 2. Record on-chain (Polygon, ~$0.01)
const tx = await record(hash, 'Pitch deck v1 — HackathonX 2026', {
  rpcUrl: 'https://polygon-rpc.com',
  privateKey: process.env.PRIVATE_KEY,
  vaultAddress: '0x...',
});
console.log('Recorded:', tx.txHash);

// 3. Verify later
const proof = await verify(hash, {
  rpcUrl: 'https://polygon-rpc.com',
  vaultAddress: '0x...',
});
console.log(proof.exists);     // true
console.log(proof.timestamp);  // 1711843200
console.log(proof.recorder);   // 0x...your wallet
```

## API

### `hashFile(filePath)` → `Promise<string>`
SHA256 hash of a file. Returns 64-char hex string.

### `hashString(content)` → `string`
SHA256 hash of a string.

### `hashBuffer(buffer)` → `string`
SHA256 hash of a Buffer.

### `record(hash, description, options)` → `Promise<{txHash, blockNumber}>`
Record hash on-chain via EvidenceVault contract.

### `verify(hash, options)` → `Promise<{exists, timestamp, recorder, description}>`
Check if hash exists on-chain. Returns recorder address and timestamp.

### `totalRecords(options)` → `Promise<number>`
Total number of recorded hashes in the vault.

## Supported Chains

Any EVM-compatible chain. Recommended for low gas:
- Polygon (~$0.01 per record)
- Base (~$0.005 per record)
- Arbitrum (~$0.01 per record)

## License

CC-BY-4.0