Skip to main content

algovoi-delegation-ref

Content-addressed delegation references for the AlgoVoi substrate. An agent delegates authority to another agent for a scope and a validity window; the delegation_ref is the content hash of that delegation envelope, so any tamper (widening the scope, extending the expiry, swapping the delegate) changes the ref and is detectable offline. Delegations chain (A→B→C) via prev_delegation_ref, giving a tamper-evident delegation chain.

This is the inverse of an opaque delegation token (an arbitrary label that does not change when the delegation's content is altered). Additive over the frozen substrate (Apache-2.0); no new cryptography:

delegation_ref = "sha256:" + SHA-256(JCS(RFC 8785)({
    delegate_id, delegator_id, not_after_ms, not_before_ms,
    prev_delegation_ref, scope }))

with integer-millisecond validity bounds.

Install

pip install algovoi-delegation-ref

Use

from algovoi_delegation_ref import delegation_ref, tamper_detected, verify_chain

root = {
    "delegator_id": "did:web:org.example",
    "delegate_id":  "did:web:agent-1.example",
    "scope":        "payments:usdc:<=100",
    "not_before_ms": 1716494400000,
    "not_after_ms":  1716498000000,
    "prev_delegation_ref": "",
}
ref = delegation_ref(root)
tamper_detected(ref, root)                              # False (matches)
tamper_detected(ref, {**root, "scope": "payments:usdc:*"})   # True (scope widened)

# chain a sub-delegation and verify integrity end to end
sub = {**root, "delegator_id": "did:web:agent-1.example",
       "delegate_id": "did:web:agent-2.example",
       "scope": "payments:usdc:<=50", "prev_delegation_ref": ref}
verify_chain([root, sub])    # -> [root_ref, sub_ref]; raises on a broken link

Envelope key order does not matter (JCS absorbs it). A non-integer validity bound (e.g. an RFC-3339 string) is rejected, not hashed.

Conformance

conformance/delegation_ref_v1/: 3 positives (root, reordered-key, chain link), 5 negatives (scope / expiry / delegate / chain-link tamper, plus a rejected malformed bound), and two invariants (key-order, chain integrity). The verifier imports only the standard library plus rfc8785 (no algovoi import):

pip install rfc8785
python conformance/delegation_ref_v1/verify.py

Adopters

Build on algovoi-delegation-ref, pin ==0.1.0, anchor a canonical vector hash, and keep the NOTICE, and you qualify for a free v0 licence key for algovoi-mandate-auditor. The gate is scripts/check_v0_adoption.py (dependency + canonical hash anchor + NOTICE + version pin → ISSUE_V0_KEY). Apply: email chopmob@gmail.com.

License

Apache-2.0. Copyright 2026 AlgoVoi. Preserve the NOTICE in any distribution.

Metadata

Release files for algovoi-delegation-ref 0.5.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 algovoi-delegation-ref 0.5.0
File Size Uploaded Provenance Actions
algovoi_delegation_ref-0.5.0.tar.gz 9.0 kB Without provenance Details for algovoi_delegation_ref-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for algovoi-delegation-ref 0.5.0
File Interpreter ABI Platform Actions
algovoi_delegation_ref-0.5.0-py3-none-any.whl Python 3 none any Details for algovoi_delegation_ref-0.5.0-py3-none-any.whl

Total release size: 19.8 kB

Release files / algovoi_delegation_ref-0.5.0.tar.gz

Download URL algovoi_delegation_ref-0.5.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bf431a11f94d91f928d25140e8d1818ad5392518ec355c730b0960d0645dcd59
BLAKE2b-256 checksum
How to use checksums
509973a76cace63cc585da066d7817b84ad47f931cf2589733826a67d2914482
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / algovoi_delegation_ref-0.5.0-py3-none-any.whl

Download URL algovoi_delegation_ref-0.5.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a021fe6c437cbace1b0c048a0dd64bb9b388caf61eea7eb17e4c58cf4e9c24a
BLAKE2b-256 checksum
How to use checksums
2f24f2727c33de79eb82fc05c110fda80c0c91cf0af8dd46fc5f7bb749feacbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for algovoi-delegation-ref 0.5.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.5.0 This release

2 release files No 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