Technical

Put a cost on bot sign-ups in your own app or service: let your users make a PCOC, or check one when someone signs up.

Part of Service integration.

The maker creates the PCOC and keeps the key. Anyone can check the PCOC. The service decides admission.

Overview

This page is for people who want to build with PCOC or run it themselves. There are three roles.

  • A producer makes a PCOC on the maker's own device.

  • A verifier measures it against Bitcoin's public record.

  • An admission gate applies a service's policy to those measurements.

Everything is open: the specification, the SDKs, and the code for every service groundinglab runs. groundinglab hosts those services as a convenience, and you can run each one yourself.

A producer makes a PCOC. A verifier measures it. An admission gate applies a service's policy. Hosted services are optional. Producer Makes a PCOC Verifier Measures it Admission gate Policy decides Hosted services Optional Or run your own
The pieces. The hosted services are optional.

Get the code and run every test

The code is in one public repository on GitHub, groundinglab/pcoc: the specification, the SDKs, the services and the desktop app. The four SDKs are Rust, C, Go, and Java.

All four are 2.3.1. Each README names its test command.

pcoc quickstart checks the conformance pack. Paste each step into a terminal, in order, or hand this page to your coding agent.

OS
Debian 13 or Ubuntu 24.04, in a terminal. Ubuntu 24.04 should behave the same; it was not tested.
You need
Rust 1.99.0, Go 1.22 or newer, JDK 21 or newer, python3, and a full git clone (the harness reads the specification tag)
Time
About 10 minutes

Expected lines checked against tag sdk-rust-v2.3.1 on 24 Oct 2026. This page was not run as a build on that date.

1. Install the system packages

sudo apt update
sudo apt install -y build-essential git curl python3 golang-go openjdk-21-jdk-headless

2. Install Rust with rustup

The second line loads Rust into this terminal.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.99.0
. "$HOME/.cargo/env"

3. Get the code

git clone https://github.com/groundinglab/pcoc.git
cd pcoc

4. Run the Rust quickstart

This checks the conformance pack. C, Go, and Java print the same lines apart from the language name. The commands are on the SDK page.

git checkout sdk-rust-v2.3.1
cd sdk/rust
cargo run -p pcoc-cli --release --quiet -- quickstart

5. Check the result

Six lines. The second line names the SHA-256 backend on your machine. This example is reference system 3.

Expected output

pcoc 2.3.1 (rust) spec-2.3.0 pack 91ded57e5c05b7cb: pin match
kernel scalar, sha256 sha-ni
O1-S1 object sha256 800ad07a87a567c835f539617b61ccddc96a0a984425675a5ece971162dfd246
O1-S1 six_leg match, checkpoints match, waypoints match
negatives 13 non-match
PROD leg 0 legs_le_hex 88a04ac5beacb8a7

The repository's README covers each test on its own and how to verify a real PCOC from the command line. The Android app is in its own repository, groundinglab/primal-pcoc.

Services groundinglab runs

groundinglab runs these four services for convenience. None is required, and anyone can run each one from the GitHub repository. Running your own Bari needs a Bitcoin node and covers its own anchoring transactions; serving or rebuilding an index does not.

  • Bari

    The waypoint service used while making a PCOC.

    It takes the short waypoints a maker posts, each paid with a small Hashcash stamp, builds one tree per Bitcoin block, timestamps it in one Bitcoin transaction, and later returns the proof for each one.

    bari.groundinglab.io

    How Bari works. Run your own: services/bari

    Bari Ops

  • Index

    Serves Bitcoin's public block record, one entry per block height, so a verifier doesn't need its own node. Anyone can skip it and read Bitcoin directly.

    index.groundinglab.io

    Run your own. services/index

  • Verifier

    Measures any PCOC against Bitcoin's public record and returns the measurements. It doesn't decide admission.

    verify.groundinglab.io

    Run your own: any SDK's verify program, or the gate binary.

  • Admission gate

    groundinglab's sign-in gate. It runs the verifier, then applies groundinglab's published policy to accept, refuse or revoke.

    admission.groundinglab.io

    Run your own. services/admission-gate

    Gate log · How we set its policy · POLICY.md

Visitors shows open counts of who reads the site.

Specification

The specification is the core set of requirements for a PCOC: how one is made, and exactly what a verifier measures. Its conformance vectors are the exact bytes every implementation must reproduce.

Together they let any conforming producer and verifier, in any language, agree on the same PCOC. The specification defines measurements.

It doesn't set what a service accepts; that is policy. If an SDK and the specification disagree, the specification wins.

SDKs

An SDK is the component you add to your own app or service to make or check PCOCs. Rust, C, Go, and Java produce and verify, are tested against the same conformance pack, and are cross-checked against each other.

Rust, C, Go, and Java are 2.3.1. The specification tag is spec-2.3.0.

The release tags are cut. See SDKs.

Building from a specification

A practical method for AI-assisted implementation: explicit requirements, bounded tasks, meaningful checks and retained evidence. Experimental WIP; the repository kit records its limitations.

Source and reference code

For people who want more. Runnable quickstarts are the pcoc quickstart command in each SDK, described on SDKs. The services are in services/, the desktop app is in apps/desktop, and the Android app is in its own repository, groundinglab/primal-pcoc.

Each SDK's own README is the detailed reference: SDKs.

Integrate