Skip to main content

Carry an AlgoVoi keystone decision into an AutoGen conversation: a recomputable execution_ref under algovoi.keystone.*, verifiable offline

Project description

algovoi-keystone-autogen

Carry an AlgoVoi keystone decision into an AutoGen conversation. The decision's content-addressed execution_ref rides on a message's metadata under algovoi.keystone.* (never inside an AutoGen reserved field), so anyone reading the conversation recomputes it offline with only JCS (RFC 8785) and SHA-256 and confirms the action is consistent with the decision that authorized it.

from algovoi_keystone_autogen import stamp_message, verify_trace_execution_ref

stamp_message(
    message,
    decision_ref="sha256:2a444c62...", action_type="payment", scope="bilateral",
    outcome="COMMITTED", executed_at_ms=1716460800000,
)
verify_trace_execution_ref(message.metadata)   # True iff execution_ref recomputes

keystone_message_metadata(...) returns the dict if you prefer to merge it yourself. The package never imports AutoGen (it stamps any object with a metadata dict, or a dict message), so there is no version coupling. Apache-2.0.

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_keystone_autogen-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

algovoi_keystone_autogen-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for algovoi_keystone_autogen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 20ad20ece78c115f3ba52fee29a6ef191e7a71b12c8e810a1b8b400893ffced4
MD5 bd8644fed311b5af34d30aed64cc67c9
BLAKE2b-256 070a80b6eaf6a4ae3e2803bb0681a29f1519df8d088b98ac69041c51b4d2519b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_autogen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2728a6c911efc6d7045df8b24109e031a9e6779b801f368f7eb92b9de8c2f13
MD5 731e3a156035fa5a16ce4a346c0a8bb6
BLAKE2b-256 c361110ba4829629b7a92f00042245324a319628bf32e3ddaecdf4d8710d13a4

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