# zerosync_verifier

> Zerosync verifier allows to verify ZeroSync‘s latest header chain STARK proofs in your node project. The proof validates the Bitcoin consensus for the header chain and provides the latest header chain state. To Instantly verify Bitcoin's header chain in y

Latest version **0.1.0** (published 2023-10-20) · 0 weekly downloads

## Install

```sh
npm install zerosync_verifier
pnpm add zerosync_verifier
yarn add zerosync_verifier
bun add zerosync_verifier
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-10-20 |
| First published | 2023-10-20 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | abims |

## Links

- npm: https://www.npmjs.com/package/zerosync_verifier
- npm.io page: https://npm.io/package/zerosync_verifier

## Recent versions

- 0.1.0 (latest) — 2023-10-20

## README

# zerosync__verifier
Zerosync verifier allows to verify ZeroSync‘s latest header chain STARK proofs in your node project. The proof validates the Bitcoin consensus for the header chain and provides the latest header chain state.
To Instantly verify Bitcoin's header chain in your browser,check out our [demo here](https://https://zerosync.org/demo/) 

## Installation
#### NPM
```sh
npm i zerosync_header_chain_verifier
```
OR 
#### YARN
```sh
yarn add zerosync_header_chain_verifier
```

## Quick Start
Here's a simple example to get you started:


```sh
import pkg from "zerosync_verifier";
const { verify } = pkg;
import fetch from "node-fetch";

async function main() {

    // The public input and proof are extracted from the latest data
  const publicInputUrl = "https://zerosync.org/demo/proofs/latest/air-public-input.json";
  const proofUrl =  "https://zerosync.org/demo/proofs/latest/aggregated_proof.bin";

  const publicInputResponse = await fetch(publicInputUrl);
  const publicInputBytes = new Uint8Array(
    await publicInputResponse.arrayBuffer()
  );

  const proofResponse = await fetch(proofUrl);
  const proofBytes = new Uint8Array(await proofResponse.arrayBuffer());

  //  Verifies the proof  and returns the result
  const result = verify(publicInputBytes, proofBytes);
  console.log(result);

}
main();
```

## Dependencies
The verifier package leverages in the following dependencies
- Ministark: GPU accelerated STARK prover and verifier
- Sandstorm: Cairo prover powered by miniSTARK

---
_Source: https://npm.io/package/zerosync_verifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
