Skip to main content

Freehold Specification

S-PAL schema, protocol specifications, and documentation for Personal Context Infrastructure.

Overview

This repository contains the core specifications for Freehold:

  • S-PAL (Sovereign Privacy & Access Language) - Machine-readable privacy policies with cryptographic enforcement
  • Protocol definitions - Negotiation and federation protocols
  • API specifications - OpenAPI specs for Freehold components

Structure

schemas/
├── spal/
│   └── v1.0/
│       ├── schema.json       # JSON Schema for S-PAL policies
│       └── examples/         # Example policies
└── encoding/
    └── v1.0/
        └── test-vectors.json # Canonical preimage encoding test vectors

protocols/
├── negotiation.md            # S-PAL negotiation protocol
├── federation.md             # Community federation protocol
└── preimage-encoding.md      # Canonical injective, domain-separated encoding

api/
└── openapi/
    └── agent-api.yaml        # Personal Agent API spec

docs/
└── architecture.md           # High-level architecture overview

S-PAL Quick Reference

S-PAL policies define:

  • context_scope - Which data subset to access
  • identity_linkage - Ephemeral DID requirements
  • proof_requirement - Zero-knowledge proof claims
  • derivative_use - Training/aggregation permissions
  • data_retention - Cryptographic deletion timing
  • payment_protocol - x402 micropayment requirements

Canonical Preimage Encoding

Every signed or committed multi-field preimage in Freehold — S-PAL commitments, ZK public inputs, DID-signed request envelopes — uses a single injective, domain-separated encoding so that distinct field tuples can never collide to the same bytes. The rule, the domain-separator registry, the per-structure field lists, and adversarial test vectors are in protocols/preimage-encoding.md. Downstream repositories implement against it.

A dependency-free Python reference implementation lives in src/freehold_preimage: the canonical encoder, a round-trip decoder that re-derives the field tuple for every vector, and the generator that produces schemas/encoding/v1.0/test-vectors.json — so the vectors are reproducible rather than trusted. Run the conformance suite with uv run pytest; regenerate the vectors with uv run python -m freehold_preimage.generate_vectors.

License

Apache 2.0

Metadata

Release files for freehold-preimage 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for freehold-preimage 0.2.0
File Size Uploaded
freehold_preimage-0.2.0.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for freehold-preimage 0.2.0
File Interpreter ABI Platform
freehold_preimage-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.7 kB

Release files / freehold_preimage-0.2.0.tar.gz

Download URL freehold_preimage-0.2.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
02fa2deef02fe270a09327bf5c9935e341b61a549357e8864331203feee02c32
BLAKE2b-256 checksum
How to use checksums
158d001000572dcecedae670c9be52a3cf52c34e3c6d95d43538260a2d080635
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / freehold_preimage-0.2.0-py3-none-any.whl

Download URL freehold_preimage-0.2.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f0e9ee2bf9434662c2bda5adaa9923e243889c8e01a2330569dedec91aaab11
BLAKE2b-256 checksum
How to use checksums
cc751d1b881dcfe5b6b28c954e2980ee075698b2fb5f6297e41e7d84095942fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page