Metadata-Version: 2.5
Name: langchain-popcorn
Version: 0.1.0
Summary: LangChain tools for POPCORN, the witness service at 767-2676.com run by Violet Herod (Briarwood). Free receipt verification tools, plus paid signed time and witness tools behind an explicit opt-in flag.
Project-URL: Homepage, https://767-2676.com/
Project-URL: Documentation, https://767-2676.com/
Project-URL: Repository, https://github.com/violetclaire/popcorn-temporal-anchor
Author-email: Violet Herod <violet@briarwood.ai>
License: LicenseRef-POPCORN-Read-and-Use-Terms
License-File: LICENSE
Keywords: langchain,mcp,popcorn,receipt,timestamp,witness,x402
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: langchain-core>=0.3.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: requests>=2.31.0
Provides-Extra: test
Requires-Dist: pytest>=8.0.0; extra == 'test'
Description-Content-Type: text/markdown

# langchain-popcorn

LangChain tools for POPCORN, the witness service at
[767-2676.com](https://767-2676.com/), run by Violet Herod (Briarwood).

POPCORN stands outside the parties to a deal and signs what it saw, at
the time it saw it. A POPCORN receipt witnesses only that the node
received a fingerprint within a stated interval. It does not witness
agreement, authorship, competence, completion, fairness, or payment.
A receipt is evidence, not permission. Verification depends on
accepting the node's key and clock.

## Install

```bash
pip install langchain-popcorn
```

This package is not on PyPI yet. Until it is, install it from this
folder:

```bash
pip install .
```

## Use

```python
from langchain_popcorn import get_tools

tools = get_tools()
```

That returns the five free tools. They call the POPCORN MCP endpoint at
`https://767-2676.com/mcp` (Streamable HTTP, POST JSON-RPC 2.0).

| Tool | Cost | What it does |
| --- | --- | --- |
| `popcorn_sample` | Free | Checks the published October 14, 2026 sample receipt and a changed-digest control. |
| `popcorn_catalog` | Free | Reads the live catalog, the offer, and the published verification keys. |
| `popcorn_hash` | Free | Hashes public bytes on the server. Hash private work locally instead; submitted text reaches the server. |
| `popcorn_verify` | Free | Verifies a time or witness receipt against a caller-trusted JWKS and expected values. |
| `popcorn_verify_v2` | Free | Verifies leTAIN TAIN 2.0 evidence against the keys published by the issuer. |

## Paid tools

Two tools cost money:

| Tool | Cost | What it does |
| --- | --- | --- |
| `popcorn_time` | $0.001 | Buys a fresh signed time anchor. |
| `popcorn_witness` | $0.001 | Buys a fresh witness receipt for a payload digest. |

$0.001 is a tenth of a penny. Payment is in USDC on Base through x402.

Paid tools are off by default. They are returned only when you ask for
them, and each one checks the flag again before it calls:

```python
tools = get_tools(allow_paid_tools=True)
```

Calling a paid tool while the flag is off raises
`PopcornPaidToolDisabledError` with the price and the condition stated
in the error. Turning the flag on is the caller's statement that the
owner has authorized the payment. Paying also needs an x402-capable
wallet on the calling side. This package never pays on its own.

## What a receipt proves, and what it does not

A verified receipt proves that the holder of the published key signed
that fingerprint and that stated time interval, and that the bytes
were not changed after signing. It does not prove the claim inside the
bytes was checked by the witness, and it does not prove delivery,
completion, or agreement. Verification is free and can be done offline
against the published keys at
`https://767-2676.com/.well-known/popcorn-keys.json`.

## License

POPCORN Read-and-Use Terms v1.2
(`LicenseRef-POPCORN-Read-and-Use-Terms`). Copyright 2026 Violet Herod.
The code is open to see and to use under those terms. It is not MIT.
