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, DID authorization records — 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.3.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.3.0
File Size Uploaded Provenance Actions
freehold_preimage-0.3.0.tar.gz 12.8 kB With provenance Details for freehold_preimage-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 27.5 kB

Release files / freehold_preimage-0.3.0.tar.gz

Download URL freehold_preimage-0.3.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8bf2e60ceb8eb7b141fc4dcfc77266b0245d521a8fca38b0eebab97ff42a0307
BLAKE2b-256 checksum
How to use checksums
5825daa9c9a1ddddc40196a89a75879e19ddcd4e3f6f08c79d08b3f4f712064a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

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

Download URL freehold_preimage-0.3.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fc855da52e4cbe3dc163f8c81a1e34b24be7323fd269aa93b42b6fe064561dd
BLAKE2b-256 checksum
How to use checksums
b80a5b46121cf6d93facd495154032c8277e0c5ebf0844ee29f3e6c805b0894e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Security for freehold-preimage 0.3.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for freehold_preimage-0.3.0.tar.gz

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 Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

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