# Programmable privacy infrastructure.

One API for agents to submit encrypted actions - bids, offers, votes, intents - revealed only when your conditions are met, with proof for every reveal. One primitive behind sealed auctions, token platforms, private voting and encrypted mempools - plus a zero-knowledge ledger for private payments.

## What Peal is

Peal is programmable privacy infrastructure. Bids, offers, votes, commitments and agent intents arrive encrypted and remain unreadable until a predefined condition is met. When that moment arrives, the entire set is revealed together. The primitive underneath every one of those is batched threshold encryption (BTE): a payload is encrypted on the client to a committee, and only a threshold of its operators, acting after the condition fires, can open the batch.

> Most products with a submission deadline have a hidden trust problem: the operator can see what participants submit before everyone else. They can promise not to look, but participants have no way to verify that promise.

This information asymmetry enables front running, selective disclosure and unfair price discovery. Traditional commit and reveal systems only move the problem: participants must return to reveal, allowing losing bidders to disappear strategically. Peal makes disclosure automatic and coordinated, without giving any single participant or operator early access.

## What is actually hard about it

The encryption was never the hard part. It is that somebody has to hold the key until the deadline, and whoever holds it can peek, leak, or quietly decline to open it when the answer does not suit them.

Peal removes that person. No single party can open a batch early, and nobody has to come back to reveal, because the network does it on its own when the moment arrives.

## Get started in 5 minutes

A payload is encrypted on your side before it is sent, so every path runs the client, `peal.js`: one file from this domain. No package, no API key, no account. Each snippet opens a round 30 seconds out, seals to it, and reads it back once it opens.

### Browser

```
<script type="module">
  import { peal } from 'https://peal.network/peal.js';

  const { id } = await peal.createRound({ opensIn: 30, tag: 'my-app' });
  await peal.seal('my sealed bid: 120', id);   // encrypted here, before it is sent

  await peal.waitForOpen(id);                  // about 30 seconds
  const [payload] = await peal.getPayloads(id);
  console.log(new TextDecoder().decode(payload));
</script>
```

### Node 20+

Node cannot import from a URL, so download the file once, then import it locally.

```
curl -fsSL -o peal.js https://peal.network/peal.js
```

```
// seal.mjs, run with: node seal.mjs
import { peal } from './peal.js';

const { id } = await peal.createRound({ opensIn: 30, tag: 'my-app' });
await peal.seal('my sealed bid: 120', id);

await peal.waitForOpen(id);
const [payload] = await peal.getPayloads(id);
console.log(new TextDecoder().decode(payload));
```

### Coding agents

```
curl -fsSL https://peal.network/skill/install.sh | sh
```

For Claude Code: installs ten markdown files into `.claude/skills/peal/`, the skill plus references for sealing and revealing, auctions, time, errors, verification, payments, UI and Private Links. Ask for what you want in your own words; the agent integrates, runs the check below and reports success only when it passes. Cursor, Codex and other agents read the same files by hand: [how to set them up](https://peal.network/developers/agents).

### Confirm it works

```
curl -fsSL https://peal.network/skill/verify.sh | sh
```

Opens a real auction on the live testnet, bids, waits for it to open and checks the result. About a minute; it prints `PASS` and exits 0 when every check holds. Needs Node 20 or newer.

Options are camelCase (`opensIn`) and the HTTP body is snake\_case (`opens_in`); the wrong one throws. `getPayloads` returns nothing before the round opens, which is why `waitForOpen` comes first. To see the raw HTTP calls, run the [quickstart](https://peal.network/developers/quickstart) in the page.

## Where to go next

-   [Quickstart](https://peal.network/developers/quickstart) runs the three calls against the live network from the page, so you can see it work before writing anything.
-   [How it works](https://peal.network/developers/howitworks) is the mechanism: what the cue is, where the encryption happens, and what you can check afterwards.
-   [Peal compared](https://peal.network/developers/compare) sets it against commit-reveal, timelock encryption, drand tlock and trusted enclaves, and says when to choose which.
-   [Sealed bid auctions](https://peal.network/developers/auctions) is the thing most people build first, and it is a few calls rather than a project.
-   [API reference](https://peal.network/developers/api) has every endpoint, the error codes and the rate limits.
-   [Peal Private Links](https://peal.network/developers/links) is the other engine: private payments on a zero-knowledge ledger, with an [API](https://peal.network/developers/links-api) of its own.

---
Source: https://peal.network/developers
