Skip to main content

AlgoVoi Payment Evidence Frame (PEF), the signed-transport layer over the Keystone. Wraps and pins a keystone reference so the frame_id commits to it; chains frames into one trust_query_ref-capped audit chain. Open, content-addressed, unsigned (signing is the commercial tier). Runs on any algovoi-substrate version (v0/v1); uses only JCS RFC 8785 canonicalisation.

Project description

algovoi-pef-keystone

Payment Evidence Frame (PEF), the signed-transport layer over the AlgoVoi Keystone.

A PEF frame wraps a keystone reference (or any lifecycle receipt) and pins it, so the frame's content-addressed frame_id commits to the exact keystone position it carries. Frames link into an audit chain, each row's prev_hash is the prior row's hash, capped by one trust_query_ref. PEF is the envelope and delivery layer, not a new link in the keystone chain.

This is the open edition: content-addressed and unsigned. The frame is byte-identical to the published pef_v1 / pef_keystone_v1 conformance construction. It runs unchanged on any algovoi-substrate version (v0 and v1), using only JCS (RFC 8785) canonicalisation.

receipt_hash = "sha256:" + SHA-256(JCS(receipt))     # pins the wrapped payload
frame_id     = "sha256:" + SHA-256(JCS(preimage))    # commits to the whole frame

Install

pip install algovoi-pef-keystone

Use

from algovoi_pef_keystone import evidence_frame, audit_chain_of_frames, verify_frame

# wrap a keystone fact (e.g. an execution_binding record) in a signed-transport frame
frame = evidence_frame(
    claim_type="payment_execution",
    receipt_format="execution-binding-v1",
    receipt={"binding_ref": "sha256:...", "canon_version": "urn:x402:canonicalisation:jcs-rfc8785-v1",
             "execution_ref": "sha256:...", "retention_chain_ref": "sha256:...", "settlement_ref": "sha256:..."},
    frame_provider_did="did:web:api.algovoi.co.uk",
    frame_timestamp_ms=1748534600000,
)
frame["frame_id"]        # commits to the exact keystone position carried
verify_frame(frame)      # True

# chain the whole lifecycle (execution -> settlement -> refund) and cap it with one verdict
chain = audit_chain_of_frames([f1_id, f2_id, f3_id], "TRUSTED")
chain["cap"]             # one trust_query_ref over the ordered frames

evidence_frame produces the byte-identical pef_v1 preimage, so frame_id matches the published conformance value for the same inputs. The keystone references themselves come from algovoi-execution-ref (bind_keystone, execution_binding); this package is the transport around them.

Verify it yourself

Offline, from the public conformance corpus, no package import:

git clone https://github.com/chopmob-cloud/algovoi-jcs-conformance-vectors
python composition/pef_keystone_v1/verify_pef_keystone.py             # frame wraps + pins a keystone fact
python composition/audit_chain_of_frames_v1/verify_audit_chain_of_frames.py  # lifecycle as chained frames, capped

TypeScript twin: @algovoi/pef-keystone, byte-identical output.

Licensing

Apache-2.0. Frames are content addressed, no signature. The commercial tier adds the cryptographic signature (hybrid Falcon-1024 + ML-DSA-65) and Compliance Command Center ingest over the same frame.

Pinned edition for adopters, with a free key. Pin algovoi-pef-keystone==0.1.0, anchor a pef_keystone_v1 (or audit_chain_of_frames_v1) vector hash, and keep the NOTICE; that four check gate earns a free v0 licence key for algovoi-mandate-auditor (email chopmob@gmail.com with your import-by-hash evidence and the NOTICE).

Python and TypeScript produce identical bytes on the same input. Redistribution must retain the NOTICE and the Apache-2.0 LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

algovoi_pef_keystone-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

algovoi_pef_keystone-0.1.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file algovoi_pef_keystone-0.1.0.tar.gz.

File metadata

  • Download URL: algovoi_pef_keystone-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for algovoi_pef_keystone-0.1.0.tar.gz
Algorithm Hash digest
SHA256 91086d64cf7e715155a421e82a32a8d089d9b880aff411b3cf6e01cae3b7f67a
MD5 16ca59e90a646b86471eeebf1be58bfc
BLAKE2b-256 48f7b99c705d927106c421117fa82a9970eadbff66575974d921425b4a561bca

See more details on using hashes here.

File details

Details for the file algovoi_pef_keystone-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for algovoi_pef_keystone-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26f8d0180f3e6dca2e5ce46b6e469072e5d7f5a013c74c9a372baef4917afcb4
MD5 3ff2384aa9ecb5be3cd07cea11d2abd9
BLAKE2b-256 dc43174b76ea17b3a0a049e6e17cf14eda4fa13ec97059ca695867a77e02e926

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page